Asynchronous SGD Beats Minibatch SGD Under Arbitrary Delays
Abstract
The existing analysis of asynchronous stochastic gradient descent (SGD) degrades dramatically when any delay is large, giving the impression that performance depends primarily on the delay.
On the contrary, we prove much better guarantees for the same asynchronous SGD algorithm regardless of the delays in the gradients, depending instead just on the number of parallel devices used to implement the algorithm.
Our guarantees are strictly better than the existing analyses, and we also argue that asynchronous SGD outperforms synchronous minibatch SGD in the settings we consider.
For our analysis, we introduce a novel recursion based on “virtual iterates” and delay-adaptive stepsizes, which allow us to derive state-of-theart guarantees for both convex and non-convex objectives
Introduction
We consider solving stochastic optimization problems of the form
[Equation]
which includes machine learning (ML) training objectives, where f ( x ; ξ ) represents the loss of a model parameterized by x on the datum ξ .
Depending on the application, D could represent a finite dataset of size n or a population distribution.
In recent years, such stochastic optimization problems have continued to grow rapidly in size, both in terms of the dimension d of the optimization variable—i.e., the number of model parameters in ML—and in terms of the quantity of data—i.e., the number of samples ξ 1 , . . . , ξ n ∼ D being used.
With d and n regularly reaching the tens or hundreds of billions, it is increasingly necessary to use parallel optimization algorithms to handle the large scale and to benefit from data stored on different machines.
There are many ways of employing parallelism to solve (1), but the most popular approaches in practice are first-order methods based on stochastic gradient descent (SGD).
At each iteration, SGD employs stochastic estimates of ∇ F to update the parameters as x k = x k − 1 − γ k ∇ f ( x k − 1 ; ξ k − 1 ) for an i.i.d.
sample ξ k − 1 ∼ D .
Given M machines capable of computing these stochastic gradient estimates ∇ f ( x ; ξ ) in parallel, one approach to parallelizing SGD is what we call “Minibatch SGD.”
This refers to a synchronous, parallel algorithm that dispatches the current parameters x k − 1 to each of the M machines, waits while they compute and communicate back their gradient estimates g 1 k − 1 , . .
, g Mk − 1 , and then takes a minibatch SGD step x k = x k − 1 − γ k · 1 M (cid:80) Mm =1 g mk − 1 .
This is a natural idea with long history [16, 18, 55] and it is a commonly used in practice [e.g., 22].
However, since Minibatch SGD waits for all M of the machines to finish computing their gradient estimates before updating, it proceeds only at the speed of the slowest machine.
There are several possible sources of delays: nodes may have heterogeneous hardware with different computational throughputs [23, 25], network latency can slow the communication of gradients, and nodes may even just drop out [45].
Slower “straggler” nodes can arise in many natural parallel settings including training ML models using multiple GPUs [14] or in the cloud, and sensitivity to these stragglers poses a serious problem for Minibatch SGD and other similar synchronous algorithms.
1.1 Asynchronous SGD
In this work, we consider a different, asynchronous parallel variant of SGD, which we define in
Algorithm 1 and which has a long history [1, 3, 41].
For this method, whenever one of the M machines finishes computing a stochastic gradient, the algorithm immediately uses it to take an
SGD step, and then that machine begins computing a new stochastic gradient at the newly updated parameters.
Because of the asynchronous updates, the other machines are now estimating the gradient at out-of-date parameters, so this algorithm ends up performing updates of the form
[Equation]
where τ ( k ) is the “delay” of the gradient at iteration k , which is often much greater than one.
Nevertheless, even though the updates are not necessarily well-aligned with the gradient of F at the current parameters, the delays are usually not a huge problem in practice [17].
Asynchronous
SGD has been particularly popular in reinforcement learning applications [36, 39] and federated learning [13, 43], providing significant speed-ups over Minibatch SGD.
However, the existing theoretical guarantees for Asynchronous SGD are disappointing, and the typical approach to analyzing the algorithm involves assuming that all of the delays are either the same, τ ( k )
=
τ , or at least upper bounded, τ ( k ) ⩽ τ max [1, 3, 29, 32, 48].
These analyses then show that the number of updates needed to reach accuracy ϵ grows linearly with τ max , which could be very painful.
Specifically, suppose we have two parallel workers—one fast device that needs just 1 µ s to calculate a stochastic gradient, and one slow device that needs 1s.
If we use these two machines to implement Asynchronous SGD, the delay of the slow device’s gradients will be 1 million, because in the 1 second that we wait for the slow machine, the fast one will produce 1 million updates.
Consequently, the analysis based on τ max degrades by a factor of 1 million.
But on further reflection,
Asynchronous SGD should actually do very well in this scenario, after all, 99.9999% of the SGD steps taken have gradients with no delay!
Even if one update in a million has an enormous delay, it seems fairly clear that a few badly out-of-date gradients should not be enough to ruin the performance of SGD—a famously robust algorithm.
1.2 Speedup over Minibatch SGD
We will frequently compare Asynchronous SGD to Minibatch SGD ( e.g. , Table 2), and to make this comparison easier, suppose for simplicity that each worker requires a fixed time of s m seconds per gradient computation, so in S seconds, each machine computes S / s m stochastic gradients.
Importantly, this translates into drastically different numbers of parameter updates for Asynchronous versus
Minibatch SGD: the former takes one step per gradient computed, while the latter only takes one step for each gradient from the slowest machine.
That is, Asynchronous and Minibatch SGD take
[Equation]
total steps, respectively.
So, it is easy to see that Asynchronous SGD takes at least M times more steps than Minibatch SGD in any fixed amount of time, and even more than that when the machines have varying speeds.
Soon, we will prove guarantees for Asynchronous SGD that match the guarantee for Minibatch SGD using exactly M times fewer updates, meaning that our Asynchronous SGD guarantees are strictly better than the Minibatch SGD guarantees in terms of runtime.
1.3 Contributions and structure
In this work, we provide a new analysis for Asynchronous SGD, described in Section 2, which we use to prove better convergence guarantees.
In contrast to the existing guarantees that are based asynchronous in the sense that different workers will have un-synchronized iterates, we nevertheless focus on a situation where each SGD step is an atomic/locked update of the parameters x k .
This is in contrast to methods using lock-free updates, e.g., in the style of H OGWILD !
[44], where different coordinates of the parameters might be updated and overwritten simultaneously by different workers.
[Table]
[Equation]
[Table]
K
[Equation]
K
[Table]
[Equation]
[Table]
Our work
[Equation]
[Table]
[Equation]
[Table]
on τ max , ours depend only on the number of workers, M
[Table]
and show that Asynchronous SGD is better than the Minibatch SGD algorithm described earlier.
For Lipschitz-continuous objectives, our results in Section 3 improve over existing Asynchronous and Minibatch SGD guarantees, and in the non-smooth, convex setting they are, in fact, minimax optimal.
In Section 4, we prove state-of-the-art guarantees for smooth losses, which are summarized in Table 1.
We do this by introducing a novel delay-adaptive stepsize schedule γ k ∼ 1 /τ ( k ) .
The high-level intuition behind our proofs is that, although some of the gradients may have very large delay, most of the gradients have delay O ( M ) , which is enough for good performance.
1.4 Related work
Asynchronous optimization has a long history.
In the 1970s, Baudet [8] considered shared-memory asynchronous fixed-point iterations, and an early convergence result for Asynchronous SGD was established by Tsitsiklis et al.
Recent analysis typically relies on bounded delays [1, 30, 44, 48].
Sra et al.
[46] slightly relax this to random delays with bounded expectation.
Zhou et al.
[54] allowed delays to grow over time, but only show asymptotic convergence.
Some algorithms try to adapt to the delays, but even these are not proven to perform well under arbitrary delays [35, 53].
For more examples of stochastic asynchronous algorithms, we refer readers to the surveys by Assran et al.
[6], Ben-Nun and Hoefler [9].
In the online learning setting, Joulani et al.
[24], McMahan and Streeter [33] studied an adaptive asynchronous SGD algorithm.
Aviv et al.
[7] proved better guarantees on bounded domains by introducing a projection, with rates depending on the average rather than maximum delay.
However, their proof relies heavily on the assumption of a bounded domain, while ours applies for optimization over all of R d .
Relatedly, Cohen et al.
[15] prove guarantees for Asynchronous SGD that depend on the average delay, but their results only hold with probability 12 .
Most closely related to ours, Mania et al.
[32] proposed and utilized the analysis tool of “virtual iterates” for Asynchronous SGD under bounded delays.
Stich and Karimireddy [48] extended these results, albeit restricting delays to be constant, and Leblond et al.
[29] considered lock-free updates.
We use the same proof approach, but with a different virtual sequence and different, delay-adaptive stepsizes.
In a concurrent work, Koloskova et al.
[28] used a similar technique to ours to study Asynchronous
SGD with potentially unbounded delays.
Their bounds are stated using empirical average of the delays rather than M .
Compared to the work of Koloskova et al.
[28], our theory includes guarantees for non-smooth problems as given in Theorem 1.
They, on the other hand, have an extra result for the case of constant stepsize and bounded delays without assuming bounded gradients.
Our Theoremthat covers non-convex, convex, and strongly convex problems has almost the same delay-adaptive stepsize as their Theorem 8 that covers non-convex functions only.
For heterogeneous data, we study standard Asynchronous SGD, whereas Koloskova et al.
[28] used a special scheduling procedure to balance the workers, see also the comments after our Theorem 4.
More broadly, there are numerous other parallel training approaches that could improve upon Minibatch SGD.
Particularly popular lines of work include gradient compression [2, 10, 48], decentralized communication [31, 40], and local updates with infrequent communication [27, 34, 47, 50].
These are all orthogonal to asynchrony and can even be combined with it [see, e.g., 5, 19, 38].
1.5 Notation and problem setting
We consider solving the problem (1) under several standard [see, e.g., 11] combinations of conditions on the objective F .
We denote the minimum of F as F ∗ :=
min x F ( x ) , an upper bound on the initial suboptimality ∆ ⩾ F ( x 0 ) − F ∗ , and an upper bound on the initial distance to the minimizer
B ⩾ min {∥ x 0 − x ∗ ∥ : x ∗ ∈ argmin x F ( x ) } .
Here, and throughout this paper we focus on the
Euclidean geometry and use ∥·∥ to denote the Euclidean norm; however, it is likely possible to extend our results to other geometries using similar arguments.
Our optimization variable lies in R d , but our algorithm and results are dimension-free, meaning they hold for any d .
A function F is µ - strongly convex if for each x , y and subgradient g ∈ ∂F ( x ) , we have F ( y ) ⩾
F ( x )+ ⟨ g , y − x ⟩ + µ 2 ∥ x − y ∥ 2 , and F is convex if this holds for µ = 0 .
When F and f are convex, we do not necessarily assume they are differentiable, but we abuse notation and use ∇ F ( x ) and ∇ f ( x ; ξ ) to denote an arbitrary subgradient at x .
The loss f is G - Lipschitz-continuous if for each x , y and ξ , we have | f ( x ; ξ ) − f ( y ; ξ ) | ⩽ G ∥ x − y ∥ , which also implies that for each x , ∥∇ f ( x ; ξ ) ∥ ⩽
G [11].
The objective F is L - smooth if it is differentiable and its gradient is L -Lipschitz-continuous: for all x , y , ∥∇ F ( x ) − ∇ F ( y )
∥
⩽ L ∥ x − y ∥ .
We may also assume the stochastic gradients have σ 2 - bounded variance , meaning that for all x , E ξ ∼D ∥∇ f ( x ; ξ ) − ∇ F ( x ) ∥ 2 ⩽ σ 2 .
When the objective is (strongly) convex, we will obtain an upper bound on the expected suboptimality of our algorithm’s output, ˜ x , i.e., E F (˜ x ) − F ∗ ⩽ ϵ for some explicit ϵ .
On the other hand, when the objective is not convex, it is generally intractable to approximate global minima [42] so, as is common in the literature, we fall back to showing that the algorithm will find an approximate first-order stationary point of the objective: E ∥∇ F (˜ x ) ∥ 2 ⩽ ϵ 2 .
Finally, we mainly focus on “homogeneous” optimization, where each machine computes each stochastic gradient using an i.i.d.
sample ξ ∼ D .
This is in contrast to the “heterogeneous” setting, where different machines have access to data drawn from different sources, meaning that stochastic gradients estimated on different machines can have different distributions (see Section 5).
Delay notation.
The gradients used by Algorithm 1 may arrive out of order, so the parameters x k at iteration k will often be updated using stochastic gradients ∇ f ( x j ; ξ j ) evaluated at out-of-date parameters x j for j < k − 1 ; we therefore introduce additional notation for describing the delays.
We use m k ∈ [ M ] to denote the index of the worker whose stochastic gradient estimate is used in iteration k to compute x k .
In addition, for each iteration k and worker m , we introduce prev( k, m ) =
max { j < k : m j = m } and next( k, m ) =
min { j ⩾ k : m j = m } , which denotes the index of the last iteration before k in which machine m returned a gradient, and the index of the first iteration after k (inclusive) that machine m will return a gradient, respectively.
Accordingly, at iteration k , machine m is in the process of estimating ∇ f ( x prev( k,m ) ; ξ m prev( k,m ) ) .
We define the current “delay” of this gradient as the number of iterations that have happened since prev( k, m ) , i.e., τ ( k, m ) :
= k − prev( k, m ) .
Abusing notation, we shorten to τ ( k ) :
= τ ( k, m k ) for the delay of the gradient used to compute x k .
Analysis of Asynchronous SGD via virtual iterates
The central idea in our analysis is to focus on a virtual iterate sequence, which tracks, roughly, how the parameters would have evolved if there were no delays.
We note that this sequence is only used for the purpose of analysis, and is never actually computed.
This technique is related to previous approaches [29, 32, 48], with the key difference being which virtual sequence we track.
Specifically, in addition to x 0 , . . .
, x K —the actual sequence of iterates generated by Algorithm 1—we introduce
1: Input: initialization x 0 ∈ R d , stepsizes γ k >2: Each worker m ∈
[ M ] begins calculating ∇ f ( x 0 ; ξ m 0 ) 3: for k
= 1 , 2 , . . .
do 4:
Gradient ∇ f ( x prev( k,m k ) ; ξ m k prev( k,m k ) ) arrives from some worker m k 5:
Update: x k = x k − 1 − γ k ∇ f ( x prev( k,m k ) ; ξ m k prev( k,m k ) ) 6:
Send x k to worker m k , which begins calculating ∇ f ( x k ; ξ m k k ) 7: end for the complementary sequence ˆ x 1 , . .
, ˆ x K which evolves according to
[Equation]
where ˆ x 1 := x 0 − (cid:88)
M m =1 γ next(1 ,m ) ∇ f ( x 0 ; ξ m 0 ) and ˆ γ k :=
γ next( k +1 ,m k ) .
This virtual sequence ˆ x k +1 evolves almost according to SGD (without delays), although we note that it uses gradients evaluated at x k rather than ˆ x k .
The stepsize used for this update, ˆ γ k , is the stepsize that is eventually used by Algorithm 1 when it takes a step using the gradient evaluated at x k .
The core of our proofs is showing that x k and ˆ x k remain close using the following Lemma:
Lemma 1.
Let { x k } and { ˆ x k } be defined as in Algorithm 1 and (3) , respectively.
Then for all k ⩾x k − ˆ x k = (cid:88)
[Equation]
Proof.
First, we expand the update of x k in Algorithm 1, and of ˆ x k in (3).
Denoting e k = x k − ˆ x k , e k =
[Equation]
From here, we note that the second term, which comprises all of the gradients used by Algorithm 1 to make the first k updates, can be rewritten as:
[Equation]
and substituting into the expression for e k above, there are k cancellations and the claim follows.
How does this help us?
For all of our results, our strategy is to show that the virtual iterates ˆ x k evolve essentially according to SGD (without delays), that ∥ x k − ˆ x k ∥ remains small throughout the algorithm’s execution, and therefore that the Asynchronous SGD iterates x k are nearly as good as
SGD without delays.
Lemma 1 is key for the second step.
Whereas previous work tries to bound ∥ x k − ˆ x k ∥ by reasoning about the delays involved in the first k updates, we observe that x k − ˆ x k is just the sum of M − 1 gradients, so our bound naturally incurs a dependence on M , but it is not directly affected by the delays themselves.
Convergence guarantees for Lipschitz losses
We begin by analyzing Algorithm 1 for convex, Lipschitz-continuous losses:
Theorem 1.
Let the objective F be convex, let f ( · ; ξ ) be G -Lipschitz-continuous for each ξ , and let there be a minimizer x ∗ ∈ argmin x F ( x ) for which ∥ x 0 − x ∗ ∥ ⩽ B .
Then for any number of iterations 2 K ⩾ M , Algorithm 1 with constant stepsize γ k = γ =
B/ ( G √ KM ) ensures
[Equation]
Proof.
Let x ∗ ∈ argmin x F ( x ) with ∥ x 0 − x ∗ ∥ ⩽ B .
First, we follow the typical analysis of stochastic gradient descent [see, e
[Equation]
g., 11, Theorem 3.2] by expanding the update of ˆ x k +1 from (3):
[Equation]
For the first inequality
[Equation]
we used the convexity of F and that f ( · ; ξ ) being G -Lipschitz implies ∥∇ f ( x ; ξ )
∥
⩽ G for all x ; for the second, we again used the G -Lipschitzness of f ( · ; ξ ) along with the Cauchy-Schwarz inequality.
Continuing as in the standard SGD analysis, we rearrange the expression, average over K , apply the convexity of F
[Equation]
and telescope the sum to conclude:
[Equation]
The first two terms almost exactly match the guarantee of SGD with fixed stepsize γ .
The main difference—and the place where Lemma 1 and the Lipschitzness of the losses plays a key role—is in bounding the third term.
Since ∥∇ f ( x prev( k,m ) ; ξ m prev( k,m ) )
∥ ⩽ G , we just use the triangle inequality:
[Equation]
Combining this with ∥ ˆ x 1 − x ∗ ∥ 2 = ∥ x 0 − γ (cid:80) Mm =1 ∇ f ( x 0 ; ξ m 0 ) − x ∗ ∥ 2 ⩽ 2 B 2 + 2 γ 2 M 2 G 2 , and plugging in our stepsize in (4) completes the proof.
To understand this result, it is instructive to recall the worst-case performance of K Mini steps of
Minibatch SGD [42] in the setting of Theorem 1:
[Equation]
From this, we see that our guarantee for Asynchronous SGD in Theorem 1 matches the rate for
K Mini = K/M steps of Minibatch SGD.
Furthermore, at least in the simplified model of Section 1.2, Asynchronous SGD takes at least M times more steps than Minibatch SGD in a given span of time, and therefore Theorem 1 guarantees better performance than (6) in terms of runtime.
Moreover, previous analyses of Asynchronous SGD [e.g., 48] provide guarantees with τ max replacing M in our bound.
Since necessarily τ max ⩾ M , this means that our guarantee is never worse than the existing ones and it can be much better, for example, in a case where one severe straggler results in τ max ≈ K but M ≪ K .
In fact, our guarantee in Theorem 1 is minimax optimal in the setting that we consider [see 51, Section 4.3], and as summarized in Table 2.
Finally, we emphasize that although M appears in the numerator of the error guarantee in Theorem 1, this does not mean that the guarantee necessarily degrades when more parallel workers are added.
In particular, adding more workers always means that more gradients will be calculated in any given amount of runtime.
More concretely, in the model of Section 1.2 where the machines have fixed speeds, the expression for K Async = K Async ( S, s 1 , . .
, s m ) in (2) implies that adding an ( M + 1) th machine gives a better guarantee whenever s M +1 is smaller than the harmonic mean of s 1 , . . .
, s M :
[Equation]
Following the same high-level approach, we can also analyze Algorithm 1 for non-convex objectives, the proof being deferred to Appendix C.
[Table]
[Equation]
[Table]
Theorem 2.
Let F be L -smooth, f ( · ; ξ ) be G -Lipschitz-continuous for every ξ , let ∆ ⩾ F ( x 0 ) − F ∗ , and let the stochastic gradients have variance at most σ 2 .
Then Algorithm 1 with stepsize γ = min
[Equation]
3 (cid:111) , ensures for any
[Equation]
⩾
[Equation]
Convergence guarantees for non-Lipschitz losses
Now, we analyze smooth but not necessarily Lipschitz-continuous losses.
The previous proofs relied crucially on the gradients being bounded in norm in order to control x k − ˆ x k .
For general smooth losses, the situation is more difficult because ∥∇ f
( x prev( k,m ) ; ξ m prev( k,m ) )
∥ could be large.
Our solution to this issue is to introduce a new delay-adaptive stepsize schedule γ k ∼ 1 /τ ( k ) , which we show allows for sufficient control over ∥ x k − ˆ x k ∥ .
Similar stepsizes have been considered by
Wu et al.
[52] for the PIAG algorithm, while the stepsizes for Asynchronous SGD used in previous analyses typically scale with 1 /τ max [e.g., 48].
Thus, our analysis shows that we can get away with a more aggressive stepsize to get better rates.
However, our stepsize choice could be problematic if it were correlated with the noise in the stochastic gradients because our proofs involve the step:
[Equation]
Therefore, we introduce the following assumption about the relationship between the delays and data:
Assumption 1.
The stochastic sequences ( ξ 1 , ξ 2 , . . . )
and ( τ (0) , τ (1) , . . . ) are independent.
This assumption holds, for example, when it takes a fixed amount of computation to evaluate any stochastic gradient, and the combination of the (potentially heterogeneous) computational throughput on the different workers and network latency gives rise to the delays.
However, this can fail to hold, for instance, when training a model with variable-length inputs, in which case the delays will probably depend on the length of the input sequences, so it will likely also be related to the gradient noise.
The next Theorem shows our convergence guarantees under Assumption 1 for Asynchronous SGD with novel delay-adaptive stepsizes scaling with 1 /τ ( k ) :
Theorem 3.
Suppose F is L -smooth, that Assumption 1 holds, that B ⩾ E ∥ x 0 − x ∗ ∥ 2 for some minimizer x ∗ , and ∆ ⩾ E F ( x 0 ) − F ∗ .
Then there exist numerical constants c 1 , c 2 , c 3 , c 4 such that:
For convex F , K ⩾ M and γ k = min (cid:110)
[Equation]
where ˜ x K is the weighted average 3 of x 1 , . .
, x K defined in (20) .
For µ -strongly convex F , K ⩾
3 M
, and
γ k
[Equation]
min
[Equation]
( k ) 4 ML )
[Equation]
k
[Equation]
, 1 8 ML , 504ln (cid:16) e + µ 2 K 2 B 2 σ(cid:17) µK (cid:111)
Algorithm 1 ensures
[Equation]
where ˜ x K
is the weighted average of x 1 , . . .
x
K
defined in (22) .
For non-convex F , K ⩾ M , and γ k = min (cid:110)
[Equation]
Algorithm 1 ensures
[Equation]
where ˜ x K is randomly chosen from x 1 , . .
, x K according to (25) .
We defer the complete proof of the three parts to Appendices D.1, D.2, and D.3.
However, to give a sense of our approach, we will now sketch the ideas behind the proof of Theorem 3.1:
Proof sketch.
We begin following the standard analysis of SGD for smooth, convex objectives.
We expand the update ˆ x k +1 from (3), and use the L -smoothness of the objective and the fact that the stepsizes are less than 1 / (4 L ) to obtain the inequality
[Equation]
A key step above uses Assumption 1 to show ˆ γ k is independent of the gradient noise, meaning
[Equation]
This is, so far, essentially identical to the first step of the typical SGD analysis, the only difference being the fourth term.
Rearranging the expression and summing over k , this implies
K
[Equation]
This still resembles the typical SGD analysis except for the third term on the right hand side
[Equation]
but we begin to see divergence here.
First, we must bound this third term
[Equation]
for which we introduce the following Lemma, proven by using Lemma 1 to write x k − ˆ x k as a sum of gradients:
Lemma 2.
In the setting of Theorem 3.1,
[Equation]
Combining this with (7) and using the convexity of F
[Equation]
we further conclude that
[Equation]
This shows that a weighted average of the iterates—with x k unconventionally weighted by the stepsize ˆ γ k rather than typical uniform weights—attains suboptimality inversely proportional to the sum of the stepsizes.
To conclude, we lower bound the sum of stepsizes in the denominator by a term scaling with min { K / ML , B √ K / σ } .
All remaining proof details can be found in Appendix D.
To understand the implications, we recall the guarantees for R steps of Minibatch SGD using minibatches of size M in the setting of Theorem 3, which are (ignoring all constants)
E [ F ( x Mini ) − F ∗ ] ⩽ LB 2 R + σB √ RM in the convex setting, E [ F ( x Mini ) − F ∗ ] ⩽ LB 2 exp( − µR / L ) + σ 2 µRM in the strongly convex setting, and E ∥∇ F ( x Mini ) ∥ 2 ⩽ L ∆ R +
(cid:112) L ∆ σ 2 / RM in the non-convex setting.
Comparing these to the guarantees for Asynchronous SGD in Theorem 3.1–3, we see that up to constants (and logarithmic factors in the strongly convex case), our results match the guarantees of R = K/M steps of Minibatch SGD with minibatch size M .
As discussed in Section 1.2, each
[Figure]
update of Minibatch SGD takes the time needed by the slowest machine, meaning that in any given amount of time, Asynchronous SGD will complete at least M times more updates than Minibatch would.
Therefore, the guarantees in Theorem 3 imply strictly better performance for Algorithmthan for Minibatch SGD in terms of guaranteed error after a fixed amount of time, as illustrated in
Table 2.
Figure 1 depicts a simple experiment demonstrating this phenomenon in practice.
The first “optimization” terms in our guarantees match K/M steps of exact gradient descent, completely irrespective of the delays.
In the convex cases, it is likely that these could be “accelerated” to scale with ( K/M ) − 2 or exp( − K √ µ / M √ L ) , but at the expense of a more complex algorithm and analysis.
However, by analogy to existing lower bounds [12, 51] we conjecture that the optimization terms in Theorem 3.1–2 are the best “unaccelerated” rate we could hope for, and that the optimization term in Theorem 3.3 is optimal.
Moreover, despite the delays, the second “statistical” terms in our guarantees are minimax optimal amongst all algorithms that use K stochastic gradients [4, 42].
So, when the statistical terms dominate the rate, our guarantees are unimprovable in the worst case, and in fact they even match what could be guaranteed by K steps of SGD without delays.
Furthermore, since the optimization terms decrease faster with K , in a realistic scenario where K ≫ M , the statistical term will eventually dominate the rate and our algorithm will have optimal performance with no penalty from the delayed gradients at all.
Heterogeneous data setting
Finally, we extend our results to the heterogeneous data setting, where each worker m possesses its own local data distribution D m , giving rise to a local objective F m .
So the optimization problem in the heterogeneous setting is:
[Equation]
, where F m ( x ) =
E ξ ∼D m [ f m ( x ; ξ )] .
[Equation]
In this setting, we define Asynchronous SGD the same way, with worker m having access to the stochastic gradients ∇ f m ( · ; ξ ) and updates taking the form:
[Equation]
It is generally impossible to show that Asynchronous SGD will work well in this setting.
Specifically, if F 2 = · · · = F M = 0 , then the time needed to optimize F is entirely dependent on the speed of the first worker.
Moreover, with arbitrary delays, we might only get a single gradient update from the first worker, leaving us no hope of any useful guarantee.
To avoid this issue and to be able to apply our analysis, we will require that the gradient dissimilarities between the local functions are bounded and that the identity of the worker used in iteration k is independent of the gradient noise:
Assumption 2.
There exists ζ ⩾ 0 such that ∥∇ F m ( x ) − ∇ F ( x ) ∥ 2 ⩽ ζ 2 for all m and x ∈ R d , E [ g k | x k , m k ] =
∇ F m k
( x k ) , and E [ ∥ g k −
[Equation]
Equipped with the new assumption, we can provide an analogue of Theorem 3 for problem (9):
Theorem 4.
In the setting of Theorem 3 with the addition of Assumption 2, for γ k = min {
[Equation] [Equation]
} , the updates described in (10) ensure for a numerical constant c :
[Equation]
where ˜ x k is randomly chosen from x 1 , . .
, x K according to (28) .
Comparing Theorem 4—which we prove in Appendix E—with Theorem 3.3, we see that the exact same rate is achieved in the heterogeneous setting up to the additive term ζ 2 .
As described above, we cannot really expect good performance for arbitrarily heterogeneous losses under arbitrary delays, so some dependence on ζ 2 is unavoidable.
Moreover, in many natural settings, ζ 2 can be quite small.
For instance, when heterogeneity arises because a large i.i.d.
dataset is partitioned across the M machines, the degree of heterogeneity ζ 2 will be inversely proportional to the number of samples assigned to each worker.
So although Asynchronous SGD is not well-suited to problem (9) when the delays can be arbitrarily large, at least under Assumption 2, it does not totally break down or diverge.
While Assumption 2 used in Theorem 4 seems unavoidable for studying Asynchronous SGD, it can be circumvented when studying other asynchronous methods.
In particular, Koloskova et al.
[28] proposed to sample a random worker at each iteration k and add the current points x k to its list of points for computing the gradient.
Under an extra assumption on the delay pattern, Koloskova et al.
[28] proved convergence of this method to a point with zero gradient, without extra errors.
Unfortunately, unlike Asynchronous SGD, their method would not have the speedup shown in Table 2, since after a large number of iterations K , all workers would be expected to compute roughly KM gradients.
Since this puts the same load on the slowest worker as Minibatch SGD, the algorithm proposed by Koloskova et al.
[28] is useful only when there is no worker that is fundamentally slower than the others.
Our theory, in turn, has an extra ζ 2 error term, but does not require waiting for the slow workers.
Conclusion
This work studies Asynchronous SGD via a virtual-iterate analysis: we prove that in a vast variety of settings – convex/Lipschitz, non-convex/Lipschitz/smooth, convex/smooth, strongly-convex/smooth and non-convex/smooth – the convergence guarantees of Asynchronous SGD improve over that of Minibatch SGD, irrespectively of the delay sequence .
We obtained these results by leveraging delay-adaptive stepsizes and proving that Asynchronous SGD is only slowed down by the number of stochastic gradients being computed, rather than the longest delay.
We also extend one of these results to the case of heterogeneous data and show that Asynchronous SGD can converge to an approximate stationary point with the error controlled by a data dissimilarity constant.
Acknowledgements
This work was supported by the French government under the management of the Agence Nationale de la Recherche as part of the “Investissements d’avenir” program, reference ANR-19-P3IA- (PRAIRIE 3IA Institute).
We also acknowledge support from the European Research Council (grant
SEQUOIA 724063).
Checklist
For all authors... (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] (b) Did you describe the limitations of your work?
[Yes] (c) Did you discuss any potential negative societal impacts of your work?
[No] This work is mainly theoretical, and we do not believe it has any clear negative societal impact.
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[Yes] (b) Did you include complete proofs of all theoretical results?
[Yes] 3.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] The code used to run the experiments is uploaded as part of the supplementary materials.
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[No] (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[No] 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[N/A] (b) Did you mention the license of the assets?
[N/A] (c) Did you include any new assets either in the supplemental material or as a URL?
[N/A] (d) Did you discuss whether
and how consent was obtained from people whose data you’re using/curating?
[N/A]
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[N/A] 5.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]
A Experimental details
To showcase how our theory matches the numerical performance of Asynchronous SGD, we run experiments on a simple quadratic objective with random data.
We run our experiments on a single node with 48 logical cores and set M = 40 .
We use the Ray package [37] to parallelize the execution and follow the official documentation for the implementation 4 of asynchronous training.
All delays appearing in the runs are not simulated and come from the execution on CPUs.
For further reproducibility, we released our code online 5 .
B Intermediate results
Lemma 3.
Under Assumption 1 and the σ 2 variance bound, if γ k depends only on k and τ ( k ) for each k
[Equation]
then for all k ⩾ 1 ,
[Equation]
Proof.
By Lemma
[Equation]
we have
[Equation]
Notice that we had to use Young’s inequality to separate expectations from the variance terms since the variance in the vectors is not independent.
The first term can be bounded using Young’s inequality as follows,
[Equation]
To bound the second term
[Equation]
assume without loss of generality that prev( k, 1) <
prev( k, 2) < · · · < prev( k, M ) .
In addition, denote
[Equation]
Then
[Equation]
we have for any m
[Equation]
Moreover, for any m ∈ [1 , M − 1] , the stochastic gradient of worker m +1 has conditional expectation
[Equation]
[Equation]
so E [ θ m +1 | θ 1 , . .
, θ m ] = 0 .
This allows us to obtain by induction,
E
[Equation]
The remaining scalar product is, in fact, equal to zero.
Indeed, by the tower property of expectation,
[Equation]
= 0 .
Therefore,
[Equation]
} γ next( k,m ) ( ∇ f ( x prev( k,m ) ; ξ m prev( k,m ) ) − ∇ F ( x prev( k,m ) )) (cid:13)(cid:13)(cid:13)(cid:13)(cid:13) ⩽ (cid:88) m ∈ [ M ] \{ m k } γ 2next( k,m ) σ 2 .
Lemma 3 is very useful whenever stochastic gradients are not guaranteed to be bounded.
If they were bounded, we could immediately show that E ∥ x k − ˆ x k ∥ 2 is small regardless of the delays, as was done in the proof of Theorem 1, see equation (5).
For non-Lipschitz losses, however, E ∥ x k − ˆ x k ∥is not guaranteed to be finite, and Lemma 3 is required to show that ˆ x k and x k stay sufficiently close to each other.
B.1 A caveat in the proof of Lemma
In the proof above, our first step was to split conditional expectations from the conditional variances using inequality ∥ a + b ∥ 2 ⩽ 2 ∥ a ∥ 2 + 2 ∥ b ∥ 2 .
One may wonder why we did not use instead the decomposition E ∥ X ∥ 2 = ∥
E X ∥
2 + E ∥
X − E X ∥ 2 that holds for any random variable X with finite variance.
While this identity is simpler, it also leads to full expectations inside all norms, producing γ next( k,m ) ( ∇ f ( x prev( k,m ) ; ξ m prev( k,m ) )
− E (cid:2) ∇ F ( x prev( k,m ) )) (cid:3) .
Our proof, on the other hand, relied on the identity
[Equation]
for all j ⩽ m .
Notice that the same would not be true if we defined θ m +1 with E (cid:2) ∇ F ( x prev( k,m ) ) (cid:3) instead of ∇ F ( x prev( k,m ) ) , since in general E (cid:104) ∇ f ( x prev( k,m ) ; ξ m prev( k,m ) ) | θ 1 , . .
, θ m (cid:105) =
∇ F ( x prev( k,m ) )
̸
= E (cid:2) ∇ F ( x prev( k,m ) ) (cid:3) .
B.2 A lemma for products with delays
The next lemma is a general statement about sequences with delays, which we will use to bound various error terms in our proofs.
Lemma 4.
For any positive sequences { a k } , { b k } , and { c k } , it holds
[Equation]
Proof.
The proof follows simply by rewriting the sums several times while manipulating the definitions of prev and next :
[Equation]
m ) min { next(1 ,m ) ,K } (cid:88) k
= a k 1 { m ̸
= m k } +
K − 1 (cid:88)
j = b j c next( j +1 ,m j ) min { next( j +1 ,m j ) ,K } (cid:88) k
= j
+ a k 1 { m j ̸
= m k } =
b
M (cid:88) m =
c next(1 ,m ) min { next(1 ,m ) − 1 ,K } (cid:88) k
= a k +
K − 1 (cid:88)
j = b j c next( j +1 ,m j ) min { next( j +1 ,m j ) − 1 ,K } (cid:88) k
= j + a k , which establishes the claim after exchanging subscripts.
C Proof of Theorem
We are ready to prove Theorem 2, which assumes that the losses are Lipschitz continuous.
This assumption makes the proof shorter than that of more general Theorem 3, but on the downside, its rate has an extra O (1 /K 2 / 3 ) term.
Theorem 2.
Let F be L -smooth, f ( · ; ξ ) be G -Lipschitz-continuous for every ξ , let ∆ ⩾ F ( x 0 ) − F ∗ , and let the stochastic gradients have variance at most σ 2 .
Then Algorithm 1 with stepsize γ = min (cid:110) 1 2 ML , (cid:113) ∆
Lσ 2 K , (cid:0) ∆ L 2 M 2 G 2 K (cid:1) 1 / 3 (cid:111) , ensures for any K ⩾ M
K K
[Equation]
k
[Equation]
O
[Equation]
K
[Equation]
Proof.
By the L -smoothness of F , the σ 2 -bounded variance of the stochastic gradients, and the fact γ ⩽ 1 / (2 L )
[Equation]
For the third term
[Equation]
we use Lemma 1 and the G -Lipschitzness of f ( · ; ξ ) to bound
[Equation]
Rearranging and averaging over K , we conclude
[Equation]
All that remains is to bound F (ˆ x 1 ) − F ∗ .
By the definition of ˆ x 1 from (3), the L -smoothness of F , and the fact that γ ⩽ 2 / ( ML )
[Equation]
Substituting this into the expression above, we conclude
[Equation]
and plugging in the stepsize completes the proof
[Equation]
We note that the expression for the stepsize comes from the idea of equalizing the terms in the last upper bound.
D Proof of Theorem
Throughout this proof, we will refer frequently to ˆ γ 1 , . .
, ˆ γ K , the stepsizes corresponding to the stochastic gradients ∇ f ( x 1 , ξ m 1 1 ) , . .
. , ∇ f ( x K , ξ m K K ) .
However, some of these gradients will not be available when the algorithm ends after K updates—in particular, precisely M − 1 of them are in the process of being calculated when the algorithm terminates.
Since those gradients are never used for updates, the corresponding stepsize ˆ γ k seems, in some sense, unneeded.
However, our algorithm’s output weights each iterate x k by a term involving ˆ γ k , whether or not the gradient ∇ f ( x k , ξ m k k ) becomes available before the algorithm finishes.
For this reason, in order to make the stepsize ˆ γ k well-defined, we specify τ ( k ) for k ⩾ K , upon which ˆ γ 1 , . . .
, ˆ γ K might depend, according to τ ( k ) :
= max { 1 , min { k, K } − prev( k, m k ) } .
This is essentially equivalent to just not incrementing the iteration counter once it reaches K , although we note that all of the stepsizes ˆ γ 1 , . . .
, ˆ γ K can be calculated by the time of the K th update, without needing to wait for the M − 1 in-progress gradients.
D.1 Convex case
Lemma 2.
In the setting of Theorem 3.1,
[Equation]
Proof.
In this proof, we denote g k :=
∇ f ( x k ; ξ m k k ) and ζ k :=
2ˆ
γ k ⟨ g k , x k − ˆ x k ⟩ .
We begin by applying Lemma 1, using the fact that for any a , b , it holds 2 ⟨ a , b ⟩ = ∥ a ∥ 2 + ∥
b ∥ 2 − ∥ a − b ∥ 2 ⩽ ∥ a ∥ 2 + ∥ b ∥ 2 , and using Assumption 1:
[Equation]
First, we bound the sum of the second terms using Lemma 4 with a k = 1 , b k = ∥∇ F ( x k ) ∥ 2 , and c k = γ 2 k :
[Equation]
From here, we note that our choice of stepsize ensures
[Equation]
next
[Equation] [Equation]
and also γ k ⩽ 1 4 LM for all k , so substituting back into (12), we can upper bound
K (cid:88)
[Equation]
=
[Equation] [Equation]
Plugging this into (11), we have
[Equation]
which completes the proof.
To show fast convergence rates, we need to first show that overall the stepsizes are not too small.
This is a little bit tricky because our stepsizes are delay-adaptive.
Nevertheless, updates with large delays are rare, so it is natural that the majority of the stepsizes are sufficiently large.
Lemma 5.
In the setting of Theorem 3.1, it holds with probability one
[Equation]
Proof.
First, we note that if τ ( k ) ⩽ 3 M , then
[Equation]
Next, we observe that if m ̸ = m k , then τ ( k + 1 , m ) =
τ ( k, m ) + 1 , while τ ( k + 1 , m k )
= 1 = 1 + τ ( k, m k ) − τ ( k ) .
Therefore,
[Equation]
Since (cid:80) M m =1 τ (1 , m )
=
M , we can conclude that
[Equation]
This implies that at most ⌊ K/ 3 ⌋ of the terms on the left hand side can be larger than 3 M .
Furthermore, since the first 3 M gradients must have delay less than 3 M , the number of terms with delay greater than 3 M is no larger than min { K/ 3 , max { K − 3 M, 0 }} .
This allows us to bound
K (cid:88)
[Equation]
> 0 } +
M (cid:88) m
= γ next( K,m )
[Equation]
{ prev( K,m ) > 0 } ⩾ min (cid:26)
[Equation]
ML,
B
[Equation]
(cid:27)(cid:18) K
[Equation]
(cid:88) k
= 1 { prev( k,m k )
[Equation]
0 } 1 { τ ( k
[Equation]
m k ) ⩽ 3 M }
+
M (cid:88) m =
[Equation]
{ prev( K
[Equation]
m ) > 0 } 1 { τ ( K
[Equation]
m ) ⩽ 3 M } (cid:19)
[Equation]
(cid:27)(cid:19)
[Equation]
If K ⩾ 2 , then we conclude that
K (cid:88) k
= ˆ γ k ⩾ min (cid:40)
K 36 LM ,
B √ K 3 σ (cid:41) as claimed.
Otherwise, if K = 1 then also M = 1 , so all delays are one and
K (cid:88) k
= ˆ γ k
= ˆ γ 1 = min (cid:26)
[Equation]
4 L,
B σ (cid:27) ⩾ min (cid:40)
K
[Equation]
LM
[Equation]
B √
[Equation]
σ (cid:41) , which completes the proof.
Proof of Theorem 3.1.
We begin by expanding the update of ˆ x k +1 from (3):
[Equation]
From here, we take the expectation of both sides and bound the right hand side term-by-term.
Because the stochastic variance is bounded by σ 2 , F is L -smooth, and Assumption 1 holds,
[Equation]
Likewise, by Assumption 1 and the convexity of F
[Equation]
we have
[Equation]
Finally, we denote ζ k := 2ˆ
γ k ⟨ g k , x k − ˆ x k ⟩ and we will come back to address this term later.
Combining the above inequalities
[Equation]
rearranging
[Equation]
and using that γ k ⩽ 14 L for all k so 2 L ˆ γ 2 k − 2ˆ γ k ⩽ 32 ˆ γ k , we have
[Equation]
Summing over all k , we get
[Equation]
So, applying Lemma 2 to the third term and rearranging
[Equation]
we bo
[Equation]
Applying the definition of ˆ x 1 from (3)
[Equation]
and using that for convex
[Equation]
L -smooth F and any x
[Equation]
⟨∇ F ( x ) , x − x ∗ ⟩ ⩾ 1 L ∥∇ F ( x ) ∥
[Equation]
we have
[Equation] [Equation]
(19) because (cid:80) Mm =1 γ next(1 ,m ) ⩽ 14 L .
Returning to (18), for
[Equation] [Equation]
we conclude by the convexity of F that
[Equation]
From here, all that remains is to observe that
[Equation]
and by Lemma
[Equation]
So, we can conclude that
[Equation]
which completes the proof
[Equation]
D.2 Strongly convex case
Lemma 6.
In the setting of Theorem 3.2, with γ max defined as in (21) ,
E
[Equation]
Proof.
We start by applying Lemma 3 and then Lemma 4 with a k = ˆ γ k ˆ P k , b k
= σ 2 + ( M − 1) ∥∇ F ( x k ) ∥ 2 , and c k = γ 2 k :
E (cid:34) 2 L
[Equation]
L E  
[Equation]
( k
[Equation]
m
[Equation]
(cid:104)
[Equation]
M
[Equation]
(cid:13)(cid:13)
[Equation]
F ( x prev( k,m
[Equation]
(cid:13)(cid:13)
[Equation]
(cid:105) ⩽
[Equation]
M
[Equation] [Equation]
) min {
[Equation] [Equation]
j = a
[Equation]
+
[Equation]
k
[Equation]
) min { next( k +1 ,m k ) − 1 ,K } (cid:88)
j = k + a j (cid:21) ⩽
[Equation]
m =
[Equation]
(1 ,m ) min { next(1 ,m ) − 1 ,K } (cid:88)
j = a j +
[Equation]
(cid:0)
[Equation]
k min { next( k
[Equation]
1 ,m k )
[Equation]
1 ,K } (cid:88)
j = k + a j (cid:21) .
Since the sequence ˆ P k is increasing, for each k we can bound a k = ˆ γ k ˆ P k ⩽ γ max ˆ P j for any j ⩾ k .
So, denoting n 1 ,m := min { next
[Equation]
1 , m ) − 1 , K } and n k = min { next( k + 1 , m k ) − 1 , K } for short, we have
E
[Equation]
We also have that for j ⩾ k
[Equation]
so,
[Equation]
We now recall our choice of stepsize
[Equation]
which implies for each j that
[Equation]
and
[Equation]
m +
[Equation]
Therefore,
E
[Equation]
where we used that γ max ⩽ 1 / (8 ML ) and F 0 ⩽ 12 LB 2 .
Lemma 7.
In the setting of Theorem 3.2, with γ max defined as in (21) , we have with probability
K (cid:88)
[Equation]
Proof.
First, we note that if τ ( k ) ⩽ 3 M , then since γ max ⩽
[Equation]
As in the proof of Lemma 5, we recall that τ ( k, m ) denotes the current delay of the m th worker’s gradient.
We begin by observing that if m ̸ = m k , then τ ( k +1 , m ) =
τ ( k, m )+1 and τ ( k +1 , m k )
=
1 ⩽ τ ( k, m k ) .
Therefore,
M (cid:88) m
= τ ( k + 1 , m ) ⩽ M − 1 +
M (cid:88) m
= τ ( k, m ) .
Since (cid:80) Mm =1 τ (1 , m )
=
M , we can conclude that for every J ⩽ K
J (cid:88) k
= τ ( k ) ⩽
J (cid:88) k
=
M (cid:88) m
= τ ( k, m ) ⩽ JM.
This implies that at most ⌊ J/ 3 ⌋ of the terms on the left hand side can be larger than 3 M .
Furthermore, since the first 3 M gradients must have delay less than 3 M , the number of terms with delay greater than 3 M is no larger than min { J/ 3 , max { J − 3 M, 0 }} .
This allows us to bound for each J ⩽ K
[Equation]
With this in hand
[Equation]
we again observe
[Equation]
This implies that at most ⌊ K/ 3 ⌋ of the terms on the left hand side can be larger than 3 M .
Furthermore, since the first 3 M gradients must have delay less than 3 M , the number of terms with delay greater than 3 M is no larger than min { K/ 3 , max { K − 3 M, 0 }} .
So,
[Equation]
k ˆ P prev
[Equation]
k,
[Equation]
k )
[Equation]
{ prev( k
[Equation] [Equation]
0 } +
M
[Equation]
m =
γ
[Equation]
K
[Equation] [Equation]
prev
[Equation]
K
[Equation] [Equation]
{ prev( K,m ) > 0 } ⩾ γ max (cid:18) K −
[Equation]
k = ˆ P prev
[Equation]
k,
[Equation] [Equation]
{ prev( k,
[Equation]
k )
[Equation] [Equation]
[Equation]
( k ) ⩽
[Equation]
M }
[Equation]
=
[Equation] [Equation]
⩾
[Equation]
max
[Equation]
min
[Equation]
max
[Equation]
0 } (cid:27)(cid:41) ⩾
γ max
[Equation] [Equation]
 ⩾
[Equation]
max
[Equation]
k
[Equation]
max
[Equation]
⩾ γ max
[Equation] [Equation]
max
[Equation]
⩾ max
[Equation]
Kγ max , γ max exp
[Equation]
max (cid:19)(cid:27) , where we used that ˆ P k is increasing, then the lower bound on the sum of stepsizes from above, and then that K ⩾ 3 M so
Proof of Theorem 3.2.
Throughout the proof, we will use γ max to denote the τ ( k ) -independent portion of the stepsize, i.e.,
[Equation]
Mirroring the typical analysis of SGD, we begin by recalling the updates of ˆ x k +1 from (3) and expanding:
[Equation]
For the inequality, we used Assumption 1 and the σ 2 stochastic gradient variance bound.
To proceed, the L-smoothness of F implies ∥∇ F ( x k )
∥ 2 ⩽ 2 L ( F ( x k ) − F ∗ ) , and to bound the final term, we use the µ -strong convexity of F and the inequality 2 ⟨ a , b ⟩ ⩽ α ∥ a ∥ 2 + α − 1 ∥ b ∥ 2 for any α > 0 , so:
[Equation]
Combining this with the above
[Equation]
and using that γ k ⩽ 14 L for all k
[Equation]
so 2 L ˆ γ 2 k − ˆ γ k
⩽ 12 ˆ γ k
[Equation]
we conclude
[Equation]
where F k :=
F ( x k ) − F ∗ .
From here
[Equation]
we define a weighting of the iterates
[Equation]
we multiply both sides of the expression by ˆ P k , sum over k
[Equation]
and use that 1 − µ ˆ γ k ⩽ exp( − µ ˆ γ k ) in order to telescope the sum, getting:
[Equation]
We apply Lemma 6 and rearrange
[Equation]
giving
[Equation]
In the proof of the smooth convex case of Theorem
[Equation]
we derived the following upper bound in (19):
[Equation]
Therefore, for
[Equation]
we conclude by the convexity of F that
[Equation]
To conclude
[Equation]
we use Lemma 7 to lower bound the denominator of the first term:
[Equation]
Plugging in our choice of γ max from (21) completes the proof.
D.3 Non-convex case
Lemma 8.
In the setting of Theorem 3.3, with γ max defined as in (24)
E
[Equation]
Proof.
We start using Lemma 3 and then Lemma 4 with a k = ˆ γ k , b k = σ 2 +
( M − 1) ∥∇ F ( x k ) ∥ 2 , and c k = γ 2 k :
E
[Equation]
L
[Equation]
From here, note that our choice of stepsize γ k ⩽ 4 Lτ ( k ) implies γ
[Equation]
Plugging these two inequalities into our previous bound, we obtain
E
[Equation]
Using the fact that γ max ⩽ 1 / (2 ML ) and ∥∇ F ( x 0 ) ∥ 2 ⩽ 2 L ∆ completes the proof.
Lemma 9.
In the setting of Theorem 3.3, with γ max defined as in (24)
[Equation]
Proof.
First, we note that if τ ( k ) ⩽ 3 M , then
[Equation]
Following the proofs of Lemmas 5 and 7, we begin with the observation that
[Equation]
This implies that at most ⌊ K/ 3 ⌋ of the terms on the left hand side can be larger than 3 M .
Furthermore, since the first 3 M gradients must have delay less than 3 M , the number of terms with delay greater than 3 M is no larger than min { K/ 3 , max { K − 3 M, 0 }} .
From here, we rewrite:
[Equation]
1 { prev
[Equation]
k
[Equation]
m k ) >
[Equation]
{ τ
[Equation]
k
[Equation]
k
[Equation]
⩽
[Equation]
m =
[Equation]
{ prev
[Equation]
⩾
[Equation]
max
[Equation]
For K ⩾ 2 , the Lemma follows directly.
For K = 1 , we also have M = 1 so all of the delays are one, and (cid:80)
Kk
=
ˆ γ k
= ˆ γ 1 = min (cid:8) γ max , 12 L (cid:9) ⩾ Kγ max.
Therefore, this inequality holds either way, completing the proof.
Proof of Theorem 3.3.
In this proof, we will use γ max to denote the τ ( k ) -independent terms in the definition of the stepsize, i.e.,
[Equation]
Next, we use the L -smoothness of F , the definition of ˆ x k +1 from (3), and Assumption 1:
[Equation]
Since γ k ⩽ 12 L for all k , this means
[Equation]
Rearranging and summing over k , this means
[Equation]
Applying Lemma 8 and rearranging
[Equation]
this gives
[Equation]
Therefore
[Equation]
if we choose an output vector ˜ x K with
[Equation] [Equation]
then by Lemma 9,
[Equation]
Substituting γ max from (24) completes the proof.
E The heterogeneous data setting
The analysis in this section is not too different from that before.
The main idea here is to refine the upper bound on the distance between the virtual and actual iterates, which can be done using our assumption on bounded data heterogeneity
[Equation]
Lemma 10.
In the setting of Theorem
[Equation]
for any k ⩾
[Equation]
Proof.
The argument below is nearly identical to the proof of Lemma 3.
We start with an analogue of Lemma 1:
[Equation]
which follows from exactly the same argument.
We then use Assumptions 1 and 2 in the same way as in the proof of Lemma 3: [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]
Lemma 11.
In the setting of Theorem
[Equation]
with γ max defined as in (26)
[Equation]
L
[Equation]
Proof.
This follows exactly the same argument as Lemma
[Equation]
just replacing that proof’s invocation of
Lemma 3 with Lemma 10:
[Equation]
∥∇ F ( x 0 ) ∥ 2 + ζ 2 ) (cid:1)
M (cid:88) m
= γ 2next(1 ,m ) min { next(1 , m ) − 1 , K } +
K − 1 (cid:88) k
= (cid:0) σ 2 + 2 M ( ∥∇ F ( x k ) ∥ 2 (cid:1) + ζ 2 )ˆ γ 2 k (min { next( k + 1 , m k ) − 1 , K } − k ) (cid:21) .
The stepsize is chosen so that γ k ⩽ 1 8 Lτ ( k ) , which implies γ next(1 ,m ) min { next(1 , m ) − 1 , K } ⩽ 1 8 L, ˆ γ k (min { next( k + 1 , m k ) − 1 , K } − k ) ⩽ 1 8 L.
Therefore,
[Equation]
We used here that γ k ⩽ 1 / (8 ML ) and ∥∇ F ( x 0 ) ∥ 2 ⩽ 2 L ∆ .
Proof of Theorem 4.
In this proof
[Equation]
we will use γ max to denote the τ ( k ) -independent terms in the definition of the stepsize, i.e.,
[Equation]
As in the data-homogeneous setting
[Equation]
we define the virtual sequence ˆ x k as:
[Equation]
Denote g k = ∇ f m k
( x k ; ξ m k k ) .
Using the L -smoothness of F and Assumptions 1 and
[Equation]
we have:
[Equation]
For the third inequality
[Equation]
we used that γ k ⩽ 12 L for all k .
For the fifth [Equation]
we used that ∥∇ F ( x ) ∥ 2 ⩽ 2 ∥∇ F m ( x ) ∥ 2 + 2 ζ 2 for any m and x .
Rearranging and summing over k , we then have
E
[Equation]
Now
[Equation]
we apply Lemma 11 to bound the second term on the right hand side:
[Equation]
Therefore, if we choose an output ˜ x K according to
[Equation]
then E [ ∥∇ F (˜ x K ) ∥ 2 is less than this previous expression divided by (cid:80)
Kk
=
ˆ γ k .
By exactly the same argument as for Lemma 9, we can lower bound this sum as:
[Equation]
Therefore
[Equation]
for some constant c (which may change from line to line)
[Equation]
we have
[Equation]
Here, we used that γ max ⩽ 1 / (4 ML ) and M ⩽ K .
To conclude, we bound
[Equation]
⩽
[Equation]

[Equation]
(cid:13)(cid:13)(cid:13)(cid:13)(cid:13)
[Equation]
 ⩽
[Equation]
⩽ 2∆
[Equation]
⩽
[Equation]
+
[Equation]
Plugging this and γ max in above completes the proof.