F EDERATED L EARNING ’ S B LESSING : F ED A VG HAS L INEAR S PEEDUP
Anonymous authors
Paper under double-blind review
A BSTRACT
Federated learning (FL) learns a model jointly from a set of participating devices without sharing each other’s privately held data.
The characteristics of non-
i i d. data across the network, low device participation, high communication costs and the mandate that data remain private bring challenges in understanding the convergence of FL algorithms, particularly in regards to how convergence scales with the number of participating devices.
In this paper, we focus on Federated Averaging (FedAvg)–arguably the most popular and effective FL algorithm class in use today–and provide a uniﬁed and comprehensive study of its convergence rate.
Although FedAvg has recently been studied by an emerging line of literature, it remains open as to how FedAvg’s convergence scales with the number of participating devices in the fully heterogeneous FL setting–a crucial question whose answer would shed light on the performance of FedAvg in large FL systems.
We ﬁll this gap by providing a uniﬁed analysis that establishes convergence guarantees for FedAvg under three classes of problems: strongly convex smooth, convex smooth, and overparameterized strongly convex smooth problems.
We show that FedAvg enjoys linear speedup in each case, although with different convergence rates and communication efﬁciencies.
While there have been linear speedup results from distributed optimization that assumes full participation, ours are the ﬁrst to establish linear speedup for FedAvg under both statistical and system heterogeneity.
For strongly convex and convex problems, we also characterize the corresponding convergence rates for the Nesterov accelerated FedAvg algorithm, which are the ﬁrst linear speedup guarantees for momentum variants of FedAvg in the convex setting.
To provably accelerate FedAvg, we design a new momentum-based FL algorithm that further improves the convergence rate in overparameterized linear regression problems.
Empirical studies of the algorithms in various settings have supported our theoretical results.
I NTRODUCTION
Federated learning (FL) is a machine learning paradigm where many clients (e.g., mobile devices or organizations) collaboratively train a model under the orchestration of a central server (e.g., service provider), while keeping the training data decentralized (Smith et al.
; Kairouz et al.
In recent years, FL has swiftly emerged as an important learning paradigm (McMahan et al.
(2017); Li et al.
(2020a))–one that enjoys widespread success in applications such as personalized recommendation (Chen et al.
(2018)), virtual assistant (Lam et al.
and keyboard prediction (Hard et al.
(2018)), to name a few–for at least three reasons: First, the rapid proliferation of smart devices that are equipped with both computing power and data-capturing capabilities provided the infrastructure core for FL.
Second, the rising awareness of privacy and the explosive growth of computational power in mobile devices have made it increasingly attractive to push the computation to the edge.
Third, the empirical success of communication-efﬁcient FL algorithms has enabled increasingly larger-scale parallel computing and learning with less communication overhead.
Despite its promise and broad applicability in our current era, the potential value FL delivers is coupled with the unique challenges it brings forth.
In particular, when FL learns a single statistical model using data from across all the devices while keeping each individual device’s data isolated (Kairouz et al.
, it faces two challenges that are absent in centralized optimization and distributed (stochastic) optimization (Zhou & Cong (2018);
Stich (2019); Khaled et al.
Liang et al.
; Wang & Joshi (2018); Woodworth et al.
; Wang et al.
; Jiang & Agrawal (2018); Yu et al.
(2019b;a); Khaled et al.
(2020); Koloskova et al.
Woodworth et al.
(2020b;a)): 1) Data (statistical) heterogeneity: data distributions in devices are different (and data cannot be shared);
[Table]
2) System heterogeneity: only a subset of devices may access the central server at each time both because the communications bandwidth proﬁles vary across devices and because there is no central server that has control over when a device is active (the presence of “stragglers”).
To address these challenges
Federated Averaging (FedAvg) McMahan et al.
(2017) was proposed as a particularly effective heuristic, which has enjoyed great empirical success.
This success has since motivated a growing line of research efforts into understanding its theoretical convergence guarantees in various settings.
For instance, Haddadpour & Mahdavi (2019) analyzed FedAvg (for non-convex smooth problems satisfying PL conditions) under the assumption that each local device’s minimizer is the same as the minimizer of the joint problem (if all devices’ data is aggregated together), an overly restrictive assumption that restricts the extent of data heterogeneity.
Very recently, Li et al.
(2020b) furthered the progress and established an O ( 1 T ) convergence rate for FedAvg for strongly convex smooth Federated learning problems with both data and system heterogeneity.
A similar result in the same setting Karimireddy et al.
(2019) also established an O ( 1 T ) result that allows for a linear speedup when the number of participating devices is large.
At the same time, Huo et al.
(2020) studied the Nesterov accelerated FedAvg for non-convex smooth problems and established an O ( 1 √ T ) convergence rate to stationary points.
However, despite these very recent fruitful pioneering efforts into understanding the theoretical convergence properties of FedAvg, it remains open as to how the number of devices–particularly the number of devices that participate in the computation–affects the convergence speed.
In particular, is linear speedup of FedAvg a universal phenomenon across different settings and for any number of devices?
What about when FedAvg is accelerated with momentum updates?
Does the presence of both data and system heterogeneity in FL imply different communication complexities and require technical novelties over results in distributed and decentralized optimization?
These aspects are currently unexplored or underexplored in FL.
We ﬁll in the gaps here by providing afﬁrmative answers.
Our Contributions
We provide a comprehensive and uniﬁed convergence analysis of FedAvg and its accelerated variants in the presence of both data and system heterogeneity.
Our contributions are threefold.
First, we establish an O (1 /KT ) convergence rate under FedAvg for strongly convex and smooth problems and an O (1 / √ KT ) convergence rate for convex and smooth problems (where K is the number of participating devices), thereby establishing that FedAvg enjoys the desirable linear speedup property in the FL setup.
Prior to our work here, the best and the most related convergence analysis is given by Li et al.
(2020b)
and Karimireddy et al.
(2019), which established an O ( 1 T ) convergence rate for strongly convex smooth problems under FedAvg.
Our rate matches the same (and optimal) dependence on T , but also completes the picture by establishing the linear dependence on K , for any K ≤ N , where N is the total number of devices, whereas Li et al.
(2020b) does not have linear speedup analysis, and Karimireddy et al.
(2019) only allows linear speedup close to full participation ( K = O ( N ) ).
As for convex and smooth problems, there was no prior work that established the
O ( 1 √ T ) rate under both system and data heterogeneity.
Our uniﬁed analysis highlights the common elements and distinctions between the strongly and convex settings.
Second, we establish the same convergence rates– O (1 /KT ) for strongly convex and smooth problems and O (1 / √ KT ) for convex and smooth problems–for Nesterov accelerated FedAvg.
We analyze the accelerated version of FedAvg here because empirically it tends to perform better; yet, its theoretical convergence guarantee is unknown.
To the best of our knowledge, these are the ﬁrst results that provide a linear speedup characterization of Nesterov accelerated FedAvg in those two problem classes (that FedAvg and Nesterov accelerated FedAvg share the same convergence rate is to be expected: this is the case even for centralized stochastic optimization).
Prior to our results here, the most relevant results Yu et al.
(2019a)
; Li et al.
(2020a)
; Huo et al.
(2020) only concern the non-convex setting, where convergence is measured with respect to stationary points (vanishing of gradient norms, rather than optimality gaps).
Our uniﬁed analysis of Nesterov FedAvg also illustrates the technical similarities and distinctions compared to the original FedAvg algorithm, whereas prior works (in the non-convex setting) were scattered and used different notations.
Third, we study a subclass of strongly convex smooth problems where the objective is overparameterized and establish a faster O (exp( − KTκ )) convergence rate for FedAvg, in contrast to the
O (exp( − Tκ )) rate for individual solvers Ma et al.
Within this class, we further consider the linear regression problem and establish an even sharper rate under FedAvg.
In addition, we propose a new variant of accelerated FedAvg based on a momentum update of Liu & Belkin (2020)–MaSS accelerated FedAvg–and establish a faster convergence rate (compared to if no acceleration is used).
This stands in contrast to generic (strongly) convex stochastic problems where theoretically no rate improvement is obtained when one accelerates FedAvg.
The detailed convergence results are summarized in Table 1.
Connections with Distributed and Decentralized Optimization Federated learning is closely related to distributed and decentralized optimization, and as such it is important to discuss connections and distinctions between our work and related results from that literature.
First, when there is neither system heterogeneity, i.e. all devices participate in parameter averaging during a communication round, nor statistical heterogeneity, i.e. all devices have access to a common set of stochastic gradients, FedAvg coincides with the “Local SGD” of Stich (2019), which showed the linear speedup rate O (1 /NT ) for strongly convex and smooth functions.
Woodworth et al. (2020b) and Woodworth et al. (2020a) further improved the communication complexity that guarantees the linear speedup rate.
When there is only data heterogeneity, some works have continued to use the term Local SGD to refer to FedAvg, while others subsume it in more general frameworks that include decentralized model averaging based on a network topology or a mixing matrix.
They have provided linear speedup analyses for strongly convex and convex problems, e.g. Khaled et al.
(2020); Koloskova et al.
(2020) as well as non-convex problems, e.g. Jiang & Agrawal (2018); Yu et al. (2019b) ; Wang & Joshi (2018).
However, these results do not consider system heterogeneity, i.e. the presence of stragglers in the device network.
Even with decentralized model averaging, the assumptions usually imply that model averages over all devices is the same as decentralized model averages based on network topology (e.g. Koloskova et al.
Proposition 1), which precludes system heterogeneity as deﬁned in this paper and prevalent in FL problems.
For momentum accelerated FedAvg, Yu et al.
(2019a) provided linear speedup analysis for non-convex problems, while results for strongly convex and convex settings are entirely lacking, even without system heterogeneity.
Karimireddy et al.
(2019) considers both types of heterogeneities for FedAvg, but their rate implies a linear speedup only when the number of stragglers is negligible.
In contrast, our linear speedup analyses consider both types of heterogeneity present in the full federated learning setting, and are valid for any number of participating devices.
We also highlight a distinction in communication efﬁciency when system heterogeneity is present.
Moreover, our results for Nesterov accelerated FedAvg completes the picture for strongly convex and convex problems.
For a detailed comparison with related works, please refer to Table 2 in Appendix Section B.
S ETUP
In this paper, we study the following federated learning problem:
[Equation]
where N is the number of local devices (users/nodes/workers) and p k is the k -th device’s weight satisfying p k ≥
and (cid:80) Nk
=
1 p k = 1 .
In the k -th local device, there are n k data points: x 1 k , x 2 k , . . .
, x n k k .
The local objective F k ( · ) is deﬁned as: F k ( w ) (cid:44) 1 n k (cid:80) n k j =1 (cid:96) (cid:16) w ; x jk (cid:17) , where (cid:96) denotes a userspeciﬁed loss function.
Each device only has access to its local data, which gives rise to its own local objective F k .
Note that we do not make any assumptions on the data distributions of each local device.
The local minimum F ∗ k = min w F k ( w ) can be far from the global minimum of Eq (1) (data heterogeneity).
2. T HE F EDERATED A VERAGING (F ED A VG ) A LGORITHM
We ﬁrst introduce the standard Federated Averaging (FedAvg) algorithm which was ﬁrst proposed by McMahan et al.
FedAvg updates the model in each device by local Stochastic Gradient
Descent (SGD) and sends the latest model to the central server every E steps.
The central server conducts a weighted average over the model parameters received from active devices and broadcasts the latest averaged model to all devices.
Formally, the updates of FedAvg at round t is described as follows:
[Equation]
where w kt is the local model parameter maintained in the k -th device at the t -th iteration and g t,k :=
∇ F k ( w kt , ξ kt ) is the stochastic gradient based on ξ kt , the data point sampled from k -th device’s local data uniformly at random.
I E
= { E, 2 E, . . .
} is the set of global communication steps, when local parameters from a set of active devices are averaged and broadcast to all devices.
We use S t +1 to represent the (random) set of active devices at t + 1 .
q k is a set of averaging weights that are speciﬁc to the sampling procedure used to obtain the set of active devices S t +1 .
Since federated learning usually involves an enormous amount of local devices, it is often more realistic to assume only a subset of local devices is active at each communication round (system heterogeneity).
In this work, we consider both the case of full participation where the model is averaged over all devices at each communication round, in which case q k = p k for all k and w kt +
= (cid:80)
Nk
=
1 p k v kt +1 if t + 1 ∈ I E , and the case of partial participation where |S t +1 | < N .
With partial participation, we follow Li et al.
(2020a)
; Karimireddy et al.
; Li et al.
(2020b)
and assume that S t +1 is obtained by one of two types of sampling schemes to simulate practical scenarios.
One scheme establishes S t +1 by i.i.d.
sampling the devices with probability p k with replacement, and uses q k = 1 K ,
where K =
|S t +1 | , while the other scheme samples S t +1 uniformly i.i.d.
from all devices without replacement, and uses q k = p k NK .
Both schemes guarantee that gradient updates in FedAvg are unbiased stochastic versions of updates in FedAvg with full participation, which is important in the theoretical analysis of convergence.
Because the original sampling scheme and weights proposed by McMahan et al.
(2017) lacks this nice property, it is not considered in this paper.
For more details on the notations and setup as well as properties of the two sampling schemes, please refer to Section A in the appendix.
2. A SSUMPTIONS
We make the following standard assumptions on the objective function F 1 , . .
. , F N .
Assumptionsand 2 are commonly satisﬁed by a range of popular objective functions, such as (cid:96) 2 -regularized logistic regression and cross-entropy loss functions.
Assumption 1 ( L -smooth) .
F 1 , · · · , F N are all L -smooth: for all v and w , F k ( v ) ≤ F k ( w )
+( v − w ) T ∇ F k ( w ) + L 2 (cid:107) v − w (cid:107) 22 .
Assumption 2 (Strongly-convex) .
F 1 , · · · , F N are all µ -strongly convex: for all v and w , F k ( v ) ≥
F k ( w ) + ( v − w ) T ∇ F k ( w ) + µ 2 (cid:107) v − w (cid:107)
Assumption 3 (Bounded local variance) .
Let ξ kt be sampled from the k -th device’s local data uniformly at random.
The variance of stochastic gradients in each device is bounded:
E (cid:13)(cid:13) ∇ F k (cid:0) w kt , ξ kt (cid:1) − ∇ F k (cid:0) w kt (cid:1)(cid:13)(cid:13) 2 ≤ σ 2 k , for k = 1 , · · · , N and any w kt .
Let σ 2 := (cid:80)
Nk
=1 p k σ 2 k .
Assumption 4 (Bounded local gradient) .
The expected squared norm of stochastic gradients is uniformly bounded.
i.e., E (cid:13)(cid:13) ∇ F k (cid:0) w kt , ξ kt (cid:1)(cid:13)(cid:13) 2 ≤ G 2 , for all k = 1 , ..., N and t = 0 , . .
, T − 1 .
Assumptions 3 and 4 have been made in many previous works in federated learning, e.g. Yu et al.
(2019b)
; Li et al.
(2020b);
Stich (2019).
We provide further justiﬁcation for their generality.
As model average parameters become closer to w ∗ , the L -smoothness property implies that E (cid:107)∇ F k ( w kt , ξ kt ) (cid:107) 2 and E (cid:107)∇ F k ( w kt , ξ kt ) − ∇ F k ( w kt ) (cid:107) 2 approach E (cid:107)∇ F k ( w ∗ , ξ kt ) (cid:107)
and
E (cid:107)∇ F k ( w ∗ , ξ kt ) − ∇ F k ( w ∗ ) (cid:107) 2 .
Therefore, there is no substantial difference between these assumptions and assuming the bounds at w ∗ only Koloskova et al.
Furthermore, compared to assuming bounded gradient diversity as in related work Haddadpour & Mahdavi (2019); Li et al.
(2020a), Assumption 4 is much less restrictive.
When the optimality gap converges to zero, bounded gradient diversity restricts local objectives to have the same minimizer as the global objective, contradicting the heterogeneous data setting.
For detailed discussions of our assumptions, please refer to
Appendix Section B.
L INEAR S PEEDUP A NALYSIS OF F ED A VG
In this section, we provide convergence analyses of FedAvg for convex objectives in the general setting with both heterogeneous data (statistical heterogeneity) and partial participation (system heterogeneity).
We show that for strongly convex and smooth objectives, the convergence of the optimality gap of averaged parameters across devices is O (1 /KT ) , while for convex and smooth objectives, the rate is O (1 / √ KT ) .
Our results improve upon Li et al.
(2020b)
; Karimireddy et al.
(2019) by showing linear speedup for any number of participating devices, and upon Khaled et al.
(2020); Koloskova et al.
(2020) by allowing system heterogeneity.
The proofs also highlight similarities and distinctions between the strongly convex and convex settings.
Detailed proofs are deferred to
Appendix Section E.
3. S TRONGLY C ONVEX AND S MOOTH O BJECTIVES
We ﬁrst show that FedAvg has an O (1 /KT ) convergence rate for µ -strongly convex and L -smooth objectives.
The result relies on a technical improvement over the analysis in Li et al.
(2020b).
Moreover, it implies a distinction in communication efﬁciency that guarantees this linear speedup for
FedAvg with full and partial device participation.
With full participation, E can be chosen as large as
O ( (cid:112) T/N ) without degrading the linear speedup in the number of workers.
On the other hand, with partial participation, E must be O (1) to guarantee O (1 /KT ) convergence.
Theorem 1.
Let w T
=
(cid:80)
Nk
=1 p k w kT in FedAvg, ν max = max k
Np k , and set decaying learning rates α t = 4 µ ( γ + t ) with γ = max { 32 κ, E } and κ = Lµ .
Then under Assumptions 1 to 4 with full device participation,
[Equation]
and with partial device participation with at most K sampled devices at each communication round,
[Equation]
Proof sketch.
Because our uniﬁed analyses of results in the main text follow the same framework with variations in technical details, we ﬁrst give an outline of proof for Theorem 1 to illustrate the main ideas.
For full participation, the main ingredient is a recursive contraction bound
[Equation]
where the O ( α 3 t E 2 G 2 ) term is the key improvement over the bound in Li et al.
(2020b), which has
O ( α 2 t E 2 G 2 ) instead.
We then use induction to obtain a non-recursive bound on E (cid:107) w T − w ∗ (cid:107) 2 , which is converted to a bound on E F ( w T ) − F ∗ using L -smoothness.
For partial participation, an additional term O ( 1 K α 2 t E 2 G 2 ) of leading order resulting from sampling variance is added to the contraction bound.
To facilitate the understanding of our analysis, please refer to a high-level summary in Appendix C.
Linear speedup.
We compare our bound with that in Li et al.
(2020b), which is O ( 1 NT + E 2 KT + E 2 G 2 T ) .
Because the term E 2 G 2 T is also O (1 /T ) without a dependence on N , for any choice of E their bound cannot achieve linear speedup.
The improvement of our bound comes from the term κ 2 E 2 G 2 /µ T, which now is O ( E 2 /T 2 ) and so is not of leading order.
As a result, all leading terms scale with 1 /N in the full device participation setting, and with 1 /K in the partial participation setting.
This implies that in both settings, there is a linear speedup in the number of active workers during a communication round.
We also emphasize that the reason one cannot recover the full participation bound by setting K = N in the partial participation bound is due to the variance generated by sampling.
Communication Complexity.
Our bound implies a distinction in the choice of E between the full and partial participation settings.
With full participation, the term involving E , O ( E 2 /T 2 ) , is not of leading order O (1 /T ) , so we can increase E and reduce the number of communication rounds without degrading the linear speedup in iteration complexity O (1 /NT ) , as long as E
= O ( (cid:112) T/N ) , since then O ( E 2 /T 2 )
=
O (1 /NT ) matches the leading term.
This corresponds to a communication complexity of T/E
=
O ( √ NT ) .
In contrast, the bound in Li et al.
(2020b) does not allow E to scale with √ T to preserve O (1 /T ) rate, even for full participation.
On the other hand, with partial participation, κE 2 G 2 /µ KT is also a leading term, and so E must be O (1) .
In this case, our bound still yields a linear speedup in K , which is also conﬁrmed by experiments.
The requirement that E =
O (1) in order to achieve linear speedup in partial participation cannot be removed for our sampling schemes, as the term κE 2 G 2 /µ KT comes from variance in the sampling process, which is O ( E 2 /T 2 ) . In Proposition 1 in Section E of the appendix, we provide a problem instance where the dependence of the sampling variance on E is tight.
Comparison with related works.
To better understand the signiﬁcance of the obtained bound, we compare our rates to the best-known results in related settings.
Haddadpour & Mahdavi (2019) proves a linear speedup O (1 /KT )
result for strongly convex and smooth objectives 1 , with O ( K 1 / 3 T 2 / 3 ) communication complexity with non- i.i.d.
data and partial participation.
However, their results build on the bounded gradient diversity assumption, which implies the existence of w ∗ that minimizes all local objectives (see discussions in Section 2.2 and Appendix B), effectively removing statistical heterogeneity.
The bound in Koloskova et al.
(2020) matches our bound in the full participation case, but their framework excludes partial participation (Koloskova et al., 2020, Proposition 1).
The result of Karimireddy et al.
(2019) applies to the full FL setting, but only has linear speedup when
K =
O ( N ) , i.e. close to full participation, whereas our result has linear speedup for any number of participating devices.
When there is no data heterogeneity, i.e. in the classical distributed optimization paradigm, communication complexity can be further improved, e.g. Woodworth et al.
(2020b;a), but such results are not directly comparable to ours since we consider the setting where individual devices have access to different datasets.
3. C ONVEX S MOOTH O BJECTIVES
Next we provide linear speedup analysis of FedAvg with convex and smooth objectives and show that the optimality gap is O (1 / √ KT ) .
This result complements the strongly convex case in the previous part, as well as the non-convex smooth setting in Jiang & Agrawal (2018);
Yu et al.
(2019b);
Haddadpour & Mahdavi (2019), where O (1 / √ KT ) results are given in terms of averaged gradient norm, and it also extends the result in Khaled et al.
(2020), which has linear speedup in the convex setting, but only for full participation.
Theorem 2.
Under Assumptions 1,3,4 and constant learning rate α t = O ( (cid:113) NT ) , FedAvg satisﬁes
[Equation]
with full participation, and with partial device participation with K sampled devices at each communication round and learning rate α t = O ( (cid:113) KT ) ,
[Equation]
The analysis again relies on a recursive bound, but without contraction:
[Equation]
which is then summed over time steps to give the desired bound, with α t
= O ( (cid:113) NT ) .
Choice of E and linear speedup.
With full participation, as long as E = O ( T 1 / 4 /N 3 / 4 ) , the convergence rate is O (1 / √ NT ) with O ( N 3 / 4 T 3 / 4 ) communication rounds.
In the partial participation setting, E must be O (1) in order to achieve linear speedup of O (1 / √ KT ) .
Our result again demonstrates the difference in communication complexities between full and partial participation, and is to our knowledge the ﬁrst result on linear speedup in the general federated learning setting with both heterogeneous data and partial participation for convex objectives.
L INEAR S PEEDUP A NALYSIS OF N ESTEROV A CCELERATED F ED A VG
A natural extension of the FedAvg algorithm is to use momentum-based local updates instead of local
SGD updates in order to accelerate FedAvg. As we know from stochastic optimization, Nesterov and other momentum updates fail to provably accelerate over SGD (Liu & Belkin (2020); Kidambi et al. Liu et al. ; Yuan & Ma (2020)).
This is in contrast to the classical acceleration result of Nesterov-accelerated gradient descent over GD.
Thus in the FL setting, the best provable convergence rate for FedAvg with Nesterov updates is the same as FedAvg with SGD updates.
Nevertheless, Nesterov and other momentum updates are frequently used in practice, in both non-FL and FL settings, and are observed to perform better empirically. In fact, previous works such as Stich (2019) on FedAvg with vanilla SGD uses FedAvg with Nesterov or other momentum updates in their experiments to achieve target accuracy. Because of the popularity of Nesterov and other momentumbased methods, understanding the linear speedup behavior of FedAvg with such local updates is important. To our knowledge, the only convergence analyses of FedAvg with momentum-based stochastic updates focus on the non-convex smooth case Huo et al.
Yu et al. (2019a); Li et al.
(2020a), and no results existed in the convex smooth settings.
In this section, we complete the picture by providing the ﬁrst O (1 /KT ) and O (1 / √ KT ) convergence results for Nesterov-accelerated FedAvg for convex objectives that match the rates for FedAvg with SGD updates.
Detailed proofs of convergence results in this section are deferred to Appendix Section F.
4. S TRONGLY C ONVEX AND S MOOTH O BJECTIVES
The Nesterov Accelerated FedAvg algorithm follows the updates:
[Equation]
where g t,k := ∇ F k ( w kt , ξ kt ) is the stochastic gradient sampled on the k -th device at time t , and q k again depends on participation and sampling schemes.
Theorem 3.
Let v T =
(cid:80) N k
=1 p k v k T in Nesterov accelerated FedAvg, and set learning rates α t = 6 µ 1 t + γ , β t − 1 =
[Equation]
[Equation]
)max { µ, 1 } .
Then under Assumptions 1,2,3,4 with full device participation,
[Equation]
and with partial device participation with K sampled devices at each communication round,
[Equation]
Similar to FedAvg, the key step in the proof of this result is a recursive contraction bound, but different in that it involves three time steps, due to the update format of Nesterov SGD (see Lemmain Appendix F.1).
Then we can again use induction and L -smoothness to obtain the desired bound.
To our knowledge, this is the ﬁrst convergence result for Nesterov accelerated FedAvg in the strongly convex and smooth setting.
The same discussion about linear speedup of FedAvg applies to the
Nesterov accelerated variant.
In particular, to achieve O (1 /NT ) linear speedup, T iterations of the algorithm require only O ( √ NT ) communication rounds with full participation.
4. C ONVEX S MOOTH O BJECTIVES
We now show that the optimality gap of Nesterov-accelerated FedAvg has O (1 / √ KT ) rate for convex and smooth objectives.
This result complements the strongly convex case in the previous part, as well as the non-convex smooth setting in Huo et al.
Yu et al. (2019a); Li et al.
(2020a), where a similar O (1 / √ KT ) rate is given in terms of averaged gradient norm.
Theorem 4.
Set learning rates α t = β t =
O ( (cid:113) NT ) .
Then under Assumptions 1,3,4 Nesterov accelerated FedAvg with full device participation has rate
[Equation]
and with partial device participation with K sampled devices at each communication round,
[Equation]
We emphasize again that in the stochastic optimization setting, the optimal convergence rate that FedAvg wtih Nesterov udpates can achieve is the same as FedAvg with SGD updates. However, due to the popularity and superior performance of momentum methods in practice, it is still important to understand the linear speedup behavior of such FedAvg variants.
Our results in this section ﬁll exactly this gap.
[Figure] r
[Figure]
i t
[Figure]
r a t i [Figure]
N UMERICAL E XPERIMENTS
In this section, we empirically examine the linear speedup convergence of FedAvg and Nesterov accelerated FedAvg in various settings, including strongly convex function, convex smooth function, and overparameterized objectives, as analyzed in previous sections.
Setup.
Following the experimental setting in Stich (2019), we conduct experiments on both synthetic datasets and real-world dataset w8a Platt (1998) ( d = 300 , n = 49749) .
We consider the distributed objectives F ( w )
=
(cid:80) Nk
=1 p k F k ( w ) , and the objective function on the k -th local device includes three cases: 1) Strongly convex objective : the regularized binary logistic regression problem,
F k ( w ) =
1 N k (cid:80) N k i
=1 log(1 + exp( − y ki w T x ki )
+ λ 2 (cid:107) w (cid:107) 2 .
The regularization parameter is set to λ
= 1 /n
≈
e − 5 . 2)
Convex smooth objective : the binary logistic regression problem without regularization.
Overparameterized setting : the linear regression problem without adding noise to the label, F k ( w ) =
1 N k (cid:80) N k i =1 ( w T x ki + b − y ki ) 2 .
Linear speedup of FedAvg and Nesterov accelerated FedAvg.
To verify the linear speedup convergence as shown in Theorems 1 2 3 4, we evaluate the number of iterations needed to reach (cid:15) -accuracy in three objectives.
We initialize all runs with w 0 =
d and measure the number of iterations to reach the target accuracy (cid:15) .
For each conﬁguration ( E, K ) , we extensively search the learning rate from min( η 0 , nc 1+ t ) , where η 0 ∈ { 0 . 1 , 0 .
12 , 1 , 32 } according to different problems and c can take the values c =
i ∀ i ∈
Z .
As the results shown in Figure 1, the number of iterations decreases as the number of (active) workers increasing, which is consistent for FedAvg and Nesterov accelerated
FedAvg across all scenarios.
For additional experiments on the impact of E , detailed experimental setup, and hyperparameter setting, please refer to the Appendix Section I.
A A DDITIONAL N OTATIONS AND B OUNDS FOR S AMPLING S CHEMES
In this section, we introduce additional notations that are used throughout the proofs.
Following common practice, e.g. Stich (2019); Li et al.
(2020b), we deﬁne two virtual sequences v t =
(cid:80)
Nk
=1 p k v kt and w t =
(cid:80)
Nk
=1 p k w kt , where we recall the FedAvg updates from (2):
[Equation]
The following observations apply to FedAvg updates, while Nesterov accelerated FedAvg requires modiﬁcations.
For full device participation or partial participation with t / ∈ I E , note that v t = w t = (cid:80)
Nk
=1 p k v kt .
For partial participation with t ∈ I E , w t (cid:54) = v t since v t = (cid:80) Nk =1 p k v kt while w t = (cid:80) k ∈S t q k w kt .
However, we can use unbiased sampling strategies such that E S t w t = v t .
Note that v t +1 is one-step SGD from w t .
[Equation]
where g t = (cid:80) N k
=1 p k g t,k is the one-step stochastic gradient averaged over all devices.
[Equation]
Similarly, we denote the expected one-step gradient g t =
E ξ t [ g t ] =
(cid:80) Nk
=
p k E ξ kt g t,k , where
[Equation]
and ξ t = { ξ kt } Nk =1 denotes random samples at all devices at time step t .
Since in this work we also consider the case of partial participation, the sampling strategy to approximate the system heterogeneity can also affect the convergence.
Here we follow the prior works Li et al.
(2020b) and Li et al.
(2020a)
and consider two types of sampling schemes that guarantee E S t w t = v t .
The sampling scheme I establishes S t +1 by i.i.d.
sampling the devices according to probabilities p k with replacement, and setting q k = 1 K .
In this case the upper bound of expected square norm of w t +1 − v t +1 is given by (Li et al., 2020b, Lemma 5):
[Equation]
The sampling scheme II establishes S t +1 by uniformly sampling all devices without replacement and setting q k = p k NK , in which case we have
[Equation]
We summarize these upper bounds as follows:
[Equation]
and this bound will be used in the convergence proof of the partial participation result.
B C OMPARISON OF C ONVERGENCE R ATES WITH R ELATED W ORKS
In this section, we compare our convergence rate with the best-known results in the literature (see
Table 2).
In Haddadpour & Mahdavi (2019), the authors provide O (1 /NT ) convergence rate of nonconvex problems under Polyak-Łojasiewicz (PL) condition, which means their results can directly apply to the strongly convex problems.
However, their assumption is based on bounded gradient diversity, deﬁned as follows:
[Equation]
This is a more restrictive assumption comparing to assuming bounded gradient under the case of target accuracy (cid:15) → 0 and PL condition.
To see this, consider the gradient diversity at the global optimal w
[Equation]
, i.e.,
[Equation]
For Λ( w ∗ ) to be bounded, it requires (cid:107)∇
[Equation]
This indicates w ∗ is also the minimizer of each local objective, which contradicts to the practical setting of heterogeneous data.
Therefore, their bound is not effective for arbitrary small (cid:15) -accuracy under general heterogeneous data while our convergence results still hold in this case.
In Karimireddy et al.
(2019), the linear speedup convergence rate of FedAvg are provided for strongly convex, general convex, and non-convex problems under full participation setting.
However, their rate does not enjoy linear speedup for any number of devices while our results apply to any valid
K ≤ N .
For example, they provides an optimality gap of O (cid:0) (1 − KN )
E/T (cid:1) for the strongly convex case (Karimireddy et al., 2019, Theorem V).
With partial participation, and when K = O (1) , their convergence rate is O ( E/T ) which does not have linear speedup.
Under partial participation, the
FedAvg analyses in Karimireddy et al.
(2019) requires E
= O (1) .
For example, the strongly convex result O
((1 − KN )
E/T ) in Theorem V is O
( E/T ) when K = O (1) and is O ( E/NT )
when
K =
O ( N ) .
In either case, to achieve a O (1 /T ) convergence rate, it requires E
=
O
(1) as well.
Similar conclusion also holds for the general convex problem.
[Table]
Boundedgradient
OverparameterizedLR
In Haddadpour & Mahdavi (2019), the convergence rate is for non-convex smooth problems with
PL condition, which also applies to strongly convex problems.
Therefore, we compare it with our strongly convex results here.
‡‡ The bounded gradient diversity assumption is not applicable for general heterogeneous data when converging to arbitrarily small (cid:15) -accuracy (see discussions in Sec B).
Although the results in Karimireddy et al.
(2019) is applicable for partial participation setting, their results only achieve linear speedup under full participation setting K = N while we show linear speedup convergence for K ≤ N (see discussions in Sec B).
The E in the table is obtained under full participation.
Under partial participation, the communication complexity is E
=
O (1) .
C A H IGH - LEVEL S UMMARY OF F ED A VG ANALYSIS
To facilitate the understanding of our analysis and highlight the improvement of our work comparing to prior arts, we summarize the general steps used in the proofs across the various settings.
In this section, we take the strongly convex case as an example to illustrate our analysis.
The corresponding proof for general convex functions follows the same framework.
One step progress bound
This step establishes the progress of distance ( (cid:107) w t − w ∗ (cid:107) 2 ) to optimal solution after one step SGD update (see line 9, Alg 1), as the following equation shows:
[Equation]
The above bound consists of three main ingredients, the distance to optima in previous step (with η t ∈ (0 , 1) to obtained a contraction bound), the variance of stochastic gradients in local clients (second term), the variance across different clients (third term).
Notice that the third term in this bound is the primary source of improvement in the rate.
Comparing to the bound in Li et al.
(2020b), we improve the third term from O ( α 2 t E 2 G 2 ) to O ( α 2 t E 2 G 2 ) , which enables the linear speedup in the convergence rate.
Iterative deduction
This step uses the one step progress bound iteratively to connect the the current distance to optimal solution with the initial distance ( (cid:107) w 0 − w ∗ (cid:107) 2 ), as follows:
[Equation]
Then we can use the distance to optima to upper bound the optimality gap ( F ( w t ) − F ∗
≤ O (1 /T ) )
, as follows:
[Equation]
− w ∗ (cid:107) 2 ) .
The convergence rate of the optimality gap is equally obtained as the convergence rate of the distance to optima.
From full participation to partial participation
There are three sources of variances that affect the convergence rate.
The ﬁrst two sources come from the variances of within local clients and across clients (second and third term in one step progress bound).
The partial participation, which involves a sampling procedure, is the third source of variance.
Therefore, comparing to the rate in full participation, this will add another term of variance into the convergence rate, where we follow a similar derivation as in Li et al.
(2020b).
D T ECHNICAL LEMMAS
To facilitate reading, we ﬁrst summarize some basic properties of L -smooth and µ -strongly convex functions, found in e.g. Rockafellar (1970), which are used in various steps of proofs in the appendix.
Lemma 1.
Let F be a convex L -smooth function.
Then we have the following inequalities:
Quadratic upper bound: 0 ≤ F ( w ) − F ( w (cid:48) ) − (cid:104)∇ F ( w (cid:48) ) , w − w (cid:48) (cid:105) ≤
L 2 (cid:107) w − w (cid:48) (cid:107) 2 . 2.
Coercivity: 1 L (cid:107)∇ F ( w ) − ∇ F ( w (cid:48) )
(cid:107) 2 ≤
cid:104)∇ F ( w ) − ∇ F ( w (cid:48) ) , w − w (cid:48) (cid:105) .
Lower bound: F ( w ) ≥ F ( w (cid:48) )
+ (cid:104)∇ F ( w (cid:48) ) , w − w (cid:48) (cid:105) + 12 L (cid:107)∇ F ( w ) − ∇ F ( w (cid:48) )
(cid:107) 2 .
In particular, (cid:107)∇ F ( w ) (cid:107) 2 ≤ 2 L ( F ( w ) − F ( w ∗ )) .
Optimality gap: F ( w
) − F ( w ∗ )
≤(cid:104)∇ F ( w ) , w − w ∗ (cid:105) .
Lemma 2.
Let F be a µ -strongly convex function.
Then
[Equation] [Equation]
E P ROOF OF C ONVERGENCE R ESULTS FOR F ED A VG E. S TRONGLY C ONVEX S MOOTH O BJECTIVES
To organize our proofs more effectively and highlight the signiﬁcance of our results compared to prior works, we ﬁrst state the following key lemmas used in proofs of main results and defer their proofs to later.
Lemma 3 ( One step progress, strongly convex ) .
Let w t
=
(cid:80)
Nk
=1 p k w kt , and suppose our functions satisfy Assumptions 1,2,3,4, and set step size α t = 4 µ ( γ + t ) with γ = max { 32 κ, E } and κ =
Lµ , then the updates of FedAvg with full participation satisfy
[Equation]
We emphasize that the above lemma is the key step that allows us to obtain a bound that improves on the convergence result of Li et al.
(2020b) with linear speedup.
Its proof will make use of the following two results.
Lemma 4 ( Bounding gradient variance (Lemma 2 Li et al.
(2020b)) ) .
Given Assumption 3, the upper bound of gradient variance is given as follows,
[Equation]
Lemma 5 ( Bounding the divergence of w kt (Lemma 3 Li et al. (2020b)) ) .
Given Assumption 4, and assume that α t is non-increasing and α t ≤ 2 α t + E for all t ≥ 0 , we have
[Equation]
We now restate Theorem 1 from the main text and then prove it using Lemma 3.
Theorem 1.
Let w T
=
(cid:80)
Nk
=1 p k w kT in FedAvg, ν max = max k
Np k , and set decaying learning rates α t = 4 µ ( γ + t ) with γ = max { 32 κ, E } and κ = Lµ .
Then under Assumptions 1,2,3,4 with full device participation,
[Equation]
and with partial device participation with at most K sampled devices at each communication round,
[Equation]
Proof.
The road map of the proof for full device participation contains three steps.
First, we establish a recursive relationship between E (cid:107) w t +1 − w ∗ (cid:107) 2 and E (cid:107) w t − w ∗ (cid:107) 2 , upper bounding the progress of
FedAvg from step t to step t + 1 .
Second, we show that E (cid:107) w t − w ∗ (cid:107)
= O ( ν
[Equation]
µ
[Equation]
) by induction using the recursive relationship from the previous step.
Third, we use the property of
L -smoothness to bound the optimality gap by E (cid:107) w t − w ∗ (cid:107) 2 .
By Lemma 3, we have the following upper bound for the one step progress:
[Equation]
3 t G 2 .
We show next that E (cid:107) w t − w ∗
cid:107)
= O (
[Equation] [Equation]
E 2 LG 2 /µ 2 t) using induction.
To simplify the presentation, we denote C ≡ 6 E 2 LG 2 and D ≡ 1 N ν 2 max σ 2 .
Suppose that we have the bound
E (cid:107) w t − w ∗ (cid:107) 2 ≤ b · ( α t D + α 2 t C ) for some constant b and learning rates α t .
Then the one step progress from Lemma 3 becomes:
[Equation]
To establish the result at step t +1 , it remains to choose α t and b such that ( b (1 − µα t )+ α t ) α t ≤ bα t + and ( b (1 − µα t ) + α t )
α 2 t ≤ bα 2 t
+1 .
If we let α t = 4 µ ( t + γ ) where γ = max { E, 32 κ } (choice of γ required to guarantee the one step progress) and set b = 4 µ , we have:
[Equation]
where we have used the following inequalities:
[Equation]
Thus we have established the result at step t + 1 assuming the result is correct at step t :
[Equation]
At step t = 0 , we can ensure the following inequality by scaling b with c (cid:107) w 0 − w ∗ (cid:107) 2 for a sufﬁciently large constant c :
[Equation]
It follows that
[Equation]
for all t ≥ 0 .
Finally, the L -smoothness of F implies
[Equation]
where in the ﬁrst line, we use the property of L -smooth function (see Lemma 1), and in the second line, we use the conclusion in Eq (8).
With partial participation, the update at each communication round is now given by weighted averages over a subset of sampled devices.
When t + 1 / ∈ I E , v t +1 =
w t +1 , while when t + 1 ∈ I E , we have E w t
+1 = v t
+1 by design of the sampling schemes (Li et al.
(2020b),
Lemma 4),
so that
[Equation]
This in particular implies E (cid:107) v t − w ∗ (cid:107) 2 ≤ E (cid:107) w t − w ∗ (cid:107) 2 for all t .
Since v t = (cid:80) Nk
=
1 p k v kt always averages over all devices, the full participation one step progress result Lemma 3 applied to v t implies
[Equation] [Equation]
The bound for E (cid:107) w t +1 − v t +1 (cid:107) 2 for the two sampling schemes we consider is provided in Eq (7), and applying it we can write the one step progress for partial participation as
[Equation]
and the same arguments using induction and L -smoothness as the full participation case implies
[Equation]
E.1. D EFERRED PROOFS OF KEY LEMMAS
Here we ﬁrst rewrite the proofs of lemmas 4 and 5 from Li et al.
(2020b) with slight modiﬁcations for the consistency and completeness of this work, since later we will use modiﬁed versions of these results in the convergence proof for Nesterov accelerated FedAvg.
Proof of lemma 4.
[Equation]
Proof of lemma 5.
Now we bound E (cid:80) Nk
=1 p k (cid:107) w t − w kt
(cid:107) 2 following Li et al. (2020b).
Since communication is done every E steps, for any t ≥ 0 , we can ﬁnd a t 0 ≤ t such that t − t 0 ≤ E − 1 and w kt 0 = w t 0 for all k .
Moreover, using α t is non-increasing and α t 0 ≤ 2 α t for any t − t 0 ≤ E − 1 , we have
[Equation]
Based on the results of Lemma 4, 5, we now prove the upper bound of one step SGD progress.
This proof improves on the previous work Li et al.
(2020b)
and is the ﬁrst to reveal the linear speedup of convergence of FedAvg.
Proof of lemma 3.
We have
[Equation]
where we denote:
[Equation]
By deﬁnition of g t and g t (see Eq (4)), we have E
A 2 = 0 .
For A 3 , we have the following upper bound (see Lemma 4):
[Equation]
Next we bound A 1 :
[Equation]
and we will show that the third term (cid:107) α t g t (cid:107) 2 can be canceled by an upper bound of the second term, which is one of major improvement comparing to prior art Li et al.
(2020b).
The upper bound of second term can be derived as follows, using the strong convexity and L -smoothness of F k :
[Equation]
We record the bound we have obtained so far, as it will also be used in the proof for convex case:
[Equation]
For the term 2 α t (cid:80) N k =1 p k
[ F k ( w ∗ ) − F k ( w t )] , which is negative, we can ignore it, but this yields a suboptimal bound that fails to provide the desired linear speedup.
Instead, we upper bound it using the following derivation:
[Equation] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
where we have used the smoothness of F twice.
Note that the term − α 2 t (cid:107) g t (cid:107) 2 exactly cancels the α 2 t (cid:107) g t (cid:107) 2 in the bound in Eq (9), so that plugging in the bound for − 2 α t (cid:104) w t − w ∗ , g t (cid:105) , we have so far proved
[Equation]
Under Assumption 4, we have E (cid:107) g t (cid:107) 2 ≤ G 2 .
Furthermore, we can check that our choice of α t satisﬁes α t is non-increasing and α t ≤ 2 α t + E , so we may plug in the bound E (cid:80) Nk
=1 p k (cid:107) w t − w kt
(cid:107) 2 ≤ 4 E 2 α 2 t
G 2 to the above inequality (see Lemma 5).
Therefore, we can conclude that, with ν max := N · max k p k and ν min := N · min k p k ,
[Equation]
where in the last inequality we use σ 2 = (cid:80) Nk
=1 p k σ 2 k , and that by construction α t satisﬁes Lα t ≤ 18 .
One may ask whether the dependence on E in the term κE 2 G 2 /µ KT can be removed, or equivalently whether (cid:80)
k p k (cid:107) w kt − w t (cid:107)
= O (1 /T 2 ) can be independent of E .
We provide a simple counterexample that shows that this is not possible in general.
Proposition 1.
There exists a dataset such that if E = O ( T β ) for any β > 0 then (cid:80) k p k (cid:107) w kt − w t (cid:107) 2 = Ω( 1 T 2 − 2 β ) .
Proof.
Suppose that we have an even number of devices and each F k ( w ) = 1 n k (cid:80) n k j =1 ( x jk − w )contains data points x jk = w ∗ ,k , with n k ≡ n .
Moreover, the w ∗ ,k ’s come in pairs around the origin.
As a result, the global objective F is minimized at w ∗ = 0 .
Moreover, if we start from w 0 = 0 , then by design of the dataset the updates in local steps exactly cancel each other at each iteration, resulting in w t = 0 for all t .
On the other hand, if E = T β , then starting from any t = O ( T ) with constant step size O ( 1 T ) , after E iterations of local steps, the local parameters are updated towards w ∗ ,k with (cid:107) w kt + E (cid:107) 2 =
Ω(( T β · 1 T ) 2 ) =
Ω( 1 T
[Equation] [Equation]
This implies that
[Equation]
which is at a slower rate than 1 T 2 for any β > 0 .
Thus the sampling variance E (cid:107) w t +1 − v t +1 (cid:107)
=
Ω( (cid:80) k
p k E (cid:107) w kt +1 − w t
+1 (cid:107) 2 ) decays at a slower rate than 1 T 2 , resulting in a convergence rate slower than O ( 1 T ) with partial participation.
E. C ONVEX S MOOTH O BJECTIVES
In this section we provide the proof of the convergence result for FedAvg with convex and smooth objectives.
The key step is a one step progress result analogous to that in the strongly convex case, and their proofs share identical components as well.
Lemma 6 ( One step progress, convex case ) .
Let w t
=
(cid:80)
Nk
=1 p k w kt in FedAvg.
Under assumptions 1,3,4, the following bound holds for all t :
[Equation]
Proof.
The ﬁrst part of the proof follows directly from Eq (9) in the proof of Lemma 3.
Setting µ =in Eq (9) (since we are in the convex setting instead of strongly convex), we obtain
[Equation]
The difference of this bound with that in the strongly convex case is that we no longer have a contraction factor of 1 − µα t in front of (cid:107) w t − w ∗ (cid:107) 2 .
In the strongly convex case, we were able to cancel α 2 t (cid:107) g t (cid:107) 2 with 2 α t (cid:80) Nk
=1 p k
[ F k ( w ∗ ) − F k ( w t )] and obtain only lower order terms.
In the convex case, we use a different strategy and preserve (cid:80) Nk =1 p k
[ F k ( w ∗ ) − F k ( w t )] in order to obtain the desired optimality gap.
We have
[Equation]
using ∇ F ( w ∗ ) = 0 .
Now using the L smoothness of F , we have (cid:107)∇ F ( w t ) (cid:107) 2 ≤ 2 L ( F ( w t ) −
F ( w ∗ )) , so that
[Equation]
Since F ( w ∗ ) ≤ F ( w t ) , as long as 4 α t L ≤ 1 , we can ignore the last term, and rearrange the inequality to obtain
[Equation]
The same argument as before yields E (cid:80) Nk
=1 p k
[Equation]
w t − w kt (cid:107) 2 ≤ 4 E 2 α 2 t G 2 which gives
[Equation]
With the one step progress result, we can now prove the convergence result in the convex setting, which we restate below.
Theorem 2.
Under assumptions 1,3,4 and constant learning rate α t = O ( (cid:113) NT ) , FedAvg satisﬁes
[Equation]
with full participation, and with partial device participation with K sampled devices at each communication round and learning rate α t = O ( (cid:113) KT ) ,
[Equation]
Proof.
We ﬁrst prove the bound for full participation.
Applying Lemma 6, we have
[Equation]
Summing the inequalities from t = 0 to t =
T , we obtain
T (cid:88)
[Equation]
so that
[Equation]
By setting the constant learning rate α t ≡ (cid:113) NT
[Equation]
we have
[Equation]
Similarly
[Equation]
for partial participation
[Equation]
we have
[Equation]
where C = 4 K E 2 G 2 or N − K N − 1 4 K E 2 G 2 depending on the sampling scheme, so that with α t = (cid:113) KT , we have
[Equation]
F P ROOF OF C ONVERGENCE R ESULTS FOR N ESTEROV A CCELERATED F ED A VG F. S TRONGLY C ONVEX S MOOTH O BJECTIVES
Recall that the Nesterov accelerated FedAvg follows the updates v k t +1 = w
[Equation]
t
[Equation]
α t g t,k ,
[Equation]
The proofs of convergence results for Nesterov Accelerated FedAvg consists of components that are direct analogues of the FedAvg case.
We ﬁrst state these analogue results before proving the main theorem.
Like before, the proofs of the lemmas are deferred to after the main proof.
Lemma 7 ( One step progress, Nesterov ) .
Let v t = (cid:80)
Nk
=
1 p k v kt in Nesterov accelerated FedAvg, and suppose our functions satisfy Assumptions 1,2,3,4, and set step sizes α t = 6 µ 1 t + γ , β t − 1 =
[Equation]
t + γ )
[Equation]
1 − 6 t + γ )max { µ, 1 } with γ = max { 32 κ, E } and κ =
Lµ , the updates of Nesterov accelerated
FedAvg satisfy
[Equation]
The one step progress result makes use of the same bound on the gradient variance in Lemma 4, as well as a divergence bound analogous to Lemma 5, which we state below.
Lemma 8 ( Bounding the divergence of w kt , Nesterov ) .
Given Assumption 4, and assume that α t is non-increasing, α t ≤ 2 α t + E , and 2 β 2 t − 1 + 2 α 2 t ≤ 1 / 2 for all t ≥ 0 , w t = (cid:80) Nk
=1 p k w kt in Nesterov accelerated FedAvg satisﬁes
[Equation]
Theorem 3.
Let v T =
(cid:80)
Nk
=1 p k v kT in Nesterov accelerated FedAvg and set learning rates α t = 6 µ 1 t + γ , β t − 1 =
[Equation]
{ µ, 1 } .
Then under Assumptions 1,2,3,4 with full device participation,
[Equation]
and with partial device participation with K sampled devices at each communication round,
[Equation]
Proof.
We ﬁrst prove the result for full participation.
Applying the one step progress bound in
Lemma
[Equation]
we have
[Equation]
Recall that we require α t 0 ≤ 2 α t for any t − t 0 ≤ E − 1 , Lα t ≤ 15 , and 2 β 2 t − 1 + 2 α 2 t ≤ 1 / 2 in order for Lemmas 8 and 7 to hold, which we can check by deﬁnition of α t and β t .
We show next that E (cid:107) v t − w ∗ (cid:107)
= O ( ν 2 max σ 2 /µ tN
[Equation]
) by induction.
Assume that we have shown
[Equation]
for all iterations until t , where C = 20 E 2 LG 2 , D = 1 N ν 2 max σ 2 , and b is some constant to be chosen later.
For step sizes recall that we choose α t = 6 µ 1 t + γ and β t − 1 = 3 14( t + γ )(1 − 6 t + γ )max { µ, 1 } where γ = max { 32 κ, E } , so that β t − 1 ≤ α t and
[Equation]
Moreover, E (cid:107) v t − 1 − w ∗ (cid:107) 2 ≤ b ( Cα 2 t − 1 + Dα t − 1 ) ≤ 4 b ( Cα 2 t
+ Dα t ) with the chosen step sizes.
Therefore the bound for E (cid:107) v t +1 − w ∗ (cid:107) 2 can be further simpliﬁed with
[Equation]
(cid:107) v t − w ∗ (cid:107) · (cid:107) v t − 1 − w
[Equation]
(cid:107) ≤ 4 β t − 1 (1 + β t − 1 )(1 − α t µ ) ·
b ( Cα 2 t + Dα t ) and
[Equation]
α
[Equation]
so that
[Equation] [Equation]
and so it remains to choose b such that
[Equation]
from which we can conclude E (cid:107)
[Equation]
With b = 6 µ , we have
[Equation]
where we have used t + γ − 1 ( t + γ ) 2 ≤ 1 t + γ +1 .
Similarly
[Equation]
where we have used t + γ − 2 ( t + γ ) 3 ≤ 1 ( t + γ +1) 2 .
Finally, to ensure (cid:107) v 0 − w ∗ (cid:107) 2 ≤ b ( Cα 20 + Dα 0 ) , we can rescale b by c (cid:107) v 0 − w ∗ (cid:107) 2 for some c. It follows that E (cid:107) v t − w ∗ (cid:107) 2 ≤ b ( Cα 2 t
+ Dα t ) for all t ≥ 0 .
Using the L -smooothness of F ,
E ( F ( v T ))
− F
[Equation]
E
[Equation]
F
[Equation]
T )
[Equation]
F
[Equation]
w ∗ ))
[Equation]
With partial participation, the same argument with an added term for sampling error yields
[Equation]
F.1. D EFERRED PROOFS OF KEY LEMMAS
Proof of lemma 8.
The proof of bound for E (cid:80) Nk
=1 p k (cid:107) w t − w kt
(cid:107) 2 in the Nesterov accelerated
FedAvg follows a similar logic as in Lemma 5, but requires extra reasoning.
Since communication is done every E steps, for any t ≥ 0 , we can ﬁnd a t 0 ≤ t such that t − t 0 ≤ E − 1 and w kt 0 = w t 0 for all k .
Moreover, using α t is non-increasing, α t 0 ≤ 2 α t , and β t ≤ α t for any t − t 0 ≤ E − 1 , we have
E N (cid:88) k
= p k (cid:107) w t − w kt
cid:107)
= E
N (cid:88) k
= p k (cid:107) w kt − w t 0 − ( w t − w t 0 ) (cid:107)≤ E
N (cid:88) k
= p k (cid:107) w kt − w t 0 (cid:107)= E
N (cid:88) k
= p k (cid:107) w kt − w kt
(cid:107)= E
N (cid:88) k
= p k (cid:107) t − 1 (cid:88) i = tβ
i ( v ki +1 − v ki ) − t − 1 (cid:88) i
=
tα
i g i,k (cid:107)≤
N (cid:88) k
= p k E t − 1 (cid:88) i
=
t( E − 1) α 2 i (cid:107) g
i,k (cid:107) 2 +
N (cid:88) k
= p k E t − 1 (cid:88) i
=
t( E − 1) β
i (cid:107) ( v ki +1 − v ki ) (cid:107)
[Equation]
≤
[Equation]
N
[Equation]
where we have used E (cid:107) v kt − v kt − 1 (cid:107) 2 ≤ G 2 .
To see this identity for appropriate α t , β t , note the recursion
[Equation]
so that
[Equation]
Since the identity v kt +1 − v kt = β t − 1 ( v kt − v kt − 1 ) − α t g t,k implies
E
[Equation]
v kt
[Equation]
− v kt
[Equation]
2 ≤ 2 β
[Equation]
Gas long as α t , β t − 1 satisfy 2 β 2 t − 1 + 2 α 2 t ≤ 1 / 2 , we can guarantee that E (cid:107) v kt − v kt − 1 (cid:107) 2 ≤ G 2 for all k by induction.
This together with Jensen’s inequality also gives E (cid:107) v t − v t − 1 (cid:107) 2 ≤ G 2 for all t .
Now we are ready to prove the one step progress result for Nesterov accelerated FedAvg.
The ﬁrst part of the proof is identical to that of the FedAvg case, while the main recursion takes a different form.
Proof of lemma 7.
We again have
[Equation]
and using exactly the same derivation as the FedAvg case, we can obtain the following bound (same as Eq (10) in the proof of Lemma 3):
[Equation] [Equation]
Different from the FedAvg case
[Equation]
we no longer have w t = v t .
Instead,
[Equation]
which gives a recursion involving both v t and v t − 1 :
[Equation]
and we will using this recursive relation to obtain the desired bound.
We can check that our choice of α t and β t satisfy α t is non-increasing, α t ≤ 2 α t + E , and 2 β 2 t − 1 + 2 α 2 t ≤ 1 / 2 for all t ≥ 0 , so that we can apply the bound from Lemma 8 on E (cid:80)
Nk =
[Equation]
p k
[Equation]
− w
[Equation]
to conclude that, with ν max := N · max k p k ,
E
[Equation]
where we have used σ 2 = (cid:80)
k
p k σ 2 k , and by construction our α t satisﬁes Lα t ≤ 15 .
F. C ONVEX S MOOTH O BJECTIVES
In this section we provide proof of the convergence result for Nesterov accelerated FedAvg with convex and smooth objectives.
Unlike with the FedAvg algorithm, where convex and strongly convex results share identical components, the proof for the convergence result in the convex setting for
Nesterov FedAvg uses a change of variables, although the general ideas are in the same vein: we have a one step progress bound for E (cid:107) w t
+1 − w ∗ (cid:107) 2 + η t ( F ( w t ) − F ( w ∗ )) , which is then used to form a telescoping sum that gives an upper bound on min t ≤ T F ( w t ) − F ( w ∗ ) .
Lemma 9 ( One step progress, convex case, Nesterov ) .
Let w t
=
(cid:80)
Nk
=1 p k w kt in Nesterov accelerated FedAvg, and deﬁne η t = α t 1 − β t .
Under assumptions 1,3,4, the following bound holds for all t :
[Equation]
Theorem 4.
Set learning rates α t = β t =
O ( (cid:113) NT ) .
Then under Assumptions 1,3,4 Nesterov accelerated FedAvg with full device participation has rate
[Equation]
and with partial device participation with K sampled devices at each communication round,
[Equation]
Proof.
Applying the bound from Lemma 9, with η t = α t 1 − β t we have
[Equation]
Summing the inequalities from t = 0 to t =
T , we obtain
T (cid:88)
[Equation]
so that min
[Equation]
By setting the constant learning rates α t ≡ (cid:113) NT and β t ≡ c (cid:113) NT so that η t = α
[Equation]
1 − β
[Equation]
=
[Equation] [Equation]
NT , we have
[Equation]
Similarly, for partial participation
[Equation]
we have
[Equation]
where C = 4 K E 2 G 2 or N − K N − 1 4 K E 2 G
[Equation]
so that with α t ≡ (cid:113) KT and β t ≡ c (cid:113) KT , we have
[Equation]
F.2.
D EFERRED PROOFS OF KEY LEMMAS
Proof of lemma 9.
Deﬁne p t := β t 1 − β t
w t − w t − 1 + α t g t − 1 ] =
β 2 t 1 − β t ( v t − v t − 1 ) for t ≥ 1 andfor t = 0 .
We can check that
[Equation]
Now we deﬁne z t := w t + p t and η t = α t 1 − β t for all t , so that we have the recursive relation
[Equation]
t g t
Now
[Equation]
where
[Equation]
where again E A 2 = 0 and E A 3 ≤ η 2 t
[Equation]
p 2 k σ 2 k .
For A 1 we have
[Equation]
Using the convexity and L -smoothness of F k
[Equation]
N (cid:88) k
[Equation]
N
[Equation] [Equation]
≤
[Equation]
t
[Equation]
−
[Equation]
N
[Equation]
k
[Equation]
=
[Equation]
N (cid:88) k
[Equation]
p
[Equation]
which results in
E (cid:107) w
[Equation]
∗
[Equation]
∗
[Equation]
L
N
[Equation]
t
N
[Equation]
] +
[Equation]
η
[Equation]
t
N (cid:88) k
= p
[Equation]
t
N (cid:88)
[Equation]
=
[Equation]
F
[Equation]
t ) (cid:105)
As before, (cid:107) g t (cid:107) 2 ≤ 2 L 2 (cid:80) k
p k (cid:107) w kt − w t (cid:107) 2 + 4 L ( F ( w t ) − F ( w ∗ )) , so that η 2 t (cid:107) g t (cid:107) 2 + η t
[Equation]
for η t ≤ 1 / 4 L .
Using (cid:80) Nk
=1 p k (cid:107) w t − w kt
(cid:107) 2 ≤ 16 E 2 α 2 t G 2 and (cid:80) Nk
=1 p 2 k σ 2 k ≤ ν max 1 N σ 2 , it follows that
[Equation] [Equation]
−
[Equation]
N (cid:88) k
=
[Equation]
p
[Equation]
(cid:104)
[Equation]
w
[Equation]
, ∇
[Equation]
k ( w kt ) (cid:105) if η t ≤ 12 L .
It remains to bound E (cid:80) Nk
=1 p k (cid:104)
z t − w t , ∇ F k ( w kt ) (cid:105) .
Recall that z t − w t = β t 1 − β t
[ w t − w t − 1 + α t g t − 1 ] =
β 2 t 1 − β t ( v t − v t − 1 ) and E (cid:107) v t − v t − 1 (cid:107) 2 ≤ G 2 , E (cid:107)∇ F k ( w kt ) (cid:107) 2 ≤ G 2 .
Cauchy-Schwarz gives
E N (cid:88)
[Equation]
=
[Equation] [Equation]
(cid:105)
[Equation]
N (cid:88)
[Equation]
(cid:107)
[Equation]
(cid:113) E (cid:107)∇
[Equation]
Thus
[Equation]
G G EOMETRIC C ONVERGENCE OF F ED A VG IN THE O VERPARAMETERIZED S ETTING
Overparameterization is a prevalent machine learning setting where the statistical model has much more parameters than the number of training samples and the existence of parameter choices with zero training loss is ensured Allen-Zhu et al.
; Zhang et al.
Due to the property of automatic variance reduction in overparameterization, a line of recent works proved that SGD and accelerated methods achieve geometric convergence Ma et al.
; Moulines & Bach (2011); Needell et al.
(2014); Schmidt & Roux (2013); Strohmer & Vershynin (2009).
A natural question is whether such a result still holds in the federated learning setting.
In this section, we provide the ﬁrst geometric convergence rate of FedAvg for the overparameterized strongly convex and smooth problems, and show that it preserves linear speedup at the same time.
We then sharpen this result in the special case of linear regression.
Inspired by recent advances in accelerating SGD Liu et al.
Jain et al.
(2017), we further propose a novel momentum-based FedAvg algorithm, which enjoys an improved convergence rate over FedAvg.
Detailed proofs are deferred to Appendix Section H. In particular, we do not need Assumptions 3 and 4 and use modiﬁed versions of Assumptions 1 and 2 detailed in this section.
G. G EOMETRIC C ONVERGENCE OF F ED A VG IN THE O VERPARAMETERIZED S ETTING
Recall the FL problem min w (cid:80) Nk
=
p k F k ( w ) with F k ( w ) =
1 n k (cid:80) n k j =1 (cid:96) ( w ; x jk ) .
In this section, we consider the standard Empirical Risk Minimization (ERM) setting where (cid:96) is non-negative, l -smooth, and convex, and as before, each F k ( w ) is L -smooth and µ -strongly convex.
Note that l ≥ L .
This setup includes many important problems in practice.
In the overparameterized setting, there exists w ∗ ∈ arg min w (cid:80)
Nk
=1 p k F k ( w ) such that
(cid:96) ( w ∗ ; x jk ) = 0 for all x jk .
We ﬁrst show that FedAvg achieves geometric convergence with linear speedup in the number of workers.
Theorem 5.
In the overparameterized setting, FedAvg with communication every E iterations and constant step size α = O ( 1 E
[Equation]
has geometric convergence:
[Equation]
Linear speedup and Communication Complexity
The linear speedup factor is on the order of
O ( N/E ) for N ≤ O ( l L ) , i.e. FedAvg with N workers and communication every E iterations provides a geometric convergence speedup factor of O ( N/E ) , for N ≤ O ( lL ) .
When N is above this threshold, however, the speedup is almost constant in the number of workers.
This matches the ﬁndings in Ma et al.
Our result also illustrates that E can be taken O ( T β ) for any β <to achieve geometric convergence, achieving better communication efﬁciency than the standard FL setting.
We emphasize again that compared to the single-server results in Ma et al.
(2018), the difference of our result lies in the factor of N in the speedup, which cannot be obtained if one simply applied the single-server result to each device in our problem.
G. O VERPARAMETERIZED L INEAR R EGRESSION P ROBLEMS
We now turn to quadratic problems and show that the bound in Theorem 5 can be improved to
O (exp( − NEκ 1 t )) for a larger range of N .
We then propose a variant of FedAvg that has provable acceleration over FedAvg with SGD updates.
The local device objectives are now given by the sum of squares F k ( w ) =
12 n k (cid:80) n k j =1 ( w T x jk − z jk ) 2 , and there exists w ∗ such that F ( w ∗ ) ≡ 0 .
Two notions of condition number are important in our results: κ 1 which is based on local Hessians, and ˜ κ , which is termed the statistical condition number Liu & Belkin (2020);
Jain et al.
For their detailed deﬁnitions, please refer to Appendix Section H. Here we use the fact ˜ κ ≤ κ 1 .
Recall ν max = max k p k N and ν min = min k p k N .
Theorem 6.
For the overparamterized linear regression problem, FedAvg with communication every
E iterations with constant step size α = O ( 1 E
N lν max + µ ( N − ν min ) ) has geometric convergence:
[Equation]
When N =
O
( κ 1 ) , the convergence rate is O
((1 − NEκ 1 ) T ) =
O (exp( − NTEκ 1 )) , which exhibits linear speedup in the number of workers, as well as a 1 /κ 1 dependence on the condition number κ 1 .
Inspired by Liu & Belkin (2020), we propose the MaSS accelerated FedAvg algorithm (FedMaSS):
[Equation]
When η k 2 ≡ 0 , this algorithm reduces to the Nesterov accelerated FedAvg algorithm.
In the next theorem, we demonstrate that FedMaSS improves the convergence to O (exp( − NTE √ κ 1 ˜ κ )) .
To our knowledge, this is the ﬁrst acceleration result of FedAvg with momentum updates over SGD updates.
Theorem 7.
For the overparamterized linear regression problem, FedMaSS with communication every E iterations and constant step sizes η 1 = O
( 1 E
[Equation]
has geometric convergence:
[Equation]
Speedup of FedMaSS over FedAvg To better understand the signiﬁcance of the above result, we brieﬂy discuss related works on accelerating SGD.
Nesterov and Heavy Ball updates are known to fail to accelerate over SGD in both the overparameterized and convex settings Liu & Belkin (2020);
Kidambi et al.
Liu et al.
; Yuan et al.
Thus in general one cannot hope to obtain acceleration results for the FedAvg algorithm with Nesterov and Heavy Ball updates.
Luckily, recent works in SGD Jain et al.
(2017); Liu & Belkin (2020) introduced an additional compensation term to the Nesterov updates to address the non-acceleration issue.
Surprisingly, we show the same approach can effectively improve the rate of FedAvg.
Comparing the convergence rate of FedMass (Theorem 7) and FedAvg (Theorem 6), when N = O ( √ κ 1 ˜ κ ) , the convergence rate is
O ((1 −
N E √ κ 1 ˜ κ ) T )
=
O (exp( − NTE √ κ 1 ˜ κ )) as opposed to O (exp( − NTEκ 1 )) .
Since κ 1 ≥ ˜ κ , this implies a speedup factor of (cid:112) κ 1 ˜ κ for FedMaSS.
On the other hand, the same linear speedup in the number of workers holds for N in a smaller range of values.
H P ROOF OF G EOMETRIC C ONVERGENCE R ESULTS FOR O VERPARAMETERIZED P ROBLEMS H. G EOMETRIC C ONVERGENCE OF F ED A VG FOR GENERAL STRONGLY CONVEX AND SMOOTH OBJECTIVES
Theorem 5.
For the overparameterized setting with general strongly convex and smooth objectives,
FedAvg with local SGD updates and communication every E iterations with constant step size α = 12 E
N lν max + L ( N − ν min ) gives the exponential convergence guarantee
[Equation]
Proof.
To illustrate the main ideas of the proof, we ﬁrst present the proof for E = 2 .
Let t − 1 be a communication round, so that w kt − 1 = w t − 1 .
We show that
[Equation]
for appropriately chosen constant step sizes α t , α t − 1 .
We have
[Equation]
and the cross term can be bounded as usual using µ -convexity and L -smoothness of F k : − 2 α t E t (cid:104) w t − w ∗ , g t (cid:105)
= − 2 α t
N (cid:88) k
=
[Equation]
) (cid:105)
= − 2 α t
N (cid:88) k
= p k (cid:104) w t − w kt , ∇ F k ( w kt ) (cid:105) − 2 α t
N (cid:88) k
= p k (cid:104) w kt − w ∗ , ∇ F k ( w kt ) (cid:105) ≤ − 2 α t
N (cid:88) k
= p k (cid:104) w t − w kt , ∇ F k ( w kt ) (cid:105)
+ 2 α t
N (cid:88) k
= p k ( F k ( w ∗ ) − F k ( w kt )) − α t µ
N (cid:88) k
= p k (cid:107) w kt − w ∗ (cid:107)≤ 2 α t
N (cid:88) k
= p k (cid:20)
F k ( w kt ) − F k ( w t ) + L 2 (cid:107) w t − w kt
cid:107)
+ F k ( w ∗ ) − F k ( w kt ) (cid:21) −
α t µ (cid:107)
N (cid:88) k
= p k ( w kt − w ∗ ) (cid:107)= α t L
N (cid:88) k
= p k (cid:107) w t − w kt
cid:107)
+ 2 α t
N (cid:88) k
= p k
[ F k ( w ∗ ) − F k ( w t )] − α t µ (cid:107) w t − w ∗ (cid:107)= α t L
N (cid:88) k
= p k (cid:107) w t − w kt
cid:107) 2 − 2 α t
N (cid:88) k
= p k F k ( w t ) − α t µ (cid:107) w t − w ∗ (cid:107)and so
E (cid:107) w t +
[Equation]
Applying this recursive relation to (cid:107) w t − w ∗ (cid:107) 2 and using (cid:107) w t − 1 − w kt − 1 (cid:107) 2 ≡ 0 , we further obtain
E (cid:107) w t +1 − w ∗ (cid:107) 2 ≤ E (1 − α t µ ) (cid:0) (1 −
[Equation]
t − 1 µ
[Equation]
w
[Equation]
w
[Equation] [Equation]
Now instead of bounding (cid:80)
Nk
=1 p k (cid:107) w t − w kt
(cid:107) 2 using the arguments in the general convex case
, we follow Ma et al.
and use the fact that in the overparameterized setting, w ∗ is a minimizer of each (cid:96) ( w , x jk ) and that each (cid:96) is l -smooth to obtain (cid:107)∇ F k ( w t − 1 , ξ kt − 1 ) (cid:107) 2 ≤ 2 l ( F k ( w t − 1 , ξ kt − 1 ) −
F k ( w ∗ , ξ kt − 1 )) , where recall F k ( w , ξ kt − 1 ) = (cid:96) ( w , ξ kt − 1 ) , so that
N (cid:88) k
= p
[Equation]
(cid:107)
[Equation]
(cid:88)
[Equation]
=
[Equation]
(cid:88)
[Equation]
=
[Equation]
(cid:88)
[Equation]
) =
[Equation]
(cid:88)
[Equation]
p
[Equation]
) (cid:107)
[Equation]
(cid:107) g
[Equation]
(cid:107)≤ α
[Equation]
N (cid:88) k
=
[Equation]
p
[Equation]
)) −
[Equation] [Equation]
[Equation]
again using w t − 1 = w kt − 1 .
Taking expectation with respect to ξ kt − 1 ’s and using the fact that
F ( w ∗ )
= 0 , we have
[Equation]
Note also that
[Equation]
while (cid:107) g t (cid:107)
=
(cid:107)
N (cid:88)
[Equation]
Substituting these into the bound for (cid:107) w t +1 − w ∗ (cid:107) 2 , we have
E (cid:107) w t +1 − w ∗ (cid:107)
[Equation]
from which we can conclude that
[Equation]
if we can choose α t , α t − 1 to guarantee
[Equation]
Note that
[Equation]
≤
[Equation]
and so following Ma et al.
(2018) if we let α t = min { qN 2 lν max , 1 − q 2 L (1 − 1 N ν min ) } for a q ∈ [0 , 1] to be optimized later, we have
E t ( F ( w t ) − α t (cid:107)
N (cid:88)
[Equation]
≥ E t
N (cid:88)
[Equation]
≥ E t
N (cid:88) k
= p k
[Equation]
k
[Equation]
w t
[Equation]
) ≥ q E t
N (cid:88)
[Equation]
=
[Equation]
≥again using w ∗ optimizes F k ( w , ξ kt ) with F k ( w ∗ , ξ kt )
= 0 .
Maximizing α t = min { qN 2 lν max , 1 − q 2 L (1 − 1 N ν min ) } over q ∈ [0 , 1] , we see that q = lν max lν max + L ( N − ν min ) results in the fastest convergence, and this translates to α t =
N lν max + L ( N − ν min ) .
Next we claim that α t − 1 =
c
N lν max + L ( N − ν min ) also guarantees
[Equation]
Note that by scaling α t − 1 by a constant c ≤ 1 if necessary, we can guarantee lα t − 1 (2 l
[Equation] [Equation]
+
[Equation]
t L
[Equation]
1 − α t µ ≤
[Equation]
, and so the condition is equivalent to
[Equation]
which was shown to hold with α t − 1 ≤
N lν max + L ( N − ν min ) .
For the proof of general E ≥ 2 , we use the following two identities:
[Equation]
where the ﬁrst inequality has been established before.
To establish the second inequality, note that
[Equation]
and (cid:88)
[Equation]
so that using the l -smoothness of (cid:96) ,
E N (cid:88) k
=
[Equation]
≤
[Equation]
Using the ﬁrst inequality
[Equation]
we have
[Equation]
and we choose α t and α t − 1 such that E ( F ( w t ) − α t (cid:107) (cid:80)
Nk
=1 p k ∇ F k ( w t , ξ kt ) (cid:107) 2 ) ≥ 0 and (2 α 2 t l 2 + α t L ) ≤ (1 − α t µ )(2 α 2 t − 1 l 2 + α t − 1 L ) / 3 .
This gives
E (cid:107) w t +1 − w ∗ (cid:107) 2 ≤ E (1 − α t µ )[(1 − α t − 1 µ ) (cid:107) w t − 1 − w ∗ (cid:107) 2 − 2 α t − 1 F ( w t − 1 ) + 2 α 2 t − 1 (cid:107)
N (cid:88) k
= p k ∇ F k ( w t − 1 , ξ kt − 1 ) (cid:107)+ (2 α 2 t − 1 l 2 + α t − 1 L )(
N (cid:88) k
= p k (cid:107) w t − 1 − w kt − 1 (cid:107) 2 +
N (cid:88) k
= p k (cid:107) w t − w kt
cid:107) 2 ) / 3]
Using the second inequality
N (cid:88) k
= p k (cid:107) w t − w kt
cid:107) 2 ≤ E 2(1 + 2 l 2 α 2 t − 1 )
N (cid:88) k
= p k (cid:107) w t − 1 − w kt − 1 (cid:107) 2 + 8 α 2 t − 1 lF ( w t − 1 ) − 2 α 2 t − 1 (cid:107) g
t − 1 (cid:107)and that 2(1 + 2 l 2 α 2 t − 1 ) ≤ 3 , 2 α 2 t − 1 l 2 + α t − 1 L ≤ 1 , we have
E (cid:107) w t +1 − w ∗ (cid:107) 2 ≤ E (1 − α t µ )[(
[Equation]
and if α t − 1 is chosen such that
[Equation]
and
[Equation]
we again have
[Equation]
Applying the above derivation iteratively τ < E times
[Equation]
we have
[Equation]
as long as the step sizes α t − τ are chosen such that the following inequalities hold
[Equation]
We can check that setting α t − τ = c 1 τ +
N lν max + L ( N − ν min ) for some small constant c satisﬁes the requirements.
Since communication is done every E iterations
[Equation]
w t 0 = w kt 0 for some t 0 > t − E , from which we can conclude that
[Equation]
and applying this inequality to iterations between each communication round,
[Equation]
With partial participation
[Equation]
we note that
[Equation]
and so the recursive identity becomes
[Equation]
which requires
[Equation]
to hold.
Again setting α t − τ = c 1 τ +
N lν max + L ( N − ν min ) for a possibly different constant from before satisﬁes the requirements
[Equation]
Finally, using the L -smoothness of F ,
[Equation]
H. G EOMETRIC C ONVERGENCE OF F ED A VG FOR O VERPARAMETERIZED L INEAR R EGRESSION
We ﬁrst provide details on quantities used in the proof of results on linear regression in Section G.
The local device objectives are now given by the sum of squares F k ( w ) = 1 2 n k (cid:80) n = − and there exists w ∗ such that F ( w ∗ ) ≡ 0 .
Deﬁne the local Hessian matrix as H k := 1 n k (cid:80) n k j =1 x jk ( x jk ) T , and the stochastic Hessian matrix as ˜ H kt := ξ kt ( ξ kt ) T , where ξ kt is the stochastic sample on the k th device at time t .
Deﬁne l to be the smallest positive number such that E (cid:107) ξ kt (cid:107) 2 ξ kt ( ξ kt ) T (cid:22) l H k for all k .
Note that l ≤ max k,j (cid:107) x jk (cid:107) 2 .
Let L and µ be lower and upper bounds of non-zero eigenvalues of
H k .
Deﬁne κ 1 :=
l/µ and κ :=
L/µ .
Following Liu & Belkin (2020); Jain et al.
(2017), we deﬁne the statistical condition number ˜ κ as the smallest positive real number
such that E (cid:80) k
p k
˜
H
kt H − 1 ˜
H kt ≤ ˜ κ H .
The condition numbers κ 1 and ˜ κ are important in the characterization of convergence rates for FedAvg algorithms.
Note that κ 1 > κ and κ 1 > ˜ κ .
Let H =
(cid:80) k p k H k .
In general H has zero eigenvalues.
However, because the null space of H and range of H are orthogonal, in our subsequence analysis it sufﬁces to project w t − w ∗ onto the range of H , thus we may restrict to the non-zero eigenvalue of H .
A useful observation is that we can use w ∗ T x jk − z jk ≡ 0 to rewrite the local objectives as F k ( w ) =
[Equation] [Equation]
so that F ( w ) = 12 (cid:107) w − w ∗ (cid:107) 2 H .
Finally, note that E ˜ H kt = 1 n k (cid:80) n k j =1 x jk ( x jk ) T
= H k and g t,k = ∇ F k ( w kt , ξ kt ) =
˜
H kt ( w kt − w ∗ ) while g t = (cid:80) Nk
=1 p k ∇ F k ( w kt , ξ kt ) =
(cid:80) Nk
=1 p k ˜ H kt ( w kt − w ∗ ) and g t = (cid:80) Nk
=1 p k H k ( w kt − w ∗ )
Theorem 6.
For the overparamterized linear regression problem, FedAvg with communication every
E iterations with constant step size α = O ( 1 E
N lν max + µ ( N − ν min ) ) has geometric convergence:
[Equation]
Proof.
We again show the result ﬁrst when E = 2 and t − 1 is a communication round.
We have
[Equation]
and − 2 α t E t (cid:104) w t − w ∗ , g t (cid:105) = − 2 α t
N (cid:88) k
= p k (cid:104) w t − w ∗ , ∇ F k ( w kt ) (cid:105)
= − 2 α t
N (cid:88) k
= p k (cid:104) w t − w kt , ∇ F k ( w kt ) (cid:105) − 2 α t
N (cid:88) k
= p k (cid:104) w kt − w ∗ , ∇ F k ( w kt ) (cid:105) =
− 2 α t
N (cid:88) k
= p k (cid:104) w t − w kt , ∇ F k ( w kt ) (cid:105) − 2 α t
N (cid:88) k
= p k (cid:104) w kt − w ∗ , H k ( w kt − w ∗ ) (cid:105)
= − 2 α t
N (cid:88) k
= p k (cid:104) w t − w kt , ∇ F k ( w kt ) (cid:105) − 4 α t
N (cid:88) k
= p k F k ( w kt ) ≤ 2 α t
N (cid:88) k
= p k ( F k ( w kt ) − F k ( w t ) + L 2 (cid:107) w t − w kt
(cid:107) 2 )
− 4 α t
N (cid:88) k
= p k F k ( w kt )
= α t L
N (cid:88) k
= p k (cid:107) w t − w kt
cid:107) 2 − 2 α t
N (cid:88) k
= p k F k ( w t ) − 2 α t
N (cid:88) k
= p k F k ( w kt ) =
α t L
N (cid:88) k
= p k (cid:107) w t − w kt
cid:107) 2 − α t
N (cid:88) k
= p k (cid:104) ( w t − w ∗ ) , H k ( w t − w ∗ ) (cid:105) − 2 α t
N (cid:88) k
= p k F k ( w kt ) and (cid:107) g t (cid:107)
= (cid:107)
N (cid:88) k
= p k ˜ H kt ( w kt − w ∗ ) (cid:107)= (cid:107)
N (cid:88) k
= p k ˜ H kt ( w t − w ∗ )
+
N (cid:88) k
= p k ˜ H kt ( w kt − w t ) (cid:107)≤ 2 (cid:107)
N (cid:88) k
= p k ˜ H kt ( w t − w ∗ ) (cid:107) 2 + 2 (cid:107)
N (cid:88) k
= p k ˜ H kt ( w kt − w t ) (cid:107)which gives
E (cid:107)
[Equation]
w ∗
[Equation]
α t
N (cid:88) k
= p k (cid:104)
[Equation]
t
[Equation]
∗ ,
[Equation]
k w t −
[Equation]
∗ (cid:105) +
α 2 t (cid:107)
N (cid:88) k
= p k ˜ H kt ( w t −
[Equation]
following Ma et al.
we ﬁrst prove that
[Equation]
with appropriately chosen α t .
Compared to the rate O (
[Equation]
for general strongly convex and smooth objectives, this is an improvement as linear speedup is now available for a larger range of N
[Equation]
We have
[Equation]
(cid:54) =
k p j p k E t (cid:104) ˜
H kt ( w t − w ∗ ) , ˜ H jt ( w t − w ∗ ) (cid:105) =
N (cid:88) k
= p 2 k E t (cid:107) ˜
H kt ( w t − w ∗ ) (cid:107) 2 +
N (cid:88) k
= (cid:88) j (cid:54) =
k p j p k E t (cid:104)
H k ( w t − w ∗ ) , H j ( w t − w ∗ ) (cid:105) =
N (cid:88) k
= p 2 k E t (cid:107) ˜
H kt ( w t − w ∗ ) (cid:107) 2 +
N (cid:88) k
=
N (cid:88)
j = p
j p k E t (cid:104)
H k ( w t − w ∗ ) , H j ( w t − w ∗ ) (cid:105) −
N (cid:88) k
= p 2 k (cid:107) H k ( w t − w ∗ ) (cid:107)=
N (cid:88) k
= p 2 k E t (cid:107) ˜
H kt ( w t − w ∗ ) (cid:107)
+ (cid:107) (cid:88) k p
k H k ( w t − w ∗ ) (cid:107) 2 −
N (cid:88) k
= p 2 k (cid:107) H k ( w t − w ∗ ) (cid:107)≤
N (cid:88) k
= p 2 k E t (cid:107) ˜
H kt ( w t − w ∗ ) (cid:107)
+ (cid:107) (cid:88) k p
k H k ( w t − w ∗ ) (cid:107) 2 − 1 N ν min (cid:107) (cid:88) k p k H k ( w t − w ∗ ) (cid:107)
[Equation]
using (cid:107) ˜
H kt (cid:107) ≤ l .
Now we have
[Equation]
and it remains to bound the maximum eigenvalue of
[Equation]
and we bound this following Ma et al.
If we choose α t <
N
[Equation] [Equation]
+
[Equation]
N −
[Equation]
) L ) , then
[Equation]
and the convergence rate is given by the maximum of 1 − α t λ +
α 2 t ( ν max l N λ + N − ν min N λ 2 ) maximized over the non-zero eigenvalues λ of H .
To select the step size α t that gives the smallest upper bound, we then minimize over α t , resulting in
[Equation]
Since the objective is quadratic in λ , the maximum is achieved at either the largest eigenvalue λ max of H or the smallest non-zero eigenvalue λ min of H .
When N ≤ 4 ν max l L − λ min + 4 ν min , i.e. when N =
O
( l/λ min )
=
O ( κ 1 ) , the optimal objective value is achieved at λ min and the optimal step size is given by α t =
N 4( ν max l +( N − ν min ) λ min ) .
The optimal convergence rate (i.e. the optimal objective value) is equal to 1 −
[Equation]
1 −
N ( ν max κ 1 +( N − ν min )) .
This implies that when N = O ( κ 1 ) , the optimal convergence rate has a linear speedup in N .
When N is larger, this step size is no longer optimal, but we still have 1 −
N ( ν max κ 1 +( N − ν min )) as an upper bound on the convergence rate.
Now we have proved
[Equation]
N
[Equation]
Next we bound terms in the second line using a similar argument as the general case.
We have
[Equation]
and
E N (cid:88)
[Equation] [Equation]
and if α t , α t − 1 satisfy
[Equation]
we have
[Equation]
and again by choosing α t − 1 =
c
N
[Equation]
λ min ) for a small constant c
[Equation]
we can guarantee that
[Equation]
For general E
[Equation]
we have the recursive relation
[Equation]
as long as the step sizes are chosen α t − τ = c
N
[Equation]
max
[Equation]
min ) λ min ) such that the following inequal- ities hold
[Equation]
and
[Equation]
which gives
[Equation]
and with partial participation, the same bound holds with a possibly different choice of c .
H. G EOMETRIC C ONVERGENCE OF F ED M A SS FOR O VERPARAMETERIZED L INEAR R EGRESSION
Theorem 7.
For the overparamterized linear regression problem, FedMaSS with communication every E iterations and constant step sizes η 1 = O
( 1 E
[Equation]
has geometric convergence:
[Equation]
Proof.
The proof is based on results in Liu & Belkin (2020) which originally proposed the MaSS algorithm.
Note that the update can equivalently be written as
[Equation]
where there is a bijection between the parameters 1 − α k 1+ α k = γ k , η k = η k 1 , η k
[Equation]
= η k 2 , and we further introduce an auxiliary parameter v kt , which is initialized at v k 0 .
We also note that when δ k =
η k α k , the update reduces to the Nesterov accelerated SGD.
This version of the FedAvg algorithm with local MaSS updates is used for analyzing the geometric convergence.
As before, deﬁne the virtual sequences
[Equation]
, v t = (cid:80) Nk
=1 p k v kt , u t = (cid:80) Nk
=1 p k u kt , and g t = (cid:80)
Nk
=1 p k E g t,k .
We have E g t =
g t and w t +1 =
u t − η t g t , v t +1 =
(1 − α k ) v t + α k w t − δ k g t , and u t +1 =
α k 1+ α k v t +1 + 1
+ α k w t
+1 .
We ﬁrst prove the theorem with E = 2 and t − 1 being a communication round.
We have (cid:107) v t
[Equation]
1 − w ∗ (cid:107) 2 H −=
[Equation]
Following the proof in Liu & Belkin (2020),
[Equation]
using the convexity of the norm (cid:107) · (cid:107) H − 1 and that µ is the smallest non-zero eigenvalue of H .
Now
[Equation]
using the folowing bound:
[Equation]
where we have used E (cid:80)
[Equation]
˜ κ H by deﬁnition of ˜ κ and the operator convexity of the mapping W → W H − 1 W .
Finally,
[Equation]
where we have used
[Equation]
and the identity that − 2 (cid:104) a , b
[Equation]
=
[Equation]
b
[Equation]
It follows that
[Equation] [Equation]
On the other hand
[Equation]
where we use the following bound:
[Equation]
H again using that W → W 2 is operator convex and that E ˜ H kt ˜ H kt (cid:22) l H k by deﬁnition of l .
Combining the bounds for E (cid:107) w t +1 − w ∗ (cid:107) 2 and E (cid:107) v t +1 − w ∗ (cid:107) 2 H − 1 ,
E δ
[Equation]
Following Liu & Belkin (2020) if we choose step sizes
so that
[Equation]
or equivalently
[Equation]
the second and third terms are negative.
To optimize the step sizes, note that the two inequalities imply
[Equation]
and maximizing the right hand side with respect to η , which is quadratic, we see that η ≡ 1 / ( ν max 1 N l +
L N − ν min N ) maximizes the right hand side, with α
[Equation]
Note that α =
[Equation]
O
[Equation]
) when N = O (min { ˜ κ, κ 1 /κ } ) .
Finally, to deal with the terms 2 δ 2 (cid:107) (cid:80)
[Equation]
p
[Equation]
˜ H
[Equation]
u
[Equation] [Equation]
+
[Equation]
k p k (cid:107) ( u t − u kt ) (cid:107) 2 H − 1 , we can use Jensen
[Equation]
which can be combined with the terms with (cid:107) ( u t − 1 − w ∗ ) (cid:107) 2 in the recursive expansion of E δα (cid:107) w t − w
[Equation]
+
[Equation]
and the step sizes can be chosen so that the resulting coefﬁcients are negative.
Therefore, we have shown that
E (cid:107) w t +
[Equation]
w
[Equation]
(cid:107) 2 ≤ (1 − α ) 2 (cid:107) w
[Equation]
1 − w
[Equation]
(cid:107)where α =
[Equation]
= O (
N
[Equation]
+ N − ν min ) when N =
O (min { ˜ κ, κ 1 /κ } ) .
For general E > 1 , choosing η = c/E ( ν max 1 N l + L N − ν min N ) for some small constant c results in α
= O (
E
[Equation]
N
[Equation]
) and this guarantees that
[Equation]
for all t .
I D ETAILS ON E XPERIMENTS AND A DDITIONAL R ESULTS
We describe the precise procedure to reproduce the results in this paper.
As we mentioned in
Section 5, we empirically veriﬁed the linear speed up on various convex settings for both FedAvg and its accelerated variants.
For all the results, we set random seeds as 0 , 1 , 2 and report the best convergence rate across the three folds.
For each run, we initialize w 0 = 0 and measure the number of iteration to reach the target accuracy (cid:15) .
We use the small-scale dataset w8a Platt (1998), which consists of n = 49749 samples with feature dimension d = 300 .
The label is either positive one or negative one.
The dataset has sparse binary features in { 0 , 1 } .
Each sample has 11.15 non-zero feature values out of 300 features on average.
We set the batch size equal to four across all experiments.
In the next following subsections, we introduce parameter searching in each objective separately.
I. S TRONGLY C ONVEX O BJECTIVES
We ﬁrst consider the strongly convex objective function, where we use a regularized binary logistic regression with regularization λ
= 1 /n
≈ 2 e − 5 .
We evenly distributed on 1 , 2 , 4 , 8 , 16 , 32 devices and report the number of iterations/rounds needed to converge to (cid:15) − accuracy, where (cid:15) = 0 .
The optimal objective function value f ∗ is set as f ∗ = 0 .
This is determined numerically and we follow the setting in Stich (2019).
The learning rate is decayed as the η t = min( η 0 , nc 1+ t ) , where we extensively search the best learning rate c ∈ { 2 − 1 c 0 , 2 − 2 c 0 , c 0 , 2 c 0 , 2 2 c 0 } .
In this case, we search the initial learning rate η 0 ∈ { 1 , 32 } and c 0 = 1 / 8 .
I. C ONVEX S MOOTH O BJECTIVES
We also use binary logistic regression without regularization.
The setting is almost same as its regularized counter part.
We also evenly distributed all the samples on 1 , 2 , 4 , 8 , 16 , 32 devices.
The ﬁgure shows the number of iterations needed to converge to (cid:15) − accuracy, where (cid:15) = 0 .
The optiaml objective function value is set as f ∗ = 0 .
11379089057514849 , determined numerically.
The learning rate is decayed as the η t = min( η 0 , nc 1+ t ) , where we extensively search the best learning rate c ∈ { 2 − 1 c 0 , 2 − 2 c 0 , c 0 , 2 c 0 , 2 2 c 0 } .
In this case, we search the initial learning rate η 0 ∈ { 1 , 32 } and c 0 = 1 / 8 .
I. L INEAR REGRESSION
For linear regression, we use the same feature vectors from w8a dataset and generate ground truth [ w ∗ , b ∗ ] from a multivariate normal distribution with zero mean and standard deviation one.
Then we generate label based on y i =
x ti w ∗ + b ∗ .
This procedure will ensure we satisfy the over-parameterized setting as required in our theorems.
We also evenly distributed all the samples on 1 , 2 , 4 , 8 , 16 ,devices.
The ﬁgure shows the number of iterations needed to converge to (cid:15) − accuracy, where (cid:15) = 0 .
The optiaml objective function value is f ∗ = 0 .
The learning rate is decayed as the η t = min( η 0 , nc 1+ t ) , where we extensively search the best learning rate c ∈ { 2 − 1 c 0 , 2 − 2 c 0 , c 0 , 2 c 0 , 2 2 c 0 } .
In this case, we search the initial learning rate η 0 ∈ { 0 . 1 , 0 . 12 } and c 0 = 1 / 256 .
I. P ARTIAL P ARTICIPATION
To examine the linear speedup of FedAvg in partial participation setting, we evenly distributed data on 4 , 8 , 16 , 32 , 64 , 128 devices and uniformly sample 50% devices without replacement.
All other hyperparameters are the same as previous sections.
I. N ESTEROV ACCELERATED F ED A VG
The experiments of Nesterov accelerated FedAvg (the update formula is given as follows) uses the same setting as previous three sections for vanilia FedAvg.
[Equation]
[Figure]
We set β t = 0 .
1 and search α t in the same way as η t in FedAvg.
I. T HE IMPACT OF E .
In this subsection, we further examine how does the number of local steps ( E ) affect convergence.
As shown in Figure 2, the number of iterations increases as E increase, which slow down the convergence in terms of gradient computation.
However, it can save communication costs as the number of rounds decreased when the E increases.
This showcase that we need a proper choice of E to trade-off the communication cost and convergence speed.