Title: POPSGD: DECENTRALIZED STOCHASTIC GRADIENT DESCENT IN THE POPULATION MODEL

Abstract: 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.

1. INTRODUCTION:

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 finding x = argmin x 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:

x t+1 = x t -η t P i=1 g i t (x t ),

where η t is the learning rate, x t is the value of the global parameter, initially 0 d , and g i t (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 significant progress on communication-reduced variants of SGD (e.g. Seide et al. (2014) ; Strom (2015) ; Alistarh et al. (2017b) ; Wen et al. (2017) ; Aji and Heafield (2017) ; Dryden et al. (2016) ; Grubic et al. (2018) ), asynchronous variants (e.g. Recht et al. (2011); Sa et al. (2015) ; 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. (2017) and Chen and Huo (2016) ; Stich (2018)), or even decentralized synchronous 1 variants(e.g. Lian et al. (2017a) ; Tang et al. (2018) ; Koloskova et al. (2019) ). 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) , defined 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 specified 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. (2017) and synthetic DNA strand displacement cascades Chen et al. (2013) . The key difference between population protocols and the synchronous gossip models (e.g. Xiao and Boyd (2004) ; Lian et al. (2017a) ; Koloskova et al. (2019) ) 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 efficiently 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 first 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

x i ← x i + x j 2 -η i g i (x i ) + g j (x j ) 2 , (1.1)

where j is the interaction partner, and the stochastic gradients g i and 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 satisfies 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 efficient implementation of PopSGD using Pytorch/MPI applied to regression tasks, but also to the standard CIFAR/ImageNet classification tasks for deployments on a multi-GPU nodes, and on the Piz Daint supercomputer (Piz). Experiments confirm 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 ResNet50 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 first 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. (1999) ; Mitzenmacher (2000) ; Talwar and Wieder (2007) ; Peres et al. (2015a) ; Boyd et al. (2006) ). 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 sufficient 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 difficulties, 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. 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. (2003) ; Xiao and Boyd (2004) ; Boyd et al. (2006) . 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 fixed, 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. (2009) ; Shamir and Srebro (2014) . Tang et al. (2018) ; 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. Specifically, they analyze the same SGD averaging dynamic in the non-convex setting. Table 2 in 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/

√:

T n) 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 find 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 first 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 first to show linear convergence speedup in the non-convex case. Our analysis technique relies on a fine-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. (2018) . 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.

2. PRELIMINARIES:

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 identifiers 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, specified 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, defined 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 > 0, that is:

(x -y) T (∇f (x) -∇f (y)) ≥ x -y 2 , ∀x, y ∈ R d .

(2.1) Specifically, 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

x * = argmin x f (x) = argmin x (1/m) m i=1 f i (x). (2.2)

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 g of the function f , which are functions such that E[ 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 ∈ R d :

∇f (x) -∇f (y) ≤ L x -y .

(2.3)

• Bounded Variance: The variance of the stochastic gradients is bounded by some σ 2 > 0, i.e. for all x ∈ R d :

E g (x) -E[ g(x)] 2 ≤ σ 2 .

(2.4)

• Bounded Second Moment: The second moment of the stochastic gradients is bounded by some M 2 > 0, i.e. for all x ∈ R d :

E g (x) 2 ≤ M 2 .

(2.5) 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 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. Specifically, upon every interaction, the interacting agents i and j perform the following steps:

% i and j are chosen uniformly at random, with replacement upon each interaction between agents i and j

% each agent performs a local SGD step

X i ← X i -η i g i (X i ) X j ← X j -η j g j (X j )

% agents average their estimates coordinate-wise

avg ← (X i + X j )/2 X i ← avg X j ← avg

Algorithm 1: Population SGD pseudocode for each interaction between arbitrary nodes i and j.

We are interested in the convergence of local models : X1 , 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 specified 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 defined 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 fix 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.)

4. THE CONVERGENCE OF POPSGD IN THE CONVEX CASE:

This section is dedicated to proving that the following result holds with high probability:

Theorem 4.1. Let f be an L-smooth, -strongly convex function satisfying conditions (2.3)-(2.5), whose minimum x we are trying to find via the PopSGD procedure given in Algorithm 1.

Let the learning rate for process i at local time

t i = nV i t be η i t = b/(t i + a)

, where a = max(2cn log T, 18n, 256L/ ) and b = 4n/ are fixed(for some constant c). Let the sequence of weights w t be given by w

t = (a + t) 2 . Define µ t = n i=1 X i t , S T = T -1 t=0 w t ≥ 1 3 T 3 and y T = 1 S T T -1 t=0 w t µ t .

Then, for any time T , we have with probability

1 -O(1/ poly T ) that E[f (y T ) -f (x * )] ≤ a 3 2S T µ 0 -x * 2 + 64T (T + 2a) S T σ 2 + 9216T n 2 2 S T M 2 L. (4.1)

Discussion. We first 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 n, and the parameters M , L, and are assumed to be well-behaved. In this case, since S T ≥ T 3 /3, the first 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 2T , 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 definition 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 first step aims to bound the variance of the local models X i t at each time t and node i with respect to the mean µ t = 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 first 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 definition of parallel time T p = T /n, where T counts the number of pairwise interactions. For any time t, define by η t = b/(a + t) the "true" learning rate at time t, where a and b are constants to be fixed later, such that a ≥ 2cn log n for some constant c. We denote by x * the optimum of the function f . Learning Rate Estimates. Our first 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

η i t . Lemma 4.2. Let η i t = b/(a + nV i t )

, be the learning rate estimate of agent i at time step t, in terms of its time estimate V i t . 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 ≥ 0 and agent i:

1 2 ≤ η t η i t ≤ 2. (4.2)

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 n t ). Also, let µ t = 1 n n i=1

X i t , be an average estimate at time step t. The following potential function measures the concentration of the models around the average:

Γ t = n i=1 X i t -µ t 2 .

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 fixed learning rate η t used at t, we have the bound

E[Γ t+1 |Γ t ] ≤ 1 - 1 n Γ t + 4η t M Γ t n 1/2 + 8η 2 t M 2 .

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 ≥ 18n , then the potential is bounded as follows

E[Γ t ] ≤ 36nb 2 /(t + a) 2 M 2 = 36nη 2 t M 2 .

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 64L , we have that

E µ t+1 -x * 2 ≤ 1 - η t n E µ t -x * 2 - η t 2n E[f (µ t ) -f (x * )] + 16σ 2 η 2 t n 2 + 288η 3 t M 2 L n .

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

for w t = (a + t) 2 and S T =

T -1 t=0 w T ≥ 1 3 T 3 . To use the above lemma, we set η t = nα t = 4n (t+a) , and the parameter b = 4n/ . We also use A = 1/2, B = 16σ 2 , and

C = 288M 2 Ln 2 . Let y T = 1 nS T n i=1 T -1 t=0 w t X i t . Also, let e t = E[f (µ t ) -f (x * )] and a t = E µ t -x * 2 .

Using convexity and Lemma 4.6 above we obtain the following final bound:

E[f (y T ) -f (x * )] ≤ a 3 2S T µ 0 -x * 2 + 64T (T + 2a) S T σ 2 + 9216T n 2 2 S T M 2 L. (4.4)

To complete the proof of the Theorem, we only need to find the appropriate value of the parameter a. For that, we list all the constraints on a: a ≥ 2cn log T, a ≥ 18n and 4n (t+a) ≤ n 64L . These inequalities can be satisfied by setting a = max 2cn log T, 18n, 256 L . This concludes our proof.

5. EXTENSIONS:

Convergence of local models and alternative to computing y T . Notice that Theorem 4.1 measures convergence of f (y T ), where y

T = T -1 t=0 wt S T n i=1 X i t n = T -1 t=0 wt 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) :

1 S T T -1 t=0 w t E[f (µ t ) -f (x * )] ≤ a 3 2S T µ 0 -x * 2 + 64T (T + 2a) S T σ 2 + 9216T n 2 2 S T M 2 L. (5.1)

What we can do is, instead of computing y T , we just sample time step 0 ≤ t ≤ T -1 with probability wt S T and compute f (µ t ) = f ( n i=1 X i t /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, -strongly convex function satisfying conditions (2.3)-(2.5), whose minimum x we are trying to find via the PopSGD procedure on a cycle. Let the learning rate for process i at local time t i = nV i t be η i t = b/(t i +a), where a = max(2cn log T, 18n, 256L/ ) and b = 4n/ are fixed(for some constant c). Let the sequence of weights w t be given by w

t = (a + t) 2 . Define µ t = n i=1 X i t , S T = T -1 t=0 w t ≥ 1 3 T 3 and y T = 1 S T T -1 t=0 w t µ t .

Then, for any time T , we have with probability

1 -O(1/ poly T ) that E[f (y T ) -f (x * )] ≤ a 3 2S T µ 0 -x * 2 + 64T (T + 2a) S T σ 2 + 25600T n 6 3 S T M 2 L 2 .

Notice that for T 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 we are trying to find via the PopSGD procedure given in Algorithm 1. Let the learning rate we use be η = n/ √ T . Then, for any T ≥ n 4 :

1 T T -1 t=0 E ∇f (µ t ) 2 ≤ (f (µ 0 ) -f (x * )) √ T + 36LM 2 √ T + 2LM 2 √ T .

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 we are trying to find 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

T -1 t=0 1 T E f (µ t ) 2 ≤ E[f (µ 0 )] -E[f (x * )] √ T + 4σ 2 √ T + 32L 2 σ 2 √ T + 768L 2 σ 2 √ T .

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/ 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 satisfies the Polyak-Łojasiewicz (PL) assumption with constant α. More formally, function f satisfies the PL assumption with constant α if :

1 2 E ∇f (µ t ) 2 ≥ α(f (µ t ) -f (x * )).

(5.2)

We use a similar approach to Haddadpour et al. ( 2019), 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 P Lassumption with constant α(5.2), whose minimum x we are trying to find via the PopSGD procedure given in Algorithm 1. Let the learning rate at time step t be η t = 4n α(t+a) (Local learning rates at time T i are η i t = 4n α(T i +a) ). Then for a ≥ 2cn log T and time T , with probability 1 -O(1/ poly T ) we have

E[f (µ T )] -f (x * ) ≤ a 3 (a + T ) 3 (E[f (µ 0 )] -f (x * )) + 4608L 2 M 2 n 2 T α 3 (T + a) 3 + 64LM 2 α 2 (T + a) .

Observe that as in Theorem 4.1, this gives us a linear speedup over the sequential version.

6. EXPERIMENTAL RESULTS:

In 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.

7. DISCUSSION AND FUTURE WORK:

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 confirmed our analytical findings. 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 SUMMARY 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: 1. σ 2 -bound on the variance of gradient. 2. M 2 -bound on the second moment of gradient.

3. PL -Polyak-Łojasiewicz assumption. 4. d -bounded dimension. 5. ρ -bounded spectral gap of the averaging matrix. 6. τ -bounded message delay. 

Global synchronization Assumptions:

Convergance Rate PopSGD NO σ 2 , M 2 O(1/T n) Local SGD YES σ 2 , M 2 O(1/T n) Table 1: convex case Global synchronization Assumptions Convergance Rate PopSGD NO σ 2 , M 2 O(1/ √ T n) PopSGD NO σ 2 , M 2 , P L O(1/T n) PopSGD NO σ 2 O(1/ √ T n) LUPA-SGD YES σ 2 , M 2 , P L O(1/T n) AD-SGD NO σ 2 , ρ, τ O(1/ √ T n) SGP NO σ 2 , d, τ O(1/ √ T n)

B ADDITIONAL EXPERIMENTS:

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, and track the evolution of train and test loss at an arbitrary fixed 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 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. 

C COMPLETE CORRECTNESS ARGUMENT:

Lemma 4.2. Let η i t = b/(a + nV i t ), be the learning rate estimate of agent i at time step t, in terms of its time estimate V i t . 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 ≥ 0 and agent i:

1 2 ≤ η t η i t ≤ 2. (C.1) Proof. Let G t = n i=1 exp ζ(V i t -t n ) + n i=1 exp -ζ(V i t -t n )

, for some fixed constant ζ. The following lemma is proved as Theorem 2.10 in Peres et al. (2015b) :

Lemma C.1. For any t ≥ 0, and some fixed constants and θ, E[G t ] ≤ 4θ

ζ n. Subsequently, we can show that for any t ≥ 0 and agent i:

P r | t n -V i t |≥ q ζ log T ≤ P r[G t ≥ T q ] M arkov ≤ 4θ ζ n T q . (C.2)

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, | t n -V i t |≤ q ζ log T , with probability at least 1 -1/T γ . Let c be q ζ , thus a ≥ 2cn log T = 2 q ζ n log T . This allows us to finish the proof of the lemma:

1 2 ≤ a + t -q ζ n log T a + t ≤ η t η i t ≤ a + t + q ζ n log T a + t ≤ 2. (C.3)

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 fixed learning rate η t used at t, we have the bound

E[Γ t+1 |Γ t ] ≤ 1 - 1 n Γ t + 4η t M Γ t n 1/2 + 8η 2 t M 2 .

Proof. First we bound change in potential ∆ t = Γ t+1 -Γ t for some time step t > 0. Let ∆ i,j t be a change in potential when we choose different agents i and j at random and let ∆ i t be a change in potential when we select the same node i. We get that

E ∆ t |X t = i i =j 1 n 2 E ∆ i,j t |X t + n i=1 1 n 2 E ∆ i t |X t . (C.4)

We proceed by bounding a change in potential for fixed i = j. Observe, that in this case

µ t+1 = µ t -(η i t g i (X i t ) + η j t g j (X j t ))/n and X i t+1 = X j t+1 = (X i t + X j t )/2 -(η i t g i (X i t ) + η j t g j (X j t ))/2. Hence, X i t+1 -µ t+1 = X j t+1 -µ t+1 = (X i t + X j t )/2 - n -2 2n (η i t g i (X i t ) + η j t g j (X j t )) -µ t .

For k / ∈ {i, j}, since X k t+1 = X k t we get that

X k t+1 -µ t+1 = X k t + 1 n (η i t g i (X i t ) + η j t g j (X j t )) -µ t . This gives us that E ∆ i,j t |X t = E (X i t + X j t )/2 - n -2 2n (η i t g i (X i t ) + η j t g j (X j t )) -µ t 2 -X i t -µ t 2 + E (X i t + X j t )/2 - n -2 2n (η i t g i (X i t ) + η j t g j (X j t )) -µ t 2 -X j t -µ t 2 + k / ∈{i,j} E X k t + 1 n (η i t g i (X i t ) + η j t g j (X j t )) -µ t 2 -X k t -µ t 2 = 2 (X i t -µ t )/2 + (X j t -µ t )/2 2 -X i t -µ t 2 -X j t -µ t 2 - n -2 n E η i t g i (X i t ) + η j t g j (X j t ), (X i t -µ t ) + (X j t -µ t ) + 2 n -2 2n 2 E η i t g i (X i t ) + η j t g j (X j t ) 2 + k / ∈{i,j} 2 n E η i t g i (X i t ) + η j t g j (X j t ), X k t -µ t + 1 n 2 E η i t g i (X i t ) + η j t g j (X j t ) 2

Observe that

E η i t g i (X i t )+η t g j (X j t ) 2 ≤ 2(η i t ) 2 E g i (X i t ) 2 +2(η j t ) 2 E g j (X j t ) 2 Fact (2.5) ≤ 2M 2 (η i t ) 2 +(η j t ) 2 Lemma 4.2 ≤ 16η 2 t M 2 . and n k=1 E η i t g i (X i t ) + η j t g j (X j t ), X k t -µ t = 0.

Thus, we have that

E ∆ i,j t |X t ≤ 2 (X i t -µ t )/2 + (X j t -µ t )/2 2 -X i t -µ t 2 -X j t -µ t 2 -E η i t g i (X i t ) + η j t g j (X j t ), (X i t -µ t ) + (X j t -µ t ) + 32η 2 t n -2 2n 2 M 2 + k / ∈{i,j} 16 n 2 η 2 t M 2 ≤ -X i t -µ t 2 /2 -X j t -µ t 2 /2 + X i t -µ t , X j t -µ t -E η i t g i (X i t ) + η j t g j (X j t ), (X i t -µ t ) + (X j t -µ t ) + 8η 2 t M 2 . (C.6)

similarly we can prove that

E ∆ i t |X t ≤ -E η i t g i (X i t ) + η i t g i (X i t ), (X i t -µ t ) + (X i t -µ t ) + 8η 2 t M 2 . (C.7)

By using inequalities C.6 and C.7 in inequality C.4 we get that

E ∆ t |X t = i i =j 1 n 2 E ∆ i,j t |X t + n i=1 1 n 2 E ∆ t i |X t ≤ - i i =j 1 n 2 X i t -µ t 2 /2 + X j t -µ t 2 /2 + i i =j 1 n 2 X i t -µ t , X j t -µ t 1 n 2 E η i t g i (X i t ) + η j t g j (X j t ), (X i t -µ t ) + (X j t -µ t ) + 8η 2 t M 2 .

Observe that

i i =j 1 n 2 X i t -µ t , X j t -µ t = n i=1 1 n 2 X i t -µ t , j =i X j t -µ t = 1 n 2 i -X i t -µ t 2 = - 1 n 2 Γ t . and i i =j 1 n 2 X i t -µ t 2 /2 + X j t -µ t 2 /2 = n -1 n 2 i X i t -µ t 2 = n -1 n 2 Γ t .

Hence, we get that

E ∆ t |X t ≤ - Γ t n - i j 1 n 2 E η i t g i (X i t )+η j t g j (X j t ), (X i t -µ t )+(X j t -µ t ) +8η 2 t M 2 . (C.9)

Further, we have that

i j 1 n 2 E η i t g i (X i t ) + η j t g j (X j t ), (X i t -µ t ) + (X j t -µ t ) = i j 1 n 2 E η i t g i (X i t ), (X j t -µ t ) + i j 1 n 2 E η j t g j (X j t ), (X i t -µ t ) + n i=1 2η i t n E g i (X i t ), X i t -µ t = n i=1 2η i t n E g i (X i t ), X i t -µ t Cauchy-Schwarz ≤ n i=1 2η i t n E g i (X i t ) • X i t -µ t = n i=1 2η i t n E g i (X i t ) X i t -µ t Jensen ≤ n i=1 2η i t n E g i (X i t ) 2 1 2 X i t -µ t ≤ n i=1 2η i t M n X i t -µ t Lemma 4.2 ≤ 4η t M n n i=1 X i t -µ t Cauchy-Schwarz ≤ 4η t M n n n i=1 X i t -µ t 2 1/2 = 4η t M Γ t n 1/2 .

By plugging above inequality in inequality C.9, we get that

E[∆ t |X t ] ≤ - Γ t n + 4η t M Γ t n 1/2 + 8η 2 t M 2 .

Hence, considering the definition of ∆ t and the fact that the above inequality implies

E[∆ t |Γ t ] ≤ - 1 n Γ t + 4η t M Γ t n 1/2 + 8η 2 t M 2 ,

we get the proof of the Lemma.

Lemma 4.4. If a ≥ 18n , then the potential is bounded as follows

E[Γ t ] ≤ 36nb 2 /(t + a) 2 M 2 = 36nη 2 t M 2 .

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 ] ≤ 36nb 2 M 2 /(t + a) 2 . Our goal is to prove that E[Γ t+1 ] ≤ 36nb 2 M 2 /(t + a + 1) 2 . E[Γ t+1 ] = E[E[Γ t+1 |Γ t ]] Lemma 4.3 ≤ 1 - 1 n E[Γ t ] + 4η t M E Γ t n 1/2 + 8η 2 t M 2 Jensen ≤ 1 - 1 n E[Γ t ] + 4η t M E Γ t n 1/2 + 8η 2 t M 2 ≤ 1 - 1 n 36nb 2 M 2 (t + a) 2 + 24b 2 M 2 (t + a) 2 + 8b 2 M 2 (t + a) 2 ≤ 36nb 2 M 2 (t + a + 1) 2 + 36nb 2 M 2 (t + a) 2 - 36nb 2 M 2 (t + a + 1) 2 - 4b 2 M 2 (t + a) 2 = 36b 2 M 2 (t + a + 1) 2 + 36nb 2 M 2 2(t + a) + 1 (t + a) 2 (t + a + 1) 2 - 4b 2 M 2 (t + a) 2 ≤ 36nb 2 M 2 (t + a + 1) 2 + 72nb 2 M 2 (t + a + 1) (t + a) 2 (t + a + 1) 2 - 4b 2 M 2 (t + a) 2 .

Using the fact that t + a + 1 ≥ a ≥ 18n in the above inequality allows us to get

E[Γ t+1 ] ≤ 36nb 2 M 2 (t + a + 1) 2 + 4b 2 M 2 (t + a) 2 - 4b 2 M 2 (t + a) 2 ≤ 36nb 2 M 2 (t + a + 1) 2 .

Lemma 4.5. For η t ≤ n 64L , we have that

E µ t+1 -x * 2 ≤ 1 - η t n E µ t -x * 2 - η t 2n E[f (µ t ) -f (x * )] + 16σ 2 η 2 t n 2 + 288η 3 t M 2 L n .

Proof. Let F t be the amount by which µ t decreases at step t. So, F t is a sum of

η i t n g i (X i t ) and η j t n g(X j t )

for agents i and j, which interact at step t. Also, let F 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 t is sum of

η j t n ∇f (X i t )

and

η j t n ∇f (X j t ). E µ t+1 -x * 2 = E µ t -F t -x * 2 = E µ t -F t -x * -F t + F t 2 = E µ t -x * -F t 2 + E F t -F t 2 + 2E µ t -x * -F t , F t -F t (C.10)

Observe that E[F t ] = F t , hence the last term in the equation above is 0. This means that in order to upper bound E µ t+1 -x *

2:

, we need to upper bound

E µ t -x * -F t 2 and E F t -F t 2 .

For the latter, we get that

E F t -F t 2 = 1 n 2 n i=1 n j=1 E η i t n ( g i (X i t ) -∇f (X i t )) + η j t n ( g j (X j t ) -∇f (X j t )) 2 ≤ 2 n 2 n i=1 n j=1 η i t n 2 E g i (X i t ) -∇f (X i t ) 2 + η j t n 2 E g j (X j t ) -∇f (X j t ) 2 = 4 n n i=1 η i t n 2 E g i (X i t ) -∇f (X i t ) 2 Fact (2.4) ≤ 4 n n i=1 η i t n 2 σ 2 Lemma 4.2 ≤ 16 σ 2 η 2 t n 2 .

For the former, we have that

E µ t -x * -F t 2 = E µ t -x * 2 + E F t 2 -2E µ t -x * , F t = E µ t -x * 2 + 1 n 2 n i=1 n j=1 E η i t n ∇f (X i t ) + η j t n ∇f (X j t ) 2 - 1 n 2 n i=1 n j=1 2E µ t -x * , η i t n ∇f (X i t ) + η j t n ∇f (X j t ) ≤ E µ t -x * 2 + 4 n 3 n i=1 (η i t ) 2 E ∇f (X i t ) 2 - 4 n 2 n i=1 E µ t -x * , η i t ∇f (X i t ) = E µ t -x * 2 + 4 n 3 n i=1 (η i t ) 2 E ∇f (X i t ) -∇f (x * ) 2 - 4 n 2 n i=1 E µ t -X i t + X i t -x * , η i t ∇f (X i t ) = E µ t -x * 2 + 4 n 3 n i=1 (η i t ) 2 E ∇f (X i t ) -∇f (x * ) 2 - 4 n 2 n i=1 η i t E µ t -X i t , ∇f (X i t ) - 4 n 2 n i=1 η i t E X i t -x * , ∇f (X i t ) (C.11)

In order to bound ∇f (X i t )-∇f (x * ) 2 we can use the L-smoothness property for convex functions, in the following form

f (y) ≥ f (x) + ∇f (x), y -x + 1 2L ∇f (y) -∇f (x) 2 . (C.12) By setting y = X i t and x = x * we get ∇f (X i t ) -∇f (x * ) 2 ≤ 2L(f (X i t ) -f (x * )). (C.13)

Additionally, by -strong convexity, we have that

-X i t -x * , ∇f (X i t ) ≤ -(f (X i t ) -f (x * )) - 2 X i t -x * 2 . (C.14)

By Cauchy-Schwarz inequality, we get that

-2 µ t -X i t , ∇f (X i t ) ≤ 2L X i t -µ t 2 + ∇f (X i t ) 2 /(2L) = 2L X i t -µ t 2 + ∇f (X i t ) -∇f (x * ) 2 /(2L) Using L-smoothness property (C.13) in the above inequality gives us that -2 µ t -X i t , ∇f (X i t ) ≤ 2L X i t -µ t 2 + (f (X i t ) -f (x * )). (C.15)

By plugging inequalities (C.13), (C.14) and (C.15) in inequality (C.11), we get

E µ t -x * -F t 2 ≤ E µ t -x * 2 + 4L n 2 n i=1 η i t E X i t -µ t 2 + 8L n 3 n i=1 (η i t ) 2 E[f (X i t ) -f (x * )] - 2 n 2 n i=1 η i t E[f (X i t ) -f (x * )] - 2 n 2 n i=1 η i t E X i t -x * 2 .

Observe that

E X i t -x * 2 , E X i t -µ t 2 and E[f (X i t ) -f (x * )

] are non-negative terms, Thus, by using Lemma 4.2 in the above inequality we have that:

E µ t -x * -F t 2 ≤ E µ t -x * 2 + 8Lη t n 2 n i=1 E X i t -µ t 2 + 32Lη 2 t n 3 n i=1 E[f (X i t ) -f (x * )] - η t n 2 n i=1 E[f (X i t ) -f (x * )] - η t n 2 n i=1 E X i t -x * 2 = E µ t -x * 2 + 8Lη t n 2 n i=1 E X i t -µ t 2 + η t n 2 n i=1 32Lη t n -1 E[f (X i t ) -f (x * )] -E X i t -x * 2 .

By using η t ≤ n 64L in the above inequality we get that

E µ t -x * -F t 2 ≤ E µ t -x * 2 + 8Lη t n 2 n i=1 E X i t -µ t 2 + η t n 2 n i=1 - 1 2 E[f (X i t ) -f (x * )] -E X i t -x * 2 .

By Jensen's inequality and convexity of f and square of norm we have that

E µ t -x * - η t n F t 2 ≤ E µ t -x * 2 + 8η t L n 2 n i=1 E X i t -µ t 2 + η t n - 1 2 E[f (µ t ) -f (x * )] -E µ t -x * 2 = 1 - η t n E µ t -x * 2 - η t 2n E[f (µ t ) -f (x * )] + 8η t L n 2 E[Γ t ] Lemma 4.4 ≤ 1 - η t n E µ t -x * 2 - η t 2n E[f (µ t ) -f (x * )] + 288η 3 t M 2

L n Finally, by using the above inequality in inequality (C.10) we get

E µ t+1 -x * 2 ≤ 1 - η t n E µ t -x * 2 - η t 2n E[f (µ t ) -f (x * )] + 16σ 2 η 2 t n 2 + 288η 3 t M 2 L n

Theorem 4.1. Let f be an L-smooth, -strongly convex function satisfying conditions (2.3)-(2.5), whose minimum x we are trying to find via the PopSGD procedure given in Algorithm 1.

Let the learning rate for process i at local time t i = nV i t be η i t = b/(t i + a), where a = max(2cn log T, 18n, 256L/ ) and b = 4n/ are fixed(for some constant c). Let the sequence of weights w t be given by w t = (a + t) 2 . Define µ

t = n i=1 X i t , S T = T -1 t=0 w t ≥ 1 3 T 3 and y T = 1 S T

T -1 t=0 w t µ t . Then, for any time T , we have with probability 1 -O(1/ poly T ) that

E[f (y T ) -f (x * )] ≤ a 3 2S T µ 0 -x * 2 + 64T (T + 2a) S T σ 2 + 9216T n 2 2 S T M 2 L.

Proof. We use Lemma 4.6 to solve the recurrence given by Lemma 4.5. For this we set η t = nα t = 4n (t+a) . That is, we set parameter b = 4n/ . We also use A = 1/2, B = 16σ 2 , and C = 288M 2 Ln 2 . This way we can rewrite Lemma 4.5 as :

E µ t+1 -x * 2 ≤ (1 -α t )E µ t -x * 2 -Aα t E[f (µ t ) -f (x * )] + Bα 2 t + Cα 3 t . Further, let y T = 1 nS T n i=1 T -1 t=0 w t X i t . Also, let e t be E[f (µ t ) -f (x * )] and a t = E µ t -x * 2 .

By convexity of f we have that

E[f (y T ) -f (x * )] ≤ 1 S T T -1 t=0 w t E[f (µ t ) -f (x * )] (C.16)

Using this fact and the Lemma 4.6 we obtain the following.

E[f (y T ) -f (x * )] ≤ a 3 2S T µ 0 -x * 2 + 64T (T + 2a) S T σ 2 + 9216T n 2 2 S T M 2 L. (C.17)

what is left is to find the appropriate a. For that we remember all the constraints on a: a ≥ 2cn log T, a ≥ 18n and 4n (t+a) ≤ n 64L . These inequalities can be satisfied by setting a = max 2cn log T, 18n, 256 L .

D NON 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 satisfies P L-assumption(5.2) with constant α. More formally, function f satisfies P Lassumption(5.2) with constant α.

Theorem 5.4. Let f be an non-convex, L-smooth, function satisfying assumption 2.5 and P Lassumption(5.2) with constant α, whose minimum x we are trying to find via the PopSGD procedure given in Algorithm 1. Let the learning rate at time step t be η t = 4n α(t+a) . Then, for any time T , we have

E[f (µ T )] -f (x * ) ≤ a 3 (a + T ) 3 (E[f (µ 0 )] -f (x * )) + 4608L 2 M 2 n 2 T α 3 (T + a) 3 + 64LM 2 α 2 (T + a) .

Proof.

E[f (µ t+1 )] L-smoothness ≤ E[f (µ t )] + E ∇f (µ t ), µ t+1 -µ t + L 2 E µ t+1 -µ t 2 (D.1) = E[f (µ t )] + n i=1 n j=1 1 n 2 E ∇f (µ t ), - η i t n g i (X i t ) - η j t n g j (X j t ) (D.2) + n i=1 n j=1 L 2n 2 E η i t n g i (X i t ) + η j t n g j (X j t ) 2 (D.3) ≤ E[f (µ t )] + n i=1 n j=1 1 n 2 E ∇f (µ t ), - η i t n g i (X i t ) - η j t n g j (X j t ) (D.4) + n i=1 n j=1 L n 2 E η i t n g i (X i t ) 2 + η j t n g j (X j t ) 2 (D.5) = E[f (µ t )] + n i=1 2 n E ∇f (µ t ), - η i t n g i (X i t ) + n i=1 2L n E η i t n g i (X i t ) 2 . (D.6)

Using E[ g i (x)] = ∇f (x) and property (2.5) we can rewrite the above inequality as

E[f (µ t+1 )] ≤ E[f (µ t )] + n i=1 2 n E ∇f (µ t ), - η i t n ∇f (X i t ) + n i=1 2L(η i t ) 2 n 3 M 2 (D.7) = E[f (µ t )] + n i=1 2η i t n 2 E ∇f (µ t ), ∇f (µ t ) -∇f (X i t ) (D.8) - n i=1 2η i t n 2 E ∇f (µ t ) 2 + n i=1 2L(η i t ) 2 n 3 M 2 (D.9) ≤ E[f (µ t )] + n i=1 η i t n 2 E ∇f (µ t ) 2 + ∇f (µ t ) -∇f (X i t ) 2 (D.10) - n i=1 2η i t n 2 E ∇f (µ t ) 2 + n i=1 2L(η i t ) 2 n 3 M 2 (D.11) = E[f (µ t )] + n i=1 η i t n 2 E ∇f (µ t ) -∇f (X i t ) 2 - n i=1 η i t n 2 E ∇f (µ t ) 2 + n i=1 2L(η i t ) 2 n 3 M 2 (D.12) Lemma 4.2 ≤ E[f (µ t )] + n i=1 2η t n 2 E ∇f (µ t ) -∇f (X i t ) 2 - n i=1 η t 2n 2 E ∇f (µ t ) 2 + n i=1 8Lη 2 t n 3 M 2 (D.13) L-smoothness ≤ E[f (µ t )] + n i=1 2L 2 η t n 2 E µ t -X i t 2 - η t 2n E ∇f (µ t ) 2 + 8Lη 2 t n 2 M 2 . (D.14)

Recall that by Lemma 4.4 we have that

E[Γ t ] = n i=1 E µ t -X i t 2 ≤ 36nη 2 t M 2 ,

hence the above inequality becomes:

E[f (µ t+1 )] -E[f (µ t )] ≤ 72L 2 η 3 t M 2 n - η t 2n E ∇f (µ t ) 2 + 8Lη 2 t n 2 M 2 .

Next we use P L-assumption(5.2), which says that

1 2 E ∇f (µ t ) 2 ≥ α(f (µ t ) -f (x * )).

Hence, we get that

E[f (µ t+1 )] -E[f (µ t )] ≤ 72L 2 η 3 t M 2 n - η t α n (f (µ t ) -f (x * )) + 8Lη 2 t n 2 M 2 .

This can be rewritten as:

E[f (µ t+1 )] -f (x * ) ≤ (1 - η t α n )(E[f (µ t )] -f (x * )) + 72L 2 η 3 t M 2 n + 8Lη 2 t n 2 M 2 . (D.15)

Next as in the proof for convex case, we define w t = (a + t) 2 and we set η t = 4n α(t+a) . We get that w

t η t (1 - η t α n ) = (a + t) 3 α 4n (1 - 4 t + a ) = (a + t) 2 α 4n (t + a -4) ≤ (a + t -1) 3 α 4n = w t-1 η t-1 .

By using this in inequality D.15 and unrolling recursion we get that

w T η T (E[f (µ T )] -f (x * )) ≤ (1 - αη 0 n ) w 0 η 0 (E[f (µ 0 )] -f (x * )) + T -1 t=0 w t η t 72L 2 η 3 t M 2 n + T -1 t=0 w t η t 8Lη 2 t n 2 M 2 = (1 - 4 a ) a 3 α 4n (E[f (µ 0 )] -f (x * )) + T -1 t=0 1152L 2 M 2 n α 2 + T -1 t=0 32(t + a)LM 2 αn ≤ a 3 α 4n (E[f (µ 0 )] -f (x * )) + 1152L 2 M 2 nT α 2 + 16(T + a) 2 LM 2 αn .

Next we divide the above inequality by w T η T = (a+T ) 3 α 4n

. We get that

E[f (µ T )] -f (x * ) ≤ a 3 (a + T ) 3 (E[f (µ 0 )] -f (x * )) + 4608L 2 M 2 n 2 T α 3 (T + a) 3 + 64LM 2 α 2 (T + a) .

E NON-CONVEX ANALYSIS 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 η i t = η t = η ≤ 2η t , Lemma 4.3 holds. So, we get that

E[Γ t+1 |Γ t ] ≤ 1 - 1 n Γ t + 4ηM Γ t n 1/2 + 8η 2 M 2 . (E.1)

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

E[Γ t ] ≤ 36nη 2 M 2 . (E.2)

Theorem 5.2. Let f be an non-convex, L-smooth, function satisfying assumption 2.5, whose minimum x we are trying to find via the PopSGD procedure given in Algorithm 1. Let the learning Under review as a conference paper at ICLR 2020 rate we use be η = n/ √ T . Then, for any T ≥ n 4 :

1 T T -1 t=0 E ∇f (µ t ) 2 ≤ (f (µ 0 ) -f (x * )) √ T + 36LM 2 √ T + 2LM 2 √ T .

Proof.

E[f (µ t+1 )] L-smoothness ≤ E[f (µ t )] + E ∇f (µ t ), µ t+1 -µ t + L 2 E µ t+1 -µ t 2 (E.3) = E[f (µ t )] + n i=1 n j=1 1 n 2 E ∇f (µ t ), - η n g i (X i t ) - η n g j (X j t ) (E.4) + n i=1 n j=1 L 2n 2 E η n g i (X i t ) + η n g j (X j t ) 2 (E.5) ≤ E[f (µ t )] + n i=1 n j=1 1 n 2 E ∇f (µ t ), - η n g i (X i t ) - η n g j (X j t ) (E.6) + n i=1 n j=1 L n 2 E η n g i (X i t ) 2 + η n g j (X j t ) 2 (E.7) = E[f (µ t )] + n i=1 2 n E ∇f (µ t ), - η n g i (X i t ) + n i=1 2L n E η n g i (X i t ) 2 . (E.8)

Using E[ g i (x)] = ∇f (x) and property (2.5) we can rewrite the above inequality as

E[f (µ t+1 )] ≤ E[f (µ t )] + n i=1 2 n E ∇f (µ t ), - η n ∇f (X i t ) + n i=1 2Lη 2 n 3 M 2 (E.9) = E[f (µ t )] + n i=1 2η n 2 E ∇f (µ t ), ∇f (µ t ) -∇f (X i t ) (E.10) - n i=1 2η n 2 E ∇f (µ t ) 2 + n i=1 2Lη 2 n 3 M 2 (E.11) ≤ E[f (µ t )] + n i=1 η n 2 E ∇f (µ t ) 2 + ∇f (µ t ) -∇f (X i t ) 2 (E.12) - n i=1 2η n 2 E ∇f (µ t ) 2 + n i=1 2Lη 2 n 3 M 2 (E.13) = E[f (µ t )] + n i=1 η n 2 E ∇f (µ t ) -∇f (X i t ) 2 - n i=1 η n 2 E ∇f (µ t ) 2 + n i=1 2Lη 2 n 3 M 2 (E.14) L-smoothness ≤ E[f (µ t )] + n i=1 L 2 η n 2 E µ t -X i t 2 - η n E ∇f (µ t ) 2 + 2Lη 2 n 2 M 2 . (E.15) recall that by Lemma E.1 we have that E[Γ t ] = n i=1 E µ t -X i t 2 ≤ 36nη 2 M 2 , hence the above inequality becomes: E[f (µ t+1 )] -E[f (µ t )] ≤ 36L 2 η 3 M 2 n - η n E ∇f (µ t ) 2 + 2Lη 2 n 2 M 2 . (E.16

) by summing the above inequality for t = 0 to t = T -1, we get that

E[f (µ T )] -f (µ 0 ) ≤ T -1 t=0 36L 2 η 3 M 2 n - η n E ∇f (µ t ) 2 + 2Lη 2 n 2 M 2 . (E.17)

From this we get that :

T -1 t=0 η n E ∇f (µ t ) 2 ≤ f (µ 0 ) -E[f (µ T )] + T -1 t=0 36L 2 η 3 M 2 n + T -1 t=0 2Lη 2 n 2 M 2 . (E.18) Note that E[f (µ T )] ≥ f (x *

), hence after multiplying the above inequality by n ηT we get that

1 T T -1 t=0 E ∇f (µ t ) 2 ≤ n(f (µ 0 ) -f (x * )) T η + 36LM 2 η 2 + 2LM 2 η n .

Observe that η = n/ √ T ≤ 1/n, since T ≥ n 4 . This allows us to finish the proof:

1 T T -1 t=0 E ∇f (µ t ) 2 ≤ n(f (µ 0 ) -f (x * )) T η + 36LM 2 η n + 2LM 2 η n = (f (µ 0 ) -f (x * )) √ T + 36LM 2 √ T + 2LM 2 √ T .

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:

E[∆ t |X t ] ≤ - Γ t 2n + 4η 2 n n i=1 E g i (X i t ) 2 .

Proof. First we bound change in potential ∆ t = Γ t+1 -Γ t for some time step t > 0. Let ∆ i,j t be a change in potential when we choose different agents i and j at random and let ∆ i t be a change in potential when we select the same node i. We get that

E ∆ t |X t = i i =j 1 n 2 E ∆ i,j t |X t + n i=1 1 n 2 E ∆ i t |X t . (E.19)

We proceed by bounding a change in potential for fixed i = j. Observe, that in this case µ t+1 = µ t -(η g i (X i t )+η g j (X j t ))/n and X i t+1 = X j t+1 = (X i t +X j t )/2-(η g i (X i t )+η g j (X j t ))/2. Hence,

X i t+1 -µ t+1 = X j t+1 -µ t+1 = (X i t + X j t )/2 - n -2 2n (η g i (X i t ) + η g j (X j t )) -µ t . For k / ∈ {i, j}, since X k t+1 = X k t we get that X k t+1 -µ t+1 = X k t + 1 n (η g i (X i t ) + η g j (X j t )) -µ t . This gives us that E ∆ i,j t |X t = E (X i t + X j t )/2 - n -2 2n (η g i (X i t ) + η g j (X j t )) -µ t 2 -X i t -µ t 2 + E (X i t + X j t )/2 - n -2 2n (η g i (X i t ) + η g j (X j t )) -µ t 2 -X j t -µ t 2 + k / ∈{i,j} E X k t + 1 n (η g i (X i t ) + η g j (X j t )) -µ t 2 -X k t -µ t 2 = 2 (X i t -µ t )/2 + (X j t -µ t )/2 2 -X i t -µ t 2 -X j t -µ t 2 - n -2 n E η g i (X i t ) + η g j (X j t ), (X i t -µ t ) + (X j t -µ t ) + 2 n -2 2n 2 E η g i (X i t ) + η g j (X j t ) 2 + k / ∈{i,j} 2 n E η g i (X i t ) + η g j (X j t ), X k t -µ t + 1 n 2 E η g i (X i t ) + η g j (X j t ) 2

Observe that n k=1 E η g i (X i t ) + η g j (X j t ), X k t -µ t = 0.

Thus, we have that E ∆ i,j t |X t ≤ 2 (X i t -µ t )/2 + (X j t -µ t )/2 2 -X i t -µ t 2 -X j t -µ t 2 -E η g i (X i t ) + η g j (X j t ), (X i t -µ t ) + (X j t -µ t ) + 4η 2 n -2 2n

2 (E g i (X i t ) 2 + E g j (X j t ) 2 ) + k / ∈{i,j} 2η 2 n 2 (E g i (X i t ) 2 + E g j (X j t ) 2 )

≤ -X i t -µ t 2 /2 -X j t -µ t 2 /2 + X i t -µ t , X j t -µ t -E η g i (X i t ) + η g j (X j t ), (X i t -µ t ) + (X j t -µ t ) + η 2 (E g i (X i t ) 2 + E g j (X j t ) 2 ).

(E.21) similarly we can prove that E ∆ i t |X t ≤ -E η g i (X i t ) + η g i (X i t ), (X i t -µ t ) + (X i t -µ t ) + 2η 2 (E g i (X i t ) 2 ). (E.22) By using inequalities E.21 and E.22 in inequality E.19 we get that

E ∆ t |X t = i i =j 1 n 2 E ∆ i,j t |X t + n i=1 1 n 2 E ∆ t i |X t ≤ - i i =j 1 n 2 X i t -µ t 2 /2 + X j t -µ t 2 /2 + i i =j 1 n 2 X i t -µ t , X j t -µ t - i j 1 n 2 E η g i (X i t ) + η g j (X j t ), (X i t -µ t ) + (X j t -µ t ) + 2η 2 n n i=1 E g i (X i t ) 2 .

Observe that

i i =j 1 n 2 X i t -µ t , X j t -µ t = n i=1 1 n 2 X i t -µ t , j =i X j t -µ t = 1 n 2 i -X i t -µ t 2 = - 1 n 2 Γ t . and i i =j 1 n 2 X i t -µ t 2 /2 + X j t -µ t 2 /2 = n -1 n 2 i X i t -µ t 2 = n -1 n 2 Γ t .

Hence, we get that

E ∆ t |X t ≤ - Γ t n - i j 1 n 2 E η g i (X i t )+η g j (X j t ), (X i t -µ t )+(X j t -µ t ) + 2η 2 n n i=1 E g i (X i t ) 2 .

(E.24) Further, we have that i j 1 n 2 E η g i (X i t ) + η g j (X j t ), (X i t -µ t ) + (X j t -µ t ) = i j 1 n 2 E η g i (X i t ), (X j t -µ t ) + 

T -1 t=0 1 T E f (µ t ) 2 ≤ E[f (µ 0 )] -E[f (x * )] √ T + 4σ 2 √ T + 32L 2 σ 2 √ T + 768L 2 σ 2 √ T .

Proof.

E[f (µ t+1 )]:

L-smoothness 

2L n E η n g i (X i t ) 2 ≤ E[f (µ t )] + ηL 2 n 2 E[Γ t ] - η n E ∇f (µ t ) 2 - η n E| n i=1 ∇f (X i t )/n 2 + 4σ 2 η 2 n 2 + 24L 2 η 2 n 3 E[Γ t ] + 12Lη 2 n 2 E n i=1

∇f (X i t )/n 2 .

Next, we sum the above inequality from t = 0 to t = T -1 and divide by T . We get:

T -1 t=0 η T n E f (µ t ) 2 ≤ E[f (µ 0 )] -E[f (µ T )] T + 4σ 2 η 2 n 2 + T -1 t=0 ηL 2 n 2 T E[Γ t ] + T -1 t=0 24η 2 L 2 n 3 T E[Γ t ] + T -1 t=0 12Lη 2 n 2 T E| n i=1 ∇f (X i t )/n 2 - T -1 t=0 η nT E| n i=1 ∇f (X i t )/n 2 Lemma E.4 ≤ E[f (µ 0 )] -E[f (µ T )] T + 4σ 2 η 2 n 2 + 32η 3 L 2 σ 2 n + T -1 t=0 96η 3 L 2 nT E n i=1 ∇f (X i t )/n 2 + 768η 4 L 2 σ 2 n 2 + T -1 t=0 2304η 4 L 2 n 2 T E n i=1 ∇f (X i t )/n 2 - T -1 t=0 η nT E| n i=1

∇f (X i t )/n 2 .

Next we assume that η < 1 68L and η < 1. This allows us to eliminate terms with E| n i=1 ∇f (X i t )/n 2 multiplicative factor from the above inequality, hence we get:

T -1 t=0 η T n E f (µ t ) 2 ≤ E[f (µ 0 )] -E[f (µ T )] T + 4σ 2 η 2 n 2 + 32η 3 L 2 σ 2 n + 768η 4 L 2 σ 2 n 2 .

next, we divide the above inequality by η n :

T -1 t=0 1 T E f (µ t ) 2 ≤ n(E[f (µ 0 )] -E[f (µ T )]) T η + 4σ 2 η n + 32η 2 L 2 σ 2 + 768η 3 L 2 σ 2 n .

:

An event holds with high probability (w.h.p.) if it occurs with probability ≥ 1 -1/T γ , for constant γ > 0 and the total number of interactions -T .

i j

Figures and Tables:

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 classification 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) = 1 2 Ax -b 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.

(a) PopSGD test loss vs. n on Year Prediction. (b) PopSGD test loss vs. n on Gisette.

Figure 1: PopSGD convergence (test loss at the step versus parallel time) for various node counts n on a real linear regression (left) and logistic regression (right) datasets. The baseline is sequential SGD, which is identical to PopSGD with node count 1. Our first set of experiments examines train and test loss for PopSGD on the real-world tasks specified 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 sampling 128 elements 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 confirm 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, confirming 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 9

Figure 2: PopSGD test accuracy using 32 nodes on Piz Daint, measured at a fixed arbitrary node. The X axis measures SGD steps per model, whereas the Y axis measures Top-1 accuracy. The dotted red line is the accuracy of the Torchvision baseline. PopSGD surpasses the test accuracy of the baseline by 0.34%, although it processes each sample 4× less times, and each model sees 8× less gradient updates. The third graph shows the average runtime per batch for PopSGD (center) versus DA-PSGD (Lianet al., 2017b)  and SGP(Assran et al., 2018) on the same setup.

(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. Figure3(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 Figure3(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 (Figure3(b)), PopSGD with n = 128 has similar, but notably higher variance, which follows the analytical bound in Theorem 4.1.

(a) PopSGD convergence vs. n. (b) PopSGD convergence vs. mini-batch SGD.

Figure 3: PopSGD convergence (training loss at the step versus parallel time) on the synthetic regression task versus the number of nodes n (left), and versus sequential SGD with different batch sizes (right). Sequential SGD is identical to PopSGD with node count 1. The cutouts represent zoomed views.

Figure 4: PopSGD train and test accuracy using 32 nodes on Piz Daint, measured at a fixed arbitrary node, for training ResNet50 on ImageNet. The round multipler value is mult = 4. The X axis measures SGD steps per model, whereas the Y axis measures Top-1 accuracy. The dotted red line is the accuracy of the Torchvision baseline (Marcel and Rodriguez, 2010). PopSGD is below the test accuracy of the baseline by < 0.5%.

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 we are trying to find 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

non-convex case

Table content: <table/>

Hence, considering the definition of ∆ t we get the proof of the Lemma. -1/4n) i = 4n, the above equation results in Lemma E.4.

Table content: <table><tr><td colspan="4">Lemma E.3.</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td/><td/><td/><td>n</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td>n</td></tr><tr><td/><td/><td/><td/><td colspan="12">E g i (X i t ) 2 ≤ 2nσ 2 + 12LE[Γ t ] + 6nE</td><td>∇f (X i t )/n 2</td><td>(E.25)</td></tr><tr><td/><td/><td/><td colspan="2">i=1</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td>i=1</td></tr><tr><td colspan="2">Proof.</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td>n</td><td/><td/><td/><td>n</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td colspan="3">E g i (X i t ) 2 =</td><td/><td colspan="11">E g i (X i t ) -∇f (X i t ) + ∇f (X i t ) 2</td></tr><tr><td>i=1</td><td/><td/><td/><td>i=1</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td/><td colspan="2">n</td><td/><td/><td/><td/><td/><td/><td/><td>n</td><td/><td/><td/></tr><tr><td/><td colspan="2">≤ 2</td><td colspan="9">E g i (X i t ) -∇f (X i t ) 2 + 2</td><td colspan="4">E ∇f (X i t ) 2</td></tr><tr><td/><td/><td colspan="2">i=1</td><td/><td/><td/><td/><td/><td/><td/><td colspan="2">i=1</td><td/><td/></tr><tr><td/><td/><td colspan="2">n</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td colspan="2">= 2</td><td colspan="7">E g i (X i t ) -∇f (X i t ) 2</td><td/><td/><td/><td/><td/></tr><tr><td/><td/><td colspan="2">i=1</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td/><td/><td/><td colspan="2">n</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td>n</td><td>n</td></tr><tr><td/><td/><td/><td colspan="2">+ 2</td><td/><td colspan="3">E ∇f (X i</td><td/><td/><td/><td/><td/><td/><td>∇f (X j t )/n +</td><td>∇f (X j t )/n 2</td></tr><tr><td/><td/><td/><td/><td colspan="3">i=1</td><td/><td/><td/><td/><td/><td/><td/><td/><td>j=1</td><td>j=1</td></tr><tr><td/><td/><td colspan="2">n</td><td/><td/><td/><td/><td/><td/><td/><td>n</td><td/><td/><td/><td>n</td><td>n</td></tr><tr><td/><td colspan="2">≤ 2</td><td colspan="9">E g i (X i t ) -∇f (X i t ) 2 + 6</td><td colspan="4">E ∇f (X i t ) -∇f (µ t ) 2 + 6</td><td>E</td><td>(∇f (µ t ) -∇f (X j t ))/n 2</td></tr><tr><td/><td/><td colspan="2">i=1</td><td/><td/><td/><td/><td/><td/><td/><td colspan="2">i=1</td><td/><td/><td>i=1</td><td>j=1</td></tr><tr><td/><td/><td/><td/><td colspan="2">n</td><td/><td>n</td><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td/><td/><td colspan="2">+ 6</td><td/><td>E</td><td colspan="6">∇f (X j t )/n 2</td><td/><td/></tr><tr><td/><td/><td/><td/><td colspan="3">i=1</td><td>j=1</td><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td colspan="3">≤ 2nσ 2 + 6L</td><td>n i=1</td><td colspan="4">E µ t -X i t</td><td colspan="2">2 +</td><td>6L n</td><td colspan="2">n i=1</td><td colspan="2">n j=1</td><td>E µ t -X j t</td><td>2 + 6nE</td><td>n i=1</td><td>∇f (X i t )/n 2</td></tr><tr><td/><td/><td/><td/><td/><td/><td/><td/><td/><td>n</td><td/><td/><td/><td/><td/></tr><tr><td/><td colspan="7">= 2nσ 2 + 12LE[Γ t ] + 6nE</td><td/><td/><td colspan="6">∇f (X i t )/n 2 .</td></tr><tr><td/><td/><td/><td/><td/><td/><td/><td/><td colspan="3">i=1</td><td/><td/><td/><td/></tr><tr><td colspan="6">Notice that for η ≤ 1 16 √</td><td colspan="10">L the above two lemmas give us</td></tr><tr><td/><td/><td/><td colspan="5">E[Γ t+1 ] ≤ (1 -</td><td colspan="2">1 4n</td><td colspan="6">)E[Γ t ] + 8η 2 σ 2 + 24η 2 E</td><td>n i=1</td><td>∇f (X i t )/n 2 .</td><td>(E.26)</td></tr><tr><td colspan="4">Observe that since</td><td colspan="3">∞ i=0 (1</td><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td>i</td><td/><td>j</td><td/><td>1 n 2 E η g j (X j t ), (X i t -µ t ) +</td><td>n i=1</td><td>2η n</td><td>E g i (X i t ), X i t -µ t</td></tr><tr><td>=</td><td>n i=1</td><td>2η n</td><td colspan="5">E g i (X i t ), X i t -µ t ≤</td><td colspan="3">n i=1</td><td>2η 2 n</td><td colspan="4">E g i (X i t ) 2 +</td><td>1 2n</td><td>X i t -µ t</td><td>2 =</td><td>2η 2 t n</td><td>n i=1</td><td>E g i (X i t ) 2 +</td><td>Γ t 2n</td><td>.</td></tr><tr><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/><td colspan="2">Γ t 2n</td><td colspan="2">+</td><td>4η 2 n</td></tr></table>

Peer review (iclr2020):
The paper considers scaling distributed stochastic gradient descent to large number of nodes. Paper proposes novel asynchronous variant to decentralized SGD, called PopSGD. It models asynchrony with the population model. Paper theoretically analyzes the proposed method and shows that in the convex case PopSGD has a linear speedup in the number of nodes compared to the sequential training on one node. However, in the non-convex setting, the PopSGD rate doesn’t have a linear speedup. The paper also provides experimental evaluation of PopSGD where they scale PopSGD up to 1000 of nodes in the convex optimization; and also apply PopSGD to neural network training on ImageNet. My score is weak reject. The major reason is that it is not clear how does this work theoretically and experimentally compares to the previous asynchronous variants of decentralized SGD (Lian et al. (2017b) AD-PSGD and Assran et al. (2018) SGP) or to the centralized SGD (parallel mini-batch SGD) baseline; and what are the benefits of the proposed method. Concerns that should be addressed: 1. No theoretical and experimental comparison with the baselines (see above). 2. Extension to the non-convex case: there is no linear speedup in the number of nodes n. Does this mean that it is better to use Centralized SGD (which has speedup in the number of nodes)? The comparison should be made explicit. 3. The paper is a bit too long (10 pages) and contains some repetitions. Consider to shorten a bit. (e.g. procedure of splitting data between nodes was described twice on page 2 and 4; proof overview on page 6 could be merged with two steps on page 7) 4. The procedure how to sample nodes uniformly was not discussed in the paper. Moreover, it is also not clear why Theta(n) updates could be done in parallel. When intersection happens, many nodes would have to wait for the previously selected pairs to finish computation. 5. Why are the local learning rates required? When scheduler samples the nodes uniformly it can also transmit them the global time count. 6. In the description of data distribution (page 2, paragraph 4-5, page 4, last paragraph): what if there is more samples than available nodes? do the nodes exchange samples or only gradients? Is it possible to have part of the full dataset on every node without sharing it with anyone? 7. Page 3, line 3: Lian et al. (2017b) and Assran et al. (SGP) also showed that they don’t require global synchronization. 8. Page 4, line 2: The AD-PSGD rate does have a linear speedup in the number of workers n, so the claim should be corrected. 9. Page 7: all lemmas and theorems hold only for the global stepsize eta_t. Would it also hold with local stepsizes eta_t^i? 10. Extensions for arbitrary graphs: would it be possible to have one theorem for all possible graphs and see how graph parameters (e.g. spectral gap or others) influence the convergence rate? 11. Experiments: I didn’t understand the definition of mult constant and what does it control. Re-phrase this paragraph. Minor comments: - page 1, last line of the paragraph 2: “parameter obtained by node i at time t“ -> “stoch. gradient obtained by node i at time t“? - page 2, line 4: “variants(e.g.” -> “variants (e.g.” - Usually mu is used for strong convexity parameter. - page 3, paragraph 2, “we emphasize that convexity is not enough…” the purpose of this sentence is unclear, what is enough then or why is that important to know? - page 3, related work: Nedic at al. Nedic et al. (2017) -> Nedic et al. (2017). The same for the other citation. - page 3, related work: PP model is not defined. - How can PP model result in a multigraph? If two samples pairs have the same nodes, then they need to be processed sequentially, so it can be modeled with two graphs for different time steps. - Population protocol model (page 4): “states store real numbers” -> can they store vectors instead? page 5, estimating time and the learning rate section: what happens if the V^i is equal to V_j? Who updates its value? - Figure 1(a) was not discussed at all in the text. - Page 6, Notation and preliminaries: why it is required that T = O(poly n) is not explained.