Title: DECENTRALIZED DEEP LEARNING WITH ARBITRARY COMMUNICATION COMPRESSION

Abstract: Decentralized training of deep learning models is a key element for enabling data privacy and on-device learning over networks, as well as for efficient scaling to large compute clusters. As current approaches are limited by network bandwidth, we propose the use of communication compression in the decentralized training context. We show that CHOCO-SGD achieves linear speedup in the number of workers for arbitrary high compression ratios on general non-convex functions, and non-IID training data. We demonstrate the practical performance of the algorithm in two key scenarios: the training of deep learning models (i) over decentralized user devices, connected by a peer-to-peer network and (ii) in a datacenter.

1. INTRODUCTION:

Distributed machine learning-i.e. the training of machine learning models using distributed optimization algorithms-has recently enabled many successful applications in research and industry. Such methods offer two of the key success factors: 1) computational scalability by leveraging the simultaneous computational power of many devices, and 2) data-locality, the ability to perform joint training while keeping each part of the training data local to each participating device. Recent theoretical results indicate that decentralized schemes can be as efficient as the centralized approaches, at least when considering convergence of training loss vs. iterations (Scaman et al., 2017; 2018; Lian et al., 2017; Tang et al., 2018; Koloskova et al., 2019; Assran et al., 2019) .

Gradient compression techniques have been proposed for the standard distributed training case (Alistarh et al., 2017; Wen et al., 2017; Lin et al., 2018; Wangni et al., 2018; Stich et al., 2018) , to reduce the amount of data that has to be sent over each communication link in the network. For decentralized training of deep neural networks, Tang et al. (2018) introduce two algorithms (DCD, ECD) which allow for communication compression. However, both these algorithms are restrictive with respect to the used compression operators, only allowing for unbiased compressors and-more significantlyso far not supporting arbitrarily high compression ratios. We here study CHOCO-SGD-recently introduced for convex problems only (Koloskova et al., 2019) -which overcomes these constraints.

For the evaluation of our algorithm we in particular focus on the generalization performance (on the test-set) on standard machine learning benchmarks, hereby departing from previous work such as e.g. (Tang et al., 2018; Wang et al., 2019; Tang et al., 2019; Reisizadeh et al., 2019 ) that mostly considered training performance (on the train-set). We study two different scenarios: firstly, (i) training on a challenging peer-to-peer setting, where the training data is distributed over the training devices (and not allowed to move), similar to the federated learning setting (McMahan et al., 2017) . We are again able to show speed-ups for CHOCO-SGD over the decentralized baseline (Lian et al., 2017) with much less communication overhead. Secondly, (ii) training in a datacenter setting, where decentralized communication patterns allow better scalability than centralized approaches. For this setting we show that communication efficient CHOCO-SGD can improve time-to-accuracy on large tasks, such as e.g. ImageNet training. However, when investigating the scaling of decentralized algorithms to larger number of nodes we observe that (all) decentralized schemes encounter difficulties and often do not reach the same (test and train) performance as centralized schemes. As these findings point out some deficiencies of current decentralized training schemes (and are not particular to our scheme) we think that reporting these results is a helpful contribution to the community to spur further research on decentralized training schemes that scale to large number of peers.

Contributions. Our contributions can be summarized as:

• On the theory side, we are the first to show that CHOCO-SGD converges at rate O 1 / √ nT + 1 /(ρ 2 δT ) 2/3 on non-convex smooth functions, where n denotes the number of nodes, T the number of iterations, ρ the spectral gap of the mixing matrix and δ the compression ratio. The main term, O 1 / √ nT , matches with the centralized baselines with exact communication and shows a linear speedup in the number of workers n. Both ρ and δ only affect the asymptotically smaller second term.

• On the practical side, we present a version of CHOCO-SGD with momentum and analyze its practical performance on two relevant scenarios:

• for on-device training over a realistic peer-to-peer social network, where lowering the bandwidth requirements of joint training is especially impactful • in a datacenter setting for computational scalability of training deep learning models for resource efficiency and improved time-to-accuracy • Lastly, we systematically investigate performance of the decentralized schemes when scaling to larger number of nodes and we point out some (shared) difficulties encountered by current decentralized learning approaches.

2. RELATED WORK:

For the training in communication restricted settings a variety of methods have been proposed. For instance, decentralized schemes (Lian et al., 2017; Nedić et al., 2018; Koloskova et al., 2019) , gradient compression (Seide et al., 2014; Strom, 2015; Alistarh et al., 2017; Wen et al., 2017; Lin et al., 2018; Wangni et al., 2018; Bernstein et al., 2018; Lin et al., 2018; Alistarh et al., 2018; Stich et al., 2018; Karimireddy et al., 2019) , asynchronous methods (Recht et al., 2011; Assran et al., 2019) or performing multiple local SGD steps before averaging (Zhang et al., 2016; McMahan et al., 2017; Lin et al., 2020) . This especially covers learning over decentralized data, as extensively studied in the federated learning literature for the centralized algorithms (McMahan et al., 2016) . In this paper we advocate for combining decentralized SGD schemes with gradient compression.

Decentralized SGD. We in particular focus on approaches based on gossip averaging (Kempe et al., 2003; Xiao & Boyd, 2004; Boyd et al., 2006) whose convergence rate typically depends on the spectral gap ρ ≥ 0 of the mixing matrix (Xiao & Boyd, 2004) . Lian et al. (2017) combine SGD with gossip averaging and show that the leading term in the convergence rate O 1 / √ nT is consistent with the convergence of the centralized mini-batch SGD (Dekel et al., 2012) and the spectral gap only affects the asymptotically smaller terms. Similar results have been observed very recently for related schemes (Scaman et al., 2017; 2018; Koloskova et al., 2019; Yu et al., 2019) .

Quantization. Communication compression with quantization has been popularized in the deep learning community by the reported successes in (Seide et al., 2014; Strom, 2015) . Theoretical guarantees were first established for schemes with unbiased compression (Alistarh et al., 2017; Wen et al., 2017; Wangni et al., 2018) but soon extended to biased compression (Bernstein et al., 2018) as well. Schemes with error correction work often best in practice and give the best theoretical gurantees (Lin et al., 2018; Alistarh et al., 2018; Stich et al., 2018; Karimireddy et al., 2019) . Recently, also proximal updates and variance reduction have been studied in combination with quantized updates (Mishchenko et al., 2019; Horváth et al., 2019) .

Decentralized Optimization with Quantization. It has been observed that gossip averaging can diverge (or not converge to the correct solution) in the presence of quantization noise (Xiao et al., 2005; Carli et al., 2007; Nedić et al., 2008; Dimakis et al., 2010; Carli et al., 2010b; Yuan et al., 2012) . Reisizadeh et al. (2018) propose an algorithm that can still converge, though at a slower rate than the exact scheme. Another line of work proposed adaptive schemes (with increasing compression accuracy) that converge at the expense of higher communication cost (Carli et al., 2010a; Doan et al., 2018; Berahas et al., 2019) . For deep learning applications, Tang et al. (2018) proposed the DCD and ECD algorithms that converge at the same rate as the centralized baseline though only for constant compression ratio. The CHOCO-SGD algorithm that we consider in this work can deal with arbitrary high compression, and has been introduced in (Koloskova et al., 2019) but only been analyzed for convex functions. For non-convex functions we show a rate of

O 1 / √ nT + 1 /(ρ 2 δT ) 2 3

, where δ > 0 measures the compression quality. Simultaneous work of Tang et al. (2019) introduced DeepSqueeze, an alternative method which also converges with arbitrary compression ratio. In our experiments, under the same amount of tuning, CHOCO-SGD achieves higher test accuracy.

3. CHOCO-SGD:

In this section we formally introduce the decentralized optimization problem, compression operators, and the gossip-based stochastic optimization algorithm CHOCO-SGD from (Koloskova et al., 2019) .

Distributed Setup. We consider optimization problems distributed across n nodes of the form

EQUATION

where D 1 , . . . D n are local distributions for sampling data which can be different on every node, F i : R d × Ω → R are possibly non-convex (and non-identical) loss functions. This setting covers the important case of empirical risk minimization in distributed machine learning and deep learning applications.

Communication. Every device is only allowed to communicate with its local neighbours defined by the network topology, given as a weighted graph G = ([n], E), with edges E representing the communication links along which messages (e.g. model updates) can be exchanged. We assign a positive weight w ij to every edge (w ij = 0 for disconnected nodes {i, j} / ∈ E). Assumption 1 (Mixing matrix). We assume that W ∈

[0, 1] n×n , (W ) ij = w ij is a symmetric (W = W ) doubly stochastic (W 1 = 1,1 W = 1 ) matrix with eigenvalues 1 = |λ 1 (W )| > |λ 2 (W )| ≥ • • • ≥ |λ n (W )| and spectral gap ρ := 1 -|λ 2 (W )| ∈ (0, 1] .

In our experiments we set the weights based on the local node degrees: w ij = max{deg(i), deg(j)} -1 for {i, j} ∈ E. This will not only guarantee ρ > 0 but these weights can easily be computed in a local fashion on each node (Xiao & Boyd, 2004) .

Compression. We aim to only transmit compressed (e.g. quantized or sparsified) messages. We formalized this through the notion of compression operators that was e.g. also used in (Tang et al., 2018; Stich et al., 2018) .

EQUATION

for a parameter δ > 0. Here E Q denotes the expectation over the internal randomness of operator Q.

In contrast to the quantization operators used in e.g. (Alistarh et al., 2017; Horváth et al., 2019) , compression operators defined as in (2) are not required to be unbiased and therefore supports a larger class of compression operators. Some examples can be found in (Koloskova et al., 2019) and we further discuss specific compression schemes in Section 5.

Algorithm. CHOCO-SGD is summarized in Algorithm 1. Every worker i stores its own private variable x i ∈ R d that is updated by a stochastic gradient step in part 2 and a modified gossip averaging step on line 2. This step is a key element of the algorithm as it preserves the averages of the iterates even in presence of quantization noise (the compression errors are not discarded, but aggregated in the local variables x i , see also (Koloskova et al., 2019) ). The nodes communicate with their neighbors in part 1 and update the variables xj ∈ R d for all their neighbors {i, j} ∈ E only using compressed updates. These xi are available to all the neighbours of the node i and represent the 'publicly available' copies of the private x i , in general x i = xi , due to the communication restrictions.

From an implementation aspect, it is worth highlighting that the communication part 1 and the gradient computation part 2 can both be executed in parallel because they are independent. Moreover, Algorithm 1 CHOCO-SGD (Koloskova et al., 2019) input:

Initial value x (-1 2 ) ∈ R d , x (-1 2 ) i = x (-1 2 ) on each node i ∈ [n], consensus stepsize γ, SGD stepsize η, communication graph G = ([n], E) and mixing matrix W , initialize x(0) i := 0 ∀i ∈ [n]

1: for t in 0 . . . T -1 do {in parallel for all workers i ∈ [n]} 2:

x (t) i := x (t-1 2 ) i + γ j:{i,j}∈E w ij x(t) j - x(t)

i modified gossip averaging 3:

q (t) i := Q(x (t) i - x(t) i ) compression 4:

for neighbors j : {i, j} ∈ E (including {i} ∈ E) do 5:

Send q (t)

i and receive q (t) j communication 6:

x(t+1)

j := q (t) j + x(t) j local update 7:

end for

EQUATION

i )

9:

x

(t+ 1 2 ) i := x (t) i -ηg (t) i

stochastic gradient update 10: end for 1 2 each node only needs to store 3 vectors at most, independent of the number of neighbors (this might not be obvious from the notation used here for additinal clarity, for further details c.f. (Koloskova et al., 2019) ). We further propose a momentum-version of CHOCO-SGD in Algorithm 2 (see also Section D for further details).

4. CONVERGENCE OF CHOCO-SGD ON SMOOTH NON-CONVEX PROBLEMS:

As the first main contribution, we here extend the analysis of CHOCO-SGD to non-convex problems. For this we make the following technical assumptions: Assumption 2. Each function

f i : R d → R for i ∈ [n] is L-smooth, that is ∇f i (y) -∇f i (x) ≤ L y -x , ∀x, y ∈ R d , i ∈ [n],

and the variance of the stochastic gradients is bounded on each worker:

EQUATION

where E ξi [•] denotes the expectation over ξ i ∼ D i . We also denote σ 2 := 1 n n i=1 σ 2 i for convenience. Theorem 4.1. Under Assumptions 1-2 there exists a constant stepsize η and the consensus stepsize from (Koloskova et al., 2019) , γ :=

ρ 2 δ 16ρ+ρ 2 +4β 2 +2ρβ 2 -8ρδ with β = I -W 2 ∈ [0, 2], such that the averaged iterates x (t) := 1 n n i=1 x (t) i of Algorithm 1 satisfy: 1 T + 1 T t=0 ∇f x (t) 2 2 = O LF 0 σ 2 n(T + 1) 1/2 + GLF 0 c(T + 1) 2/3 + LF 0 T + 1

where c := ρ 2 δ 82 denotes the convergence rate of the underlying consensus averaging scheme of (Koloskova et al., 2019) ,

F 0 := f (x (0) ) -f .

This result shows that CHOCO-SGD converges as O 1 / √ nT + 1 /(ρ 2 δT ) 2/3 . The first term shows a linear speed-up compared to SGD on a single node, while compression and graph topology affect only the higher order second term. By differently choosing the stepsize η :=

√ n / √ T +1 we can recover asymptotic convergence rate of O 1 / √ nT + n /(ρ 4 δ 2 T ) .

For the proofs and convergence of the individual iterates x i we refer to Appendix A.

5. COMPARISON TO BASELINES FOR VARIOUS COMPRESSION SCHEMES:

In this section we experimentally compare CHOCO-SGD to the relevant baselines for a selection of commonly used compression operators. For the experiments we further leverage momentum in all implemented algorithms. The newly developed momentum version of CHOCO-SGD is given as Algorithm 2.

Algorithm 2 CHOCO-SGD with Momentum input: Same as for Algorithm 1, additionally: weight decay factor λ, momentum factor β, local momentum memory v (0)

i := 0 ∀i ∈ [n] Lines 1-8 in Algorithm 1 are left unmodified Line 9 in Algorithm 1 is replaced with the following two lines

9: v (t+1) i := (g (t) i + λx (t) i ) + βv (t) i

local momentum with weight decay 10:

x (t+ 1 2 ) i := x (t) i -ηv (t+1) i stochastic gradient update

Setup. In order to match the setting in (Tang et al., 2018) for our first set of experiments, we use a ring topology with n = 8 nodes and train the ResNet20 architecture (He et al., 2016) on the Cifar10 dataset (50K/10K training/test samples) (Krizhevsky, 2012) . We randomly split the training data between workers and shuffle it after every epoch, following standard procedure as e.g. in (Goyal et al., 2017) . We implement DCD and ECD with momentum (Tang et al., 2018) , DeepSqueeze with momentum (Tang et al., 2019) , CHOCO-SGD with momentum (Algorithm 2) and standard (all-reduce) mini-batch SGD with momentum and without compression (Dekel et al., 2012) . Our implementations are open-source and available at https://github.com/epfml/ ChocoSGD. The momentum factor is set to 0.9 without dampening. For all algorithms we fine-tune the initial learning rate and gradually warm it up from a relative small value (0.1) (Goyal et al., 2017) for the first 5 epochs. The learning rate is decayed by 10 twice, at 150 and 225 epochs, and stop training at 300 epochs. For CHOCO-SGD and DeepSqueeze the consensus learning rate γ is also tuned. The detailed hyper-parameter tuning procedure refers to Appendix F. Every compression scheme is applied to every layer of ResNet20 separately. We evaluate the top-1 test accuracy on every node separately over the whole dataset and report the average performance over all nodes.

Compression Schemes. We implement two unbiased compression schemes: (i) gsgd b quantization that randomly rounds the weights to b-bit representations (Alistarh et al., 2017) , and (ii) random a sparsification, which preserves a randomly chosen a fraction of the weights and sets the other ones to zero (Wangni et al., 2018) . Further two biased compression schemes: (iii) top a , which selects the a fraction of weights with the largest magnitude and sets the other ones to zero (Alistarh et al., 2018; Stich et al., 2018) , and (iv) sign compression, which compresses each weight to its sign scaled by the norm of the full vector (Bernstein et al., 2018; Karimireddy et al., 2019) . We refer to Appendix C for exact definitions of the schemes. DCD and ECD have been analyzed only for unbiased quantization schemes, thus the combination with the two biased schemes is not supported by theory. In converse, CHOCO-SGD and DeepSqueeze has been studied only for biased schemes according to Definition 2. However, both unbiased compression schemes can be scaled down in order to meet the specification (cf. discussions in (Stich et al., 2018; Koloskova et al., 2019) ) and we adopt this for the experiments.

Results. The results are summarized in Tab. 1. For unbiased compression schemes, ECD and DCD only achieve good performance when the compression ratio is small, and sometimes even diverge when the compression ratio is high. This is consistent1 with the theoretical and experimental results in (Tang et al., 2018) . We further observe that the performance of DCD with the biased top a sparsification is much better than with the unbiased random a counterpart, though this operator is not yet supported by theory.

CHOCO-SGD can generalize reasonably well in all scenarios (at most 1.65% accuracy drop) for fixed training budget. The sign compression achieves state-of-the-art accuracy and requires approximately 32× less bits per weight than the full precision baseline. Modeling. To simulate this scenario, we permanently split the training data between the nodes, i.e. the data is never shuffled between workers during training, and every node has distinct part of the dataset. To the best of our knowledge, no prior works studied this scenario for decentralized deep learning. For the centralized approach, gathering methods such as all-reduce are not efficiently implementable in this setting, hence we compare to the centralized baseline where all nodes route their updates to a central coordinator for aggregation. For the comparison we consider CHOCO-SGD with sign compression (this combination achieved the compromise between accuracy and compression level in Tab. 1)), decentralized SGD without compression (Lian et al., 2017) , and centralized SGD without compression.

Scaling to Large Number of Nodes. To study the scaling properties of CHOCO-SGD, we train on 4, 16, 36 and 64 number of nodes. We compare decentralized algorithms on two different topologies: ring as the worst possible topology, and on the torus with much larger spectral gap.

Their parameters are listed in the table 2. (Krizhevsky, 2012) .

For the simplicity, we keep the learning rate constant and separately tune it for all methods. We tune consensus learning rate for CHOCO-SGD.

The results are summarized in Fig. 1 (and Fig. 6 , Tabs. 7-8 in Appendix G). First we compare the testing accuracy reached after 300 epochs (Fig. 1 , Left). CentralizedSGD has a good performance for all the considered number of nodes. CHOCO-SGD slows down due to the influence of graph topology (Decentralized curve), which is consistent with the spectral gaps order (see Tab. 2), and also influenced by the communication compression (CHOCO curve), which slows down training uniformly for both topologies. We observed that the train performance is similar to the test on Fig. 1 , therefore the performance degradation is explained by the slower convergence (Theorem 4.1) and is not a generalization issue. Increasing the number of epochs improves the performance of the decentralized schemes. However, even using 10 times more epochs, we were not able to perfectly close the gap between centralized and decentralized algorithms for both train and test performance.

In the real decentralized scenario, the interest is not to minimize the epochs number, but the amount of communication to reduce the cost of the user's mobile data. We therefore fix the number of transmitted bits to 1000 MB and compare the best testing accuracy reached (Fig. 1 , Right). CHOCO-SGD performs the best while having slight degradation due to increasing number of nodes. It is beneficial to use torus topology when the number of nodes is large because it has good mixing properties, for small networks there is not much difference between these two topologies-the benefit of large spectral gap is canceled by the increased communication due larger node degree for torus topology. Both Decentralized and Centralized SGD requires significantly larger number of bits to reach reasonable accuracy.

Experiments on a Real Social Network Graph. We simulate training models on user devices (e.g. mobile phones), connected by a real social network. We chosen Davis Southern women social network (Davis et al., 1941) The results are summarized in Figs. 2-3 and in Tab. 3. For the image classification task, when comparing the training accuracy reached after the same number of epochs, we observe that the decentralized algorithm performs best, follows by the centralized and lastly the quantized decentralized. However, the test accuracy is highest for the centralized scheme. When comparing the test accuracy reached for the same transmitted data2 , CHOCO-SGD significantly outperforms the exact decentralized scheme, with the centralized performing worst. We note a slight accuracy drop, i.e. after the same number of epochs (but much less transmitted data), CHOCO-SGD does not reach the same level of test accuracy than the baselines.

For the language modeling task, both decentralized schemes suffer a drop in the training loss when the evaluation reaching the epoch budget; while our CHOCO-SGD outperforms the centralized SGD in test perplexity. When considering perplexity for a fixed data volume (middle and right subfigure of Fig. 3 ), CHOCO-SGD performs best, followed by the exact decentralized and centralized algorithms.

On Figure 4 we additionally depict the test accuracy of the averaged model x (t) = 1 diverging from the averaged model, while decreasing only when the stepsize decreases. The same behavior was also reported in Assran et al. (2019) .

7. USE CASE II: EFFICIENT LARGE-SCALE TRAINING IN A DATACENTER:

Decentralized optimization methods offer a way to address scaling issues even for well connected devices, such as e.g. in datacenter with fast InfiniBand (100Gbps) or Ethernet (10Gbps) connections. Lian et al. (2017) describe scenarios when decentralized schemes can outperform centralized ones, and recently, Assran et al. (2019) presented impressive speedups for training on 256 GPUs, for the setting when all nodes can access all training data. The main differences of their algorithm to CHOCO-SGD are the asynchronous gossip updates, time-varying communication topology and most importantly exact communication, making their setup not directly comparable to ours. We note that these properties of asynchronous communication and changing topology for faster mixing are orthogonal to our contribution, and offer promise to be combined.

Setup. We train ImageNet-1k (1.28M/50K training/validation) (Deng et al., 2009) with Resnet-50 (He et al., 2016) . We perform our experiments on 8 machines (n1-standard-32 from Google Cloud with Intel Ivy Bridge CPU platform), where each of machines has 4 Tesla P100 2019) through sign compression, (iii) decentralized SGD (Lian et al., 2017) with parallelized forward pass and gradients communication (full-precision communication), and (iv) CHOCO-SGD with sign compressed communications. The mini-batch size on each GPU is 128, and we follow the general SGD training scheme in (Goyal et al., 2017) and directly use all their hyperparameters for all evaluated methods. Due to the limitation of the computational resource, we did not heavily tune the consensus stepsize for CHOCO-SGD3 .

Results. We depict the training loss and top-1 test accuracy in terms of epochs and time in Fig. 5 . CHOCO-SGD benefits from its decentralized and parallel structure and takes less time than all-reduce to perform the same number of epochs, while having only a slight 1.5% accuracy loss4 . In terms of time per epoch, our speedup does not match that of (Assran et al., 2019) , as the used hardware and the communication pattern5 are very different. Their scheme is orthogonal to our approach and could be integrated for better training efficiency. Nevertheless, we still demonstrate a time-wise 20% gain over the common all-reduce baseline, on our used commodity hardware cluster.

8. CONCLUSION:

We propose the use of CHOCO-SGD (and its momentum version) for enabling decentralized deep learning training in bandwidth-constrained environments. We provide theoretical convergence guarantees for the non-convex setting and show that the algorithm enjoys linear speedup in the number of nodes. We empirically study the performance of the algorithm in a variety of settings on the image classification (ImageNet-1k, Cifar10) and on the language modeling task (WikiText-2). Whilst previous work successfully demonstrated that decentralized methods can be a competitive alternative to centralized training schemes when no communication constraints are present (Lian et al., 2017; Assran et al., 2019) , our main contribution is to enable training in strongly communicationrestricted environments, and while respecting the challenging constraint of locality of the training data. We theoretically and practically demonstrate the performance of decentralized schemes for arbitrary high communication compression, and under data-locality, and thus significantly expand the reach of potential applications of fully decentralized deep learning.

A CONVERGENCE OF CHOCO-SGD:

In this section we present the proof of Theorem 4.1. For this, we will first derive a slightly more general statement: in Theorem A.3 we analyze CHOCO-SGD for arbitrary stepsizes η, and then derive Theorem 4.1 as a special case.

The structure of the proof follows Koloskova et al. (2019) . That is, we first show that Algorithm 1 is a special case of a more general class of algorithms (given in Algorithm 3): Observe that Algorithm 1 consists of two main components: 2 the stochastic gradient update, performed locally on each node, and 1 the (quantized) averaging among the nodes. We can show convergence of all algorithms of this type-i.e. stochastic gradient updates 2 followed by an arbitrary averaging step 1 -as long as the averaging scheme exhibits linear convergence. For the specific averaging used in CHOCO-SGD, linear convergence has been shown in (Koloskova et al., 2019) and we will use their estimate of the convergence rate of the averaging scheme.

A.1 A GENERAL FRAMEWORK FOR DECENTRALIZED SGD WITH ARBITRARY AVERAGING:

For convenience, we use the following matrix notation in this subsection.

X (t) := x (t) 1 , . . . , x (t) n ∈ R d×n , X (t) := x (t) , . . . , x (t) ∈ R d×n , ∂F (X (t) , ξ (t) ) := ∇F 1 (x (t) 1 , ξ (t) 1 ), . . . , ∇F n (x (t) n , ξ (t) n ) ∈ R d×n .

Decentralized SGD with arbitrary averaging is given in Algorithm 3. t) , ξ (t) ) stochastic gradient updates 3:

Algorithm 3 DECENTRALIZED SGD WITH ARBITRARY AVERAGING SCHEME input: X (0) = x (0) , . . . , x (0) , stepsize η, averaging function h : R d×n × R d×n → R d×n × R d×n , initialize Y (0) = 0 1: for t in 0 . . . T -1 do {in parallel for all workers i ∈ [n]} 2: X (t+ 1 2 ) = X (t) -η∂F i (X (

(X (t+1) , Y (t+1) ) = h(X (t+ 1 2 ) , Y (t) )

blackbox averaging/gossip 4: end for 2 { 1 { Assumption 3. For an averaging scheme h : R d×n × R d×n → R d×n × R d×n let (X + , Y + ) := h(X, Y ) for X, Y ∈ R d×n . Assume that h preserves the average of iterates:

EQUATION

and that it converges with linear rate for a parameter 0 < c ≤ 1

EQUATION

and Laypunov function

Ψ(X, Y ) := X -X 2 F + X -Y 2 F with X := 1 n X11

, where E h denotes the expectation over internal randomness of averaging scheme h.

Example: Exact Averaging. Setting X + = XW and Y + = X + gives an exact consensus averaging algorithm with mixing matrix W (Xiao & Boyd, 2004) . It converges at the rate c = ρ, where ρ is an eigengap of mixing matrix W , defined in Assumption 1. Substituting it into the Algorithm 3 we recover D-PSGD algorithm, analyzed in Lian et al. (2017) .

Example::

CHOCO-SGD. To recover CHOCO-SGD, we need to choose CHOCO-GOSSIP (Koloskova et al., 2019) as consensus averaging scheme, which is defined as

X + = X + γY (W -I) and Y + = Y + Q(X + -Y ) (in

the main text we write X instead of Y ). This scheme converges with c = ρ 2 δ 82 . The results from the main part can be recovered by substituting this c = ρ 2 δ 82 in the more general results below. It is important to note that for Algorithm 1 given in the main text, the order of the communication part 1 and the gradient computation part 2 is exchanged. We did this to better illustrate that both these parts are independent and that they can be executed in parallel. The effect of this change can be captured by changing the initial values but does not affect the convergence rate.

A.2 PROOFS:

Remark A.1 (Mini-batch variance). If for functions f i , F i defined in (1) Assumption 2 holds, i.e.

EQUATION

where

σ 2 = n i=1 σ 2 i n .

Proof. This follows from

EQUATION

i ). Expectation of scalar product is equal to zero because ξ i is independent of ξ j since i = j.

Lemma A.2. Under Assumptions 1-3 the iterates of the Algorithm 3 with constant stepsize η satisfy n i=1

x (t) -x (t) i 2 2 ≤ η 2 12nG 2 c 2 .

Proof of Lemma A.2. We start by following the proof of Lemma 21 from Koloskova et al. (2019) .

Define

EQUATION

≤ (1 -c)E X (t+ 1 2 ) -X (t+ 1 2 ) 2 F + (1 -c)E Y (t) -X (t+ 1 2 ) 2 F = (1 -c)E X (t) -X (t) + η∂F (X (t) , ξ (t) ) 11 n -I 2 F + (1 -c)E Y (t) -X (t) + η∂F (X (t) , ξ (t) ) 2 F (9) ≤ (1 -c)(1 + α -1 )E X (t) -X (t) 2 F + Y (t) -X (t) 2 F + (1 -c)(1 + α)η 2 E ∂F (X (t) , ξ (t) ) 11 n -I 2 F + ∂F (X (t) , ξ (t) ) 2 F ≤ (1 -c) (1 + α -1 )E X (t) -X (t) 2 F + Y (t) -X (t) 2 F + 2n(1 + α)η 2 G 2 α= 2 c ≤ 1 - c 2 E X (t) -X (t) 2 F + Y (t) -X (t) 2 F + 6n c η 2 G 2 .

Define A = 3nG 2 , we got a recursion

r t+1 ≤ 1 - c 2 r t + 2 c η 2 A, Verifying that r t ≤ η 2 4A c 2 satisfy recursion completes the proof as E X (t) -X (t) 2 ≤ r t . Indeed, r 0 = 0 ≤ η 2 4A c 2 as X (0) = X (0) and Y (0) = 0 r t+1 ≤ 1 - c 2 r t + η 2 2A c ≤ 1 - c 2 η 2 4A c 2 + η 2 2A c = η 2 4A c 2 .

Theorem A.3. Under Assumptions 1-3 with constant stepsize η < 1 4L , the averaged iterates

x (t) = 1 n n i=1 x (t)

i of Algorithm 3 satisfy:

1 T + 1 T t=0 ∇f (x (t) ) 2 2 ≤ 4 η(T + 1) f (x (0) ) -f + η 2σ 2 L n + η 2 36G 2 L 2 c 2

where c denotes convergence rate of underlying averaging scheme.

Proof of Theorem A.3. By L-smoothness

E t+1 f (x (t+1) ) = E t+1 f x (t) - η n n i=1 ∇F i (x (t) i , ξ (t) i ) ≤ f (x (t) ) -E t+1 ∇f (x (t) ), η n n i=1 ∇F i (x (t) i , ξ (t) i ) =:T1 +E t+1 L 2 η 2 1 n n i=1 ∇F i (x (t) i , ξ (t) i ) 2 2 =:T2

To estimate the second term, we add and subtract ∇f (x (t) )

T 1 = -η ∇f (x (t) ) 2 + η ∇f (x (t) ), ∇f (x (t) ) - 1 n n i=1 ∇f i (x (t) i ) (8),γ=1 ≤ - η 2 ∇f (x (t) ) 2 + η 2n n i=1 ∇f (x (t) ) -∇f i (x (t) i ) 2

For the last term, we add and subtract ∇f (x (t) ) and the sum of ∇f i (x

(t) i ) T 2 = E t+1 1 n n i=1 ∇F i (x (t) i , ξ (t) i ) -∇f i (x (t) i ) 2 2 + 1 n n i=1 ∇f i (x (t) i ) ± ∇f (x (t) ) 2 2

(6),( 9),( 7)

≤ σ 2 n + 2 n n i=1 f (x (t) ) -∇f i (x (t) i ) 2 2 + 2 ∇f (x (t) ) 2

Combining this together and using L-smoothness to estimate f (x (t) ) -∇f i (x

(t) i ) 2 2 , E t+1 f (x (t+1) ) ≤ f (x (t) ) -η 1 2 -Lη ∇f (x (t) ) 2 2 + 1 2 ηL 2 + η 2 L 3 1 n n i=1 x (t) -x (t) i 2 2 + Lη 2 σ 2 2n .

Using Lemma A.2 to bound the third term and using that η ≤ 1 4L in the second and in the third terms

E t+1 f (x (t+1) ) ≤ f (x (t) ) - η 4 ∇f (x (t) ) 2 2 + η 3 9L 2 G 2 c 2 + η 2 Lσ 2 2n ,

Rearranging terms and averaging over t

1 T + 1 T t=0 ∇f (x (t) ) 2 2 (9) ≤ 4 η 1 T + 1 T t=0 Ef (x (t) ) -Ef (x (t+1) ) + η 2 36G 2 L 2 c 2 + η 2Lσ 2 n ≤ 4 η(T + 1) f (x (0) ) -f + η 2σ 2 L n + η 2 36G 2 L 2 c 2

Corollary A.4. Under Assumptions 1-3 with constant stepsize η = n T +1 for T ≥ 16nL 2 , the averaged iterates

x (t) = 1 n n i=1 x (t)

i of Algorithm 3 satisfy:

1 T + 1 T t=0 ∇f (x (t) ) 2 2 ≤ 4 f (x (0) ) -f + 2σ 2 L n(T + 1) + 36G 2 nL 2 (T + 1)c 2

where c denotes convergence rate of underlying averaging scheme.

The first term shows a linear speed up compared to SGD on one node, whereas the underlying averaging scheme affects only the second-order term. Substituting the convergence rate for exact averaging with W gives the rate

O( 1 / √ nT + n /(T ρ 2 )).

CHOCO-SGD with the underlying CHOCO-GOSSIP averaging scheme converges at the rate

O( 1 / √ nT + n /(T ρ 4 δ 2 )).

The dependence on ρ (eigengap of the mixing matrix W ) is worse than in the exact case. This might either just be an artifact of our proof technique or a consequence of supporting arbitrary high compression.

A.3 CONVERGENCE FOR ARBITRARY T:

The previous result holds only for T larger than 16nL 2 . This is not necessary and can be relaxed by carefully tuning the stepsize. Lemma A.5. For any parameters r 0 ≥ 0, b ≥ 0, e ≥ 0, d ≥ 0 there exists constant stepsize η ≤ 1 d such that , then

Ψ T := r 0 η(T + 1) + bη + eη 2 ≤ 2 br 0 T + 1 1 2 + 2e 1/3 r 0 T + 1 2 3 + dr 0 T + 1 Proof. Choosing η = min r0 b(T +1)

Ψ T ≤ dr 0 T + 1 + b d + e d 2 ≤ br 0 T + 1 1 2 + dr 0 T + 1 + e 1/3 r 0 T + 1 2 3 • η = r0 b(T +1) 1 2 < r0 e(T +1) 1 3 , then Ψ T ≤ 2 r 0 b T + 1 1 2 + e r 0 b(T + 1) ≤ 2 r 0 b T + 1 1 2 + e 1 3 r 0 (T + 1) 2 3 , • The last case, η = r0 e(T +1) 1 3 < r0 b(T +1) 1 2 Ψ T ≤ 2e 1 3 r 0 (T + 1) 2 3 + b

r 0 e(T + 1)

1 3 ≤ 2e 1 3 r 0 (T + 1) 2 3 + br 0 T + 1 1 2

Corollary A.6 (Generalized Theorem 4.1). Under Assumptions 1-3 with constant stepsize η tuned as in Lemma A.5, the averaged iterates

x (t) = 1 n n i=1 x (t)

i of Algorithm 3 satisfy:

1 T + 1 T t=0 ∇f (x (t) ) 2 2 ≤ 4 2Lσ 2 n(T + 1) + 17 GLF 0 c(T + 1) 2 3 + 16LF 0 T + 1

where c denotes convergence rate of underlying averaging scheme, F 0 = f (x (0) ) -f .

Proof. The result follows from Theorem A.3 and Lemma A.5 with

r 0 = 4 f (x (0) ) -f , b = 2σ 2 L n , e = 36G 2 L 2 c 2

and d = 4L.

The corollary gives guarantees for the averaged vector of parameters x, however in a decentralized setting it is very expensive and sometimes impossible to average all the parameters distributed across several machines, especially when the number of machines and the model size is large. We can get similar guarantees on the individual iterates x i as e.g. in (Assran et al., 2019) . We summarize these briefly below. Corollary A.7 (Convergence of local weights). Under the same setting as in Corollary A.6,

1 T + 1 T t=0 1 n n i=1 ∇f x (t) i 2 2 ≤ 8 2Lσ 2 n(T + 1) + 37 GLF 0 c(T + 1) 2 3 + 32LF 0 T + 1 Proof of Corollary A.7. 1 T + 1 T t=0 1 n n i=1 ∇f (x (t) i ) 2 2 ≤ 1 T + 1 T t=0 1 n n i=1 2 ∇f (x (t) i ) -∇f (x (t) ) 2 2 + 2 ∇f (x (t) ) 2 2 ≤ 1 T + 1 T t=0 1 n n i=1 2L 2 x (t) i -x (t) 2 2 + 2 ∇f (x (t) ) 2 2

where we used L-smoothness of f . Using Theorem A.3 and tuning the stepsize as in Lemma A.5 we get the statement of the corollary.

B USEFUL INEQUALITIES:

EQUATION

EQUATION

This inequality also holds for the sum of two matrices A, B ∈ R n×d in Frobenius norm.

C COMPRESSION SCHEMES:

We implement the compression schemes detailed below.

• gsgd b (Alistarh et al., 2017) . The unbiased gsgd b : R d → R d compression operator (for b > 1) is given as

gsgd b (x) := x 2 • sig(x) • 2 -(b-1) • 2 (b-1) |x| x 2 + u

where u ∼ u.a.r. [0, 1] d is a random dithering vector and sig(x) assigns the element-wise sign:

(sig(x)) i = 1 if (x) i ≥ 0 and (sig(x)) i = -1 if (x) i < 0.

As the value in the right bracket will be rounded to an integer in {0, . . . , 2 (b-1) -1}, each coordinate can be encoded with at most (b -1) + 1 bits (1 for the sign). For more efficent encoding schemes cf. Alistarh et al. (2017) .

A biased version is given as

gsgd b (x) := x 2 τ • sig(x) • 2 -(b-1) • 2 (b-1) |x| x 2 + u for τ = 1 + min d 2 2(b-1) , √ d 2 (b-1

) and is a δ = 1 τ compression operator (Koloskova et al., 2019) .

• random a (Wangni et al., 2018) . Let u ∈ {0, 1} d be a masking vector, sampled uniformly at random from the set {u ∈ {0, 1} d : u 1 = ad }. Then the unbiased random a : R d → R d operator is defined as

random a (x) := d ad • x u .

The biased version is given as

random a (x) := x u ,

and is a δ = a compression operator (Stich et al., 2018) .

Only 32 ad bits are required to send random a (x) to another node-all the values of non-zero entries (we assume that entries are represented as float32 numbers). Receiver can recover positions of these entries if it knows the random seed of uniform sampling operator used to select these entries. This random seed could be communicated once on preprocessing stage (before starting the algorithm). • top a (Alistarh et al., 2018; Stich et al., 2018) . The biased top a : R d → R d operator is defined as

top a (x) := x u(x) ,

where u(x) ∈ {0, 1} d , u 1 = ad is a masking vector with (u) i = 1 for indices i ∈ π -1 ({1, . . . , ad }) where the permutation π is such that (

x) π(1) ≥ (x) π(2) ≥ • • • ≥ (x) π(d) .

The top a operator is a δ = a compression operator (Stich et al., 2018) .

In the case of top a compression 2 • 32 ad bits are required because along with the values we need to send positions of these values. • sign (Bernstein et al., 2018; Karimireddy et al., 2019) . The biased (scaled) sign : R d → R compression operator is defined as

sign(x) := x 1 d • sgn(x) .

The sign operator is a δ = In total for the sign compression we need to send only d + 32 bits-one bit for every entry in x and 32 bits for x 1 .

D CHOCO-SGD WITH MOMENTUM:

Algorithm 2 demonstrates how to combine CHOCO-SGD with weight decay and momentum. Nesterov momentum can be analogously adapted for our decentralized setting.

E ERROR FEEDBACK INTERPRETATION OF CHOCO-SGD:

To better understand how does CHOCO-SGD work, we can interpret it as an error feedback algorithm (Stich et al., 2018; Karimireddy et al., 2019; Stich & Karimireddy, 2019) . We can equivalently rewrite CHOCO-SGD (Algorithm 1) as Algorithm 4. The common feature of error feedback algorithms is that quantization errors are saved into the internal memory, which is added to the compressed value at the next iteration. In CHOCO-SGD the value we want to transmit is the difference

x (t) i -x (t-1) i

, which represents the evolution of local variable x i at step t. Before compressing this value on line 4, the internal memory is added on line 3 to correct for the errors. Then, on line 5 internal memory is updated. Note that m 

F DETAILED EXPERIMENTAL SETUP AND TUNED HYPERPARAMETERS:

We precise the procedure of model training as well as the hyper-parameter tuning in this section.

Social Network Setup. For the comparison we consider CHOCO-SGD with sign compression (this combination achieved the compromise between accuracy and compression level in Table 1 )), decentralized SGD without compression, and centralized SGD without compression. We train two models, firstly ResNet20 (He et al., 2016) (0.27 million parameters) for image classification on the Cifar10 dataset (50K/10K training/test samples) (Krizhevsky, 2012) and secondly, a three-layer LSTM architecture (Hochreiter & Schmidhuber, 1997) (28.95 million parameters) for a language modeling task on WikiText-2 (600 training and 60 validation articles with a total of 2 088 628 and 217 646 tokens respectively) (Merity et al., 2016) . For the language modeling task, we borrowed and adapted the general experimental setup of Merity et al. (2017) , where we use a three-layer LSTM with hidden dimension of size 650. The loss is averaged over all examples and timesteps. The BPTT length is set to 30. We fine-tune the value of gradient clipping (0.4), and the dropout (0.4) is only applied on the output of LSTM.

We train both of ResNet20 and LSTM for 300 epochs, unless mentioned specifically. The per node mini-batch size is 32 for both datasets. The momentum (with factor 0.9) is only applied on the ResNet20 training.

Social Network and a Datacenter details. For all algorithms, we gradually warmup (Goyal et al., 2017) the learning rate from a relative small value (0.1) to the fine-tuned initial learning rate for the first 5 training epochs. During the training procedure, the tuned initial learning rate is decayed by the factor of 10 when accessing 50% and 75% of the total training epochs. The learning rate is tuned by finding the optimal initial learning rate (after the scaling).

The optimal η is searched in a pre-defined grid and we ensure that the best performance was contained in the middle of the grids. For example, if the best performance was ever at one of the extremes of the grid, we would try new grid points. Same searching logic applies to the consensus stepsize. We estimate the runtime information (depicted in Figure 5 ) of different methods from three trials of the evaluation on Google Cloud (Kubernetes Engine). More precisely, we create the cluster on 

:

Tang et al. (2018) only consider absolute bounds on the quantization error. Such bounds might be restrictive (i.e. allowing only for low compression) when the input vectors are unbounded. This might be the reason for the instabilities observed here and also in(Tang et al.,

2018, Fig. 4),(Koloskova et al., 2019, Figs. 5-6).

The figure reports the transmitted data on the busiest node, i.e on the max-degree node (degree 14) node for decentralized schemes, and degree

for the centralized one.

We estimate the consensus stepsize by running CHOCO-SGD with different values for the first 3 epochs.

Centralized SGD with full precision gradients achieved test accuracy of 76.37%, v.s. 76.03% for centralized SGD (with sign compression), v.s. 74.92% for plain decentralized SGD, and vs. 75.15% for CHOCO-SGD (with sign compression).

We consider undirected communication, contrary to the directed 1-peer communication (every node sends and receives one message at every iteration) inAssran et al. (2019).

Figures and Tables:

Figure 1: Scaling of CHOCO-SGD with sign compression to large number of devices on Cifar10 dataset. Left: best testing accuracy of the algorithms reached after 300 epochs. Right: best testing accuracy reached after communicating 1000 MB.

Figure 2: Image classification: ResNet-20 on CIFAR-10 on social network topology.

Figure 4: Parameter deviations for Resnet20 trained on Cifar10 (using CHOCO-SGD) on social network topology (32 workers). (Left) performance of the averaged model compared to the average of performances of local models. (Right) parameters divergence: averaged L2 consensus distance between local models xi and the averaged model x = 1 n

Karimireddy et al., 2019).

i in the old notation.Algorithm 4 CHOCO-SGD(Koloskova et al., 2019) as Error Feedback input: Initial values x (0) i ∈ R d on each node i ∈ [n], consensus stepsize γ, SGD stepsize η, communication graph G = ([n], E) and mixing matrix W , initialize x

Figure 8: Training LSTM on WikiText2 with decentralized algorithm on a real world social network topology. The topology has 32 nodes and we assume each node can only access a disjoint subset of the whole dataset. The local mini-batch size is 32.

Top-1 test accuracy for decentralized DCD, ECD, DeepSqueeze and CHOCO-SGD with different compression schemes. Reported top-1 test accuracies are averaged over three runs with fine-tuned hyperparameters (learning rate, weight decay, consensus stepsize). The fine-tuned all-reduce baseline reaches accuracy 92.64, with 1.04 MB gradient transmission per iteration. ( indicates that 2 out of 3 runs diverged).

Table content: <table><tr><td>Algorithm</td><td>Error-</td><td/><td colspan="2">Quantization (QSGD)</td><td/><td colspan="3">Sparsification (random-%)</td></tr><tr><td/><td>feedback</td><td>16 bits</td><td>8 bits</td><td>4 bits</td><td>2 bits</td><td>50%</td><td>10%</td><td>1%</td></tr><tr><td colspan="2">transmitted data/iteration</td><td>0.52 MB</td><td>0.26 MB</td><td>0.13 MB</td><td>0.065 MB</td><td>1.04 MB</td><td>0.21 MB</td><td>0.031 MB</td></tr><tr><td>DCD-PSGD</td><td/><td colspan="3">92.51 ± 0.05 92.36 ± 0.28 23.56 ± 2.97</td><td>diverges</td><td>92.05 ± 0.25</td><td>diverges</td><td>diverges</td></tr><tr><td>ECD-PSGD</td><td/><td colspan="2">92.02 ± 0.14 59.11 ± 1.57</td><td>diverges</td><td>diverges</td><td>diverges</td><td>diverges</td><td>diverges</td></tr><tr><td>DeepSqueeze</td><td/><td colspan="4">92.27 ± 0.21 91.83 ± 0.35 91.47 ± 0.21 90.96 ± 0.19</td><td colspan="3">91.46 ± 0.09 90.96 ± 0.16 88.55 ± 0.11</td></tr><tr><td>CHOCO-SGD</td><td/><td colspan="4">92.34 ± 0.19 92.30 ± 0.08 91.92 ± 0.27 91.41 ± 0.11</td><td colspan="3">92.54 ± 0.26 91.87 ± 0.21 91.32 ± 0.17</td></tr><tr><td>Algorithm</td><td>Error-</td><td colspan="3">Sparsification (top-%)</td><td>Sign+Norm</td><td/><td/></tr><tr><td/><td>feedback</td><td>50%</td><td>10%</td><td>1%</td><td>-</td><td/><td/></tr><tr><td colspan="2">transmitted data/iteration</td><td>1.04 MB</td><td>0.21 MB</td><td>0.031 MB</td><td>0.032 MB</td><td/><td/></tr><tr><td>DCD-PSGD</td><td/><td colspan="3">92.40 ± 0.11 91.97 ± 0.14 89.79 ± 0.40</td><td>92.40 ± 0.14</td><td/><td/></tr><tr><td>ECD-PSGD</td><td/><td>17.03</td><td>16.78</td><td>18.03</td><td>diverges</td><td/><td/></tr><tr><td>DeepSqueeze</td><td/><td colspan="3">91.55 ± 0.28 91.31 ± 0.25 90.47 ± 0.17</td><td>91.38 ± 0.19</td><td/><td/></tr><tr><td>CHOCO-SGD</td><td/><td colspan="3">92.54 ± 0.26 92.29 ± 0.05 91.73 ± 0.11</td><td>92.46 ± 0.10</td><td/><td/></tr><tr><td colspan="7">6 USE CASE I: ON-DEVICE PEER-TO-PEER LEARNING</td><td/></tr></table>

Summary of communication topologies.

Table content: <table><tr><td>Topology</td><td/><td/><td colspan="2">spectral gap ρ</td><td/></tr><tr><td/><td>max. node degree</td><td colspan="4">n = 4 n = 16 n = 36 n = 64</td></tr><tr><td>ring</td><td>2</td><td>0.67</td><td>0.05</td><td>0.01</td><td>0.003</td></tr><tr><td>torus</td><td>4</td><td>0.67</td><td>0.4</td><td>0.2</td><td>0.12</td></tr><tr><td>fully-connected</td><td>d</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></table>

Summary of performance when training with the same epoch budget (as centralized SGD).

Table content: <table><tr><td colspan="3">Algorithm</td><td/><td/><td/><td/><td colspan="4">ResNet-20 (Fig. 2)</td><td/><td colspan="2">LSTM (Fig. 3)</td><td/></tr><tr><td/><td/><td/><td/><td/><td/><td>max. connections/node</td><td colspan="4">data/gradient top-1 test acc.</td><td colspan="4">data/gradient test perplexity</td></tr><tr><td colspan="4">Centralized SGD</td><td/><td/><td>32</td><td>1.04 MB</td><td/><td/><td>93.00</td><td colspan="2">110.43 MB</td><td>89.39</td><td/></tr><tr><td colspan="5">Exact Decentralized SGD</td><td/><td>14</td><td>1.04 MB</td><td/><td/><td>92.12</td><td colspan="2">110.43 MB</td><td>91.38</td><td/></tr><tr><td colspan="5">CHOCO-SGD (Sign + Norm)</td><td/><td>14</td><td colspan="2">0.032 MB</td><td/><td>91.80</td><td colspan="2">3.45 MB</td><td>86.58</td><td/></tr><tr><td>Test top-1 accuracy</td><td>60 70 80 90</td><td>0</td><td>50</td><td>100</td><td>150</td><td>200 Local model on whole data 250 Averaged model on whole data 300</td><td>Consensus distance</td><td>0 2 4 6 8</td><td>0</td><td>50 Consensus distance 100</td><td>150</td><td>200</td><td>250</td><td>300</td></tr><tr><td/><td/><td/><td/><td/><td colspan="2">Epoch</td><td/><td/><td/><td/><td>Epoch</td><td/><td/><td/></tr></table>

Resnet-50 on ImageNet-1k in the datacenter setting. The topology has 8 nodes (each accesses 4 GPUs). We use sign as the compression scheme, for CHOCO-SGD and Centralized SGD. For centralized SGD baseline without compression, we use all-reduce to aggregate the gradients; we use all-gather for centralized SGD with sign gradients quantization. The benefits of CHOCO-SGD can be further pronounced when scaling to more nodes.GPUs and each machine interconnected via 10Gbps Ethernet. Within one machine communication is fast and we rely on the local data parallelism to aggregate the gradients for the later gradients communication (over the machines). Between different machines we consider centralized (fully connected topology) and decentralized (ring topology) communication, with and without compressed communication (sign compression). Several methods categorized by communication schemes are evaluated: (i) centralized SGD (full-precision communication), (ii) error-feedback centralized SGD with compressed communications Karimireddy et al. (

Table content: <table><tr><td>Training loss</td><td>2 4 6</td><td>0</td><td>20</td><td>40</td><td>60 Centralized SGD Centralized SGD (Sign+Norm) 80 Decentralized SGD CHOCO (Sign+Norm)</td><td>Training loss</td><td>2 4 6</td><td>0</td><td>10000 20000 30000 40000 50000 Centralized SGD Centralized SGD (Sign+Norm) Decentralized SGD CHOCO (Sign+Norm)</td><td>Test top-1 accuracy</td><td>0 20 40 60 80</td><td>0</td><td>10000 20000 30000 40000 50000 Centralized SGD Centralized SGD (Sign+Norm) Decentralized SGD CHOCO (Sign+Norm)</td></tr><tr><td/><td/><td/><td/><td colspan="2">Epoch</td><td/><td/><td/><td>Time (s)</td><td/><td/><td/><td>Time (s)</td></tr><tr><td colspan="6">Figure 5: Large-scale training:</td><td/><td/><td/><td/><td/><td/><td/><td/></tr></table>

1: for t in 0 . . . T -1 do {in parallel for all workers i ∈ [n]} for neighbors j : {i, j} ∈ E (including {i} ∈ E) do

Table content: <table><tr><td>2:</td><td>x</td><td>(t) i := x</td><td colspan="2">(t-1 2 ) i</td><td colspan="3">+ γ j:{i,j}∈E w ij</td><td>x(t) j -</td><td>x(t) i</td><td>modified gossip averaging</td></tr><tr><td>3: 4: 5:</td><td colspan="6">v q m (t) i = x (t) i := Q(v (t) i -x (t) i ) (t-1) i (t+1) i = v (t) i -q (t) + m (t) i i</td><td/><td>compression memory update</td></tr><tr><td>6:</td><td/><td/><td/><td/><td/><td/><td/></tr><tr><td>7:</td><td/><td colspan="2">Send q</td><td colspan="3">(t) i and receive q (t) j</td><td/><td>communication</td></tr><tr><td>8:</td><td/><td>x(t+1)</td><td/><td colspan="2">(t) j +</td><td>x(t) j</td><td/><td>local update</td></tr><tr><td>9:</td><td colspan="2">end for</td><td/><td/><td/><td/><td/></tr><tr><td>10: 11:</td><td colspan="6">Sample ξ x (t+ 1 2 ) i := x (t) i , compute gradient g (t) i -ηg (t) i</td><td>(t)</td><td>(t) i , ξ i ) (t)</td><td>stochastic gradient update</td></tr><tr><td colspan="3">12: end for</td><td/><td/><td/><td/><td/></tr></table>

demonstrates the fine-tuned hpyerparameters of CHOCO-SGD for training ResNet-20 on Cifar10, while Table 6 reports our fine-tuned hpyerparameters of our baselines. Table5demonstrates the fine-tuned hpyerparameters of CHOCO-SGD for training ResNet-20/LSTM on a social network topology.

Table content: <table/>

Peer review (iclr2020):
This paper studies non-convex decentralized optimization with arbitrary communication compression. It is well motivated and well written. The authors consider CHOCO-SGD for non-convex decentralized optimization and establish the convergence result based on the compression ratio. This result does not rely on specific quantized method and main term in the upper bound matches with the centralized baseline. The authors also show CHOCO-SGD with momentum is effectiveness in practical. The experimental results on several benchmark datasets validate the algorithm achieves better performance than baselines Both of the theoretical and empirical results are convincing. I believe this paper is ready for publication. Minor comments: 1. It is prefer to present Algorithm 2 and 3 in the main text, since they are mentioned by the statement of Theorem 4.1 and used in experiments respectively. 2. Can you provide some theoretical guarantee of CHOCO-SGD with momentum?