P OP SGD: D ECENTRALIZED S TOCHASTIC G RADIENT D ESCENT IN THE P OPULATION M ODEL
A BSTRACT
The population model is a standard way to represent large-scale decentralized distributed systems, in which agents with limited computational power interact in randomly chosen pairs, in order to collectively solve global computational tasks.
In contrast with synchronous gossip models, nodes are anonymous, lack a common notion of time, and have no control over their scheduling.
In this paper, we examine whether large-scale distributed optimization can be performed in this extremely restrictive setting.
We introduce and analyze a natural decentralized variant of stochastic gradient descent
(SGD
, called
PopSGD
, in which every node maintains a local parameter
, and is able to compute stochastic gradients with respect to this parameter.
Every pair-wise node interaction performs a stochastic gradient step at each agent, followed by averaging of the two models.
We prove that, under standard assumptions,
SGD can converge even in this extremely loose, decentralized setting, for both convex and non-convex objectives.
Moreover, surprisingly, in the former case, the algorithm can achieve linear speedup in the number of nodes n .
Our analysis leverages a new technical connection between decentralized SGD and randomized load-balancing, which enables us to tightly bound the concentration of node parameters.
We validate our analysis through experiments, showing that PopSGD can achieve convergence and speedup for large-scale distributed learning tasks in a supercomputing environment
I NTRODUCTION
Distributed machine learning has become commonplace, and it is not unusual to encounter systems which distribute model training among tens or even hundreds of nodes.
In this paper, we take this trend to the extreme, and ask: would it be possible to distribute basic optimization procedures such as stochastic gradient descent (SGD) to thousands of agents?
How could the dynamics be implemented in such a large-scale setting, and what would be with the resulting convergence and speedup behavior?
To get some intuition, let us consider the classical data-parallel distribution strategy for SGD Bottou (2010).
We are in the classical empirical risk minimization setting, where we have a set of samples S from a distribution, and wish to minimize the function f : R d → R , which is the average of losses over samples from S by ﬁnding x (cid:63) =
argmin x (cid:80) s ∈ S f s ( x ) / | S | .
Assume that we have P compute nodes which can process samples in parallel.
Data-parallel SGD consists of parallel iterations, in which each node computes the gradient for one sample, followed by a gradient exchange.
Globally, this leads to the iteration:
[Equation]
where η t is the learning rate, x t is the value of the global parameter, initially 0 d , and (cid:101)
g it ( x t ) is the stochastic gradient with respect to the parameter obtained by node i at time t .
When extending this strategy to high node counts, two major bottlenecks are communication and synchronization .
In particular, to maintain a consistent view of the parameter x t , the nodes would need to broadcast and receive all gradients, and would need to synchronize with all other nodes, at the end of every iteration.
Recently, a tremendous amount of work has been dedicated to address these two barriers.
In particular, there has been signiﬁcant progress on communication-reduced variants of SGD (e.g. Seide et al.
Strom (2015);
Alistarh et al. (2017b); Wen et al.
; Aji and
Heaﬁeld (2017); Dryden et al.
; Grubic et al.
(2018)), asynchronous variants (e.g. Recht et al.
; Sa et al.
; Duchi et al. (2015);
Alistarh et al.
(2018b)), as well as large-batch or periodic model averaging methods, which aim to reduce the frequency of communication(e.g.
Goyal et al.
(2017); You et al.
and Chen and Huo (2016); Stich (2018)), or even decentralized synchronous variants(e.g.
Lian et al.
(2017a)
; Tang et al.
; Koloskova et al.
Using such techniques, it is possible to scale SGD to hundreds of nodes, even for complex objectives such as the training of deep neural networks.
However, in systems with node counts in the thousands or larger, some of the communication and synchronization requirements of these algorithms become infeasible.
In this paper, we consider the classic population model of distributed computing Angluin et al.
(2006), deﬁned as follows.
We are given a population of n compute agents, each with its own input, which cooperate to perform some globally meaningful computation with respect to their inputs.
Interactions occur pairwise , where the two interaction partners are randomly chosen in every step.
Thus, algorithms are speciﬁed in terms of the agents’ state transitions upon an interaction.
The basic unit of time is a single pairwise interaction between two nodes, whereas global (parallel) time is measured as the total number of interactions divided by n , the number of nodes.
Parallel time corresponds intuitively to the average number of interactions per node to reach convergence.
Population protocols have a rich history in distributed computing (e.g. Angluin et al.
(2006; 2007; 2008a;b;c)
; Alistarh et al.
(2017a; 2018a)), and are standard in modelling distributed systems with millions or billions of nodes, such as Chemical Reaction Networks (CRNs) Bower and Bolouri (2004);
Chen et al.
and
synthetic DNA strand displacement cascades Chen et al.
The key difference between population protocols and the synchronous gossip models (e.g. Xiao and Boyd (2004); Lian et al.
(2017a);
Koloskova et al.
previously used to analyze decentralized SGD is that nodes are not synchronized : since interactions occur randomly at arbitrary times, there are no global rounds, and nodes lack a common notion of time.
While the population model is a theoretical construct, we show that it can be efﬁciently mapped to large-scale super-computing scenarios, with large numbers of compute nodes connected by a fast point-to-point interconnect, where we can avoid the high costs of global synchronization.
An immediate instantiation of SGD in the population model would be to initially assign one sample
s i from the distribution to each node i , and have each node maintain its own parameter estimate x i .
Whenever two nodes interact, they exchange samples, and each performs a gradient update with respect to the other’s sample.
If we assume interaction pairs are uniform random (with replacement), each node would obtain a stochastic gradient upon each interaction, and therefore each model would converge locally.
However, this instance would not have any parallel speedup, since the SGD instances at each node are essentially independent.
In this context, a natural change to the above procedure is to have nodes i and j ﬁrst perform a gradient step, and then also average their resulting models upon every interaction.
Effectively, if node i interacts with node j , node i ’s updated model becomes
[Equation]
where j is the interaction partner, and the stochastic gradients (cid:101) g i and (cid:101)
g
j are taken with respect to each other’s samples.
The update for node j is symmetric.
In this paper, we analyze a variant of the above protocol, which we call PopSGD, in the population protocol model.
We show that, perhaps surprisingly, this simple decentralized SGD averaging dynamic provides strong convergence guarantees for both convex and non-convex objectives.
First, we prove that, under standard convexity and smoothness assumptions, PopSGD has convergence speedup that linear in the number of nodes n .
Second, we show that, if the objective is non-convex but satisﬁes the Polyak-Łojasiewicz (PL) assumption
, PopSGD can still ensure linear convergence in the number of nodes. Third, we show a Θ( √ n ) speedup in the non-convex case in the absence of this assumption, matching or slightly improving results from previous work which considered similar models (Lian et al., 2017b). On the practical side, we provide convergence and speedup results using an efﬁcient implementation of PopSGD using Pytorch/MPI applied to regression tasks, but also to the standard CIFAR/ImageNet classiﬁcation tasks for deployments on a multi-GPU nodes, and on the Piz Daint supercomputer (Piz). Experiments conﬁrm the scalability of PopSGD.
We also observe an improvement in convergence versus number of SGD iterations per model at higher node counts, in both convex and non-convex settings.
In particular, using PopSGD, we are able to train the ResNet18 and {+ResNet
 He et al. (2016) models to full accuracy using only 1 / 8 the number of SGD updates per model, compared to the sequential baseline, resulting in fast convergence with nearly linear scalability.+}
This suggests that, even though interactions occur only pairwise, uniformly at random, and in an uncoordinated manner, as long as the convergence time is large enough to amortize the information propagation, the protocol enjoys the full parallel speedup of mini-batch SGD with a batch size proportional to the number of nodes.
While similar speedup behaviour has been observed in various synchronous models for the convex case– e.g. Stich (2018); Koloskova et al.
(2019), or for complex accelerated algorithms
Hendrikx et al.
(2018)–we are the ﬁrst to show that SGD does not require the existence of globally synchronized rounds or global communication.
Central to our analytic approach is a new technical connection between averaging decentralized
SGD and the line of research studying load-balancing processes in computer science (e.g. Azar et al.
Mitzenmacher (2000); Talwar and Wieder (2007); Peres et al.
(2015a)
; Boyd et al.
Intuitively, we show PopSGD can be viewed as a composition between a set of instances of SGD–each corresponding to one of the local parameters x i –which are loosely coupled via pairwise averaging, whose role is to “balance” the models by keeping them well concentrated around their mean, despite the random nature of the pairwise interactions.
Our analysis characterizes this concentration, showing that, in essence, the averaging process propagates enough information to globally “simulate” SGD with a batch of size Θ( n ) , even though communication is only performed pairwise.
We emphasize that the convexity of the objective function in isolation would not be sufﬁcient to prove this fact: simply averaging n independent SGD models at the end of training would not lead to speedup in the objective (please see e.g. Stich (2018) for a detailed discussion).
Along the way, we overcome non-trivial technical difﬁculties, such as the lack of a common notion of time among nodes, or the fact that, due to the structure of SGD, this novel load-balancing process exhibits non-trivial correlations within the same round.
[-In particular, using PopSGD, we are able to train the ResNet18 and ResNet
-]
Related Work.
The study of decentralized optimization algorithms dates back to Tsitsiklis (1984), and is related to the study of gossip algorithms for information dissemination Kempe et al.
Xiao and Boyd (2004); Boyd et al.
Gossip is usually studied in one of two models Boyd et al.
(2006): synchronous , structured in global rounds, where each node interacts with a randomly chosen neighbor, and asynchronous , where each node wakes up at times given by a local Poisson clock, and picks a random neighbor to interact with.
The population model is functionally equivalent to the asynchronous gossip model, since the interaction times in the latter model can be “discretized” to lead to pairwise uniform interactions.
The key difference between our work and averaging in the gossip model, e.g. Boyd et al.
(2006), is that their input model is static (node inputs are ﬁxed, and node estimates must converge to the true mean), whereas we study the a dynamic setting, where the models are updated in each round by SGD, and should remain concentrated around the parameter mean as it converges towards the optimum.
Several optimization algorithms have been analyzed in this setting Nedic and Ozdaglar (2009); Johansson et al.
; Shamir and Srebro (2014).
Tang et al.
; Koloskova et al.
(2019) analyze quantization in the synchronous gossip model.
Lian et al.
(2017a;b); Assran et al.
(2018) consider SGD-type algorithms in the gossip model.
Speciﬁcally, they analyze the same SGD averaging dynamic in the non-convex setting.
Tablein the appendix summarizes their assumptions, results, and rates.
Their results are phrased in the synchronous gossip model, in which nodes interact in a sequence of perfect matchings, for which they provide O (1 / √ Tn ) convergence rates (under analytical assumptions).
Further, they extend their results to a variant of the gossip model where updates can be performed based on stale information.
Upon careful examination, we ﬁnd that their results can be extended to the population protocol/asynchronous gossip model, although at the cost of slower convergence relative to the synchronous case.
For Lian et al.
(2017b) , the convergence rate bound requires that the total number of iterations is Ω( n 6 ) , while in our case only O ( n 4 ) iterations are needed.
The difference comes from the fact that our bound on the potential Γ is tighter.
For Assran et al.
(2018), speedup with respect to the number of nodes depends on the parameter C .
Which in turn, depends on the dimension of the objective function, number iterations for the graph given by edge sets of all matrices used in averaging to be connected and the diameter of aforementioned graph.
Unfortunately, in the population model parameter C will not be a constant and this will eliminate the speedup.
Further, these references present scalability results for training neural networks using both synchronous and asynchronous variants of their algorithms, thereby slightly relaxing their analytic assumptions.
Relative to this prior work, our contributions are as follows.
First, we consider both convex and non-convex objectives.
We are the ﬁrst to show linear speedup in the objective for convex objectives in this decentralized asynchronous model.
Our bounds in the non-convex case match or slightly improve those presented above, under similar assumptions.
Furthermore, under the PL condition, we are the ﬁrst to show linear convergence speedup in the non-convex case.
Our analysis technique relies on a ﬁne-grained analysis of individual interactions, which is different than that of previous work.
From the implementation perspective, the performance of our algorithm is competitive with that of previous methods, notably DA-PSGD Lian et al.
(2017b)
and SGP Assran et al.
Other instances in the literature which consider dynamic interaction models are Nedic et al.
Nedic et al.
(2017), who present a gradient tracking algorithm in a different dynamic graph model, and
Hendrickx et al.
Hendrikx et al.
(2018), who achieve exponential convergence rates in a gossip model where transmissions are synchronized across edges .
The algorithm they consider is a more complex instance of accelerated coordinate descent, and is therefore quite different from the simple dynamics we consider.
Neither reference considers large-scale deployments for non-convex objectives.
P RELIMINARIES
The Population Protocol Model.
We consider a variant of the population protocol model which consists of a set of n ≥ 2 anonymous agents, or nodes, each executing a local state machine.
(Our analysis will make use of node identiﬁers only for exposition purposes.)
Since our application is continuous optimization, we will assume that the agents’ states may store real numbers.
The execution proceeds in discrete steps , where in each step a new pair of agents is selected uniformly at random to interact from the set of all possible pairs.
(To preserve symmetry of the protocols, we will assume that a process may interact with a copy of itself, with low probability.)
Each of the two chosen agents updates its state according to a state update function, speciﬁed by the algorithm.
The basic unit of time is a single pairwise interaction between two nodes.
Notice however that in a real system Θ( n ) of these interactions could occur in parallel.
Thus, a standard global measure is parallel time , deﬁned as the total number of interactions divided by n , the number of nodes.
Parallel time intuitively corresponds to the average number of interactions per node to convergence.
Stochastic Optimization.
We assume that the agents wish to minimize a d -dimensional, differentiable and strongly convex function f : R d → R with parameter (cid:96) > 0 , that is:
[Equation]
Speciﬁcally, we will assume the empirical risk minimization setting, in which agents are given access to a set of data samples S
= { s 1 , . . .
, s m } coming from some underlying distribution D , to a function f
i : R d → R which encodes the loss of the argument at the sample s i .
The goal of the agents is to converge on a model x ∗ which minimizes the empirical loss, that is
[Equation]
In this paper, we assume that the agents employ these samples to run a decentralized variant of SGD, described in detail in the next section.
For this, we will assume that agents have access to stochastic gradients (cid:101) g of the function f , which are functions
such that E [ (cid:101) g
( x )]
= ∇ f ( x ) .
Stochastic gradients can be computed by each agent by sampling i.i.d.
the distribution D , and computing the gradient of f at θ with respect to that sample.
In the population model, we could implement this by procedure either by allowing agents to sample in each step, or by assigning a sample s i to each agent i , and having agents compute gradients of their local models with respect to each others’ samples.
We will assume the following about the gradients:
• Smooth Gradients :
The gradient ∇ f ( x ) is L -Lipschitz continuous for some L > 0 , i.e. for all x, y ∈
[Equation]
• Bounded Variance : The variance of the stochastic gradients is bounded by some σ 2 > 0 , i.e. for all
[Equation]
R d
[Equation]
• Bounded Second Moment :
The second moment of the stochastic gradients is bounded by some M 2 > 0 , i.e. for all x ∈ R d :
[Equation]
T HE P OPULATION SGD A LGORITHM
Algorithm Description.
We now describe a decentralized variant of SGD, designed to be executed by a population of n nodes, interacting in uniform random pairs as per the population protocol model.
We assume that each node i has access to local stochastic gradients (cid:101) g i , and maintains a model estimate
X i , as well as a local learning rate η i .
For simplicity, we will assume that this initial estimate is 0 d at each agent, although its value may be arbitrary.
We detail the way in which the learning rates are updated below.
Speciﬁcally, upon every interaction, the interacting agents i and j perform the following steps:
[Figure]
[Equation] [Equation]
[Figure] [Figure]
[Figure] [Figure]
i − η i (cid:101) g
[Figure]
[Figure] [Figure]
− η
[Figure]
(cid:101) g
j
( X j )
[Figure] [Figure]
We are interested in the convergence of local models : X 1 , X 2 , ..., X n after T interactions occur in total.
For the theoretical reasons, in the case when f is convex, we derive convergence for y T which is weighted average of average values of local models per step(See Theorem 4.1).
In the beginning of section 5 we show that by performing single global averaging step at time step 0 ≤ t < T , which is carefully chosen from speciﬁed distribution, we can make sure that in expectation local models converge with the same rate as y T .
Estimating Time and the Learning Rate.
In parallel with the above algorithm, each agent maintains a local time value V i , which is estimated using a local “phase clock” protocol.
These local times are deﬁned and updated as follows.
The initial value at each agent is V i = 0 .
Upon each interaction, the interacting agents i and j exchange their time values.
The agent with a lower time value, say
V i < V j , will increment its value by 1 (ties are broken arbitrarily).
The other agent keeps its local value unchanged.
(We break ties arbitrarily.)
Although intuitively simple, the above procedure provides strong probabilistic guarantees on how far individual values may stray from the mean: with high probability, 1 all the estimates V i are in the interval [ t/n − c log T, t/n + c log T ] , where c is a constant.
Given the current value of V i at the agent, the value of the learning rate at i is simply η i = b/
( nV i + a ) , where a and b are constant parameters which we will ﬁx later.
This will ensure that the gap between two agents’ learning rates will be in the interval [0 . 5 , 2] , w.h.p.
(See Lemma 4.2.)
T HE C ONVERGENCE OF P OP SGD IN THE C ONVEX C ASE
This section is dedicated to proving that the following result holds with high probability:
Theorem 4.1.
Let f be an L -smooth, (cid:96) -strongly convex function satisfying conditions (2.3)— (2.5), whose minimum x (cid:63) we are trying to ﬁnd via the PopSGD procedure given in Algorithm 1.
Let the learning rate for process i at local time t i =
nV it be η it =
b/ ( t i + a ) , where
a = max(
cn log T, 18 n, 256 L/(cid:96) ) and b = 4 n/(cid:96) are ﬁxed(for some constant c ).
Let the sequence of weights w t be given by w t
= ( a + t ) 2 .
Deﬁne µ t = (cid:80) ni
=
X it , S T
= (cid:80) T − 1 t =
w t ≥ 13 T 3 and y T = 1 S T (cid:80) T − 1 t =0 w t µ t .
Then, for any time T , we have with probability 1 − O
(1 / poly T )
that
[Equation]
Discussion.
We ﬁrst emphasize that, in the above bound, the time T refers to the number of interactions (as opposed to parallel time ).
With this in mind, we focus on the bound in the case where T (cid:29) n, and the parameters M , L , and (cid:96) are assumed to be well-behaved.
In this case, since
S T ≥ T 3 / 3 , the ﬁrst and third terms are vanishing as T grows, and we get that convergence is dominated by the second term, which can be bounded as O ( σ 2 /T ) .
It is tempting to think that this is roughly the same rate as sequential SGD; however, our notion of time is different , as we are counting the total number of SGD steps executed in total at all the models .
(In fact, the total number of SGD steps up to T is 2 T , since each interaction performs two SGD steps.)
It is interesting to interpret this from the perspective of an arbitrary local model.
For this, notice that the parallel time corresponding to the number of total interactions T , which is by deﬁnition
T p =
T/n , corresponds (up to constants) to the average number of interactions and SGD steps performed by each node up to time T .
Thus, for any single model, convergence with respect to its number of performed SGD steps T p would be O ( σ 2 / ( nT p )) , which would correspond to running
SGD with a batch size of n .
Notice that this reduction in convergence time is solely thanks to the averaging step: in the absence of averaging, each local model would converge independently at a rate of O ( σ 2 /T p ) .
We note that our discussion assumes a batch size of 1 , but it would generalize to arbitrary batch size b , replacing σ 2 with σ 2 /b .
We note that, due to the concentration properties of the averaging process, the claim above can be extended to show convergence behavior for arbitrary individual models (instead of the average of models µ T ).
Proof Overview.
The argument, given in full in the Additional Material, can be split into two steps.
The ﬁrst step aims to bound the variance of the local models X it at each time t and node i with respect to the mean µ t = (cid:80)
i X i t
/n .
It views this quantity as a potential Γ t , which we show has supermartingale-like behavior, which enables us to bound its expected value as O ( η 2 t n ) .
This shows that the variance of the parameters is always bounded with respect to the number of nodes, but also, importantly, that it can be controlled via the learning rate.
The key technical step here is Lemma 4.3, which provides a careful bound for the evolution of the potential at a step, by modelling SGD as a dynamic load balancing process: each interaction corresponds to a weight generation step (in which gradients are generated) and a load balancing step , in which the “loads” of the two nodes (corresponding to their model values) are balanced through averaging.
In the second step of the proof, we ﬁrst bound the rate at which the mean µ t converges towards x ∗ , where we crucially (and carefully) leverage the variance bound obtained above.
This is our second key technical lemma.
Next, with this in hand, we can apply a standard argument to characterize the rate at which the quantity E [ f ( y T ) − f ( x ∗ )] converges towards 0 .
Notation and Preliminaries.
In this section, we overview the analysis of the PopSGD protocol.
We begin with some notation.
Recall that n is the number of nodes.
We will analyze a sequence of time steps t = 1 , 2 , . . .
, T , each corresponding to an individual interaction between two nodes, which are usually denoted by i and j .
Recall the deﬁnition of parallel time T p =
T/n , where T counts the number of pairwise interactions.
For any time t , deﬁne by η t = b/ ( a + t ) the “true” learning rate at time t , where a and b are constants to be ﬁxed later, such that a ≥ 2 cn log n for some constant c .
We denote by x ∗ the optimum of the function f .
Learning Rate Estimates.
Our ﬁrst technical result characterizes the gap between the “global” learning rate η t = b/ ( a + t ) (in terms of the true time t ), and the individual learning rates at an arbitrary agent i at the same time, denoted by η it .
Lemma 4.2.
Let η it = b/ ( a + nV it ) , be the learning rate estimate of agent i at time step t , in terms of its time estimate V it .
Then, there exists a constant γ > 1 such that, with probability at least 1 − 1 /T γ
(Here, T is a total number of steps our algorithms takes), the following holds for every T ≥ t ≥and agent i :
[Equation]
Step 1: Parameter Concentration.
Next, let X t be a vector of model estimates at time step t , that is X t
=
( X 1 t , X 2 t , ..., X nt ) .
Also, let µ t = 1 n n (cid:80) i
=1 X it , be an average estimate at time step t .
The following potential function measures the concentration of the models around the average:
[Equation]
With this in place, one of our key technical results is to provide a supermartingale-type bound on the evolution of the potential Γ t , in terms of M , η t , and the number of nodes n .
Lemma 4.3.
For any time step t and ﬁxed learning rate η t used at t , we have the bound
[Equation]
Next, we unroll this recurrence to upper bound Γ t in expectation for any time step t , by choosing an appropriate series of non-constant learning rates.
Lemma 4.4.
If a ≥ 18 n , then the potential is bounded as follows
[Equation]
Step 2: Convergence of the Mean and Risk Bound.
The above result allows us to characterize how well the individual parameters are concentrated around their mean, in terms of the second moment of the gradients, the number of nodes, and the learning rate.
In turn, this will allow us to provide a recurrence for how fast the parameter average is moving towards the optimum, in terms of the variance and second-moment bounds of the gradients:
Lemma 4.5.
For η t ≤ n 64 L , we have that
[Equation]
Finally, we wish to phrase this bound as a recurrence which will allow us to bound the expected risk of the weighted sum average.
We aim to use the following standard result (see e.g. Stich (2018)):
Lemma 4.6.
Let { a t } t ≥ 0 , a t ≥ 0 , { e t } t ≥ 0 , e t ≥ 0 be sequences satisfying
[Equation]
1 − (cid:96)α t (cid:17) a t − α t e t
A + α 2 t B + α 3 t C, for α t = 4 (cid:96) ( t + a ) , A > 0 , B, C ≥ 0 , (cid:96) > 0 then
A
S T
[Equation]
1 (cid:88) [Equation]
=
[Equation] T (cid:96) [Equation]
S [Equation] , (4.3) for w t = ( a + t ) 2 and S T = (cid:80) T − 1 t =0 w T ≥ 13 T 3 . To use the above lemma, we set η t = nα t = 4 n (cid:96) ( t + a ) , and the parameter b = 4 n/(cid:96) .
We also use A = 1 / 2 , B = 16 σ 2 , and C = 288 M 2 Ln 2 .
Let y T = 1 nS T (cid:80) ni
=1 (cid:80) T − 1 t =
w t
X it .
Also, let e t =
E
[ f ( µ t )
− f ( x ∗ )] and a t = E (cid:13)(cid:13)(cid:13) µ t − x ∗ (cid:13)(cid:13)(cid:13) 2 .
Using convexity and Lemma 4.6 above we obtain the following ﬁnal bound:
[Equation]
To complete the proof of the Theorem, we only need to ﬁnd the appropriate value of the parameter a .
For that, we list all the constraints on a : a ≥ 2 cn log T, a ≥ 18 n and [Equation] ≤ n 64 L .
These inequalities can be satisﬁed by setting a = max (cid:16) 2 cn log T, 18 n, 256 L(cid:96) (cid:17) .
This concludes our proof.
E XTENSIONS
Convergence of local models and alternative to computing y T .
Notice that Theorem 4.1 measures convergence of f ( y T ) , where y T = (cid:80) T − 1 t =0 w t S T (cid:80) ni
=
X it n = [Equation] T − 1 t =
w t S T µ t , is a weighted average of µ t -s per step.
Notice that actually computing y T can be expensive, since we need values of local models over T steps and it does not necessarily guarantee convergence of each individual model.
In order to circumvent this issue, we can look at the following inequality, which in combination with the
Jensen’s inequality gives us the proof of Theorem 4.1 (Please see Appendix for details) :
[Equation]
What we can do is, instead of computing y T , we just sample time step 0 ≤ t ≤ T − 1 with probability w t
S T and compute f ( µ t ) =
f ( (cid:80) ni
=
X it /n ) , by using single global averaging procedure.
Observe that
E t [ E µ t [ f ( µ t )]] is exactly the left hand side of the above inequality.
Hence, we get the convergence identical to the one in Theorem 4.1 and additionally, since we are using global averaging, we also guarantee the same convergence for each local model.
Finally, we would like to emphasize that in practice there is no need to compute y T or to use global averaging, since local models are already converged after T interactions.
General Interaction Graphs.
Our analysis can be extended to more general interaction graphs by tying the evolution of the potential in this case.
In the following, we present the results for a cycle , leaving the exact derivations for more general classes of expander graphs for the full version.
In particular, we assume that each agent is a node on a cycle, and that it is allowed to interact only with its neighbouring nodes.
Again, the scheduler chooses interaction edges uniformly at random.
In this setting, we can show the following result, which is similar to Theorem 4.1:
Theorem 5.1.
Let f be an L -smooth, (cid:96) -strongly convex function satisfying conditions (2.3)—(2.5), whose minimum x (cid:63) we are trying to ﬁnd via the PopSGD procedure on a cycle.
Let the learning rate for process i at local time t i =
nV it be η it =
b/ ( t i + a ) , where
a = max(
cn log T, 18 n, 256 L/(cid:96) ) and b = 4 n/(cid:96) are ﬁxed(for some constant c ).
Let the sequence of weights w t be given by w t
= ( a + t ) 2 .
Deﬁne µ t = (cid:80) {+ni =
+}
X it , S T
= {+(cid:80) T − 1 t =
+}
w t ≥ 13 T 3 and y T = 1 S T (cid:80) T − 1 t =0 w t µ t .
Then, for any time T , we have with probability 1 − O
(1 / poly T )
that
[Equation]
Notice that for T (cid:29) n 3 , the second term dominates convergence and we can repeat the same argument as for Theorem 4.1 to show O ( σ 2 /T ) convergence (where T is the total number of interactions).
Next we provide the sketch of a proof for the PopSGD on a cycle case.
See section ??
in the appendix for the proof sketch.
The Non-Convex Case.
Next, we show convergence for non-convex, but smooth functions.
The
Following theorem deals with the bounded gradient case:
Theorem 5.2.
Let f be an non-convex, L -smooth, function satisfying assumption 2.5, whose minimum x (cid:63) we are trying to ﬁnd via the PopSGD procedure given in Algorithm 1.
Let the learning rate we use be η = n/ √ T .
Then, for any T ≥ n 4 :
[Equation]
Next, we show the similar result for the case when gradient is not bounded, but it’s variance is.
This can be achieved by carefully following steps given in the Lian et al.
(2017b).
Theorem 5.3.
Let f be an non-convex, L -smooth, function satisfying condition 2.4, whose minimum x (cid:63) we are trying to ﬁnd via the PopSGD procedure given in Algorithm 1.
Let the learning rate we use be η = n/ √ T .
Then, for any T ≥ 4624 max { 1 /L 2 , 1 } n 4 , we have
[Equation]
Observe that, since T is the total number of interactions and is equal to nT p , where T p is a parallel time, in both theorems, we get convergence O (1 / √ T )
=
O (1 / (cid:112) T p n ) .
Which gives us 1 / √ n speedup over O (1 / √ T ) convergence of the sequential version.
(Note that in the sequential case parallel time and the total number of interactions are the same.)
Finally, we derive convergence for the case where gradient is bounded and function we are trying to optimize satisﬁes the Polyak-Łojasiewicz (PL) assumption with constant α .
More formally, function f satisﬁes the PL assumption with constant α if :
[Equation]
We use a similar approach to Haddadpour et al.
, but, our tighter analysis of Γ potential allows us to remove global synchronization.
Theorem 5.4.
Let f be an non-convex, L -smooth, function satisfying assumption 2.5 and PLassumption with constant α (5.2), whose minimum x (cid:63) we are trying to ﬁnd via the PopSGD procedure given in Algorithm 1.
Let the learning rate at time step t be η t = 4 n α [Equation] t + a ) (Local learning rates at time
T i are η it =
n α
( T i + a ) ) .
Then for a ≥ 2 cn log T and time T , with probability 1 − O (1 / poly T ) we have
[Equation]
Observe that as in Theorem 4.1, this gives us a linear speedup over the sequential version.
E XPERIMENTAL R ESULTS
In this section, we validate our results numerically by implementing PopSGD in Pytorch, using
MPI for inter-node communication MPI.
We are interested in the convergence behavior of the algorithm, and in the scalability with respect to the number of nodes.
Our study is split into simulated experiments for convex objectives–to examine the validity of our analysis as n increases—and largescale real-world experiments for non-convex objectives (training neural networks), aimed to examine whether PopSGD can provide scalability and convergence for such objectives.
Convex Objectives.
To validate our analysis in the convex case, we evaluated the performance of PopSGD on three datasets: (1) a real-world linear regression problem (the Year Prediction dataset Chang and Lin (2011)) with a 463 , 715 / 51 , 630 test/train split, and d = 90 ; (2) a realworld classiﬁcation problem ( gisette Chang and Lin (2011)) with 6 , 000 / 1 , 000 test/train split, and d = 5000 ; (3) a synthetic least-squares problem of the form (2.2) with f ( x ) = 12 (cid:107)
Ax − b (cid:107) 2 , where
A ∈ R m × d and b ∈ R m , with m = 10 4 and variable d .
As a baseline, we employ vanilla SGD with manual learning rate tuning.
The learning rate is adjusted in terms of the number of local steps each node has taken, similar to our analysis.
[Figure]
Our ﬁrst set of experiments examines train and test loss for PopSGD on the real-world tasks speciﬁed above.
We examine the test loss behavior with respect to the number of nodes n , and execute for powers of 10 between 1 and 10000 .
Each node obtains a stochastic gradient by samplingelements from the training set in a batch.
We tuned the learning rate parameter for each instance independently, through line search, and obtained learning rates in the interval [0 . 0005 , 0 . 015] for
Gisette, and [0 . 05 , 0 . 2] for Year Prediction.
Please see Figure 1(b) for the results.(The number of epochs is cropped to maintain visibility, but the trends are maintained in general.)
The results conﬁrm our analysis; notice in particular the clear separation between instances for different n , which follows exactly the increase in the number of nodes, although the X axis values correspond to the same number of gradient steps for the local model.
In Appendix B, we present additional experiments which precisely examine the reduction in variance versus the number of nodes on the synthetic regression task, conﬁrming our analysis.
Training Neural Networks.
Our second set of experiments tests PopSGD on the CSCS Piz Daint supercomputer, which is composed of Cray XC50 nodes, each with a Xeon E5-2690v3 CPU and an NVIDIA Tesla P100 GPU, using a state-of-the-art Aries interconnect.
For this, we implemented PopSGD in Pytorch using MPI one-sided primitives MPI, which allow nodes to read eachothers’ models for averaging without explicit synchronization.
We used PopSGD to train ResNets on the classic CIFAR-10 and ImageNet datasets.
Training proceeds in epochs, each of which is structured as follows.
At the beginning of each epoch, we shufﬂe the dataset and partition it among processes. Notice that, in data-parallel SGD, an epoch ends after each process iterates exactly once over its partition, i.e. each sample is seen once .
However,
Theorem 4.1 suggests that, for PopSGD, processes should iterate several times over their partitions, for the corresponding gradient information to be propagated. To match this, we introduce a multiplier constant mult , which counts the number of times each process will iterate through its partition before an epoch is complete.
At the same time, we scale down the total number of epochs executed by n , the number of nodes.
In practical terms, if sequential SGD trains ResNet50 in 90 epochs, decreasing the learning rate at 30 and 60 epochs, then PopSGD with 32 nodes and multiplier 4 would use 90 ∗ 4 / 32 (cid:39) 12 epochs per node, decreasing the learning rate at 4 and 8 epochs.
Since PopSGD scales almost linearly in terms of time per epoch (see Figure 2, middle), this should ensure end-to-end speedup for PopSGD. In particular, for ResNet50, we obtain a 2x end-to-end time-to-convergence speedup versus data-parallel SGD.
Figure 2 shows the test and train accuracies for the ResNet18 model trained on the ImageNet dataset, with 32 Piz Daint nodes and mult = 4 , as well as scalability versus number of nodes.
The hyperparameters used for model training are identical to the standard sequential recipe (batch size 128 per node), with the number of epochs scaled down to 12 per node. The results suggest that PopSGD can indeed preserve convergence, while being scalable and competitive with state-of-the-art algorithms.
Appendix B presents additional experiments for
ResNet50/Imagenet and ResNet20/CIFAR-10, which further substantiate this claim.
D ISCUSSION AND F UTURE W ORK
We have analyzed the convergence of decentralized SGD in the population model of distributed computing.
We have shown that SGD is able to still converge in this restrictive setting, and moreover, under parameter and objective assumptions, can even achieve linear speedup in the number of agents n in terms of parallel time.
The empirical results conﬁrmed our analytical ﬁndings.
The main surprising result is that PopSGD presents speedup behavior roughly similar to mini-batch SGD, even though a node only sees one gradient update and a single model at a time.
Our work opens several avenues for extensions.
One natural direction is to study PopSGD with quantized communication, or allowing the interactions to present inconsistent (stale) model views to the two agents.
Another avenue is to tighten the bounds in terms of their dependence on the problem conditioning, and on the objective assumptions.
A S UMMARY AND COMPARISON OF RESULTS
In this section we compare convergence rates of existing algorithms, while specifying the bounds they require for convergence.
In the tables T -corresponds to the parallel time and n is a number of processes.
We use the following notations for needed bounds:
σ 2 - bound on the variance of gradient.
M 2 - bound on the second moment of gradient.
PL - Polyak-Łojasiewicz assumption.
d - bounded dimension.
ρ - bounded spectral gap of the averaging matrix.
τ - bounded message delay.
[Table]
[Table]
B A DDITIONAL E XPERIMENTS
Convex Losses.
In these experiments, we examine the convergence of PopSGD versus parallel time for different node counts, and compared it with the sequential baseline.
More precisely, for PopSGD, we execute the protocol by simulating the entire sequence of interactions sequentially
[Table]
and track the evolution of train and test loss at an arbitrary ﬁxed model x i with respect to the number of SGD steps it performs.
Notice that this is practically equivalent to tracking with respect to parallel time.
In this case, the theory suggests that loss convergence and variance should both improve when increasing the number of nodes.
Figure 3(a) presents the results for the synthetic linear regression example with d = 32 , for various values of n , for constant learning rate η = 0 .
001 across all models, and batch size 1 for each local gradient.
Figure 3(b) compares PopSGD convergence (with local batch size 1 ) against sequential mini-batch SGD with batch size equal to the number of nodes n .
Examining Figure 3(a), we observe that both the convergence and loss variance improve as we increase the number of nodes n , even though the target model executes exactly the same number of gradient steps at the same point on the x axis.
Of note, variance decreases proportionally with the number of nodes, with n = 128 having the smallest variance.
Compared to mini-batch SGD with batch size = n (Figure 3(b)), PopSGD with n = 128 has similar, but notably higher variance, which follows the analytical bound in Theorem 4.1.
CIFAR-10 Experiments.
We illustrate convergence and scaling results for non-convex objectives by using PopSGD to train a standard ResNet20 DNN model on CIFAR-10 in Pytorch, using 8 GPU nodes, comparing against vanilla and local SGD performing global averaging every 100 batches (we found this value necessary for the model to converge).
We measure the error/loss at an arbitrary process for PopSGD.
We run the parallel versions at 4 and 8 nodes.
[Figure]
[Figure] [Figure]
[Figure]
The results in Figure 4(c) show that (a,b) PopSGD does indeed converge faster as we increase population size, tracking the trend from the convex case; and (c) PopSGD can provide non-trivial scalability, comparable or better than data-parallel and local SGD.
Training ResNet50 on ImageNet.
Figure 4 shows the test and train accuracies for the ResNet model trained on the ImageNet dataset, with 32 Piz Daint nodes and mult = 4 .
PopSGD achieves test accuracy within < 0 .
5% relative to the Torchvision baseline, despite the vastly inferior number of iterations, in a total of 29 hours.
By way of comparison, end-to-end training using standard data-parallel SGD takes approximately 48h on the same setup.
C C OMPLETE C ORRECTNESS A RGUMENT
Lemma 4.2.
Let η it = b/ ( a + nV it ) , be the learning rate estimate of agent i at time step t , in terms of its time estimate V it .
Then, there exists a constant γ > 1 such that, with probability at least 1 − 1 /T γ
(Here, T is a total number of steps our algorithms takes), the following holds for every T ≥ t ≥and agent i :
[Equation]
Proof.
Let G t = n (cid:80)
[Equation]
, for some ﬁxed constant ζ .
The following lemma is proved as Theorem 2.10 in Peres et al.
(2015b):
Lemma C.1.
For any t ≥ 0 , and some ﬁxed constants (cid:15) and θ , E [ G t ] ≤ 4 θζ(cid:15) n.
Subsequently, we can show that for any t ≥ 0 and agent i :
[Equation]
Hence, for large enough constant q , using union bound over T steps, we can show that there exists a constant γ > 0 such that for every T ≥ t ≥ 0 and agent i , | tn − V it |≤ qζ log T , with probability at least 1 − 1 /T γ .
Let c be qζ , thus a ≥ 2 cn log T = 2 qζ n log T .
This allows us to ﬁnish the proof of the lemma:
[Equation]
This allows us to bound the per step change of potential Γ , in terms of global learning rate η t .
Lemma 4.3.
For any time step t and ﬁxed learning rate η t used at t , we have the bound
[Equation]
Proof.
First we bound change in potential ∆ t =
Γ t +1 − Γ t for some time step t > 0 .
Let ∆ i,jt be a change in potential when we choose different agents i and j at random and let ∆ it be a change in potential when we select the same node i .
We get that
[Equation]
We
[Table]
change in
[Table]
for [Table] i (cid:54) = [Table]
Observe, [Table] µ t [Equation]
[Equation]
µ [Equation] ( η it (cid:101) g i ( X it ) + η jt (cid:101) g
[Equation] ( X jt )) /n
and X it +
=
X
jt +
=
( X it + X jt ) / 2 − [Equation] it (cid:101) g
i ( X it ) +
[Equation] (cid:101)
[Equation]
Hence,
[Equation]
For k / ∈ { i, j } , since X kt +
=
X kt
we get that
[Equation]
This gives us that
[Equation]
Observe that
[Equation]
and
[Equation]
Thus
[Equation]
we have that
[Equation]
similarly we can prove that
[Equation]
By using inequalities C.6 and C.7 in inequality C.4 we get that
E
[Equation] [Equation]
Observe that (cid:88)
i
[Equation]
and (cid:88) i (cid:88)
i (cid:54)
[Equation]
[Equation]
Hence, we get that
[Equation]
Further, we have that (cid:88) i (cid:88)
[Equation]
[Equation]
[Table]
4 η t M n
[Equation]
By plugging above inequality in inequality C.9, we get that
[Equation]
Hence, considering the deﬁnition of ∆ t and the fact that the above inequality implies
[Equation]
we get the proof of the Lemma.
[Equation]
Lemma 4.4.
If a ≥ 18 n , then the potential is bounded as follows
[Equation]
Proof.
We prove the lemma using induction.
Base case t = 0 trivially holds, since Γ t = 0 .
For induction step, we assume that at time step t , E [Γ t ] ≤ 36 nb 2 M 2 / ( t + a ) 2 .
Our goal is to prove that E [Γ t +1 ] ≤ 36 nb 2 M 2 / ( t + a + 1) 2 .
[Equation]
[Equation]
Using the fact that t + a + 1 ≥ a ≥ 18 n in the above inequality allows us to get
[Equation]
Lemma 4.5.
For η t ≤ n 64 L , we have that
[Equation]
Proof.
Let F t be the amount by which µ t decreases at step t .
So, F t is a sum of η it n (cid:101)
g
i ( X it ) and η jt n (cid:101) g
( X jt ) for agents i and j , which interact at step t .
Also, let F (cid:48) t be the amount by which µ t would decrease if interacting agents used true gradients.
That is, for agents i and j which interact at step t ,
F (cid:48) t is sum of η jt n ∇ f
( X it ) and η jt n ∇ f
( X jt ) .
[Equation]
Observe that E [ F t ] = F (cid:48) t , hence the last term in the equation above is 0 .
This means that in order to upper bound E (cid:13)(cid:13)(cid:13) µ t +1 − x ∗ (cid:13)(cid:13)(cid:13) 2 , we need to upper bound E (cid:13)(cid:13)(cid:13) µ t − x ∗ − F
[Equation]
(cid:13)(cid:13)(cid:13) 2 and E (cid:13)(cid:13)(cid:13) F
[Equation]
t − F t
[Equation]
For the latter, we get that
[Equation]
= [Equation] nn (cid:88) i =
[Equation]
it
[Equation]
n
[Equation]
n
[Equation]
[Equation]
For the former, we have that
E (cid:13)(cid:13)(cid:13) µ t − x ∗ − F (cid:48) t (cid:13)(cid:13)(cid:13)
[Equation]
E (cid:107) µ t − x ∗ (cid:107) 2 + E (cid:107) F (cid:48)
t (cid:107) 2 − 2 E (cid:104)
[Equation]
t − x
[Equation]
F (cid:48) t (cid:105) = E (cid:107) µ t − x ∗ (cid:107) 2 + 1 nn (cid:88) i = n [Equation]
[Equation]
In order to bound (cid:107)∇ f ( X it ) −∇ f ( x ∗ ) (cid:107)
we can use the L − smoothness property for convex functions
[Equation]
in the following form
[Equation]
By setting y =
X it and x
= x ∗ we get
[Equation]
Additionally, by (cid:96) − strong convexity, we have that
[Equation]
By Cauchy-Schwarz inequality, we get that
[Equation]
Using L − smoothness property (C.13) in the above inequality gives us that
[Equation]
By plugging inequalities (C.13), (C.14) and (C.15) in inequality (C.11)
[Equation]
we get
[Equation]
Observe that E (cid:107) X it − x ∗ (cid:107) 2 , E (cid:107) X it − µ t (cid:107) 2 and E [ f ( X it ) − f ( x ∗ )] are non-negative terms, Thus, by using Lemma [Equation] 2 in the above inequality we have that:
[Equation]
By using η t ≤ n 64 L in the above inequality we get that
[Equation]
By Jensen’s inequality and convexity of f and square of norm we have that
[Equation]
n
Finally, by using the above inequality in inequality (C.10) we get
[Equation]
Theorem 4.1.
Let f be an L -smooth, (cid:96) -strongly convex function satisfying conditions (2.3)— (2.5), whose minimum x (cid:63) we are trying to ﬁnd via the PopSGD procedure given in Algorithm [Equation]
Let the learning rate for process i at local time t i =
nV it be η it =
b/ ( t i + a ) , where
a = max(
cn log T, 18 n, 256 L/(cid:96) ) and b = 4 n/(cid:96) are ﬁxed(for some constant c ).
Let the sequence of weights w t be given by w t
= ( a + t ) 2 .
Deﬁne µ t = (cid:80) ni
=
X it , S T
= (cid:80) T − 1 t =
w t ≥ 13 T 3 and y T = 1 S T (cid:80) T − 1 t =0 w t µ t .
Then, for any time T , we have with probability 1 − O
(1 / poly T )
that
[Equation]
Proof.
We use Lemma 4.6 to solve the recurrence given by Lemma 4.5.
For this we set η t = nα t = 4 n [Equation] + a ) .
That is, we set parameter b = 4 n/(cid:96) .
We also use A = 1 / 2 , B = 16 σ 2 , and C = 288 M 2 Ln 2 .
This way we can rewrite Lemma 4.5 as :
[Equation]
Further, let y T = 1 nS T (cid:80) ni =1 (cid:80) T − 1 t =
w t
X it .
Also, let e t be E [ f ( µ t ) − f ( x ∗ )] and a t = E (cid:13)(cid:13)(cid:13) µ t − x ∗ [Equation]
By convexity of f we have that
[Equation]
Using this fact and the Lemma 4.6 we obtain the following.
[Equation]
what is left is to ﬁnd the appropriate a .
For that we remember all the constraints on a : a ≥ 2 cn log T, a ≥ 18 n and
[Equation]
L .
These inequalities can be satisﬁed by setting
[Equation]
D N ON CONVEX ANALYSIS WITH P L - ASSUMPTION
In this section we deal with the case when the function we are trying to optimize is non convex but it satisﬁes PL -assumption(5.2) with constant α .
More formally, function f satisﬁes PLassumption(5.2) with constant α .
Theorem 5.4.
Let f be an non-convex, L -smooth, function satisfying assumption 2.5 and PLassumption(5.2) with constant α , whose minimum x (cid:63) we are trying to ﬁnd via the PopSGD procedure given in Algorithm 1.
Let the learning rate at time step t be η t = 4 n α ( t + a ) .
Then, for any time T , we have
[Equation]
Proof.
[Equation]
Using E [ (cid:101) g i ( x )]
= ∇ f ( x ) and property (2.5) we can rewrite the above inequality as
E [ f ( µ t +1 )] ≤ E [ f ( µ t )] + n (cid:88)
i
[Equation]
i t ) (cid:105) + n (cid:88) i =
2 L ( η i t )n
M(D.7)
=
E [ f ( µ t )] + n (cid:88) i =
2 η it n 2 E (cid:104)∇ f ( µ t ) , ∇ f ( µ t ) − ∇ f ( X it ) (cid:105) (D.8) − n (cid:88) i =
η it n 2 E (cid:107)∇ f ( µ t ) (cid:107) 2 + n (cid:88) i =
2 L ( η it )n
M(D.9) ≤ E [ f ( µ t )] + n (cid:88) i =
η it n 2 E (cid:104) (cid:107)∇ f ( µ t ) (cid:107)
+
(cid:107)∇ f ( µ t ) − ∇ f ( X it ) (cid:107) 2 (cid:105) (D.10) − n (cid:88) i =
2 η it n 2 E (cid:107)∇ f ( µ t ) (cid:107) 2 + n (cid:88) i =
2 L ( η it )n
M(D.11) =
E [ f ( µ t )] + n (cid:88) i =
η it n 2 E (cid:107)∇ f ( µ t ) − ∇ f
( X it ) (cid:107) 2 − n (cid:88)
i =
η it n 2 E (cid:107)∇ f ( µ t ) (cid:107) 2 + n (cid:88) i =
2 L ( η it )n
M(D.12)
[Equation]
Recall that by Lemma 4.4 we have that E [Γ t ] = (cid:80) ni
=1 E (cid:107) µ t − X
it (cid:107) 2 ≤ 36 nη
[Equation]
M 2 , hence the above inequality becomes:
[Equation]
Next we use PL -assumption(5.2), which says that
[Equation]
Hence, we get that
[Equation]
This can be rewritten as:
[Equation]
Next as in the proof for convex case, we deﬁne w t = ( a + t ) 2 and we set η t = 4 n α ( t + a ) .
We get that
[Equation]
By using this in inequality D.15 and unrolling recursion we get that w T
[Equation]
Next we divide the above inequality by w T η T = ( a +
[Equation]
3 α 4 n .
We get that
E [
[Equation]
E N ON -C ONVEX A NALYSIS WITH CONSTANT LEARNING RATE
In this section we address the case when function we want to optimize is non-convex by using constant learning rate over all iterations and process.
Let our learning rate be eta .
Observe that since η it =
η t = η ≤ 2 η t , Lemma 4.3 holds.
So, we get that
[Equation]
Using induction as in the proof of Lemma 4.4 we can prove that the similar results holds for the constant learning rate as well:
Lemma E.1.
For any constant learning rate η and t > 0 , we have
[Equation]
Theorem 5.2.
Let f be an non-convex, L -smooth, function satisfying assumption 2.5, whose minimum x (cid:63) we are trying to ﬁnd via the PopSGD procedure given in Algorithm 1.
Let the learning rate we use be η = n/ √ T .
Then, for any T ≥ n 4 :
[Equation]
Proof.
[Equation]
Using E [ (cid:101) g i ( x )]
= ∇ f ( x ) and property (2.5) we can rewrite the above inequality as
[Equation]
recall that by Lemma E
[Equation]
1 we have that E [Γ t ] =
(cid:80)
[Equation]
E
[Equation]
µ
[Equation] [Equation]
2 , hence the above inequality becomes:
[Equation]
by summing the above inequality for t = 0 to t
= T −
[Equation]
we get that
[Equation]
From this we get that :
[Equation]
Note that E [ f ( µ T )] ≥ f ( x ∗ ) , hence after multiplying the above inequality by nηT we get that
[Equation]
Observe that η = n/ √ T ≤ 1 /n , since T ≥ n 4 .
This allows us to ﬁnish the proof:
[Equation]
Next we replace assumption 2.5 with assumption 2.4.
We start by proving the following lemma:
Lemma E.2.
For any time step t , we have:
[Equation]
Proof.
First we bound change in potential ∆ t =
Γ t +1 − Γ t for some time step t > 0 .
Let ∆ i,jt be a change in potential when we choose different agents i and j at random and let ∆ it be a change in potential when we select the same node i .
We get that
[Equation]
We proceed by bounding a change in potential for ﬁxed i (cid:54) =
j . Observe, that in this case µ t +1 = µ t − ( η (cid:101) g
i
( X it )
+ η (cid:101) g
j
( X jt )) /n
and X it +
=
X
jt +
=
( X it + X jt ) / 2 − ( η (cid:101) g
i
( X it )
+ η (cid:101) g
j
( X jt )) / 2 .
Hence,
[Equation]
For k / ∈ { i, j } , since X kt +
=
X kt
we get that
[Equation]
This gives us that
[Equation]
+ E (cid:13)(cid:13)(cid:13) ( X it + X jt ) / 2 − n − 2 2 n ( η (cid:101) g
i ( X it ) + η (cid:101) g j ( X jt )) − µ t (cid:107) 2 − (cid:107) X jt − µ t (cid:107)+ (cid:88) k/ ∈
i,j } (cid:16) E (cid:13)(cid:13)(cid:13)
X kt + 1 n ( η (cid:101) g
i ( X it ) + η (cid:101) g j ( X jt )) − µ t (cid:13)(cid:13)(cid:13) 2 − (cid:107) X kt − µ t (cid:107) 2 (cid:17) = 2 (cid:107) ( X it − µ t ) / 2 + ( X jt − µ t ) / 2 (cid:107) 2 − (cid:107) X
it − µ t (cid:107) 2 − (cid:107) X jt − µ t (cid:107)− n −n E (cid:104) η (cid:101)
g
i ( X i t ) + η (cid:101) g j ( X j t ) , ( X i t − µ t ) + ( X j t − µ t ) (cid:105) + 2 (cid:16) n −2 n (cid:17) 2 E (cid:107) η (cid:101) g
i
( X it )
+ η (cid:101) g
j
( X jt ) (cid:107)+ (cid:88) k/ ∈{ i,j } (cid:16)n E (cid:104) η (cid:101) g
i ( X it ) + η (cid:101) g j
( X jt ) , X kt − µ t (cid:105) + 1 n 2 E (cid:107) η (cid:101) g
i ( X it ) + η (cid:101) g j
( X jt ) (cid:107) 2 (cid:17)
Observe that
[Table]
Thus
[Table]
we have that
[Table]
[Equation]
similarly we can prove that
[Equation]
By using inequalities E.21 and E.22 in inequality E
[Equation]
19 we get that
[Equation]
X it
[Equation]
Observe that (cid:88)
i
[Equation]
and (cid:88)
i
[Equation]
Hence, we get that
[Equation]
Further
[Equation]
we have that
[Equation]
=
[Equation]
By plugging above inequality in inequality E.
[Equation]
we get that
[Equation]
Hence
[Equation]
considering the deﬁnition of ∆ t we get the proof of the Lemma
[Equation] [Equation]
Lemma E.3.
n
[Equation]
=
[Equation]
Proof.
n (cid:88) i =
E
[Equation]
g i
( X it ) (cid:107) 2 = n (cid:88) i =
E (cid:107) (cid:101) g
i ( X it )
[Equation]
f ( X it ) + ∇ f ( X it ) (cid:107)≤n (cid:88) i =
E (cid:107) (cid:101) g
i ( X it ) − ∇ f ( X it ) (cid:107) 2 +n (cid:88) i =
E (cid:107)∇ f
( X it ) (cid:107)=n (cid:88) i =
E (cid:107) (cid:101) g
i ( X it ) − ∇ f ( X it ) (cid:107)+n (cid:88) i =
E (cid:107)∇ f
( X it ) − ∇ f ( µ t ) + ∇ f ( µ t ) − n (cid:88)
j = ∇ f
( X jt ) /n
+ n (cid:88)
j = ∇ f
( X jt ) /n
(cid:107)≤n (cid:88) i =
E (cid:107) (cid:101) g
i ( X it ) − ∇ f ( X it ) (cid:107) 2 +n (cid:88) i =
E (cid:107)∇ f
( X it ) − ∇ f ( µ t ) (cid:107) 2 +n (cid:88) i =
[Equation]
Notice that for η ≤ 1 16 √ L the above two lemmas give us
[Equation]
Observe that since (cid:80) ∞ i =
(1 − 1 / 4 n ) i = 4 n , the above equation results in
Lemma E.4.
[Equation]
Now, we are ready to prove the following theorem
Theorem 5.3.
Let f be an non-convex, L -smooth, function satisfying condition 2.4, whose minimum x (cid:63) we are trying to ﬁnd via the PopSGD procedure given in Algorithm 1.
Let the learning rate we use be η = n/ √ T .
Then, for any T ≥ 4624 max { 1 /L 2 , 1 } n 4 , we have
[Equation]
Proof.
[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]
Next
[Equation]
we sum the above inequality from t = 0 to t =
T − 1 and divide by T
[Equation]
We get:
[Equation]
Lemma E.4 ≤
[Equation]
Next we assume that η < 168 L and η < 1 .
This allows us to eliminate terms with
E |
[Equation]
ni =1 ∇ f
( X it ) /n
(cid:107) 2 multiplicative factor from the above inequality, hence we get:
[Equation]
next, we divide the above inequality by ηn :
[Equation]
Further, assuming that η ≤ 1 /n , we get:
T [Equation] 1 (cid:88)
[Equation]
Observe that all the assumptions on η are satisﬁed for T ≥ 4624 max { 1 /L 2 , 1 } n 4 .
[Equation]
F G ENERAL I NTERACTION G RAPHS
The crucial difference between interactions on arbitrary graph and interactions on clique graph comes from the fact that we get different bound on Gamma potential.
In the case of arbitrary graph we can show that:
[Equation]
Where λ 2 is a second smallest eigenvalue of the Laplacian of the interaction graph and m is the number of it’s edges.
This allows us to bound Γ and then we can follow analysis of clique case to get the convergence rate.
For example, in a case of cycle
[Equation]
and hence
E [
[Equation]
and this allows us to prove Theorem 5.1.