stochastic distributed learning withgradient quantization ...stochastic distributed learning with...

36
Stochastic Distributed Learning with Gradient Quantization and Variance Reduction Samuel Horv´ ath 1 Dmitry Kovalev 1 Konstantin Mishchenko 1 Peter Richt´ arik 123 Sebastian U. Stich 4 Abstract We consider distributed optimization where the objective function is spread among different de- vices, each sending incremental model updates to a central server. To alleviate the communication bottleneck, recent work proposed various schemes to compress (e.g. quantize or sparsify) the gradi- ents, thereby introducing additional variance ω 1 that might slow down convergence. For strongly convex functions with condition number κ dis- tributed among n machines, we (i) give a scheme that converges in O((κ + κ ω n + ω) log(1/)) steps to a neighborhood of the optimal solution. For ob- jective functions with a finite-sum structure, each worker having less than m components, we (ii) present novel variance reduced schemes that con- verge in O((κ + κ ω n + ω + m) log(1/)) steps to arbitrary accuracy > 0. These are the first meth- ods that achieve linear convergence for arbitrary quantized updates. We also (iii) give analysis for the weakly convex and non-convex cases and (iv) verify in experiments that our novel variance reduced schemes are more efficient than the base- lines. 1. Introduction The training of large scale machine learning models poses many challenges that stem from the mere size of the avail- able training data. The data-parallel paradigm focuses on distributing the data across different compute notes, which operate in parallel on the data. Formally, we consider opti- mization problems distributed across n nodes of the form min xR d " f (x) := 1 n n X i=1 f i (x) # , (1) 1 King Abdullah University of Science and Technology, KSA 2 University of Edinburgh, UK 3 Moscow Institute of Physics and Technology, Russian Federation 4 ´ Ecole polytechnique f ´ ed´ erale de Lausanne, Switzerland. Correspondence to: Peter Richt ´ arik <[email protected]>. April 10, 2019 where f i : R d R for i =1,...,n are given as f i (x) := E ζ∼Di [F (x, ζ )] , (2) with F : R d × Ω R being a general loss function. The distributions D 1 ,..., D n can be different on every node, which means the functions f 1 ,...,f n can have completely different minimizers. This frameworks covers stochastic optimization (when either n =1 or all D i are identical) and empirical risk minimization (for e.g. when the D i ’s are discrete with disjoint support). We denote by x ? an optimal solution of (1), let f ? def = f (x ? ). 1.1. Quantization to Reduce Communication In typical computing architectures, communication is much slower than computation and the communication bottleneck between workers is a major limiting factor for many large scale applications (such as e.g. deep neural network train- ing), as reported in e.g. (Seide et al., 2014; Alistarh et al., 2017; Zhang et al., 2017; Lin et al., 2018). A possible rem- edy to tackle this issue are for instance approaches that focus on increasing the computation to communication ratio, such as increased mini-batch sizes (Goyal et al., 2017), defining local problems for each worker (Shamir et al., 2014; Reddi et al., 2016) or reducing the communication frequency (Mc- Donald et al., 2009; Zinkevich et al., 2010; You et al., 2017; Stich, 2018). A direction orthogonal to these approaches tries to reduce the size of the messages—typically gradient vectors—that are exchanged between the nodes (Seide et al., 2014; Strom, 2015; Alistarh et al., 2017; Wen et al., 2017; Grishchenko et al., 2018). These quantization techniques rely on (lossy) compression of the gradient vectors. In the simplest form, these schemes limit the number of bits that are used to rep- resent floating point numbers (Gupta et al., 2015; Na et al., 2017), reducing the size of a d-dimensional (gradient) vector by a constant factor. Random dithering approaches attain up to O( d) compression (Seide et al., 2014; Alistarh et al., 2017; Wen et al., 2017). The most aggressive schemes reach O(d) compression by only sending a constant number of bits per iteration (Suresh et al., 2017; Kone ˇ cn ´ y & Richt ´ arik, 2016; Alistarh et al., 2018; Stich et al., 2018). An alternative approach is not to compute the gradient and subsequently arXiv:1904.05115v1 [math.OC] 10 Apr 2019

Upload: others

Post on 07-Sep-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning withGradient Quantization and Variance Reduction

Samuel Horvath 1 Dmitry Kovalev 1 Konstantin Mishchenko 1 Peter Richtarik 1 2 3 Sebastian U. Stich 4

AbstractWe consider distributed optimization where theobjective function is spread among different de-vices, each sending incremental model updates toa central server. To alleviate the communicationbottleneck, recent work proposed various schemesto compress (e.g. quantize or sparsify) the gradi-ents, thereby introducing additional variance ω ≥1 that might slow down convergence. For stronglyconvex functions with condition number κ dis-tributed among n machines, we (i) give a schemethat converges inO((κ+κωn +ω) log(1/ε)) stepsto a neighborhood of the optimal solution. For ob-jective functions with a finite-sum structure, eachworker having less than m components, we (ii)present novel variance reduced schemes that con-verge in O((κ+ κωn +ω+m) log(1/ε)) steps toarbitrary accuracy ε > 0. These are the first meth-ods that achieve linear convergence for arbitraryquantized updates. We also (iii) give analysisfor the weakly convex and non-convex cases and(iv) verify in experiments that our novel variancereduced schemes are more efficient than the base-lines.

1. IntroductionThe training of large scale machine learning models posesmany challenges that stem from the mere size of the avail-able training data. The data-parallel paradigm focuses ondistributing the data across different compute notes, whichoperate in parallel on the data. Formally, we consider opti-mization problems distributed across n nodes of the form

minx∈Rd

[f(x) :=

1

n

n∑i=1

fi(x)

], (1)

1King Abdullah University of Science and Technology, KSA2University of Edinburgh, UK 3Moscow Institute of Physics andTechnology, Russian Federation 4Ecole polytechnique federalede Lausanne, Switzerland. Correspondence to: Peter Richtarik<[email protected]>.

April 10, 2019

where fi : Rd → R for i = 1, . . . , n are given as

fi(x) := Eζ∼Di[F (x, ζ)] , (2)

with F : Rd × Ω → R being a general loss function. Thedistributions D1, . . . ,Dn can be different on every node,which means the functions f1, . . . , fn can have completelydifferent minimizers. This frameworks covers stochasticoptimization (when either n = 1 or all Di are identical)and empirical risk minimization (for e.g. when the Di’s arediscrete with disjoint support). We denote by x? an optimalsolution of (1), let f? def

= f(x?).

1.1. Quantization to Reduce Communication

In typical computing architectures, communication is muchslower than computation and the communication bottleneckbetween workers is a major limiting factor for many largescale applications (such as e.g. deep neural network train-ing), as reported in e.g. (Seide et al., 2014; Alistarh et al.,2017; Zhang et al., 2017; Lin et al., 2018). A possible rem-edy to tackle this issue are for instance approaches that focuson increasing the computation to communication ratio, suchas increased mini-batch sizes (Goyal et al., 2017), defininglocal problems for each worker (Shamir et al., 2014; Reddiet al., 2016) or reducing the communication frequency (Mc-Donald et al., 2009; Zinkevich et al., 2010; You et al., 2017;Stich, 2018).

A direction orthogonal to these approaches tries to reducethe size of the messages—typically gradient vectors—thatare exchanged between the nodes (Seide et al., 2014; Strom,2015; Alistarh et al., 2017; Wen et al., 2017; Grishchenkoet al., 2018). These quantization techniques rely on (lossy)compression of the gradient vectors. In the simplest form,these schemes limit the number of bits that are used to rep-resent floating point numbers (Gupta et al., 2015; Na et al.,2017), reducing the size of a d-dimensional (gradient) vectorby a constant factor. Random dithering approaches attain upto O(

√d) compression (Seide et al., 2014; Alistarh et al.,

2017; Wen et al., 2017). The most aggressive schemes reachO(d) compression by only sending a constant number ofbits per iteration (Suresh et al., 2017; Konecny & Richtarik,2016; Alistarh et al., 2018; Stich et al., 2018). An alternativeapproach is not to compute the gradient and subsequently

arX

iv:1

904.

0511

5v1

[m

ath.

OC

] 1

0 A

pr 2

019

Page 2: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

compress it, but to update a subset of elements of the iteratex using coordinate descent type updates (Richtarik & Takac,2016; Fercoq et al., 2014; Mishchenko et al., 2019).

Recently, Mishchenko et al. (2018) proposed the firstmethod that successfully applies the gradient quantizationtechnique to the distributed optimization problem (1) with anon-smooth regularizer.

1.2. Contributions

We now briefly outline the key contributions of our work:

General compression. We generalize the method presentedin (Mishchenko et al., 2018) allowing for arbitrary compres-sion (e.g., quantization and sparsification) operators. Ouranalysis is tight, i.e. we recover their convergence rates as aspecial case. Our more general approach allows to choosefreely the compression operators that perform best on theavailable system resources and can thus offer gains in train-ing time over the previous method that is tied to a singleclass of operators.

Variance reduction. We present several variance reducedextensions of our methods for distributed training. In par-ticular, and in contrast to (Mishchenko et al., 2018), ourmethods converge to the optimum and not merely to a neigh-borhood, without any loss in convergence rate. The quan-tized SVRG method of Alistarh et al. (2017) did not onlyrely on a specific compression scheme, but also on exactcommunication from time to time (epoch gradients), bothrestrictions been overcome here.

Convex and non-convex problems. We provide conciseconvergence analysis for our novel schemes for the strongly-convex, the (weakly) convex and non-convex setting. Ouranalysis recovers the respective rates of earlier schemeswithout communication compression and shows that com-pression can provide huge benefits when communication isa bottleneck.

Experiments. We compare the novel variance reducedschemes with various baselines. In the experiments weleverage the flexibility of our approach—allowing to freelychose a quantization scheme with optimal parameters—anddemonstrate on par performance with the baselines in termsof iterations, but considerable savings in terms of total com-munication cost.

2. Related WorkGradient compression schemes have successfully been usedin many implementations as a heuristic to reduce commu-nication cost, such as for instance in 1BitSGD (Seide et al.,2014; Strom, 2015) that rounds the gradient components toeither -1 or 1, and error feedback schemes aim at reducingquantization errors among iterations, for instance as in (Lin

et al., 2018). In the discussion below we focus in particularon schemes that enjoy theoretical convergence guarantees.

2.1. Quantization and Sparsification

A class of very common quantization operators is based onrandom dithering (Goodall, 1951; Roberts, 1962) and canbe described as the random operators Q : Rd → Rd,

Q(x) = sign(x) · ‖x‖p ·1

s·⌊s|x|‖x‖p

+ ξ

⌋(3)

for random variable ξ ∼u.a.r. [0, 1]d, parameter p ≥ 1,and s ∈ N+, denoting the levels of the rounding. Itsunbiasedness property, Eξ [Q(x)] = x, ∀x ∈ Rd, is themain catalyst of the theoretical analyses. The quantiza-tion (3) was for instance used in QSGD for p = 2 (Alistarhet al., 2017), in TernGrad for s = 1 and p = ∞ (Wenet al., 2017) or for general p ≥ 1 and s = 1 in DI-ANA (Mishchenko et al., 2018). For p = 2 the expectedsparsity is Eξ [‖Q(x)‖0] = O(s(s +

√d)) (Alistarh et al.,

2017) and encoding a nonzero coordinate of Q(x) requiresO(log(s)) bits.

Much sparser vectors can be obtained by random sparsi-fication techniques that randomly mask the input vectorsand only preserve a constant number of coordinates (Sureshet al., 2017; Konecny & Richtarik, 2016; Wangni et al.,2018; Stich et al., 2018). Experimentally is has beenshown that deterministic masking—for instance selectingthe largest components in absolute value (Dryden et al.,2016; Aji & Heafield, 2017)—can outperform the randomtechniques. However, as these schemes are biased, theyresisted careful analysis until very recently (Alistarh et al.,2018; Stich et al., 2018). We will not further distinguish be-tween sparsification and quantization approaches, and referto both of these compression schemes them as ‘quantization’in the following.

Also schemes with error compensation techniques have re-cently been successfully vanquished, for instance for unbi-ased quantization on quadratic functions (Wu et al., 2018)and for unbiased and biased quantization on strongly convexfunctions (Stich et al., 2018). These schemes suffer muchless from large quantization errors, and can tolerate highervariance (both in practice an theory) than the methods abovewithout error compensation.

2.2. Quantization in Distributed Learning

In centralized approaches, all nodes communicate with acentral node (parameter sever) that coordinates the opti-mization process. An algorithm of specific interest to solveproblem (1) is mini-batch SGD (Dekel et al., 2012; Takacet al., 2013), a parallel version of stochastic gradient de-scent (SGD) (Robbins & Monro, 1951; Nemirovski et al.,2009). In mini-batch SGD, full gradient vectors have to be

Page 3: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

communicated to the central node and hence it is natural toincorporate gradient compression to reduce the cost of thecommunication rounds. Khirirat et al. (2018) study quanti-zation in the deterministic setting, i.e. when the gradients∇fi(x) can be computed without noise, and show that paral-lel gradient descent with unbiased quantization converges toa neighborhood of the optimal solution on strongly convexfunctions. Mishchenko et al. (2018) consider the stochasticsetting as in (1) and show convergence of SGD with unbi-ased quantization to a neighborhood of a stationary pointfor non-convex and strongly convex functions; the analysisin (Wu et al., 2018) only applies to quadratic functions. Themethod of Stich et al. (2018) can also be parallelized asshown by Cordonnier (2018) and converges to the exactsolution on strongly convex functions.

Decentralized methods do not require communication witha centralized node. Tang et al. (2018) consider unbiasedquantization and show convergence to the neighborhood ofa stationary point on non-convex functions under very rigidassumptions on the quantization, i.e. allowing only O(1)compression, Koloskova et al. (2019) relax those constraintsbut only consider strongly convex functions.

2.3. Quantization and Variance Reduction

Variance reduced methods (Roux et al., 2012; Johnson &Zhang, 2013; Shalev-Shwartz & Zhang, 2013; Defazio et al.,2014; Qu et al., 2015; Shalev-Shwartz, 2016; Qu et al., 2016;Csiba & Richtarik, 2015; Csiba et al., 2015; Nguyen et al.,2017; Gower et al., 2018; Zhou, 2018) admit linear conver-gence on empirical risk minimization problems, surpassingthe rate of vanilla SGD (Bottou, 2010). Alistarh et al. (2017)proposed a quantized version of SVRG (Johnson & Zhang,2013), but the proposed scheme relies on broadcasting exact(unbiased) gradients every epoch. This restriction has beenovercome in (Kunstner, 2017) but only for high-precisionquantization. Here we alleviate these restrictions and presentquantization not only for SVRG but also for SAGA (Defazioet al., 2014). Our analysis also supports a version of SVRGwhose epoch lengths are not fixed, but random, similar ase.g. in (Lei & Jordan, 2017; Hannah et al., 2018). Our baseversion (denoted as L-SVRG) is slightly different and in-spired by observations made in (Hofmann et al., 2015; Raj& Stich, 2018) and following closely (Kovalev et al., 2019).

2.4. Orthogonal Approaches

There are other approaches aiming to reduce the communi-cation cost, such as increased mini-batch sizes (Goyal et al.,2017), defining local problems for each worker (Shamiret al., 2014; Jaggi et al., 2014; Ma et al., 2015; Reddiet al., 2016; Ma et al., 2017), reducing the communica-tion frequency (McDonald et al., 2009; Zinkevich et al.,2010; You et al., 2017; Stich, 2018) or distributing along

features (Richtarik & Takac, 2016; Fercoq et al., 2014).However, we are not considering such approaches here.

3. General DefinitionsDefinition 1 (µ-strong convexity). A differentiable functionf : Rd → R is µ-strongly convex for µ > 0, if for allx, y ∈ Rd

f(y) ≥ f(x) + 〈∇f(x), y − x〉+µ

2‖x− y‖22 . (4)

Definition 2 (L-smoothness). A differentiable functionf : Rd → R is L-smooth for L > 0, if for all x, y ∈ Rd

f(y) ≤ f(x) + 〈∇f(x), y − x〉+L

2‖x− y‖22 . (5)

Definition 3. The prox operator proxγR : Rd → Rd isdefined as

proxγR(x) = argminy∈Rd

γR(y) +

1

2‖y − x‖22

,

for γ > 0 and a closed convex regularizer R : Rd → R ∪∞.

4. Quantization OperatorsOur analysis depends on a general notion of quantizationoperators with bounded variance.

Definition 4 (ω-quantization). A random operatorQ : Rd → Rd with the properties

EQ [Q(x)] = x , EQ[‖Q(x)‖22

]≤ (ω + 1)‖x‖22 , (6)

for all x ∈ Rd is a ω-quantization operator. Here EQ [·]denotes the expectation over the (internal) randomness ofQ.

Remark 1. As E[‖X − E [X]‖22

]= E

[‖X‖22

]−‖E [X]‖22

for any random vector X , equation (6) implies

EQ[‖Q(x)− x‖22

]≤ ω‖x‖22 . (7)

For instance, we see that ω = 0 implies Q(x) = x.

Remark 2. Besides the variance bound, Definition 4 doesnot impose any further restrictions on Q(x). However, forall applications it is advisable to consider operators Q thatachieve a considerable compression, i.e. Q(x) should becheaper to encode than x.

We will now give examples of a few ω-quantization opera-tors that also achieve compression, either by quantizationtechniques, or by enforcing sparsity (cf. Sec. 2.1).

Example 1 (random dithering). The operator given in (3)satisfies (6) for ω(x) := 2 +

‖x‖1‖x‖ps‖x‖22

for every fixed x ∈

Page 4: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Rd, and ω(x) is a function monotonically decreasing in p.Moreover,

ω = O(d1/p + d1/2

s

)for p ≥ 1, s ≥ 1 and all x ∈ Rd.

For p = 2 this bound was proven by Alistarh et al. (2017).Here we generalize the analysis to arbitrary p ≥ 1.

Proof. In view of (3) we have

EQ[‖Q(x)‖22

]=‖x‖2ps2

d∑i=1

`2i (1− pi) + (`i + 1)2pi︸ ︷︷ ︸≤`2i+(2`i+1)pi

for integers `i ≤ s|xi|/‖x‖p ≤ `i + 1 and probabilitiespi = s|xi|/‖x‖p − `i ≤ s|xi|/‖x‖p. Therefore,

EQ[‖Q(x)‖22

]≤‖x‖2ps2

d∑i=1

(`2i + (2`i + 1)

s|xi|‖x‖p

)

≤‖x‖2ps2

(s2‖x‖22‖x‖2p

+ 2s2‖x‖22‖x‖2p

+ s‖x‖1‖x‖p

)as `i ≤ s|xi|/‖x‖p. This proves the bound on ω(w).By Holder’s inequality ‖x‖1 ≤ d1/2‖x‖2 and ‖x‖p ≤d1/p−1/2‖x‖2 for 1 ≤ p ≤ 2 and for p ≥ 2 the in-equality ‖x‖p ≤ ‖x‖2 imply the upper bound on ω forall x ∈ Rd.

Example 2 (random sparsifiction). The random sparsifi-cation operator Q(x) = d

r · ξ ⊗ x for random variableξ ∼u.a.r. y ∈ 0, 1d : ‖y‖0 = r and sparsity parameterr ∈ N+ is a ω = d

r − 1 quantization operator.

For a proof see e.g. (Stich et al., 2018, Lemma A.1).Example 3 (block quantization). The vector x ∈ Rd is firstsplit into t blocks and then each block vi is quantized usingrandom dithering with p = 2, s = 1. If every block has thesame size d/t, then this gives a quantization operator withω =

√d/t+ 1, otherwise ω = maxi∈[t]

√|vi|+ 1.

Block quantization was e.g. used in (Alistarh et al., 2017)and is also implemented (in a similar fashion) in the CNTKtoolkit (Seide & Agarwal, 2016). The proofs of the claimedbounds can be found in (Mishchenko et al., 2018).

5. DIANA with Arbitrary QuantizationWe are now ready to present the first algorithm and its theo-retical properties. In this section we consider the regularizedproblem (1):

minx∈Rd

[f(x) +R(x) :=

1

n

n∑i=1

fi(x) +R(x)

], (8)

where R : Rd → R ∪ +∞ denotes a closed convex regu-larizer.

5.1. DIANA

Algorithm 1 is identical to the DIANA algorithmin (Mishchenko et al., 2018). However, we allow for arbi-trary ω-quantization operators, whereas Mishchenko et al.(2018) consider random dithering quantization operators (3)with p ≥ 1 and s = 1 only.

In Algorithm 1, each worker i = 1, . . . , n queries the oracleand computes an unbiased stochastic gradient gki in iterationk, i.e. E

[gki | xk

]= ∇fi(xk). A naıve approach would

be to directly send the quantized gradients, Q(gki ), to themaster node. However, this simple scheme does not onlyintroduce a lot of noise (for instance, even at the optimalsolution x? ∈ Rd the norms of the stochastic gradientsdo not vanish), but also does in general not converge fornontrivial regularizers R 6≡ 0. Instead, in Algorithm 1 eachworker maintains a state hki ∈ Rd and quantizes only thedifference gki − hki instead. If (and this we show below)hki converges to ∇fi(x?) for (k → ∞), the variance ofthe quantization can be massively reduced compared to thenaıve scheme. Both the worker and the master node updatehki based on the transmitted (quantized) vector ∆k

i ∈ Rd.Note that the quantization operator Q should be chosen sothat the transmission of ∆k

i requires significantly less bitsthan the transmission of the full d-dimensional vector.

5.2. Convergence of Algorithm 1

We make the following technical assumptions:

Assumption 1. In problem (8) we assume each fi : Rd →R to be µ-strongly convex and L-smooth. We assume thateach gki in Algorithm 1 has bounded variance

E[‖gki −∇fi(xk)‖22

]≤ σ2

i , ∀k ≥ 0, i = 1, . . . , n (9)

for constants σi ≤ ∞, σ2 := 1n

∑ni=1 σ

2i .

The main theorem of this section, presented next, estab-lishes linear convergence of Algorithm 1 with arbitrary ω-quantization schemes.

Theorem 1. Consider Algorithm 1 with ω-quantization Qand stepsize α ≤ 1

ω+1 . Define the Lyapunov function

Ψk := ‖xk − x?‖22 +cγ2

n

n∑i=1

‖hki −∇fi(x?)‖22

for c ≥ 4ωαn and assume γ ≤ 2

(µ+L)(1+ 2ωn +cα)

and γ ≤ α2µ .

Then under Assumption 1:

E[Ψk]≤ (1− γµ)kΨ0 +

2

µ(µ+ L)σ2 . (10)

Page 5: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Algorithm 1 DIANA with arbitrary unbiased quantization

Input: learning rates α > 0, and γ > 0, initial vectorsx0, h01, . . . , h

0n and h0 = 1

n

∑ni=1 h

0i

1 for k = 0, 1, . . . do2 broadcast xk to all workers3 for i = 1, . . . , n do in parallel . worker side4 sample gki such that E

[gki | xk

]= ∇fi(xk)

5 ∆ki = gki − hki

6 ∆ki = Q(∆k

i )

7 hk+1i = hki + α∆k

i

8 gki = hki + ∆ki

9 end10 qk = 1

n

∑ni=1 ∆k

i . gather quantized updates11 gk = 1

n

∑ni=1 g

ki

12 xk+1 = proxγR(xk − γgk)

13 hk+1 = 1n

∑ni=1 h

k+1i

14 end

Corollary 1. Let c = 4ωαn , α = 1

ω+1 and γ =

min

2(µ+L)(1+ 6ω

n ), 12µ(ω+1)

. Furthermore, define κ =

L+µ2µ . Then the conditions of Theorem 1 are satisfied and

the leading term in the iteration complexity bound is

1

γµ= κ+ κ

n+ 2(ω + 1) .

Remark 3. For the special case of quantization (3) in arbi-trary p-norms and s = 1, this result recovers (Mishchenkoet al., 2018) up to small differences in the constants.

6. Variance Reduction for Quantized UpdatesWe now move to the main contribution of this paper andpresent variance reduced methods with quantized gradientupdates. In this section we assume that each component fiof f in (1) has finite-sum structure:

fi(x) =1

m

m∑j=1

fij(x) , (11)

The assumption that the number of components m is thesame for all functions fi is made for simplicity only.1 Ascan seen from (10), one of the main disadvantages of Al-gorithm 1 is the fact that we can only guarantee linear con-vergence to a 2

µ(µ+L)σ2

n -neighborhood of the optimal solu-tion. In particular, the size of the neighborhood depends

1This may seem limiting, but if this was not the case our analy-sis would still hold, but instead of m, we would have maxi∈[n]mi

appearing in the rates, where mi is the number of functions onthe i-th machine. This suggests that we would like to have thefunctions distributed equally on the machines.

Algorithm 2 VR-DIANA based on L-SVRG (Variant 1),SAGA (Variant 2)

Input: learning rates α > 0 and γ > 0, initial vectorsx0, h01, . . . , h

0n, h0 = 1

n

∑ni=1 h

0i

1 for k = 0, 1, . . . do2 sample random . only for Variant 1

3 uk =

1, with probability 1

m

0, with probability 1− 1m

4 broadcast xk, uk to all workers5 for i = 1, . . . , n do in parallel . worker side6 pick random jki ∼u.a.r. [m]

7 µki = 1m

m∑j=1

∇fij(wkij)

8 gki = ∇fijki (xk)−∇fijki (wkijki

) + µki

9 ∆ki = Q(gki − hki )

10 hk+1i = hki + α∆k

i

11 for j = 1, . . . ,m do. Variant 1 (L-SVRG): update epochgradient if uk = 1

12 wk+1ij =

xk, if uk = 1

wkij , if uk = 0

. Variant 2 (SAGA): update gradient table

13 wk+1ij =

xk, j = jkiwkij , j 6= jki

14 end15 end

16 hk+1 =hk+ αn

n∑i=1

∆ki . gather quantized updates

17 gk = 1n

n∑i=1

(∆ki + hki )

18 xk+1 = xk − γgk19 end

on the size of σ2, which measures the average variance ofthe stochastic gradients gki across the workers i ∈ [n]. Incontrast, variance reduced methods converge linearly forarbitrary accuracy ε > 0.

6.1. The main challenge

Let us recall that the variance reduced method SVRG (John-son & Zhang, 2013) computes the full gradient∇f(x) in ev-ery epoch. To achieve this in the distributed setting (1), eachworker i must compute the gradient ∇fi(x) and send thisvector (exactly) either to the master node or broadcast it toall other workers. It might be tempting to replace this expen-sive communication step with quantized gradients instead,i.e. to rely on the aggregate yQ := 1

n

∑ni=1Q(∇fi(x)) in-

Page 6: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

stead. However, the error ‖yQ −∇f(x)‖ can be arbitrarilylarge (e.g. it will even not vanish for x = x?) and this simplescheme does not achieve variance reduction (cf. also thediscussion in (Kunstner, 2017)). Our approach to tackle thisproblem is via the quantization of gradient differences. Sim-ilarly to the previous section, we propose that each workermaintains a state hki ∈ Rd, and only quantizes gradient dif-ferences; for instance update hk+1

i = hki +Q(hki −∇fi(x))(we assume this for ease of exposition, the actual scheme isslightly different). We can now set hk = 1

n

∑ni=1 h

ki , which

turns out to be a much more robust estimator of∇f(x). Bymeans of proving that ‖hki −∇fi(x?)‖ → 0 for (k →∞)we are able to derive the first variance reduced method thatonly exchanges quantized gradient updates among workers.

6.2. Three new algorithms

We propose in total three variance reduced algorithms,which are derived from either SAGA (displayed in Algo-rithm 2, Variant 2), SVRG (Algorithm 3 provided in theappendix) and L-SVRG (Algorithm 2, Variant 1), a variantof SVRG with random epoch length and described in (Ko-valev et al., 2019). We prove global linear convergence inthe strongly convex case and O(1/k) convergence in con-vex and non-convex cases. Moreover, our analysis is verygeneral in the sense that the original complexity results forall three algorithms can be obtained by setting ω = 1 (noquantization).

Comments on Algorithm 2. In analogy to Algorithm 1,each node maintains a state hki ∈ Rd that aims to reduce thevariance introduced by the quantized communication. Incontrast to the variance reduced method in (Alistarh et al.,2017) that required the communication of the uncompressedgradients for every iteration of the inner loop (SVRG basedscheme), here we communicate only quantized vectors.

Each worker i = 1, . . . , n computes its stochastic gradientgki in iteration k by the formula given by the specific vari-ance reduction type (SVRG, SAGA, L-SVRG), such thatE[gki | xk

]= ∇fi(xk). Subsequently, the DIANA scheme

is applied. Each worker in Algorithms 2 and 3 maintains astate hki ∈ Rd and quantizes only the difference gki − hki .This quantized vector ∆k

i is then sent to the master nodewhich in turn updates its local copy of hki . Thus both the i-thworker and the master node have access to hki even though ithas never been transmitted in full (but instead incrementallyconstructed from the ∆k

i ’s).

The algorithm based on SAGA maintains on each workera table of gradients, ∇fij(wkij) (so the computation ofµki on line 7 can efficiently be implemented). The algo-rithms based on SAGA just need to store the epoch gradi-ents 1

m

∑ni=1∇fij(wijk) that needs only to be recomputed

whenever the wkij’s change. Which is either after a fixed

number of steps in SVRG, or after a random number ofsteps as in L-SVRG. These aspects of the algorithm are notspecific to quantization and we refer the readers to e.g. (Raj& Stich, 2018) for a more detailed exposition.

7. Convergence of VR-DIANA (Algorithm 2)We make the following technical assumptions (out of whichonly the first one is shared among all theorems in this sec-tion):

Assumption 2. In problem (1) assume the finite-sum struc-ture (11) for each fi. Further assume each functionfij : Rd → R to be L-smooth.

Assumption 3. Assume each function fi : Rd → R to beµ-strongly convex, µ > 0 and each fij : Rd → R to beconvex.

Assumption 4. Assume each function fij : Rd → R to beconvex.

We are now ready to proceed with the main theorems.

7.1. Strongly convex case

Theorem 2 (Strongly convex case). Consider Algorithm 2with ω-quantization Q, and step size α ≤ 1

ω+1 . For

b = 4(ω+1)αn2 , c = 16(ω+1)

αn2 , γ = 1L(1+36(ω+1)/n) , define

the Lyapunov function

ψk = ‖xk − x?‖22 + bγ2Hk + cγ2Dk ,

where

Hk =

n∑i=1

‖hki −∇fi(x?)‖22 ,

and

Dk =

n∑i=1

m∑j=1

‖∇fij(wkij)−∇fij(x?)‖22 .

Then under Assumption 2 and 3

E[ψk+1

]≤ (1− ρ)ψk,

where ρdef= min

µ

L(1+36ω+1n )

, α2 ,3

8m

and the expectation

is conditioned on the previous iterate.

Corollary 2. Let α = 1ω+1 . To achieve pre-

cision E[‖xk − x?‖22

]≤ εψ0 VR-DIANA needs

O((κ+ κωn +m+ ω) log 1

ε

)iterations.

Remark 4. We would like to mention that even we do notconsider the regularized problem in the second part, usingour analysis, one can easily extend our result to non-smoothregularizer just by exploiting non-expansiveness of the prox-imal operator.

Page 7: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Algorithm ωConvergence rate Convergence rate Communicationstrongly convex non-convex cost per iter.

VR without1 O (κ+m) O

(m2/3

ε

)O(dn)quantization

VR with random √d O

(κ+ κ

√dn +m+

√d)O((√

dn

)1/2m2/3

ε

)O(n√d)dithering (p = 2, s = 1)

VR with random dr O

(κ+ κ dn +m+ d

)O(

d√nm2/3

ε

)O(n)sparsification (r = const)

VR withn O (κ+m+ n) O

(m2/3

ε

)O(n2)block quantization (t = d/n2)

Table 1. This table compares variance reduced methods with different levels of quantization. The O notation omits log 1/ε factors andwe assume ω ≤ m (ω ≤ m2/3 for non-convex case) for ease of presentation. For block quantization (last row), the convergence rate isidentical to the method without quantization (first row) but the savings in communication is at least d/n, assuming d ≥ n. (in number oftotal coordinates, here we did for simplicity not consider further savings that the random dithering approach offers in terms of less bitsper coordinate). This table shows that quantization is meaningful and can provide huge benefits, especially when communication is abottleneck.

Recall that variance reduced methods (such as SAGA orSVRG) converge at rate O(κ + m) in this setting (cf. Ta-ble 1). The additional variance of the quantization operatorenters the convergence rate in two ways: firstly, (i), as an ad-ditive component. However, in large scale machine learningapplications the number of data samplesm on each machineis expected to be huge. Thus this additive component affectsthe rate only mildly. Secondly, (ii), and more severely, asa multiplicative component κωn . However, we see that thisfactor is discounted by n, the number of workers. Thus bychoosing a quantization operator with ω = O(n), this termcan be controlled. In summary, by choosing a quantizationoperator with ω = O(minn,m), the rate of VR-DIANAbecomes identical to the convergence rate of the vanilla vari-ance reduced schemes without quantization. This shows theimportance of algorithms that support arbitrary quantizationschemes and that do not depend on a specific quantizationscheme.

7.2. Convex case

Let us now look at the convergence under (standard) con-vexity assumption, that is, µ = 0. Then by taking output tobe some iterate xk with uniform probability instead of thelast iterate, one gets the following convergence rate.

Theorem 3 (Convex case). Let Assumptions 2 and 4 hold,then a randomly chosen iterate xa of Algorithm 2, i.e.xa ∼u.a.r. x0, x1, . . . , xk−1 satisfies

E [f(xa)− f?] ≤ ψ0

2k(γ − Lγ2

[1 + 36(ω+1)

n

]) ,where k denotes the number of iterations.

Corollary 3. Let γ = 1

2L√m(1+36ω+1

n ), b =

2(ω+1)αn2 , c = 6(ω+1)

n2 and α = 1ω+1 . To

achieve precision E [f(xa)− f?] ≤ ε VR-DIANA needs

O(

(1+ωn )√m+ ω√

m

ε

)iterations.

Here we see that along the quantization operator is chosento satisfy ω = O(minm,n) the convergence rate is notworsened compared to a scheme without quantization.

7.3. Non-convex case

Finally, convergence guarantee in the non-convex case isprovided by the following theorem.

Theorem 4. Let Assumption 2 hold. Moreover, let γ =1

10L(1+ωn )

1/2(m2/3+ω+1)

and α = 1ω+1 , then a randomly

chosen iterate xa ∼u.a.r. x0, x1, . . . , xk−1 of Algo-rithm 2 satisfies

E[‖∇f(xa)‖22

]≤

40(f(x0)− f?)L(1 + ω

n

)1/2(m2/3 + ω + 1)

k,

where k denotes the number of iterations.

Corollary 4. To achieve precision E[‖∇f(xa)‖22

]≤ ε

VR-DIANA needs O((

1 + ωn

)1/2 m2/3+ωε

)iterations.

As long as ω ≤ m2/3, the iteration complexity above isO(ω1/2) assuming the other terms are fixed. At the sametime, the communication complexity is proportional to thenumber of nonzeros, which for random dithering and ran-dom sparsification decreases as O(1/ω). Therefore, onecan trade-off iteration and communication complexities byusing quantization. Some of these trade-offs are mentionedin Table 1 above.

Page 8: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

0 50 100 150 200Time, minutes

10 11

10 9

10 7

10 5

10 3

10 1

f(xt )

f(x* )

QSVRGDiana-SVRGDiana-SAGADiana-LSVRGDiana-SGDADAM

(a) Real-sim, λ2 = 6 · 10−5

0 50 100 150 200Time, minutes

10 10

10 8

10 6

10 4

10 2

100

||xt

x||2

QSVRGDiana-SVRGDiana-SAGADiana-LSVRGDiana-SGDADAM

(b) Real-sim, λ2 = 6 · 10−5

Figure 1. Comparison of VR-DIANA, Diana-SGD, QSVRG and TernGrad-Adam with n = 12 workers on real-sim dataset, whose size is72309 and dimension d = 20598. We plot functional suboptimality on the left and distance from the optimum on the right. `∞ ditheringis used for every method except for QSVRG, which uses `2 dithering. We chose small value of λ2 for this dataset to give bigger advantageto sublinear rates of Diana-SGD and TernGrad-ADAM, however, they are still much small than linear rates of variance reduced methods.

0 20 40 60 80Data passes

10 11

10 8

10 5

10 2

101

f(x)

f*

10 2 1

10 1 1

0.5 1

2 1

(a) SAGA

0 10 20 30 40 50 60Data passes

10 11

10 8

10 5

10 2

101

f(x)

f*

10 2 1

10 1 1

0.5 1

2 1

(b) SVRG

0 10 20 30 40 50 60Data passes

10 15

10 12

10 9

10 6

10 3

100

f(x)

f*

10 2 1

10 1 1

0.5 1

2 1

(c) L-SVRG

Figure 2. Comparison of VR methods with different parameter α for solving the Gisette dataset with block size 2000, `2-penaltyλ2 = 2 · 10−1, and `2 random dithering.

8. ExperimentsWe illustrate the performance of the considered methodson standard logistic regression problems for binary clas-sification. We regularize the loss with `2-penalty, so thefull objective is log(1 + exp(−bijA>ijx)) + λ2

2 ‖x‖22, where

Aij , bij are data points and λ2 is the regularization parame-ter. This problem is attractive because some of the methodsto which we want to compare do not have convergenceguarantees for non-convex or non-smooth objective. λ2 isset to be of order 1/(nm). The datasets used are from theLIBSVM library (Chang & Lin, 2011).

We implement all methods in Python using MPI4PY (Dalcinet al., 2011) for collective communication operations. Werun all experiments on a machine with 24 Intel(R) Xeon(R)Gold 6146 CPU @ 3.20GHz cores. The cores are con-nected to two sockets, 12 cores to each of them, and we runworkers and the parameter server on different cores. Thecommunication is done either using 32- or 64-bit numbers,so the convergence is correspondingly up to precision 10−8

or 10−16 in different experiments.

To have a trade-off between communication and iterationcomplexities, we use in most experiments the block quanti-zation scheme with block sizes equal n2, and in one addi-tional experiments we explore what changes under differentblock sizes. We analyze the effect of changing the parameterα over different values in Figure 2 and find out that it is veryeasy to tune, and in most cases the speed of convergence isroughly the same unless α is set too close to 1 or to 0. Forinstance, we see almost no difference between choosing anyelement of 10−2, 10−3, 5 · 10−4 when ω−1 = 2 · 10−2,although for tiny values the convergence becomes muchslower. For more detailed consideration of block sizes andchoices of α on a larger dataset see Figure 5.

We also provide a comparison between most relevant quan-tization method: QSVRG (Alistarh et al., 2017), TernGrad-Adam and Diana (Mishchenko et al., 2018) in Figure 3.Since TernGrad-Adam was the slowest in our experiments,we provide it only in Figure 1.

Page 9: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

0 2 4 6 8 10Time, seconds

10 15

10 11

10 7

10 3

f(xt )

f(x* )

QSVRGDiana-SVRGDiana-SAGADiana-LSVRGDiana-SGD

(a) Mushrooms,λ2 = 6 · 10−4

0 20 40 60Time, seconds

10 15

10 11

10 7

10 3

f(xt )

f(x* )

QSVRGDiana-SVRGDiana-SAGADiana-LSVRGDiana-SGD

(b) Mushrooms,λ2 = 6 ·10−5

0 1 2 3 4 5Time, seconds

10 7

10 5

10 3

10 1

f(xt )

f(x* )

QSVRGDiana-SVRGDiana-SAGADiana-LSVRGDiana-SGD

(c) a5a,λ2 = 5 · 10−4

0 10 20 30 40Time, seconds

10 7

10 5

10 3

10 1

f(xt )

f(x* )

QSVRGDiana-SVRGDiana-SAGADiana-LSVRGDiana-SGD

(d) a5a,λ2 = 5 · 10−5

0 10000 20000 30000 40000Iteration

10 20

10 15

10 10

10 5

100

||xt

x||2

QSVRGDiana-SVRGDiana-SAGADiana-LSVRGDiana-SGD

(e) Mushrooms,λ2 = 6 ·10−4

0 50000100000150000200000250000Iteration

10 17

10 14

10 11

10 8

10 5

10 2||x

tx

||2

QSVRGDiana-SVRGDiana-SAGADiana-LSVRGDiana-SGD

(f) Mushrooms,λ2 = 6 · 10−5

0 5000 10000 15000 20000Iteration

10 6

10 4

10 2

100

||xt

x||2

QSVRGDiana-SVRGDiana-SAGADiana-LSVRGDiana-SGD

(g) a5a,λ2 = 5 · 10−4

0 100000 200000 300000Iteration

10 6

10 4

10 2

100

||xt

x||2

QSVRGDiana-SVRGDiana-SAGADiana-LSVRGDiana-SGD

(h) a5a,λ2 = 5 · 10−5

Figure 3. Comparison of VR-DIANA and Diana-SGD against QSVRG (Alistarh et al., 2017) on mushrooms (the first two columns) anda5a datasets (the last two columns). Plots in the first row show functional suboptimality over time and in the second row are the distancesto the solution over iterations.

9. ConclusionIn this work we analyzed various distributed algorithms thatsupport quantized communication between worker nodes.Our analysis is general, that is, not bound to a specificquantization scheme. This fact is especially interesting aswe have showed that by choosing the quantization operator(respectively the introduced noise) in the right way, weobtain communication efficient schemes that converge asfast as their communication intensive counterparts. Wedevelop the first variance reduced methods that supportquantized communication and derive concise convergencerates for the strongly-convex, the convex and the non-convexsetting.

Acknowledgments

The authors would like to thank Xun Qian for the carefulchecking of the proofs and for spotting several typos in theanalysis.

ReferencesAji, A. F. and Heafield, K. Sparse communication for distributed

gradient descent. In Proceedings of the 2017 Conference onEmpirical Methods in Natural Language Processing, pp. 440–445. Association for Computational Linguistics, 2017.

Alistarh, D., Grubic, D., Li, J., Tomioka, R., and Vojnovic, M.QSGD: Communication-efficient SGD via gradient quantiza-tion and encoding. In Guyon, I., Luxburg, U. V., Bengio, S.,Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R.(eds.), Advances in Neural Information Processing Systems 30,pp. 1709–1720. Curran Associates, Inc., 2017.

Alistarh, D., Hoefler, T., Johansson, M., Konstantinov, N., Khirirat,

S., and Renggli, C. The convergence of sparsified gradientmethods. In Bengio, S., Wallach, H., Larochelle, H., Grauman,K., Cesa-Bianchi, N., and Garnett, R. (eds.), Advances in NeuralInformation Processing Systems 31, pp. 5977–5987. CurranAssociates, Inc., 2018.

Bottou, L. Large-scale machine learning with stochastic gradientdescent. In Lechevallier, Y. and Saporta, G. (eds.), Proceedingsof COMPSTAT’2010, pp. 177–186, Heidelberg, 2010. Physica-Verlag HD. ISBN 978-3-7908-2604-3.

Chang, C.-C. and Lin, C.-J. LIBSVM: A library for supportvector machines. ACM Transactions on Intelligent Systemsand Technology, 2:27:1–27:27, 2011. Software available athttp://www.csie.ntu.edu.tw/˜cjlin/libsvm.

Cordonnier, J.-B. Convex optimization using sparsified stochasticgradient descent with memory. Master thesis (adv: S. u. stich,m. jaggi), EPFL, 2018.

Csiba, D. and Richtarik, P. Primal method for ERMwith flexible mini-batching schemes and non-convex losses.arXiv:1506.02227, 2015.

Csiba, D., Qu, Z., and Richtarik, P. Stochastic dual coordinateascent with adaptive probabilities. In Proceedings of the 32ndInternational Conference on Machine Learning, pp. 674–683,2015.

Dalcin, L. D., Paz, R. R., Kler, P. A., and Cosimo, A. Parallel dis-tributed computing using python. Advances in Water Resources,34(9):1124–1139, 2011.

Defazio, A., Bach, F., and Lacoste-Julien, S. Saga: A fast incre-mental gradient method with support for non-strongly convexcomposite objectives. In Ghahramani, Z., Welling, M., Cortes,C., Lawrence, N. D., and Weinberger, K. Q. (eds.), Advancesin Neural Information Processing Systems 27, pp. 1646–1654.Curran Associates, Inc., 2014.

Page 10: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Dekel, O., Gilad-Bachrach, R., Shamir, O., and Xiao, L. Optimaldistributed online prediction using mini-batches. J. Mach. Learn.Res., 13(1):165–202, January 2012. ISSN 1532-4435.

Dryden, N., Moon, T., Jacobs, S. A., and Essen, B. V. Com-munication quantization for data-parallel training of deep neu-ral networks. In 2016 2nd Workshop on Machine Learningin HPC Environments (MLHPC), pp. 1–8, Nov 2016. doi:10.1109/MLHPC.2016.004.

Fercoq, O., Qu, Z., Richtarik, P., and Takac, M. Fast distributedcoordinate descent for minimizing non-strongly convex losses.IEEE International Workshop on Machine Learning for SignalProcessing, 2014.

Goodall, W. M. Television by pulse code modulation. The BellSystem Technical Journal, 30(1):33–49, Jan 1951. ISSN 0005-8580. doi: 10.1002/j.1538-7305.1951.tb01365.x.

Gower, R. M., Richtarik, P., and Bach, F. Stochastic quasi-gradient methods: variance reduction via Jacobian sketching.arXiv:1805.02632, 2018.

Goyal, P., Dollar, P., Girshick, R. B., Noordhuis, P., Wesolowski,L., Kyrola, A., Tulloch, A., Jia, Y., and He, K. Accurate,large minibatch SGD: training ImageNet in 1 hour. CoRR,abs/1706.02677, 2017.

Grishchenko, D., Iutzeler, F., Malick, J., and Amini, M.-R. Asyn-chronous distributed learning with sparse communications andidentification. arXiv preprint arXiv:1812.03871, 2018.

Gupta, S., Agrawal, A., Gopalakrishnan, K., and Narayanan, P.Deep learning with limited numerical precision. In Proceed-ings of the 32Nd International Conference on InternationalConference on Machine Learning - Volume 37, ICML’15, pp.1737–1746. JMLR.org, 2015.

Hannah, R., Liu, Y., O’Connor, D., and Yin, W. Breaking thespan assumption yields fast finite-sum minimization. In Bengio,S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi,N., and Garnett, R. (eds.), Advances in Neural InformationProcessing Systems 31, pp. 2318–2327. Curran Associates, Inc.,2018.

Hofmann, T., Lucchi, A., Lacoste-Julien, S., and McWilliams, B.Variance reduced stochastic gradient descent with neighbors. InCortes, C., Lawrence, N. D., Lee, D. D., Sugiyama, M., andGarnett, R. (eds.), Advances in Neural Information ProcessingSystems 28, pp. 2305–2313. Curran Associates, Inc., 2015.

Jaggi, M., Smith, V., Takac, M., Terhorst, J., Krishnan,S., Hofmann, T., and Jordan, M. I. Communication-efficient distributed dual coordinate ascent. In Ad-vances in Neural Information Processing Systems 27,2014. URL http://papers.nips.cc/paper/4937-accelerating-stochastic-gradient-descent-using-predictive-variance-reduction.pdf.

Johnson, R. and Zhang, T. Accelerating stochastic gradient descentusing predictive variance reduction. In Burges, C. J. C., Bottou,L., Welling, M., Ghahramani, Z., and Weinberger, K. Q. (eds.),Advances in Neural Information Processing Systems 26, pp.315–323. Curran Associates, Inc., 2013.

Khirirat, S., Feyzmahdavian, H. R., and Johansson, M. Distributedlearning with compressed gradients. CoRR, abs/1806.06573,2018.

Koloskova, A., Stich, S. U., and Jaggi, M. Decentralized stochasticoptimization and gossip algorithms with compressed communi-cation. arXiv:1902.00340, 2019.

Konecny, J. and Richtarik, P. Randomized distributed mean esti-mation: accuracy vs communication. arXiv:1611.07555, 2016.

Kovalev, D., Horvath, S., and Richtarik, P. Don’t jump throughhoops and remove those loops: Svrg and katyusha are betterwithout the outer loop. arXiv:1901.08689, 2019.

Kunstner, F. Fully quantized distributed gradient descent. Semesterproject, (Adv: S. U. Stich, M. Jaggi), EPFL, 2017.

Lei, L. and Jordan, M. Less than a Single Pass: StochasticallyControlled Stochastic Gradient. In Singh, A. and Zhu, J. (eds.),Proceedings of the 20th International Conference on ArtificialIntelligence and Statistics, volume 54 of Proceedings of Ma-chine Learning Research, pp. 148–156, Fort Lauderdale, FL,USA, 20–22 Apr 2017. PMLR.

Li, H., Meng, H. M., Ma, B., Chng, E., and Xie, L. (eds.). IN-TERSPEECH 2015, 16th Annual Conference of the Interna-tional Speech Communication Association, Dresden, Germany,September 6-10, 2015, 2015. ISCA.

Lin, Y., Han, S., Mao, H., Wang, Y., and Dally, B. Deep gradientcompression: Reducing the communication bandwidth for dis-tributed training. In ICLR 2018 - International Conference onLearning Representations, 2018.

Ma, C., Smith, V., Jaggi, M., Jordan, M. I., Richtarik, P., and Takac,M. Adding vs. averaging in distributed primal-dual optimization.In The 32nd International Conference on Machine Learning,pp. 1973–1982, 2015.

Ma, C., Konecny, J., Jaggi, M., Smith, V., Jordan, M. I., Richtarik,P., and Takac, M. Distributed optimization with arbitrary localsolvers. Optimization Methods and Software, 32(4):813–848,2017.

McDonald, R., Mohri, M., Silberman, N., Walker, D., and Mann,G. S. Efficient large-scale distributed training of conditionalmaximum entropy models. In Bengio, Y., Schuurmans, D., Laf-ferty, J. D., Williams, C. K. I., and Culotta, A. (eds.), Advancesin Neural Information Processing Systems 22, pp. 1231–1239.Curran Associates, Inc., 2009.

Mishchenko, K., Gorbunov, E., Takac, M., and Richtarik, P.Distributed learning with compressed gradient differences.Manuscript, October 2018, 2018.

Mishchenko, K., Hanzely, F., and Richtarik, P. 99% of paral-lel optimization is inevitably a waste of time. arXiv preprintarXiv:1901.09437, 2019.

Na, T., Ko, J. H., Kung, J., and Mukhopadhyay, S. On-chiptraining of recurrent neural networks with limited numericalprecision. In 2017 International Joint Conference on NeuralNetworks (IJCNN), pp. 3716–3723, May 2017. doi: 10.1109/IJCNN.2017.7966324.

Nemirovski, A., Juditsky, A., Lan, G., and Shapiro, A. Robuststochastic approximation approach to stochastic programming.SIAM Journal on Optimization, 19(4):1574–1609, 2009.

Page 11: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Nguyen, L. M., Liu, J., Scheinberg, K., and Takac, M. SARAH: Anovel method for machine learning problems using stochasticrecursive gradient. In International Conference on MachineLearning, pp. 2613–2621, 2017.

Qu, Z., Richtarik, P., and Zhang, T. Quartz: Randomized dual co-ordinate ascent with arbitrary sampling. In Advances in NeuralInformation Processing Systems 28, pp. 865–873, 2015.

Qu, Z., Richtarik, P., Takac, M., and Fercoq, O. SDNA: Stochasticdual Newton ascent for empirical risk minimization. In The 33rdInternational Conference on Machine Learning, pp. 1823–1832,2016.

Raj, A. and Stich, S. U. SVRG meets SAGA: k-SVRG — a taleof limited memory. Technical Report, pp. arXiv:1805.09767,2018.

Reddi, S. J., Konecny, J., Richtarik, P., Poczos, B., and Smola,A. J. AIDE: Fast and communication efficient distributed opti-mization. CoRR, abs/1608.06879, 2016.

Richtarik, P. and Takac, M. Distributed coordinate descent methodfor learning with big data. Journal of Machine Learning Re-search, 17(75):1–25, 2016.

Robbins, H. and Monro, S. A Stochastic Approximation Method.The Annals of Mathematical Statistics, 22(3):400–407, Septem-ber 1951.

Roberts, L. Picture coding using pseudo-random noise. IRETransactions on Information Theory, 8(2):145–154, February1962. ISSN 0096-1000. doi: 10.1109/TIT.1962.1057702.

Roux, N. L., Schmidt, M., and Bach, F. R. A stochastic gradientmethod with an exponential convergence rate for finite trainingsets. In Pereira, F., Burges, C. J. C., Bottou, L., and Weinberger,K. Q. (eds.), Advances in Neural Information Processing Sys-tems 25, pp. 2663–2671. Curran Associates, Inc., 2012.

Seide, F. and Agarwal, A. CNTK: Microsoft’s open-source deep-learning toolkit. In Proceedings of the 22nd ACM SIGKDDInternational Conference on Knowledge Discovery and DataMining, pp. 2135–2135. ACM, 2016.

Seide, F., Fu, H., Droppo, J., Li, G., and Yu, D. 1-bit stochasticgradient descent and its application to data-parallel distributedtraining of speech DNNs. In Li et al. (2015), pp. 1058–1062.

Shalev-Shwartz, S. SDCA without duality, regularization, andindividual convexity. In Proceedings of The 33rd InternationalConference on Machine Learning, volume 48, pp. 747–754,2016.

Shalev-Shwartz, S. and Zhang, T. Stochastic dual coordinateascent methods for regularized loss. J. Mach. Learn. Res., 14(1):567–599, February 2013. ISSN 1532-4435.

Shamir, O., Srebro, N., and Zhang, T. Communication-efficientdistributed optimization using an approximate Newton-typemethod. In Xing, E. P. and Jebara, T. (eds.), Proceedings of the31st International Conference on Machine Learning, volume 32of Proceedings of Machine Learning Research, pp. 1000–1008,Bejing, China, 2014. PMLR.

Stich, S. U. Local SGD converges fast and communicates little.CoRR, abs/1805.09767, 2018.

Stich, S. U., Cordonnier, J.-B., and Jaggi, M. Sparsified SGD withmemory. In Bengio, S., Wallach, H., Larochelle, H., Grauman,K., Cesa-Bianchi, N., and Garnett, R. (eds.), Advances in NeuralInformation Processing Systems 31, pp. 4452–4463. CurranAssociates, Inc., 2018.

Strom, N. Scalable distributed DNN training using commodityGPU cloud computing. In Li et al. (2015), pp. 1488–1492.

Suresh, A. T., Yu, F. X., Kumar, S., and McMahan, H. B. Dis-tributed mean estimation with limited communication. In Pro-ceedings of the 34th International Conference on MachineLearning, 2017.

Takac, M., Bijral, A., Richtarik, P., and Srebro, N. Mini-batchprimal and dual methods for SVMs. In 30th InternationalConference on Machine Learning, pp. 537–552, 2013.

Tang, H., Gan, S., Zhang, C., Zhang, T., and Liu, J. Communi-cation compression for decentralized training. In Bengio, S.,Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi, N.,and Garnett, R. (eds.), Advances in Neural Information Pro-cessing Systems 31, pp. 7663–7673. Curran Associates, Inc.,2018.

Wangni, J., Wang, J., Liu, J., and Zhang, T. Gradient sparsificationfor communication-efficient distributed optimization. In Bengio,S., Wallach, H., Larochelle, H., Grauman, K., Cesa-Bianchi,N., and Garnett, R. (eds.), Advances in Neural InformationProcessing Systems 31, pp. 1306–1316. Curran Associates, Inc.,2018.

Wen, W., Xu, C., Yan, F., Wu, C., Wang, Y., Chen, Y., and Li,H. TernGrad: Ternary gradients to reduce communication indistributed deep learning. In Guyon, I., Luxburg, U. V., Bengio,S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R.(eds.), Advances in Neural Information Processing Systems 30,pp. 1509–1519. Curran Associates, Inc., 2017.

Wu, J., Huang, W., Huang, J., and Zhang, T. Error compensatedquantized SGD and its applications to large-scale distributedoptimization. In Dy, J. and Krause, A. (eds.), Proceedings of the35th International Conference on Machine Learning, volume 80of Proceedings of Machine Learning Research, pp. 5325–5333,Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018. PMLR.

You, Y., Zhang, Z., Demmel, J., Keutzer, K., and Hsieh, C.-J. Ima-geNet training in 24 minutes. arXiv preprint arXiv:1709.05011,2017.

Zhang, H., Li, J., Kara, K., Alistarh, D., Liu, J., and Zhang, C.ZipML: Training linear models with end-to-end low precision,and a little bit of deep learning. In Precup, D. and Teh, Y. W.(eds.), Proceedings of the 34th International Conference on Ma-chine Learning, volume 70 of Proceedings of Machine Learn-ing Research, pp. 4035–4043, International Convention Centre,Sydney, Australia, 06–11 Aug 2017. PMLR.

Zhou, K. Direct acceleration of SAGA using sampled negativemomentum. arXiv preprint arXiv:1806.11048, 2018.

Zinkevich, M., Weimer, M., Li, L., and Smola, A. J. Parallelizedstochastic gradient descent. In Lafferty, J. D., Williams, C. K. I.,Shawe-Taylor, J., Zemel, R. S., and Culotta, A. (eds.), Advancesin Neural Information Processing Systems 23, pp. 2595–2603.Curran Associates, Inc., 2010.

Page 12: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

A. Extra Experiments

0 10 20 30 40Time, seconds

10 15

10 12

10 9

10 6

10 3

100

f(x)

f*

Block size 40Block size 100Block size 400Block size 1000Block size 5000

(a) `∞, λ2 = 2 · 10−1

0 25 50 75 100 125 150Time, seconds

10 15

10 12

10 9

10 6

10 3

100

f(x)

f*

Block size 40Block size 100Block size 400Block size 1000Block size 5000

(b) `∞, λ2 = 2 · 10−2

0 20 40 60 80Data passes

10 15

10 12

10 9

10 6

10 3

100

f(x)

f*

Block size 40Block size 100Block size 400Block size 1000Block size 5000

(c) `∞, λ2 = 2 · 10−1

0 50 100 150 200 250 300Data passes

10 15

10 12

10 9

10 6

10 3

100

f(x)

f*

Block size 40Block size 100Block size 400Block size 1000Block size 5000

(d) `∞, λ2 = 2 · 10−2

0 20 40 60 80 100 120 140Time, seconds

10 15

10 12

10 9

10 6

10 3

100

f(x)

f*

Block size 40Block size 100Block size 1000Block size 5000

(e) `2, λ2 = 2 · 10−1

0 100 200 300 400 500 600Time, seconds

10 15

10 12

10 9

10 6

10 3

100

f(x)

f*

Block size 40Block size 100Block size 1000Block size 5000

(f) `2, λ2 = 2 · 10−2

0 20 40 60 80 100 120Data passes

10 15

10 12

10 9

10 6

10 3

100

f(x)

f*

Block size 40Block size 100Block size 1000Block size 5000

(g) `2, λ2 = 2 · 10−1

0 50 100 150 200 250 300Data passes

10 15

10 12

10 9

10 6

10 3

100

f(x)

f*

Block size 40Block size 100Block size 1000Block size 5000

(h) `2, λ2 = 2 · 10−2

Figure 4. Experiments with Diana-SVRG and different block sizes applied to the Gisette dataset (d = 5000) with n = 20 workers. In thefirst two columns we show convergence over time and in the last two we show convergence over epochs. We used 1-bit random ditheringwith `∞ (first row) and `2 norm and found out that even quantization with full vector quantization often does not slow down iterationcomplexity, but helps significantly with communication time. At the same time, `2 dithering is noisier and yields a more significantimpact of the block sizes on the iteration complexity. For each line in the plots, an optimal stepsize was found and we found out thatlarger block sizes require slightly smaller steps in case of `2 random dithering. In all cases, we chose α to be 1

2ω, where ω was computed

using the block size.

40 100 1000 2000 5000Block size

1e-4

1e-3

1e-2

1e-1

6.9e-06 9.5e-06 1.3e-05 1.4e-05 1.8e-05

1.3e-07 2.4e-07 1.8e-07 2.6e-07 2e-07

9.1e-08 3.6e-07 2.3e-07 2.9e-07 4.8e-07

1.8e-07 2e-07 2.6e-07 2.4e-07 3.8e-07

(a) SVRG

40 100 1000 2000 5000Block size

1e-4

1e-3

1e-2

1e-1

5.6e-06 7.1e-06 1.1e-05 1.1e-05 1.3e-05

1.4e-07 9.1e-08 8.7e-08 9.5e-08 1.1e-07

7.3e-08 7e-08 9.5e-08 9.5e-08 9.4e-08

2.5e-07 2e-07 2.4e-07 2.6e-07 3.1e-07

(b) SAGA

40 100 1000 2000 5000Block size

1e-4

1e-3

1e-2

1e-1

7.8e-06 9.4e-06 1.5e-05 1.6e-05 1.8e-05

8.6e-09 3.9e-09 5.3e-09 8.8e-09 8.8e-09

1.6e-08 9.2e-09 3.8e-09 7.1e-09 2.2e-08

1.1e-08 9.1e-09 1.9e-08 8.1e-09 6.2e-09

(c) L-SVRG

Figure 5. Functional gap after 20 epochs over the Gisette dataset (d = 5000) with Diana-VR and different combinations of block sizesand α with n = 20 workers. The same (optimal) stepsize is used in all cases with `∞ random dithering. For each cell, we average theresults over 3 runs with the same parameters as the final accuracy is random. The best iteration performance is achieved using smallblocks as expected, and the value of α does not matter much unless chosen too far from 1

ω+1. The values of 1

ω+1for the columns from

the left to the right approximately are 0.14, 0.09, 0.03, 0.02, 0.01.

Page 13: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

B. Notation TableTo enhance the readers convenience when navigating to the extensive appendix, we here reiterate our notation:

GeneralE [.] ,EQ [.] Expectation, Expectation over Quantization

µ Strong convexity constant (4)L Smoothness constant (5)κ condition number of problem l/µd Dimension of x in f(x)n Number of function in finite sumf Objective to be minimized over set Rd (1), (8)

Q(x) Quantization operator (7)ω Quantization parameter (7)

prox Proximal operatorx? Global minimizer of ff? function value in optimum x?

R Regularizer (8)General Diana

σi’s constants, upper bound on variance (9)α, γ parameters/ step sizes Alg. 1Ψk Lyapunov function Thm. 1c parameter of Lyapunov function Thm. 1

VR-Dianaα, γ Parameters/ step sizes Alg. 2m number of functions on each node (11)ψk Lyapunov function for strongly convex case and convex case Thm. 2

Hk, Dk Elements of Lyapunov function ψk Thm. 2b, c Parameters of Lyapunov function ψk Thm. 2Rk Lyapunov function for non-convex case Thm. 5

F k,W k Elements of Lyapunov function Rk Thm. 5ck, dk Parameters of Lyapunov function ψk Thm. 5

SVRG-Dianaα, γ Parameters/ step sizes Alg. 3m number of functions on each node (11)l Outer loop length for Algorithm 3 Alg. 3

prl−1r=0 coefficients for the reference point zs Alg. 3

ψk Lyapunov function for strongly convex case and convex case Thm. 6Hk Element of Lyapunov function ψk (37)b Parameter of Lyapunov function ψk (38)Rk Lyapunov function for non-convex case Thm. 8

F k,W k Elements of Lyapunov function Rk Thm. 8

Table 2. Summary of frequently used notation.

Page 14: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

C. Basic Identities and InequalitiesFor random variable X and any y ∈ Rd, the variance can be decomposed as

E[‖X − E [X]‖22

]= E

[‖X − y‖22

]− E

[‖E [X]− y‖22

]. (12)

For any vectors a1, a2, . . . , ak ∈ Rd, we have as a consequence of Jensen’s inequality:∥∥∥∥∥k∑i=1

ai

∥∥∥∥∥2

2

≤ kk∑i=1

‖ai‖22 . (13)

For any independent random variables X1, X2, · · · , Xn ∈ Rd we have

E

[‖ 1

n

n∑i=1

(Xi − E [Xi])‖22

]=

1

n2

n∑i=1

E[‖Xi − E [Xi]‖22

](14)

For a L-smooth and µ-strongly convex function f : Rd → R we have

〈∇f(x)−∇f(y), x− y〉 ≥ µL

µ+ L‖x− y‖22 +

1

µ+ L‖∇f(x)−∇f(y)‖22 , ∀x, y ∈ Rd . (15)

For µ-strongly convex function f : Rd → R we have

〈∇f(x)−∇f(y), x− y〉 ≥ µ‖x− y‖22 , ∀x, y ∈ Rd . (16)

The prox operator of a closed convex function is non-expansive. That is, for γ > 0,

‖proxγR(x)− proxγR(y)‖ ≤ ‖x− y‖ , ∀x, y ∈ Rd . (17)

Throughout the whole appendix we use conditional expectation E[X|xk, hki

]for DIANA and E

[X|xk, hki , wkij

]for VR-

DIANA and E[X|xk, hki , zs

]for SVRG-DIANA, but for simplicity, we will denote these expectations as E [X ]. If E [X ]

refers to unconditional expectation, it is directly mentioned.

D. DIANA with general quantization operators, Proof of Theorem 1Lemma 1. For all iterations k ≥ 0 of Algorithm 1 it holds

EQ[gk]

= gk :=1

n

n∑i=1

gki , EQ[‖gk − gk‖22

]≤ ω

n2

n∑i=1

‖∆ki ‖22 , E

[gk]

= ∇f(xk) . (18)

Furthermore, for h? = ∇f(x?), h?i := ∇fi(x?)

E[‖gk − h?‖22

]≤(

1 +2ω

n

)1

n

n∑i=1

E[‖∇fi(xk)− h?i ‖22

]+ (1 + ω)

σ2

n+

n2

n∑i=1

E[‖h?i − hki ‖22

]. (19)

Proof. The first equation in (18) follows from the unbiasedness of the quantization operator. By the contraction property (7)we have

EQ[‖gki − gki ‖22

]≤ ω‖∆k

i ‖22 ,

for every i = 1, . . . , n and the second relation in (18) follows from independence of gk1 , . . . , gkn. The last equality in (18)

follows from the assumption that each gki is an unbiased estimate of∇fi(xk).

Page 15: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

By applying two times the identity E[‖X − y‖22

]= E

[‖X − E [X]‖22

]+ E

[‖E [X]− y‖22

]for random variable X and

y ∈ Rd, we get

E[‖gk − h?‖22

] (12)= E

[‖gk − gk‖22

]+ E

[‖gk − h?‖22

](12)= E

[‖gk − gk‖22

]+ E

[‖gk −∇f(xk)‖22

]+ E

[‖∇f(xk)− h?‖22

]and thus

E[‖gk − h?‖22

] (9)+(18)≤ ω

n2

n∑i=1

E[‖∆k

i ‖22]

+σ2

n+ E

[‖∇f(xk)− h?‖22

]. (20)

Note that

‖∇f(xk)− h?‖22 ≤1

n

n∑i=1

‖∇fi(xk)− h?i ‖22 ,

by Jensen’s inequality. Further,

E[‖∆k

i ‖22]

= E[‖gki − hki ‖22

] (12)= E

[‖∇fi(xk)− hki ‖22

]+ E

[‖∇fi(xk)− gki ‖22

](9)≤ E

[‖∇fi(xk)− hki ‖22

]+ σ2

i

(13)≤ 2E

[‖∇fi(xk)− h?i ‖22

]+ 2E

[‖h?i − hki ‖22

]+ σ2

i .

By summing up these bounds and plugging the result into (20), equation (19) follows.

Lemma 2. Let α(ω + 1) ≤ 1. For i = 1, . . . , n, we can upper bound the second moment of hk+1i as

EQ[‖hk+1

i − h?i ‖22]≤ (1− α)‖hki − h?i ‖22 + α‖∇fi(xk)− h?i ‖22 + ασ2

i . (21)

Proof. Since hk+1i = hki + α∆k

i we can decompose

EQ[‖hk+1

i − h?i ‖22]

= EQ

[‖α∆k

i + (hki − h?i )‖22]

= ‖hki − h?i ‖22 + 2EQ

[⟨α∆k

i , hki − h?i

⟩]+ EQ

[‖α∆k

i ‖22]

(6)≤ ‖hki − h?i ‖22 + 2

⟨α∆k

i , hki − h?i

⟩+ α2(ω + 1)‖∆k

i ‖22.

Let plug in the bound (ω + 1)α ≤ 1 and continue the derivation:

EQ[‖hk+1

i − h?i ‖22]≤ ‖hki − h?i ‖22 + 2

⟨α∆k

i , hki − h?i

⟩+ α‖∆k

i ‖22= ‖hki − h?i ‖22 + α

⟨gki − hki , gki + hki − 2h?i

⟩= ‖hki − h?i ‖22 + α‖gki − h?i ‖22 − α‖hki − h?i ‖22≤ (1− α)‖hki − h?i ‖22 + α‖gki − h?i ‖22.

The second term can be further upper-bounded by ‖∇fi(xk)− h?i ‖22 + σ2i , where we use (12), which concludes the proof.

Proof of Theorem 1. If x? is a solution of (1), then x? = proxγR(x? − γh?) (for γ > 0. Using this identity together withthe non-expansiveness of the prox operator we can bound the first term of the Lyapunov function:

E[‖xk+1 − x?‖22

]= E

[‖proxγR(xk − γgk)− proxγR(x? − γh?)‖22

]≤ E

[‖xk − γgk − (x? − γh?))‖22

]= E

[‖xk − x?‖22

]− 2γE

[⟨gk − h?, xk − x?

⟩]+ γ2E

[‖gk − h?‖22

]= E

[‖xk − x?‖22

]− 2γ

⟨∇f(xk)− h?, xk − x?

⟩+ γ2E

[‖gk − h?‖22

].

Page 16: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

It is high time to use strong convexity of each component fi:

E[⟨∇f(xk)− h?, xk − x?

⟩]=

1

n

n∑i=1

E[⟨∇fi(xk)− h?i , xk − x?

⟩](15)≥ 1

n

n∑i=1

(µL

µ+ LE[‖xk − x?‖22

]+

1

µ+ LE[‖∇fi(xk)− h?i ‖22

])

=µL

µ+ LE[‖xk − x?‖22

]+

1

µ+ L

1

n

n∑i=1

E[‖∇fi(xk)− h?i ‖22

].

Hence,

E[‖xk+1 − x?‖22

]≤(

1− 2γµL

µ+ L

)E[‖xk − x?‖22

]− 2γ

µ+ L

1

n

n∑i=1

E[‖∇fi(xk)− h?i ‖22

]+ γ2E

[‖gk − h?‖22

]and by Lemma 1:

E[‖xk+1 − x?‖22

] (19)≤(

1− 2γµL

µ+ L

)E[‖xk − x?‖22

]+

(γ2(

1 +2ω

n

)− 2γ

µ+ L

)1

n

n∑i=1

E[‖∇fi(xk)− h?i ‖22

]+ γ2 (1 + ω)

σ2

n+

(γ2

n

)1

n

n∑i=1

E[‖hki − h?i ‖22

].

(22)

Now let us consider the Lyapunov function:

E[Ψk+1

] (21)+(22)≤

(1− 2γµL

µ+ L

)E[‖xk − x?‖22

]+ γ2 (1 + ω)

σ2

n

+

(γ2(

1 +2ω

n+ cα

)− 2γ

µ+ L

)1

n

n∑i=1

E[‖∇fi(xk)− h?i ‖22

]+ γ2

(2ω

n+ (1− α)c

)1

n

n∑i=1

‖hki − h?i ‖22 + γ2cασ2 .

(23)

In view of the assumption on γ we have γ2(1 + 2ω

n + cα)− 2γ

µ+L ≤ 0. Since each fi is µ-strongly convex, we have

µ‖xk − x?‖22(16)≤⟨∇fi(xk)− h?i , xk − x?

⟩and thus µ2‖xk − x?‖22 ≤ ‖∇fi(xk) − h?i ‖22 with Cauchy-Schwarz. Using

these observations we can absorb the third term in (23) in the first one:

E[Ψk+1

]≤(

1− 2γµ+ µ2γ2(

1 +2ω

n+ cα

))E[‖xk − x?‖22

]+ γ2

(cα+

ω + 1

n

)σ2

+ γ2(

n+ (1− α)c

)1

n

n∑i=1

‖hki − h?i ‖22 .

By the first assumption on γ it follows(1− 2γµ+ µ2γ2

(1 + 2ω

n + cα))≤ (1 − γµ). By the assumption on c we have(

2ωn + (1− α)c

)≤(1− α

2

)c. An the second assumption on γ implies

(1− α

2

)≤ (1− γµ). Thus

E[Ψk+1

]≤ (1− γµ)Ψk + γ2

(1 +

ω

n

) σ2

n.

Unrolling the recurrence and the estimate∑k−1`=0 (1− γµ)k ≤ 1

µγ for all k ≥ 1 leads to

E[Ψk]≤ (1− γµ)kΨ0 +

γ

µ

(cα+

ω + 1

n

)σ2 ≤ (1− γµ)kΨ0 +

2

µ(µ+ L)σ2 ,

by the first assumption on γ.

Page 17: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

E. Variance Reduced Diana—L-SVRG method and SAGA proofLemma 3. For all iterates k ≤ 0 of Algorithm 2, it holds that gki is an unbiased estimate of the local gradient∇fi(xk)

E[gki]

= ∇fi(xk)

and gk is that of the full gradient∇f(xk):

E[gk]

= ∇f(xk).

Proof. It is a straightforward consequence of how we define sampling:

E[gki]

= E[∇fijki (xk)−∇fijki (wkikki

) + µki

]= ∇fi(xk)− µki + µki = ∇fi(xk).

Similarly,

E[gk]

=1

n

n∑i=1

E[Q(gki − hki ) + hki

]=

1

n

n∑i=1

E[gki − hki + hki

]=

1

n

n∑i=1

∇fi(xk) = ∇f(xk).

E.1. Strongly convex case

Lemma 4. We can upper bound the second moment of xk in the following way

E[‖xk+1 − x?‖22

]≤ ‖xk − x?‖22(1− µγ) + 2γ(f? − f(xk)) + γ2E

[‖gk‖22

]. (24)

Proof.

E[‖xk+1 − x?‖22

]= E

[‖xk − x?‖22 + 2γ

⟨gk, x? − xk

⟩+ γ2‖gk‖22

]= ‖xk − x?‖22 + 2γ

⟨∇f(xk), x? − xk

⟩+ γ2E

[‖gk‖22

](4)≤ ‖xk − x?‖22 + 2γ

(f? − f(xk)− µ

2‖xk − x?‖22

)+ γ2E

[‖gk‖22

]= ‖xk − x?‖22(1− µγ) + 2γ(f? − f(xk)) + γ2E

[‖gk‖22

],

where the first equation follows from the definition of xk+1 in Algorithm 2.

Lemma 5. Let α(ω + 1) ≤ 1. We can upper bound Hk+1 in the following way

E[Hk+1

]≤ (1− α)Hk +

mDk + 8αLn

(f(xk)− f?

), (25)

where

Hk def=

n∑i=1

‖hki −∇fi(x?)‖22 (26)

and

Dk def=

n∑i=1

m∑j=1

‖∇fij(wkij)−∇fij(x?)‖22. (27)

Page 18: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Proof.

E[Hk+1

]= E

[n∑i=1

‖hk+1i −∇fi(x?)‖22

]

=

n∑i=1

‖hki −∇fi(x?)‖22

+

n∑i=1

E[2⟨αQ(gki − hki ), hki −∇fi(x?)

⟩+ α2‖Q(gki − hki )‖22

]≤ Hk +

n∑i=1

E[2α⟨gki − hki , hki −∇fi(x?)

⟩+ α (α · (ω + 1)) ‖gki − hki ‖22

]≤ Hk + E

[n∑i=1

α⟨gki − hki , gki + hki − 2∇fi(x?)

⟩]

= Hk + E

[n∑i=1

α(‖gki −∇fi(x?)‖22 − ‖hki −∇fi(x?)‖22

)]

= Hk(1− α) + E

[n∑i=1

α(‖gki −∇fi(x?)‖22

)](13)≤ Hk(1− α) +

n∑i=1

(2αE

[‖gki −∇fi(xk)‖22

]+ 2α‖∇fi(xk)−∇fi(x?)‖22

)Alg. 2= Hk(1− α) +

n∑i=1

E[2α‖∇fijki (xk)−∇fijki (wkijki

)− E[∇fijki (xk)−∇fijki (wkijki

)]‖22]

+ 2α

n∑i=1

‖∇fi(xk)−∇fi(x?)‖22

(12)≤ Hk(1− α) +

n∑i=1

(E[2α‖∇fijki (xk)−∇fijki (wkijki

)‖22]

+ 2α‖∇fi(xk)−∇fi(x?)‖22)

(13)≤ Hk(1− α) +

m

n∑i=1

m∑j=1

(‖∇fij(xk)−∇fij(x?)‖22 + ‖∇fij(wkij)−∇fij(x?)‖22

)+ 2α

n∑i=1

‖∇fi(xk)−∇fi(x?)‖22

(5)≤ Hk(1− α) +

m

n∑i=1

m∑j=1

‖∇fij(wkij)−∇fij(x?)‖22 + 8αLn(f(xk)− f?

)= Hk(1− α) +

mDk + 8αLn

(f(xk)− f?

),

where the second equality uses definition of hk+1i in Algorithm 2 and the first inequality follows from α(ω + 1) ≤ 1.

Lemma 6. We can upper bound Dk+1 in the following way

E[Dk+1

]≤ Dk

(1− 1

m

)+ 2Ln(f(xk)− f?). (28)

Page 19: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Proof.

E[Dk+1

]=

n∑i=1

m∑j=1

E[‖∇fij(wk+1

ij )−∇fij(x?)‖22]

=

n∑i=1

m∑j=1

[(1− 1

m

)‖∇fij(wkij)−∇fij(x?)‖22 +

1

m‖∇fij(xk)−∇fij(x?)‖22

](5)≤ Dk

(1− 1

m

)+ 2Ln(f(xk)− f?),

where the second equality uses definition of wk+1ij in Algorithm 2.

Lemma 7. We can upper bound the second moment of the gk in the following way

E[‖gk‖22

]≤ 2L(f(xk)− f?)

(1 +

4ω + 2

n

)+

mn2Dk +

2(ω + 1)

n2Hk. (29)

Proof.

EQ[‖gk‖22

] (12)= ‖EQ

[gk]‖22︸ ︷︷ ︸

T1

+ EQ[‖gk − EQ

[gk]‖22]︸ ︷︷ ︸

T2

.

We proceed with upper bounding terms T1 and T2 separately. For T1 we can use definition of gk in order to obtain

T1 = ‖ 1

n

n∑i=1

EQ[Q(gki − hki ) + hki

]‖22 = ‖ 1

n

n∑i=1

gki ‖22

and

T2 = EQ

[‖ 1

n

n∑i=1

Q(gki − hki )− (gki − hki )‖22

](14)=

1

n2

n∑i=1

EQ[‖Q(gki − hki )− (gki − hki )‖22

](6)≤ ω

n2

n∑i=1

‖gki − hki ‖22.

Let us calculate full expectations conditioned on previous iteration:

E [T2] =ω

n2

n∑i=1

E[‖gki − hki ‖22

]=

ω

n2

n∑i=1

(‖E[gki − hki

]‖22 + E

[‖gki − hki − E

[gki − hki

]‖22])

n2

n∑i=1

(‖∇fi(xk)− hki ‖22 + E

[‖gki −∇fi(xk)‖22

])=

ω

n2

n∑i=1

(‖∇fi(xk)− hki ‖22 + E

[‖∇fijki (xk)−∇fijki (wkijki

)− E[∇fijki (xk)−∇fijki (wkijki

)]‖22])

(12)≤ ω

n2

n∑i=1

(‖∇fi(xk)− hki ‖22 + E

[‖∇fijki (xk)−∇fijki (wkijki

)‖22])

(13)≤ 2ω

n2

n∑i=1

(‖hki −∇fi(x?)‖22 + ‖∇fi(xk)−∇fi(x?)‖22

)+

mn2

n∑i=1

m∑j=1

(‖∇fij(wkij)−∇fij(x?)‖22 + ‖∇fij(xk)−∇fij(x?)‖22

)(5)≤ 2ω

n2Hk +

mn2Dk +

8Lω

n(f(xk)− f?)

Page 20: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

The other term follows in a similar way:

E [T1] = E

[‖ 1

n

n∑i=1

gki ‖22

]= ‖ 1

n

n∑i=1

E[gki]‖22 + E

[‖ 1

n

n∑i=1

(gki − E

[gki])‖22

]

= ‖∇f(xk)‖22 +1

n2

n∑i=1

E[‖gki −∇fi(xk)‖22

](5)≤ 2L(f(xk)− f?) +

1

n2

n∑i=1

E[‖∇fijki (xk)−∇fijki (wkijki

)− E[∇fijki (xk)−∇fijki (wkijki

)]‖22]

(12)≤ 2L(f(xk)− f?) +

1

n2

n∑i=1

E[‖∇fijki (xk)−∇fijki (wkijki

)‖22]

Alg. 2= 2L(f(xk)− f?) +

1

mn2

n∑i=1

m∑j=1

‖∇fij(xk)−∇fij(wkij)‖22

(13)≤ 2L(f(xk)− f?) +

2

mn2

n∑i=1

m∑j=1

(‖∇fij(wkij)−∇fij(x?)‖22 + ‖∇fij(xk)−∇fij(x?)‖22

)(5)≤ (f(xk)− f?)

(2L+

4L

n

)+

2

mn2Dk.

Now, summing E [T1] and E [T2] we get

E[‖gk‖22

]= E [T1 + T2] ≤ (f(xk)− f?)

(2L+

4L

n

)+

2

mn2Dk

+2ω

n2Hk +

mn2Dk +

8Lω

n(f(xk)− f?)

≤ (f(xk)− f?)(

2L+4L

n+

8Lω

n

)+

n2Hk +

2(ω + 1)

mn2Dk,

which concludes the proof.

Proof of Theorem 2. Combining all lemmas together we may finalize proof. By the definition of Lyapunov function wehave

E[ψk+1

]= E

[‖xk+1 − x?‖22 + bγ2Hk+1 + cγ2Dk+1

](24)≤ ‖xk − x?‖22(1− µγ) + 2γ(f? − f(xk)) + γ2E

[‖gk‖22

]+ E

[bγ2Hk+1 + cγ2Dk+1

](25)+(28)+(29)≤ ‖xk − x?‖22(1− µγ) + 2γ(f? − f(xk))

+ γ2(

2L(f(xk)− f?)(

1 +4ω + 2

n

)+

2(ω + 1)

mn2Dk +

n2Hk

)+ bγ2

(Hk(1− α) +

mDk + 8αLn

(f(xk)− f?

))+ cγ2

(Dk

(1− 1

m

)+ 2Ln(f(xk)− f?)

)= ‖xk − x?‖22(1− µγ) + bγ2Hk

(1− α+

bn2

)+ cγ2Dk

(1− 1

m+

2bα

cm+

2(ω + 1)

mn2c

)+ (f? − f(xk))

(2γ − 2Lγ2

[1 +

4ω + 2

n+ cn+ 4bαn

]). (30)

Now, choosing b = 4(ω+1)αn2 and c = 16(ω+1)

n2 , we get

E[ψk+1

]≤ ‖xk − x?‖22(1− µγ) + bγ2Hk

(1− α

2

)+ cγ2Dk

(1− 3

8m

)+ (f? − f(xk))

(2γ − 2Lγ2

[1 +

36(ω + 1)

n

]).

Page 21: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Setting γ = 1L(1+36(ω+1)/n) gives

Eψk+1 ≤ ‖xk − x?‖22(

1− µ

L (1 + 36(ω + 1)/n)

)+ bγ2Hk

(1− α

2

)+ cγ2Dk

(1− 3

8m

),

which concludes the proof.

E.2. Convex case

Proof of Theorem 3. Using (30) (µ = 0) assuming that α ≥ 2wbn2 and 1 ≥ 2bα

c + 2wcn2 , we obtain

E[‖xk+1 − x?‖22 + bγ2Hk+1 + cγ2Dk+1

]≤ ‖xk − x?‖22 + bγ2Hk + cγ2Dk + (f? − f(xk))

(2γ − 2Lγ2

[1 +

28ω

n

]),

which implies

(f(xk)− f?)(

2γ − 2Lγ2[1 +

128ω

n

])= ψk − E

[ψk+1

],

which after removing conditional expectation can be summed over all iterations 1, 2, . . . , k and one has

E [f(xa)− f?] ≤ ψ0

2k(γ − Lγ2

[1 + 36(ω+1)

n

]) ,where index a is uniformly at random picked from 1, 2, · · · , k ,which concludes the proof.

E.3. Non-convex case

Theorem 5. Consider Algorithm 2 with ω-quantization Q, and stepsize α ≤ 1ω+1 . Choose any p > 0 (which will appear in

sequence ck below) to consider the following Lyapunov function

Rk = f(xk) + ckW k + dkF k,

where

W k =1

mn

n∑i=1

m∑j=1

‖xk − wkij‖22

F k =1

n

n∑i=1

‖∇fi(xk)− hki ‖22 ,

and

ck = ck+1

(1− 1

m+ γp+

ω + 1

nL2γ2

)+ dk+1

(αL2 +

(1 +

2

α

)ω + 1

nL4γ2

)+ω + 1

n

γ2L3

2,

dk = dk+1

(1− α

2+

(1 +

2

α

nL2γ2

)+ ck+1ω

nγ2 +

ω

n

γ2L

2.

Then under Assumption 2E[Rk+1

]≤ Rk − Γk‖∇f(xk)‖22 ,

where

Γk = γ − γ2L

2− ck+1

(γ2 +

γ

p

)− dk+1

(1 +

2

α

)L2γ2 .

Taking xa ∼u.a.r. x0, x1, . . . , x(k − 1) of Algorithm 2 one obtains

E[‖∇f(xa)‖22

]≤ R0 −Rk

k∆, (31)

where ∆ = mint∈[k] Γt > 0 .

Page 22: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Lemma 8. We can upper bound W k+1 in the following way

E[W k+1

]≤ E

[‖xk+1 − xk‖22

]+

(1− 1

m+ γp

)W k +

γ

p‖∇f(xk)‖22. (32)

Proof.

E[W k+1

]= E

1

mn

n∑i=1

m∑j=1

‖xk+1 − wk+1ij ‖

22

=

1

mn

n∑i=1

m∑j=1

(1

mE[‖xk+1 − xk‖22

]+m− 1

mE[‖xk+1 − wkij‖22

])

=1

mE[‖xk+1 − xk‖22

]+

1

mn

n∑i=1

m∑j=1

m− 1

m

(E[‖xk+1 − xk + xk − wkij‖22

])=

1

mE[‖xk+1 − xk‖22

]+

1

mn

n∑i=1

m∑j=1

m− 1

mE[‖xk+1 − xk‖22

]+ ‖xk − wkij‖22 + 2

⟨E[xk+1 − xk

], xk − wkij

⟩≤ E

[‖xk+1 − xk‖22

]+

1

mn

n∑i=1

m∑j=1

m− 1

m‖xk − wkij‖22 + 2γ

(1

2p‖∇f(xk)‖22 +

p

2‖xk − wkij‖22

)

= E[‖xk+1 − xk‖22

]+

(1− 1

m+ γp

)W k +

γ

p‖∇f(xk)‖22,

where the second equality uses the update of wk+1ij in Algorithm 2 and the inequality uses Cauchy-Schwarz and Young

inequalities.

Lemma 9. We can upper bound quantity 1n

n∑i=1

E[‖gki − hki ‖22

]in the following way

1

n

n∑i=1

E[‖gki − hki ‖22

]≤ F k + L2W k. (33)

Proof.

1

n

n∑i=1

E[‖gki − hki ‖22

]=

1

n

n∑i=1

(‖E[gki − hki

]‖22 + E

[‖gki − hki − E

[gki − hki

]‖22])

=1

n

n∑i=1

(‖∇fi(xk)− hki ‖22 + E

[‖gki −∇fi(xk)‖22

])= F k +

1

n

n∑i=1

E[‖∇fijki (xk)−∇fijki (wkijki

)− E[∇fijki (xk)−∇fijki (wkijki

)]‖22]

(12)≤ F k +

1

n

n∑i=1

E[‖∇fijki (xk)−∇fijki (wkijki

)‖22]

= F k +1

n

n∑i=1

1

m

m∑i=1

E[‖∇fij(xk)−∇fij(wkij)‖22

](5)≤ F k + L2W k.

Equipped with this lemma, we are ready to prove a recurrence inequality for F k:

Page 23: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Lemma 10. Let α(ω + 1) ≤ 1. We can upper bound F k+1 in the following way

E[F k+1

]≤(

1 +2

α

)L2E

[‖xk+1 − xk‖22

]+(

1− α

2

)F k + αL2W k (34)

Proof.

E[F k+1

]=

1

n

n∑i=1

E[‖∇fi(xk+1)− hk+1

i ‖22]

=1

n

n∑i=1

E[‖∇fi(xk+1)−∇fi(xk) +∇fi(xk)− hki − αQ

(gki − hki

)‖22]

=1

n

n∑i=1

(E[‖∇fi(xk+1)−∇fi(xk)‖22

]+ E

[‖∇fi(xk)− hki − αQ

(gki − hki

)‖22])

+ (1− α)1

n

n∑i=1

⟨∇fi(xk+1)−∇fi(xk),∇fi(xk)− hki

⟩(5)≤ 1

n

n∑i=1

((1 +

1− ατ

)L2E

[‖xk+1 − xk‖22

]+ (1 + (1− α)τ)‖∇fi(xk)− hki ‖22 + α2E

[‖Q(gki − hki

)‖22])

− 2α

n

n∑i=1

⟨∇fi(xk)− hki ,E

[Q(gki − hki

)]⟩(7)≤(

1 +1− ατ

)L2E

[‖xk+1 − xk‖22

]+

1

n

n∑i=1

((1 + (1− α)τ)‖∇fi(xk)− hki ‖22 + α2(ω + 1)E

[‖gki − hki ‖22

])− 2

α

n

n∑i=1

⟨∇fi(xk)− hki ,∇fi(xk)− hki

⟩≤(

1 +1− ατ

)L2E

[‖xk+1 − xk‖22

]+ (1 + (1− α)τ − 2α)F k + α

1

n

n∑i=1

E[‖gki − hki ‖22

](33)≤(

1 +1− ατ

)L2E

[‖xk+1 − xk‖22

]+ (1 + τ − α)F k + αL2W k,

where the second equality uses definition of hk+1i in Algorithm 2 and the first inequality follows from Cauchy inequality

and holds for any τ > 0.

Taking τ = α/2, we obtain desired inequality.

Lemma 11. We can upper bound the second moment of the gk in the following way

E[‖gk‖22

]≤ ω

nF k +

ω + 1

nL2W k + ‖∇f(xk)‖22. (35)

Proof.

EQ[‖gk‖22

] (12)= ‖EQ

[gk]‖22︸ ︷︷ ︸

T1

+ EQ[‖gk − EQ

[gk]‖22]︸ ︷︷ ︸

T2

.

We can use the definition of gk in order to obtain

T1 = ‖ 1

n

n∑i=1

EQ[Q(gki − hki ) + hki

]‖22 = ‖ 1

n

n∑i=1

gki ‖22

Page 24: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

and

T2 = EQ

[‖ 1

n

n∑i=1

Q(gki − hki )− (gki − hki )‖22

](14)=

1

n2

n∑i=1

EQ[‖Q(gki − hki )− (gki − hki )‖22

](7)≤ ω

n2

n∑i=1

‖gki − hki ‖22.

Now we calculate full expectations conditioned on previous iteration:

E [T2] =ω

n2

n∑i=1

E[‖gki − hki ‖22

](33)≤ ω

nF k +

ω

nL2W k.

As for T1, we have

E [T1] = E

[‖ 1

n

n∑i=1

gki ‖22

]= ‖ 1

n

n∑i=1

E[gki]‖22 + E

[‖ 1

n

n∑i=1

gki − E[gki]‖22

]

= ‖∇f(xk)‖22 +1

n2

n∑i=1

E[‖gki −∇fi(xk)‖22

]= ‖∇f(xk)‖22 +

1

n2

n∑i=1

E[‖∇fijki (xk)−∇fijki (wkijki

)− E[∇fijki (xk)−∇fijki (wkijki

)]‖22]

(12)≤ ‖∇f(xk)‖22 +

1

n2

n∑i=1

E[‖∇fijki (xk)−∇fijki (wkijki

)‖22]

Alg. 2= ‖∇f(xk)‖22 +

1

mn2

n∑i=1

m∑j=1

‖∇fij(xk)−∇fij(wkij)‖22

(5)≤ ‖∇f(xk)‖22 +

1

nL2W k.

Now, summing E [T1] and E [T2] we get

E[‖gk‖22

]= E [T1 + T2] ≤ ω

nF k +

ω + 1

nL2W k + ‖∇f(xk)‖22,

which concludes the proof.

Proof of Theorem 5. Using L-smoothness one gets

E[f(xk+1)

]≤ f(xk) +

⟨∇f(xk),E

[xk+1 − xk

]⟩+L

2E[‖xk+1 − xk‖22

]= f(xk)− γ‖∇f(xk)‖22 +

Lγ2

2E[‖gk‖22

], (36)

where we use the definition of xk+1 in Algorithm 2.

Page 25: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

By combining definition of E[Rk+1

]with (32), (34) and (36) one obtains

E[Rk+1

]≤ f(xk) +

⟨∇f(xk),E

[xk+1 − xk

]⟩+L

2E[‖xk+1 − xk‖22

]+ ck+1

(E[‖xk+1 − xk‖22

]+

(1− 1

m+ γp

)W k +

γ

p‖∇f(xk)‖22

)+ dk+1

((1 +

2

α

)L2E

[‖xk+1 − xk‖22

]+(

1− α

2

)F k + αL2W k

)= f(xk)− γ‖∇f(xk)‖22 +

(γ2L

2+ ck+1γ2 + dk+1

(1 +

2

α

)L2γ2

)E[‖gk‖22

]+ ck+1

((1− 1

m+ γp

)W k +

γ

p‖∇f(xk)‖22

)+ dk+1

((1− α

2

)F k +

(1 +

2

α

)αL2W k

)(35)≤ f(xk)−

(γ − γ2L

2− ck+1γ2 − dk+1

(1 +

2

α

)L2γ2 − ck+1 γ

p

)‖∇f(xk)‖22

+

(ck+1

(1− 1

m+ γp

)+ dk+1

(1 +

2

α

)αL2 +

ω + 1

nL2

(γ2L

2+ ck+1γ2 + dk+1

(1 +

2

α

)L2γ2

))W k

+

(dk+1

(1− α

2

)+ω

n

(γ2L

2+ ck+1γ2 + dk+1

(1 +

2

α

)L2γ2

))F k

= f(xk)−(γ − γ2L

2− ck+1

(γ2 +

γ

p

)− dk+1

(1 +

2

α

)L2γ2

)‖∇f(xk)‖22

+

(ck+1

(1− 1

m+ γp+

ω + 1

nL2γ2

)+ dk+1

(αL2 +

(1 +

2

α

)ω + 1

nL4γ2

)+ω + 1

n

γ2L3

2

)W k

+

(dk+1

(1− α

2+

(1 +

2

α

nL2γ2

)+ ck+1ω

nγ2 +

ω

n

γ2L

2

)F k

= Rk − Γk‖∇f(xk)‖22.

Applying the full expectation and telescoping the equation, one gets desired inequality.

We can proceed to the proof of Theorem 4.

Proof of Theorem 4. Recursion for ct, dt can be written in a form

yt = Ayt+1 + b,

where

A =

[1− 1

m + γp+ ω+1n L2γ2 αL2 +

(1 + 2

α

)ω+1n L4γ2

ωnγ

2 1− α2 +

(1 + 2

α

)ωnL

2γ2

],

yt =

[ct

dt

],

b =

[ω+1n

γ2L3

2ωnγ2L2

].

Recall that we once used Young’s inequality with an arbitrary parameter p, so we can now specify it. Choosing p =L(1+ω

n )1/2

(m2/3+ω+1)1/2, γ = 1

10L(1+ωn )

1/2(m2/3+ω+1)

, and α = 1ω+1 , where ck = dk = 0 we can upper bound each element of

matrix A and construct its upper bound A and a corresponding vector b, where

A =

[1− 89

100m L2 103100(ω+1)

1100L2m 1− 47

100(ω+1)

], b =

(1 +

ω

n

) γ2L2

[L2

1

].

Page 26: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Due to the structure of A and b we can work with matrices

A =

[1− 89

100m103

100(ω+1)1

100m 1− 47100(ω+1)

], b =

(1 +

ω

n

) γ2L2

[11

],

where it holds Ak b = (y1, y2)> =⇒ Ak b = (L2y1, y2)>, thus we can work with A which is independent of L. In thesense of Lemma 19, we have that eigenvalues of A are less than 1 − 1

3maxm,ω+1 , 1 −1

6minm,ω+1 , respectively, and|x| ≤ 2

minm,ω+1 , thus

ck ≤ 90 maxm,ω + 1(

1 +ω

n

) γ2L3

2

= 90 maxm,ω + 1(

1 +ω

n

) L3

200(1 + ω

n

)L2(m2/3 + ω + 1)2

≤ L

2(m2/3 + ω + 1)1/2.

By the same reasoning

dk ≤ 1

2L(m2/3 + ω + 1)1/2.

This implies

Γk = γ − γ2L

2− ck+1

(γ2 +

γ

p

)− dk+1

(1 +

2

α

)L2γ2

≥ γ − γ2L

2− L

2(m2/3 + ω + 1)1/2

((2 +

2

α

)γ2 +

γ

p

)≥ 1

10L(1 + ω

n

)1/2(m2/3 + ω + 1)

− 1

200L(1 + ω

n

)(m2/3 + ω + 1)2

− 1

2L(m2/3 + ω + 1)1/2

(4(ω + 1)

100(1 + ω

n

)(m2/3 + ω + 1)2

+1

10(1 + ω

n

)(m2/3 + ω + 1)1/2

)

≥ 1

40L(1 + ω

n

)1/2(m2/3 + ω + 1)

,

which guarantees ∆ ≥ 1

40L(1+ωn )

1/2(m2/3+ω+1)

. Plugging the lower bound on ∆ into (31) one completes the proof.

F. Variance Reduced Diana - SVRG proofLemma 12. For all iterates k ≥ 0 of Algorithm 3, it holds

E[gk]

= ∇f(xk)

Proof.

E[gk]

=1

n

n∑i=1

E[Q(gki − hki

)+ hki

]=

1

n

n∑i=1

E[gki − hki + hki

]=

1

n

n∑i=1

E[gki]

=1

n

n∑i=1

∇fi(xk) = ∇f(xk),

where the first inequality follows from definition of gk in Algorithm 3.

Page 27: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Algorithm 3 SVRG-DIANA

Input: p ≥ 1, learning rates α, γ > 0, initial vectors x0, h01, . . . , h0n ∈ Rd, p0, p1, · · · , pl−1 ∈ R

1 s = 02 x0 = x03 z0 = x0

4 for k = 1, 2, . . . do5 Broadcast xk to all workers6 for i = 1, . . . , n do in parallel7 if k ≡ 0 mod l then8 s = s+ 1

9 zs =∑l−1r=0 prx

(s−1)l+r

10 Pick random jki ∈ [m] uniformly11 gki = ∇fijki (xk)−∇fijki (zs) +∇fi(zs)12 ∆k

i = Q(gki − hki )

13 hk+1i = hki + α∆k

i

14 end

15 gk = 1n

n∑i=1

(∆ki + hki )

16 xk+1 = xk − γgk17 end

F.1. Strongly convex case

To prove the convergence of Algorithm 3 we consider Lyapunov function of the following form:

ψs = (f(zs)− f?) + bγ2Hs, (37)

where

Hk def=

n∑i=1

‖hki −∇fi(x?)‖22 (38)

and Hs = H ls.

The following theorem establishes linear convergence rate of Algorithm 3.

Theorem 6. Under Assumptions 2 and 3 For α ≤ 1ω+1 , the following inequality holds:

E[ψs+1

]≤ ψs max

(1− θ)l

1− (1− θ)l2θ + (1− (1− θ)l)cµ

µ(2γ − c), (1− θ)l

, (39)

where c = 6Lωn γ2 +

(2L+ 4L

n

)γ2 + 4bγ2Lαn, θ = minµγ, α− 3ω

n2b, pr = (1−θ)l−1−r∑l−1t=0(1−θ)l−1−t

for r = 0, 1, . . . , l− 1, and

b = bl(2γ − c).

Corollary 5. Taking α = 1ω+1 , b = 6 ω

n2α , γ = 1

10L(2+ 4n+30ω

n ), and l = 2

θ SVRG-DIANA needs

O((κ+ κωn + ω +m

)log 1

ε

)iterations to achieve precision E [ψs] ≤ εψ0.

Lemma 13. We can upper bound the second moment of the gk in the following way

E[‖gk‖22

]≤(

2L+4L

n+

6Lω

n

)(f(xk)− f? + f(zs)− f?) +

n2Hk, (40)

Page 28: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Proof.

E[‖gk‖22

]= E

[EQ[‖gk‖22

]] (12)= E

[‖EQ

[gk]‖22 + EQ

[‖gk − EQ

[gk]‖22]]

= E

‖ 1

n

n∑i=1

gki ‖22︸ ︷︷ ︸T1

+ EQ

[‖ 1

n

n∑i=1

Q(gki − hki

)−(gki − hki

)‖22

]︸ ︷︷ ︸

T2

,where the third inequality uses the definition of gk in Algorithm 3. We can further bound E [T1] and E [T2].

E [T1] = E

[‖ 1

n

n∑i=1

gki ‖22

]= ‖ 1

n

n∑i=1

E[gki]‖22 + E

[‖ 1

n

n∑i=1

(gki − E

[gki])‖22

]

= ‖∇f(xk)‖22 +1

n2

n∑i=1

E[‖gki −∇fi(xk)‖22

](5)≤ 2L(f(xk)− f?) +

1

n2

n∑i=1

E[‖∇fijki (xk)−∇fijki (zs)− E

[∇fijki (xk)−∇fijki (zs)

]‖22]

(12)≤ 2L(f(xk)− f?) +

1

n2

n∑i=1

E[‖∇fijki (xk)−∇fijki (zs)‖22

]Alg. 3= 2L(f(xk)− f?) +

1

mn2

n∑i=1

m∑j=1

‖∇fij(xk)−∇fij(zs)‖22

(13)≤ 2L(f(xk)− f?) +

2

mn2

n∑i=1

m∑j=1

(‖∇fij(xk)−∇fij(x?)‖22 + ‖∇fij(zs)−∇fij(x?)‖22

)(5)≤(

2L+4L

n

)(f(xk)− f? + f(zs)− f?)

E [T2](14)=

1

n2E

[n∑i=1

EQ[‖Q(gki − hki

)−(gki − hki

)‖22]]

(12)≤ ω

n2

n∑i=1

E[‖gki − hki ‖22

](13)+Alg. 3≤ 3ω

n2

n∑i=1

E[‖∇fijki (xk)−∇fijki (x?)‖22 + ‖∇fijki (zs)−∇fijki (x?)− (∇fi(zs)−∇fi(x?))‖22

]+ E

[‖hki −∇fi(x?)‖22

](12)≤ 3ω

n2

n∑i=1

E[‖∇fijki (xk)−∇fijki (x?)‖22 + ‖∇fijki (zs)−∇fijki (x?)‖22

]+ E

[‖hki −∇fi(x?)‖22

](5)≤ 6Lω

n(f(xk)− f? + f(zs)− f?) +

n2Hk

Summing up E [T1] and E [T2] we conclude the proof:

E[‖gk‖22

]= E [T1 + T2] ≤

(2L+

4L

n+

6Lω

n

)(f(xk)− f? + f(zs)− f?) +

n2Hk.

Lemma 14. Let α(ω + 1) ≤ 1. We can upper bound Hk+1 in the following way

E[Hk+1

]≤ Hk (1− α) + 4Lαn(f(xk)− f? + f(zs)− f?). (41)

Page 29: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Proof.

E[Hk+1

]=

n∑i=1

E[‖hk+1

i − hki + hki −∇fi(x?)‖22]

=

n∑i=1

E[‖hki −∇fi(x?)‖22 + 2

⟨hk+1i − hki , hki −∇fij(x?)

⟩+ ‖hk+1

i − hki ‖22]

= Hk + E

[n∑i=1

(2⟨EQ[hk+1i − hki

], hki −∇fi(x?)

⟩+ EQ

[‖hk+1

i − hki ‖22])]

No we calculate expectations:

EQ[hk+1i − hki

]= αEQ

[∆ki

]= α(gki − hki )

EQ[‖hk+1

i − hki ‖22]

= α2EQ

[‖∆k

i ‖22]

= α2(ω + 1)‖gki − hki ‖22≤ α‖gki − hki ‖22

Finally we obtain

E[Hk+1

]= Hk + E

[n∑i=1

(2α⟨gki − hki , hki −∇fi(x?)

⟩+ α‖gki − hki ‖22

)]

= Hk +α

mE

n∑i=1

m∑j=1

⟨gki − hki , gki + hki − 2∇fi(x?)

⟩= Hk + E

αm

n∑i=1

m∑j=1

(‖gki −∇fi(x?)‖22 − ‖hki −∇fi(x?)‖22

)(5)≤ Hk (1− α) + 4Lαn(f(xk)− f? + f(zs)− f?),

which concludes the proof.

Proof of Theorem 6.

E[‖xk+1 − x?‖22 + bγ2Hk+1

]= ‖xk − x?‖22 + 2γ

⟨xk − x?,E

[gk]⟩

+ γ2E[‖gk‖22

]+ bγ2E

[Hk+1

]= ‖xk − x?‖22 + 2γ

⟨xk − x?,∇f(xk)

⟩+ γ2E

[‖gk‖22

]+ bγ2E

[Hk+1

](40)+(41)+(4)≤ (1− µγ)‖xk − x?‖22 +

(L

nγ2 +

(2L+

4L

n

)γ2 + 4bγ2Lαn− 2γ

)(f(xk)− f?)

+

(L

nγ2 +

(2L+

4L

n

)γ2 + 4bγ2Lαn

)(f(zs)− f?)

+ bγ2Hk

(1− α+

n2b

)(42)

Let c = L 6ωn γ

2 +(2L+ 4L

n

)γ2 + 4bγ2Lαn, θ = minµγ, α − 3ω

n2b, pr = (1−θ)l−1−r∑l−1t=0(1−θ)l−1−t

for r = 0, 1, . . . , l − 1, and

assume that b is picked such that α− 3ωn2b > 0 . We can apply previous inequality recursively for k = (s+ 1)l, (s+ 1)l −

1, . . . , sl + 1, which implies

E

[‖x(s+1)l − x?‖22 + bγ2Hs+1 +

1− (1− θ)l

θ(2γ − c)(f(zs+1)− f?)

]≤ (1− θ)l‖zs − x?‖22 +

1− (1− θ)l

θc(f(zs)− f?) + bγ2Hs (1− θ)l (43)

≤ 2

µ(1− θ)l(f(zs)− f?) +

1− (1− θ)l

θc(f(zs)− f?) + bγ2Hs (1− θ)l .

Page 30: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Choosing b = bl(2γ−c) we got

E[ψk+1

]≤ (1− θ)l

1− (1− θ)l2θ + (1− (1− θ)l)cµ

µ(2γ − c)(f(zs)− f?) + bγ2Hs (1− θ)l

which concludes the proof.

F.2. Convex case

Let us look at the convergence under weak convexity assumption, thus µ = 0.

Theorem 7. Let pr = 1/l for r = 0, 1, . . . , l − 1 and α ≤ 1ω+1 . Under Assumptions 2 and 4, output xa ∼u.a.r.

x0, x1, . . . , xk−1 of Algorithm 3 satisfies

E [f(xa)− f?] ≤ ‖x0 − x?‖22 + lc(f(x0)− f?)) + bγ2H0

2k(γ − c), (44)

where c = Lγ2(6ωn + 2 + 1

n + 4bαn)

and k is number of iterations, which is multiple of l, the inner loop size.

Corollary 6. Let γ = 1

L√m(2+ 4

n+18ωn )

, b = 3ω(ω+1)n2 , l = m and α = 1

ω+1 . To achieve precision E [f(xa)− f?] ≤ ε

SVRG-DIANA needs O(

(1+ωn )√m+ ω√

m

ε

)iterations.

Proof of Theorem 7. Using (42) assuming that b is picked such that α− 3ωn2b ≥ 0, we obtain

E[‖xk+1 − x?‖22 + bγ2Hk+1

]≤ ‖xk − x?‖22 + (c− 2γ) (f(xk)− f?) + c(f(zs)− f?) + bγ2Hk (45)

Taking P s = E[‖xsl − x?‖22 + lc(f(zs)− f?) + bγ2Hs

], full expectation, and using

E[l(f(zs+1)− f?)

]=

(s+1)l−1∑j=sl

(f(xj)− f?),

we get

(2γ − 2c)

(s+1)l−1∑j=sl

(f(xj)− f?) ≤ P s − P s+1,

which can be summed over all epochs and one obtains

E [(f(xa)− f?)] ≤ P 0

2k(γ − c),

which concludes the proof.

F.3. Non-convex case

Theorem 8. Consider Algorithm 3 with ω-quantization Q, and stepsize α ≤ 1ω+1 . We consider the following Lyapunov

functionRk = f(xk) + ckZk + dkF k,

whereZk = ‖xk − zs‖22

and

F k =1

n

n∑i=1

‖∇fi(xk)− hki ‖22 ,

Page 31: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

and

ck = ck+1

(1 + γp+

ω + 1

nL2γ2

)+ dk+1

(αL2 +

(1 +

2

α

)ω + 1

nL4γ2

)+ω + 1

n

γ2L3

2,

and

dk = dk+1

(1− α

2+

(1 +

2

α

nL2γ2

)+ ck+1ω

nγ2 +

ω

n

γ2L

2.

Then under Assumption 2

E[Rk+1

]≤ Rk − Γk‖∇f(xk)‖22 ,

where

Γk = γ − γ2L

2− ck+1

(γ2 +

γ

p

)− dk+1

(1 +

2

α

)L2γ2 .

Taking xa ∼u.a.r. x0, . . . , xl−1 of Algorithm 3 one obtains

E[‖∇f(xa)‖22

]≤ R0 −Rl

k∆, (46)

where ∆ = mint∈[k] Γt > 0 .

Theorem 9. Let Assumption 2 hold. Moreover, let γ = 1

10L(1+ωn )

1/2(m2/3+ω+1)

, l = m, pl−1 = 1, pr = 0 for r =

0, 1, . . . , l − 2, and α = 1ω+1 , then a randomly chosen iterate xa ∼u.a.r. x0, x1, . . . , xk−1 of Algorithm 3 satisfies

E[‖∇f(xa)‖22

]≤

40(f(x0)− f?)L(1 + ω

n

)1/2(m2/3 + ω + 1)

k,

where k denotes the number of iterations, which is multiple of m.

Corollary 7. To achieve precision E[‖∇f(xa)‖22

]≤ ε SVRG-DIANA needs O

((1 + ω

n

)1/2 m2/3+ωε

)iterations.

Lemma 15. We can upper bound Zk+1 in the following way

E[Zk+1

]≤ E

[‖xk+1 − xk‖22

]+ (1 + γp)Zk +

γ

p‖∇f(xk)‖22. (47)

Proof.

E[Zk+1

]= E

[‖xk+1 − zs‖22

]= E

[‖xk+1 − xk + xk − zs‖22

]= E

[‖xk+1 − xk‖22

]+ ‖xk − zs‖22 + 2

⟨E[xk+1 − xk

], xk − wkij

⟩≤ E

[‖xk+1 − xk‖22

]+ ‖xk − zs‖22 + 2γ

(1

2p‖∇f(xk)‖22 +

p

2‖xk − zs‖22

)= E

[‖xk+1 − xk‖22

]+ (1 + γp)Zk +

γ

p‖∇f(xk)‖22,

where the inequality uses Cauchy-Schwarz and Young inequalities with p > 0.

Lemma 16. We can upper bound quantity 1n

n∑i=1

E[‖gki − hki ‖22

]in the following way

1

n

n∑i=1

E[‖gki − hki ‖22

]≤ F k + L2Zk. (48)

Page 32: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Proof.

1

n

n∑i=1

E[‖gki − hki ‖22

]=

1

n

n∑i=1

(‖E[gki − hki

]‖22 + E

[‖gki − hki − E

[gki − hki

]‖22])

=1

n

n∑i=1

(‖∇fi(xk)− hki ‖22 + E

[‖gki −∇fi(xk)‖22

])= F k +

1

n

n∑i=1

E[‖∇fijki (xk)−∇fijki (zs)− E

[∇fijki (xk)−∇fijki (zs)

]‖22]

(12)≤ F k +

1

n

n∑i=1

E[‖∇fijki (xk)−∇fijki (zs)‖22

]= F k +

1

n

n∑i=1

1

m

m∑i=1

E[‖∇fij(xk)−∇fij(zs)‖22

](5)≤ F k + L2Zk.

Equipped with this lemma, we are ready to prove a recurrence inequality for F k:

Lemma 17. Let α(ω + 1) ≤ 1. We can upper bound F k+1 in the following way

E[F k+1

]≤(

1 +2

α

)L2E

[‖xk+1 − xk‖22

]+(

1− α

2

)F k + αL2Zk (49)

Proof.

E[F k+1

]=

1

n

n∑i=1

E[‖∇fi(xk+1)− hk+1

i ‖22]

=1

n

n∑i=1

E[‖∇fi(xk+1)−∇fi(xk) +∇fi(xk)− hki − αQ

(gki − hki

)‖22]

=1

n

n∑i=1

(E[‖∇fi(xk+1)−∇fi(xk)‖22

]+ E

[‖∇fi(xk)− hki − αQ

(gki − hki

)‖22])

+ (1− α)1

n

n∑i=1

⟨∇fi(xk+1)−∇fi(xk),∇fi(xk)− hki

⟩(5)≤ 1

n

n∑i=1

((1 +

1− ατ

)L2E

[‖xk+1 − xk‖22

]+ (1 + (1− α)τ)‖∇fi(xk)− hki ‖22 + α2E

[‖Q(gki − hki

)‖22])

− 2α

n

n∑i=1

⟨∇fi(xk)− hki ,E

[Q(gki − hki

)]⟩(7)≤(

1 +1− ατ

)L2E

[‖xk+1 − xk‖22

]+

1

n

n∑i=1

((1 + (1− α)τ)‖∇fi(xk)− hki ‖22 + α2(ω + 1)E

[‖gki − hki ‖22

])− 2

α

n

n∑i=1

⟨∇fi(xk)− hki ,∇fi(xk)− hki

⟩≤(

1 +1− ατ

)L2E

[‖xk+1 − xk‖22

]+ (1 + (1− α)τ − 2α)F k + α

1

n

n∑i=1

E[‖gki − hki ‖22

](48)≤(

1 +1− ατ

)L2E

[‖xk+1 − xk‖22

]+ (1 + τ − α)F k + αL2Zk,

Page 33: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

where the second equality uses definition of hk+1i in Algorithm 3 and the first inequality follows from Cauchy inequality

and holds for any τ > 0.

Taking τ = α/2, we obtain desired inequality.

Lemma 18. We can upper bound the second moment of the gk in the following way

E[‖gk‖22

]≤ ω

nF k +

ω + 1

nL2Zk + ‖∇f(xk)‖22. (50)

Proof.

EQ[‖gk‖22

] (12)= ‖EQ

[gk]‖22︸ ︷︷ ︸

T1

+ EQ[‖gk − EQ

[gk]‖22]︸ ︷︷ ︸

T2

.

We can use the definition of gk in order to obtain

T1 = ‖ 1

n

n∑i=1

EQ[Q(gki − hki ) + hki

]‖22 = ‖ 1

n

n∑i=1

gki ‖22

and

T2 = EQ

[‖ 1

n

n∑i=1

Q(gki − hki )− (gki − hki )‖22

](13)=

1

n2

n∑i=1

EQ[‖Q(gki − hki )− (gki − hki )‖22

](6)≤ ω

n2

n∑i=1

‖gki − hki ‖22.

Now we calculate full expectations conditioned on previous iteration:

E [T2] =ω

n2

n∑i=1

E[‖gki − hki ‖22

](48)≤ ω

nF k +

ω

nL2Zk.

As for T1, we have

E [T1] = E

[‖ 1

n

n∑i=1

gki ‖22

]= ‖ 1

n

n∑i=1

E[gki]‖22 + E

[‖ 1

n

n∑i=1

gki − E[gki]‖22

]

= ‖∇f(xk)‖22 +1

n2

n∑i=1

E[‖gki −∇fi(xk)‖22

]= ‖∇f(xk)‖22 +

1

n2

n∑i=1

E[‖∇fijki (xk)−∇fijki (zs)− E

[∇fijki (xk)−∇fijki (zs)

]‖22]

(12)≤ ‖∇f(xk)‖22 +

1

n2

n∑i=1

E[‖∇fijki (xk)−∇fijki (wkijki

)‖22]

Alg. 3= ‖∇f(xk)‖22 +

1

mn2

n∑i=1

m∑j=1

‖∇fij(xk)−∇fij(zs)‖22

(5)≤ ‖∇f(xk)‖22 +

1

nL2Zk.

Page 34: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

Now, summing E [T1] and E [T2] we get

E[‖gk‖22

]= E [T1 + T2] ≤ ω

nF k +

ω + 1

nL2Zk + ‖∇f(xk)‖22,

which concludes the proof.

Proof of Theorem 8. Using L-smoothness one gets

E[f(xk+1)

]≤ f(xk) +

⟨∇f(xk),E

[xk+1 − xk

]⟩+L

2E[‖xk+1 − xk‖22

]= f(xk)− γ‖∇f(xk)‖22 +

Lγ2

2E[‖gk‖22

], (51)

where we use the definition of xk+1 in Algorithm 3.

By combining definition of E[Rk+1

]with (47),(49),(51) one obtains

E[Rk+1

]≤ f(xk) +

⟨∇f(xk),E

[xk+1 − xk

]⟩+L

2E[‖xk+1 − xk‖22

]+ ck+1

(E[‖xk+1 − xk‖22

]+ (1 + γp)Zk +

γ

p‖∇f(xk)‖22

)+ dk+1

((1 +

2

α

)L2E

[‖xk+1 − xk‖22

]+(

1− α

2

)F k + αL2Zk

)= f(xk)− γ‖∇f(xk)‖22 +

(γ2L

2+ ck+1γ2 + dk+1

(1 +

2

α

)L2γ2

)E[‖gk‖22

]+ ck+1

((1− 1

m+ γp

)Zk +

γ

p‖∇f(xk)‖22

)+ dk+1

((1− α

2

)F k +

(1 +

2

α

)αL2Zk

)(50)≤ f(xk)−

(γ − γ2L

2− ck+1γ2 − dk+1

(1 +

2

α

)L2γ2 − ck+1 γ

p

)‖∇f(xk)‖22

+

(ck+1

(1− 1

m+ γp

)+ dk+1αL2 +

ω + 1

nL2

(γ2L

2+ ck+1γ2 + dk+1

(1 +

2

α

)L2γ2

))Zk

+

(dk+1

(1− α

2

)+ω

n

(γ2L

2+ ck+1γ2 + dk+1

(1 +

2

α

)L2γ2

))F k

= f(xk)−(γ − γ2L

2− ck+1

(γ2 +

γ

p

)− dk+1

(1 +

2

α

)L2γ2

)‖∇f(xk)‖22

+

(ck+1

(1− 1

m+ γp+

ω + 1

nL2γ2

)+ dk+1

(αL2 +

(1 +

2

α

)ω + 1

nL4γ2

)+ω + 1

n

γ2L3

2

)Zk

+

(dk+1

(1− α

2+

(1 +

2

α

nL2γ2

)+ ck+1ω

nγ2 +

ω

n

γ2L

2

)F k

= Rk − Γk‖∇f(xk)‖22.

Applying the full expectation and telescoping the equation, one gets desired inequality.

We can proceed to the proof of Theorem 9.

Proof of Theorem 9. Recursion for ct, dt can be written in a form

yt = Ayt+1 + b,

Page 35: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

where

A =

[1 + γp+ ω+1

n L2γ2 αL2 +(1 + 2

α

)ω+1n L4γ2

ωnγ

2 1− α2 +

(1 + 2

α

)ωnL

2γ2

],

yt =

[ct

dt

],

b =

[ω+1n

γ2L3

2ωnγ2L2

].

Choosing γ = 1

10L(1+ωn )

1/2(m2/3+ω+1)

, p =L(1+ω

n )1/2

(m2/3+ω+1)1/2, l = m, and α = 1

ω+1 , where cl = dl = 0 we can upper bound

each element of matrix A and construct its upper bound A, where

A =

[1 + 11

100m L2 103100(ω+1)

1100L2m 1− 47

100(ω+1)

], b =

(1 +

ω

n

) γ2L2

[L2

1

].

The same as for Proof of Theorem 4, due to structure of A and b we can work with matrices

A =

[1 + 11

100m103

100(ω+1)1

100m 1− 47100(ω+1)

], b =

(1 +

ω

n

) γ2L2

[11

],

where it holds Ak b = (y1, y2)> =⇒ Ak b = (L2y1, y2)>, thus we can work with A which is independent of L. In thesense of Lemma 19, we have that eigenvalues of A are less than 1− 1

3(ω+1) , 1 + 1m , respectively, and |x| ≤ 2

minm,ω+1 ,thus for k ≤ l − 1

ck ≤ 20 maxm,ω + 1((

1 +1

m

)m− 1

)(1 +

ω

n

) γ2L3

2

= 20(e− 1) maxm,ω + 1(

1 +ω

n

) L3

200(1 + ω

n

)L2(m2/3 + ω + 1)2

≤ L

2(m2/3 + ω + 1)1/2.

By the same reasoning

dk ≤ 1

2L(m2/3 + ω + 1)1/2.

This implies

Γk = γ − γ2L

2− ck+1

(γ2 +

γ

p

)− dk+1

(1 +

2

α

)L2γ2

≥ γ − γ2L

2− L

2(m2/3 + ω + 1)1/2

((2 +

2

α

)γ2 +

γ

p

)≥ 1

10L(1 + ω

n

)1/2(m2/3 + ω + 1)

− 1

200L(1 + ω

n

)(m2/3 + ω + 1)2

− 1

2L(m2/3 + ω + 1)1/2

(4(ω + 1)

100(1 + ω

n

)(m2/3 + ω + 1)2

+1

10(1 + ω

n

)(m2/3 + ω + 1)1/2

)

≥ 1

40L(1 + ω

n

)1/2(m2/3 + ω + 1)

,

Page 36: Stochastic Distributed Learning withGradient Quantization ...Stochastic Distributed Learning with Gradient Quantization and Variance Reduction compress it, but to update a subset of

Stochastic Distributed Learning with Gradient Quantization and Variance Reduction

which guarantees ∆ ≥ 1

40L(1+ωn )

1/2(m2/3+ω+1)

for k = 0, 1, . . . , l − 1. Using iterates k = cl, cl + 1, . . . , (c + 1)l − 1,

where c is any positive integer, one can obtain the same bound of Γk for arbitrary k. Plugging this uniform lower bound on∆ into (46) for all iterates and using the fact that pl−1 = 1 and all other pr’s are zeros, one obtains

E[‖∇f(xa)‖22

]≤

40(f(x0)− f?)L(1 + ω

n

)1/2(m2/3 + ω + 1)

m.

where xa ∼u.a.r. x0, x1, . . . , xk−1, which concludes the proof.

G. Technical LemmaLemma 19. Let A be a 2 × 2 matrix of which all entries are non-negative and yk be a sequence of vectors for whichyk = Ayk+1 + b and yT = (0, 0), where b is a vector with non-negative entries, and A = A+B, b = b+ y, where B andy have all entries non-negative. Then for the sequence yk = Ayk+1 + b it always holds that yk ≥ yk (coordinate-wise) fork = 0, 1, . . . , T . Moreover, let A has positive real eigenvalues λ1 ≥ λ2 > 0, thus there exists a real Schur decomposition ofmatrix A = UTU>, where

T =

[λ1 x0 λ2

]and x ∈ R, and U is real unitary matrix, then for every element of yk it holds

ykj ≤(

(1− λT1 )(1− λT2 )

(1− λ1)(1− λ2)|x|+ (1− λT1 )

(1− λ1)+

(1− λT2 )

(1− λ2)

)(b1 + b2)

for k = 0, 1, 2, . . . , T − 1.

Proof. From yk = Ayk+1 + b and yT = (0, 0) one can obtain

yT−k = Ak−1b+Ak−2b+ · · ·+ b

yT−k = (A+B)k−1(b+ y) + (A+B)k−2(b+ y) + · · ·+ (b+ y).

From these equalities it is trivial to see that yk ≤ yk, because yk contains at least all the elements of yk and every element isnon-negative.

For the second part of the claim, we have for every element of yT−k

yT−kj ≤ ‖yT−k‖2 = ‖Ak−1b+ Ak−2b+ · · ·+ b‖2≤ ‖Ak−1b‖2 + ‖Ak−2b‖2 + · · ·+ ‖b‖2= ‖UT k−1U>b‖2 + ‖UT k−2U>b‖2 + · · ·+ ‖b‖2≤(‖T k−1‖2 + ‖T k−2‖2 + · · ·+ ‖I‖

)‖b‖2

≤(

(1− λT1 )(1− λT2 )

(1− λ1)(1− λ2)|x|+ (1− λT1 )

(1− λ1)+

(1− λT2 )

(1− λ2)

)(b1 + b2),

where the last inequality follows from fact that ‖A‖2 ≤ ‖A‖F ≤ |a11|+ |a12|+ |a21|+ |a22| and

T k =

[λk1 x

∑ki=0 λ

i1λk−i2

0 λk2

],

which concludes the proof.