BEER: Fast O (1 /T ) Rate for Decentralized Nonconvex Optimization with Communication Compression
Abstract
Communication efﬁciency has been widely recognized as the bottleneck for largescale decentralized machine learning applications in multi-agent or federated environments.
To tackle the communication bottleneck, there have been many efforts to design communication-compressed algorithms for decentralized nonconvex optimization, where the clients are only allowed to communicate a small amount of quantized information (aka bits) with their neighbors over a predeﬁned graph topology.
Despite signiﬁcant efforts, the state-of-the-art algorithm in the nonconvex setting still suffers from a slower rate of convergence O (( G/T ) 2 / 3 ) compared with their uncompressed counterpart, where G measures the data heterogeneity across different clients, and T is the number of communication rounds.
This paper proposes BEER , which adopts communication compression with gradient tracking, and shows it converges at a faster rate of O (1 /T ) .
This signiﬁcantly improves over the state-of-the-art rate, by matching the rate without compression even under arbitrary data heterogeneity.
Numerical experiments are also provided to corroborate our theory and conﬁrm the practical superiority of BEER in the data heterogeneous regime.
Introduction
Decentralized machine learning is gaining attention in both academia and industry because of its emerging applications in multi-agent systems such as the internet-of-things (IoT) and networked autonomous systems [30, 41].
One of the key problems in decentralized machine learning is ondevice training, which aims to optimize a machine learning model using the datasets stored on (geographically) different clients, and can be formulated as a decentralized optimization problem.
Decentralized optimization aims to solve the following optimization problem without sharing the local datasets with other clients:
[Equation]
where f ( x ; D i ) :
=
E ξ i ∼D i f ( x ; ξ i ) for i ∈ [ n ] , and n is the total number of clients.
Here, x ∈ R d is the machine learning model, f ( x ; D ) , f ( x ; D i ) , and f ( x ; ξ i ) denote the loss functions of the model x on the entire dataset D , the local dataset D i , and a random data sample ξ i , respectively.
Different from the widely studied distributed or federated learning setting where there is a central server to coordinate the parameter sharing across all clients, in the decentralized setting, each client can only communication with its neighbors over a communication network determined by a predeﬁned network topology.
The main bottleneck of decentralized optimization—when it comes to large-scale machine learning applications—is communication efﬁciency, due to the large number of clients involved in the network [41] and the enormous size of machine learning models [4], exacerbated by resource constraints such as limited bandwidth availability and stringent delay requirements.
One way to reduce the communication cost is communication compression, which only transmits compressed messages (with fewer bits) between the clients using compression operators .
The compression operators come with many design choices and offer great ﬂexibility in different trade-offs of communication and computation in practice.
Even though communication compression has been extensively applied to distributed or federated optimization with a central server [45, 12, 6, 25, 11, 24, 39 ? , 26], its use in the decentralized setting has been relatively sparse.
Most of the existing approaches only apply to the strongly convex setting [38, 17, 29, 19, 28, 23], and only a few consider the general nonconvex setting [16, 49, 43].
Our contributions This paper considers decentralized optimization with communication compression, focusing on the nonconvex setting due to its critical importance in modern machine learning, such as training deep neural networks [21], word embeddings, and other unsupervised learning models [40].
Unfortunately, existing algorithms [16, 49, 43] suffer from several important drawbacks in the nonconvex setting: they need strong bounded gradient or bounded dissimilarity assumptions to guarantee convergence, and the convergence rate is order-wise slower than their uncompressed counterpart in terms of the communication rounds (see Table 1).
In this paper, we introduce BEER , which is a decentralized optimization algorithm with communication compression using gradient tracking.
BEER not only removes the strong assumptions required in all prior works, but enjoys a faster convergence rate in the nonconvex setting.
Concretely, we have the following main contributions (see Tables 1 and 2).
We show that BEER converges at a fast rate of O (1 /T ) in the nonconvex setting, which improves over the state-of-the-art rate O (1 /T 2 / 3 ) of CHOCO-SGD [16] and Deepsqueeze [49], where T is the number of communication rounds.
This matches the rate without compression even under arbitrary data heterogeneity across the clients.
We also provide the analysis of BEER under the Polyak- Łojasiewicz (PL) condition (Assumption 4), and show that BEER converges at a linear rate (see Table 2).
Note that strong convexity implies the PL condition, and thus BEER also achieves linear convergence in the strongly convex setting.
We run numerical experiments on real-world datasets and show BEER achieves superior or competitive performance when the data are heterogeneous compared with state-of-the-art baselines with and without communication compression.
To the best of our knowledge, BEER is the ﬁrst algorithm that achieves O (1 /T ) rate without the bounded gradient or bounded dissimilarity assumptions, supported by a strong empirical performance in the data heterogeneous setting.
Notation Throughout this paper, we use boldface letters to denote vectors, e.g., x ∈ R d .
Let [ n ] denote the set { 1 , 2 , · · · , n } , 1 be the all-one vector, I be the identity matrix, (cid:107)·(cid:107) denote the Euclidean norm of a vector, and (cid:107)·(cid:107) F denote the Frobenius norm of a matrix.
Let (cid:104) u , v (cid:105) denote the standard Euclidean inner product of two vectors u and v .
In addition, we use the standard order notation O ( · ) to hide absolute constants.
Due to space constraints, additional discussions of related work, further experiments, and the proof details can be found in the appendix.
Problem Setup
In this section, we formally deﬁne the decentralized optimization problem with communication compression, and introduce a few important quantities and assumptions that will be used in developing our algorithm and theory.
[Table]
[Table]
Decentralized optimization The goal of decentralized optimization is to solve
[Equation]
f ( x ) := 1 n n (cid:88) i = f i ( x ) (cid:41) , where n is the number of clients, f ( x ) is the global objective function, and f i ( x ) :
= f ( x ; D i ) :=
E ξ i ∼D i f ( x ; ξ i ) is the local objective function, with x the parameter of interest, ξ i a random data sample drawn from the local dataset D i .
In the decentralized setting, the clients can only communicate with their local neighbors over a prescribed network topology, which is speciﬁed by an undirected weighted graph G ([ n ] , E ) .
Here, each node in [ n ] represents a client, and E is the set of possible communication links between different clients.
Information sharing across the clients is implemented mathematically by the use of a mixing matrix W =
[ w ij ] ∈ [0 , 1] n × n , which is deﬁned in accordance with the network topology: we assign a positive weight w ij for any ( i, j ) ∈ E and w ij = 0 for all ( i, j ) / ∈ E .
We make the following standard assumption on the mixing matrix [35].
Assumption 1 (Mixing matrix)
The mixing matrix W = [ w ij ] ∈ [0 , 1] n × n is symmetric ( W (cid:62) =
W ) and doubly stochastic ( W 1 = 1 , 1 (cid:62) W = 1 (cid:62) ).
Let its eigenvalues be 1 = | λ 1 ( W ) | > | λ 2 ( W ) | ≥ · · · ≥ | λ n ( W ) | .
The spectral gap is denoted by
[Equation]
The spectral gap of a mixing matrix is closely related to the network topology, see Nedi´c et al.
[35] for its scaling with respect to the network size (i.e. the number of clients n ) for representative network topologies.
Compression operators Compression, in the forms of quantization or sparsiﬁcation, can be used to reduce the total communication cost.
We now introduce the notion of a randomized compression operator , which is widely used in the decentralized/federated optimization literature, e.g. Tang et al.
[47], Stich et al.
[45], Koloskova et al.
[16], Richtárik et al.
[39], Fatkhullin et al.
Deﬁnition 1 (Compression operator)
A randomized map C : R d (cid:55)→ R d is an α -compression operator if for all x ∈ R d , it satisﬁes
[Equation]
In particular, no compression ( C ( x ) ≡ x ) implies α = 1 .
Compared with the unbiased compression operator used in, e.g., Alistarh et al.
[1], Khirirat et al.
[15], Mishchenko et al.
[32 ? ], the compression operator in Deﬁnition 1 does not impose the additional constraint on the expectation such that E [ C ( x )]
= x .
Besides, it is always possible to convert an unbiased compression operator into a biased one satisfying Deﬁnition 1, and thus Deﬁnition 1 is a generalization of the unbiased compression operator that allows biased compression.
Practical examples of the compression operators are provided in Appendix B.
Assumptions on functions We now state the assumptions on the functions { f i } and f .
Throughout this paper, we assume that f ∗ =
min x f ( x ) exists and f ∗ >
[Equation]
In the nonconvex setting, we assume that the functions { f i } i ∈ [ n ] are arbitrary functions that satisfy the following standard smoothness assumption.
Assumption 2 (Smoothness)
The function f is L -smooth if there exists L ≥ 0 such that
[Equation]
In addition, we allow local computation to be performed via stochastic gradient updates, where ˜ ∇ f i ( x ) :=
∇ f i ( x ; ξ i ) denotes a local stochastic gradient computed via a sample ξ i drawn i.i.d.
from
D i , and ˜ ∇ b f i ( x ) := 1 b (cid:80) bj =1 ∇ f i ( x ; ξ i,j ) denotes the stochastic gradient computed by a minibatch with size b drawn i.i.d.
from D i .
We assume ˜ ∇ f i ( x ) and ˜ ∇ b f i ( x ) have bounded variance, which is again standard in the decentralized/federated optimization literature [31, 13, 16].
Assumption 3 (Bounded variance)
There exists a constant σ ≥
such that for all i ∈ [ n ] and x ∈ R d ,
[Equation]
For a stochastic gradient with minibatch size b , we have
[Equation]
In addition, we consider the setting when the function f additionally satisﬁes the following PolyakŁojasiewicz (PL) condition [36], which can lead to fast linear convergence even when the function is nonconvex.
Assumption 4 (PL condition)
There exists some constant µ > 0 such that for any x ∈ R d ,
[Equation]
Note that the PL condition is a weaker assumption than strong convexity, which means that if the objective function f is µ -strongly convex, then the PL condition also holds with the parameter µ .
Proposed Algorithm
In this section, we introduce our proposed algorithm BEER for decentralized nonconvex optimization with compressed communication.
Before embarking on the description of BEER , we introduce some convenient matrix notation.
Since in a decentralized setting, the parameter estimates at different clients are typically different, we use X =
[ x 1 , x 2 , . . .
, x n ] to denote the collection of parameter estimates from all clients, where x i is from client i .
The average of { x i } i ∈ [ n ] is denoted by ¯ x := 1 n X 1 .
Other quantities are deﬁned similarly.
With slight abuse of notation, we deﬁne ∇ F ( X ) :=
[ ∇ f 1 ( x 1 ) , ∇ f 2 ( x 2 ) , . . . , ∇ f n ( x n )]
∈ R d × n , which collects the local gradients computed at the local parameters.
Similarly, the stochastic variant is deﬁned as ˜ ∇ b F ( X ) :=
[ ˜ ∇ b f 1 ( x 1 ) , ˜ ∇ b f 2 ( x 2 ) , . .
. , ˜ ∇ b f n ( x n )] .
We also allow the compression operator to take vector values, which are applied in a column-wise fashion, i.e.,
C ( X ) :=
[ C ( x 1 ) , . . .
, C ( x n )]
∈ R d × n .
We now proceed to describe BEER , which is detailed in Algorithm 1 using the matrix notation introduced above.
At the t -th iteration, BEER maintains the current model estimates X t and the global gradient estimates V t across the clients.
At the crux of its design, BEER also tracks and maintains two control sequences H t and G t that serve as compressed surrogates of X t and V t , respectively.
In particular, these two control sequences are updated by aggregating the received compressed messages alone (cf.
Line 5 and Line 8).
It then boils down to how to carefully update these quantities in each iteration with communication compression, which we now explain in details.
To begin, note that for each client i , BEER not only maintains its own parameters { x ti , v ti , h ti , g ti } , but also the control variables from its neighbors, namely, { h tj } j ∈N ( i ) and { g tj } j ∈N ( i ) .
Update the model estimate Each client i ﬁrst updates its model x t +1 i according to Line 3.
By thinking of { h tj } j ∈N ( i ) as a surrogate of { x tj } j ∈N ( i ) , the second term aims to achieve better consensus among the clients through mixing, while the last term performs a gradient descent update.
Update the global gradient estimate Each client i updates the global gradient estimate v t
+1 i according to Line 6, where the last correction term—based on the difference of the gradients at consecutive models—is known as a trick called gradient tracking [37, 7, 34].
The use of gradient tracking is critical: as shall be seen momentarily, it contributes to the key difference from CHOCO-SGD that enables the fast rate of O (1 /T ) without any bounded dissimilarity or bounded gradient assumptions.
Indeed, if we remove the control sequence G t and substitute Lines 6-8 by V t +1 =
˜ ∇ b F ( X t +1 ) , we recover CHOCO-SGD from BEER .
Update the compressed surrogates with communication To update { h t j } j ∈N ( i ) , each client i ﬁrst computes a compressed message q t +1 h,i that encodes the difference x t +1 i − h ti , and broadcasts to its neighbors (cf.
Line 4).
Then, each client i updates { h tj } j ∈N ( i ) by aggregating the received compressed messages { q t +1 h,j } j ∈N ( i ) following Line 5.
The updates of { g tj } j ∈N ( i ) can be performed similarly.
Moreover, all the compressed messages can be sent in a single communication round at one iteration, i.e., the communications in Lines 4 and 7 can be performed at once.
This leverages
EF21 [39] for communication compression, which is a better and simpler algorithm that deals with biased compression operators compared with the error feedback (or error compensation, EF/EC ) framework [12, 44].
Using the control sequence G t , BEER does not need to apply EF/EC explicitly and can deal with the error implicitly.
Convergence Guarantees
In this section, we show the convergence guarantees of BEER under different settings: the O (1 /T ) rate in the nonconvex setting in Section 4.1, and the improved linear rate under the PL condition (Assumption 4) in Section 4.2.
In Section 4.3, we brieﬂy sketch the proof.
Our convergence guarantees are based on an appropriately designed Lyapunov function, given by
[Equation]
where the choice of constants { c i } 4 i =1 might be different from theorem to theorem, E f (¯ x t ) − f ∗ represents the sub-optimality gap, and the errors { Ω ti } 4 i =1 are deﬁned by
[Equation]
Here, Ω t 1 and Ω t 2 denote the compression errors for X t and V t when approximated using the compressed surrogates H t and G t respectively, and Ω t 3 and Ω t 4 denote the consensus errors of X t and V t .
4.1 Convergence in the nonconvex setting
First, we present the following convergence result of BEER in the nonconvex setting when there is no local variance ( σ 2 = 0 ), i.e., we can use the local full gradient ∇ F ( X t ) instead of ˜ ∇ b F ( X t ) in
Line 6 of Algorithm 1.
Theorem 1 (Convergence in the nonconvex setting without local variance) Suppose
Assumptions 1, and 2 hold, and we can compute the local full gradient ∇ f i ( x ) for any x .
Then there exist absolute constants c 1 , c 2 , c 3 , c 4 , c γ , c η > 0 , such that if we set γ =
c γ αρ , η = c η γρ 2 /L , then for the
Lyapunov function Φ t in (4), it holds
[Equation]
Theorem 1 shows that BEER converges at a rate of O (1 /T )
when there is no local variance ( σ 2 = 0 ), which is faster than the O (1 /T 2 / 3 ) rate by CHOCO-SGD [16] and DeepSqueeze [49], and the
O (1 / √ T ) rate by SQuARM-SGD [43]; see also Table 1.
More speciﬁcally, to achieve 1 T (cid:80) T − 1 t =
E (cid:107)∇ f
(¯ x t ) (cid:107) 2 ≤ (cid:15) 2 , BEER needs O (cid:16) 1 ρ 3 α(cid:15) 2 (cid:17) iterations or communication rounds, where ρ and α are the spectral gap (cf.
and the compression parameter (cf.
(3)), respectively.
In comparison, the state-of-the-art algorithm CHOCO-SGD [16] converges at a rate of O (( G/ρ 2 αT ) 2 / 3 ) , which translates to an iteration complexity of O (cid:16) G ρ 2 α(cid:15) 3 (cid:17) , with G being the bounded gradient parameter, namely, E ξ i
∼D i (cid:107)∇ f ( x , ξ i ) (cid:107) 2 ≤ G 2 .
Therefore, BEER improves over CHOCO-SGD not only in terms of a better dependency on (cid:15) , but also removing the bounded gradient assumption, which is signiﬁcant since in practice, G can be excessively large due to data heterogeneity across the clients.
The dependency on α of BEER is consistent with other compression schemes, such as CHOCO-SGD ,
DeepSqueeze and SQuARM-SGD for the nonconvex setting, as well as LEAD [29] and EF-C-GT [28] for the strongly convex setting.
As for the dependency on ρ , BEER is slightly worse than CHOCO-SGD , where CHOCO-SGD has a dependency of O (1 /ρ 2 ) whereas BEER has a dependency of O (1 /ρ 3 ) .
This degeneration is also seen in the analysis of uncompressed decentralized algorithms using gradient tracking [46, 53], where the rate O (1 /ρ 2 ) is worse than the rate of O (1 /ρ ) for basic decentralized SGD algorithms [14, 27] by a factor of ρ .
In addition, both BEER and CHOCO-SGD use small mixing step size γ to guarantee convergence, which makes the dependency on ρ worse than their uncompressed counterparts.
Stochastic gradient oracles BEER also supports the use of stochastic gradient oracles with bounded local variance (Assumption 3).
More speciﬁcally, we have the following theorem, which generalizes
Theorem 1.
Theorem 2 (Convergence in the nonconvex setting) Suppose Assumptions 1, 2 and 3 hold.
Then there exist absolute constants c 1 , c 2 , c 3 , c 4 , c γ , c η > 0 , such that if we set γ = c γ αρ , η = c
η γρ 2 /L ,
[Table]
then for the Lyapunov function Φ t in (4), it holds
[Equation]
In the presence of local variance, the squared gradient norm of BEER has an additional term that scales on the order of O (cid:16) σ 2 αb (cid:17) (ignoring other parameters).
By choosing a sufﬁciently large minibatch size b , i.e. b ≥ O (cid:16) σ 2 α(cid:15) 2 (cid:17) , BEER maintains the iteration complexity O (cid:16) 1 ρ 3 α(cid:15) 2 (cid:17) to reach 1 T (cid:80) T {+− 1 t =
+}
E (cid:107)∇ f
(¯ x t ) (cid:107) 2 ≤ (cid:15) 2 , without the bounded gradient assumption, thus inheriting similar advantages over CHOCO-SGD as discussed earlier.
While our focus is on communication efﬁciency, to gain more insights, Table 3 summarizes both the communication rounds and the gradient complexity for different decentralized stochastic methods.
While BEER does not require the bounded gradient assumption, it may lead to a worse gradient complexity in the data homogeneous setting due to the use of large minibatch size.
Fortunately, this only impacts the local computation cost, and does not exacerbate the communication complexity, which is often the bottleneck.
It is of great interest to further reﬁne the design and analysis of BEER in terms of the gradient complexity.
4.2 Linear convergence with PL condition
Now, we show that the convergence of BEER can be strengthened to a linear rate with the addition of the PL condition (Assumption 4).
Similar to the nonconvex setting, we ﬁrst show the convergence result without local gradient variance ( σ 2 = 0 ).
Theorem 3 (Convergence under the PL condition without local variance) Suppose
Assumptions 1, 2, and 4 hold, and we can compute the local full gradient ∇ f i ( x ) for any x .
Then there exist constants c 1 , c 2 , c 3 , c 4 , c γ , c η > 0 , such that if we set γ =
c γ αρ , η = c η γρ 2 /L , then for the
Lyapunov function Φ t in (4), it holds
[Equation]
Theorem 3 demonstrates that under the PL condition, BEER converges linearly to the global optimum f ∗ , where it ﬁnds an (cid:15) -optimal solution in O (cid:16) κρ 3 α log (cid:0) [-
 ϵ cid:1)(cid:17)-]1 (cid:15) (cid:1)(cid:17) iterations, with κ :=
L/µ the condition number.
Note that in the strongly convex case, Liao et al.
[28] proposed an algorithm that also uses error feedback compression and gradient tracking simultaneously, which achieves a linear rate of convergence with unclear dependencies with salient problem parameters.
In comparison, BEER achieves an explicit linear rate of convergence in the strongly convex case as well, given strong convexity implies the PL condition.
In fact, our analysis for the nonconvex setting—as will be made evident in our proof—almost implies immediately the linear convergence under the PL condition, thus provides a major step forward compared with prior analyses that only considered the strongly convex setting.
Stochastic gradient oracles Under the PL condition, BEER also supports the use of stochastic gradient oracles with bounded local variance (Assumption 3).
The following theorem shows that
BEER linearly converges to a neighborhood of size O (cid:16) σ 2 αb (cid:17) around the global optimum.
Theorem 4 (Convergence under PL condition) Suppose Assumptions 1, 2, 3, and 4 hold.
Then there exist absolute constants c 1 , c 2 , c 3 , c 4 , c γ , c η > 0 , such that if we set γ = c γ αρ , η = c
η γρ 2 /L , then for the Lyapunov function Φ t in (4), it holds
[Equation]
4.3 Proof sketch
We now provide a proof sketch of Theorem 1, which establishes the O (1 /T ) rate of BEER in the nonconvex setting using full gradient, highlighting the technical reason of the rate improvement of
BEER over CHOCO-SGD .
The full proofs of our theorems are delegated to Appendix D.
Recalling the quantities Ω t 1 to Ω t 4 from (5), which capture the approximation errors using compression and the consensus errors of X t and V t , we would like to control these errors by obtaining inequalities of the form:
[Equation]
where 0 < a i < 1 denotes the size of the contraction, and b i > 0 wraps together other terms which may be dependent on Ω tj for j (cid:54)
= i as well as the expected squared gradient norm of ¯ v t , i.e.,
[Equation]
[Equation]
Then, by choosing the Lyapunov function properly (cf.
(4)), we can show that the Lyapunov function actually descends, and small manipulations lead to the claimed convergence results in Theorem 1.
We now explain brieﬂy how gradient tracking helps in BEER .
Note that CHOCO-SGD also has the control variable H t for the model X t , therefore in its analysis, it also deals with the quantities Ω tand Ω t 3 .
However, CHOCO-SGD also needs to bound the term (cid:107) V t (cid:107) 2F , where V t = ∇ F ( X t ) for
CHOCO-SGD when using full gradients.
Thus, CHOCO-SGD needs to assume the bounded gradient assumption and only obtain a slower O (1 /T 2 / 3 ) convergence rate.
In contrast, BEER deals with the term (cid:107) V t (cid:107) 2F by decomposing it using Young’s inequality, leading to
[Equation]
for some β > 0 .
Here, Ω t 4 can be controlled via the gradient tracking technique (see Line 6 in
Algorithm 1) without the bounded gradient assumption, and Ω t 5 can be handled using the smoothness assumption (Assumption 2).
Numerical Experiments
This section presents numerical experiments on real-world datasets to showcase BEER ’s superior ability to handle data heterogeneity across the clients, by running each experiment on unshufﬂed datasets and comparing the performances with the state-of-the-art baseline algorithms both with and without communication compression.
The code can be accessed at:
[Equation]
Experiment setup We run experiments on two nonconvex problems to compare with the baseline algorithms both with and without communication compression: logistic regression with a nonconvex regularizer [50] on the a9a dataset [5], and training a 1-hidden layer neural network on the MNIST dataset [20].
For logistic regression with a nonconvex regularizer, following Wang et al.
[50], the objective function over a datum ( a , b ) is deﬁned as
[Equation]
Communication rounds
T r a i n i n g g r a d
i e n t n o r m 500 1 , 000 1 , 500 2 , 000 0 .0 .0 .0 .
Communication rounds
T e s t i n g a cc u r a c y 0 0 .
Communication bits
T r a i n i n g g r a d
i e n t n o r m 0 0 .
Communication bits
T e s t i n g a cc u r a c y
BEERCHOCO-SGDDSGDD where the last term is the nonconvex regularizer and the regularization parameter is set to α = 0 .
For 1-hidden layer neural network training, we use 32 hidden neurons, sigmoid activation functions and cross-entropy loss.
The objective function over a datum ( a , b ) is deﬁned as f ( x ; ( a , b ))
= (cid:96) ( softmax ( W 2 sigmoid ( W 1 a + c 1 ) + c 2 ) , b ) , where (cid:96) ( · , · ) denotes the cross-entropy loss, the optimization variable is collectively denoted by x = vec ( W 1 , c 1 , W 2 , c 2 ) , where the dimensions of the network parameters W 1 , c 1 , W 2 , c 2 are 64 × 784 , 64 × 1 , 10 × 64 , and 10 × 1 , respectively.
For both experiments, we split the unshufﬂed datasets evenly to 10 clients that are connected by a ring topology.
By using unshufﬂed data, we can simulate the scenario with high data heterogeneity across clients.
Approximately, for the a9a dataset, 5 clients receive data with label 1 and others receive data with label 0 ; for the MNIST dataset, client i receives data with label i .
We use the FDLA matrix [52] as the mixing matrix to perform weighted information aggregation to accelerate convergence.
Results We compare BEER with 1) CHOCO-SGD [17], which is the state-of-the-art nonconvex decentralized optimizing algorithm using communication compression, and 2) DSGD [27] and
D 2 [48], which are decentralized optimization algorithms without compression.
All algorithms are initialized in the same experiment by the same initial point.
Moreover, we use the same best-tuned learning rate η = 0 .
1 , batch size b = 100 , and biased compression operator (gsgd b ) [1] for BEER and CHOCO-SGD on both experiments.
Figure 1 and Figure 2 plot the training gradient norm and testing accuracy against communication rounds and communication bits for logistic regression with nonconvex regularization and 1-hiddenlayer neural network training, respectively.
In the nonconvex logistic regression experiment (cf.
Figure 1), the algorithms with communication compression ( BEER and CHOCO-SGD ) converge faster than the uncompressed algorithms ( DSGD and D 2 ) in terms of the communication bits.
However, CHOCO-SGD fails to converge to a small gradient norm solution since it cannot tolerate a high level of data dissimilarity across different clients, and its performance is not comparable to D 2 .
In contrast, BEER can converge to a point with a relatively smaller gradient norm, which is comparable to D 2 .
The performance of testing accuracy is similar to that of the training gradient norm, where BEER achieves the best testing accuracy and also learns faster than the uncompressed algorithms.
Turning to the neural network experiment (cf.
Figure 2), in terms of the ﬁnal training gradient norm, BEER converges to a solution comparable to D 2 , but at a lower communication cost, while
CHOCO-SGD and DSGD cannot converge due to the data heterogeneity.
In terms of testing accuracy,
BEER and D 2 have very similar performance, and outperform CHOCO-SGD and DSGD .
Convolutional neural network training We further compare the performance of BEER and
CHOCO-SGD on training a convolutional neural network using the unshufﬂed MNIST dataset.
Specifically, the network is consist of three modules: the ﬁrst module is a 2-d convolution layer (1 input channel, 16 output channels, kernel size 5, stride 1 and padding 2) followed by 2-d batch normalization, ReLU activation and 2-d max pooling (kernel size 2 and stride 2); the second module is the same as the ﬁrst module, except the convolution layer has 16 input channels and 32 output channels; the last module is a fully-connected layer with 1568 inputs and 10 outputs. We adopt the standard [Figure] g
[Figure]
a d i [Figure] T e s t i n g a cc u r a c y 0 0 . [Figure]
[Figure]
[Figure]
[Figure]
[Figure]
[Figure]
Communication bits
T r a i n i n g g r a d
i e n t n o r m 0 0 .
Communication bits
T e s t i n g a cc u r a c y
[Figure]
cross-entropy loss, and simply average each agent’s model with its neighbors.
Figure 3 shows the testing gradient norm and accuracy against the communication bits.
It can be seen that BEER outperforms CHOCO-SGD in terms of both testing gradient norm and testing accuracy.
Both algorithms converge fast initially, however, due to to the extreme data heterogeneity, their convergence speeds signiﬁcantly degenerate after a short time.
BEER keeps improving the objective when CHOCO-SGD hits its error ﬂoor
[Figure]
which highlights BEER ’s advantage to deal with data heterogeneity
[Figure]
[Figure] [Figure]
[Figure]
Communication bits T e s t i n g a cc u r a c y BEERCHOCO-SGD In summary, BEER has much better performance in terms of communication efﬁciency than CHOCOSGD in heterogeneous data scenario, which corroborates our theory.
BEER also performs similarly or even better than the uncompressed baseline algorithm D 2 , and much better than DSGD .
In addition, by leveraging different communication compression schemes, BEER allows more ﬂexible trade-offs between communication and computation, making it an appealing choice in practice.
Conclusion
This paper presents BEER , which achieves a faster O (1 /T ) convergence rate for decentralized nonconvex optimization with communication compression, without imposing the bounded dissimilarity or bounded gradient assumptions.
In addition, a faster linear rate of convergence is established for
BEER under the PL condition.
Numerical experiments are provided to corroborate our theory on the advantage of BEER in the data heterogeneous scenario.
An interesting direction of future work is to investigate the lower bounds for decentralized (nonconvex) optimization with communication compression.
In addition, improving the dependency of BEER with the network topology parameter ρ , possibly leveraging the analysis in Koloskova et al.
[18], is of interest.
Acknowledgement
The work of H. Zhao is supported in part by NSF, ONR, Simons Foundation, DARPA and SRC through awards to S. Arora.
The work of B. Li, Z. Li and Y. Chi is supported in part by ONR N0001419-1-2404, by AFRL under FA8750-20-2-0504, and by NSF under CCF-1901199, CCFand CNS-2148212.
B. Li is also gratefully supported by Wei Shen and Xuehong Zhang Presidential
Fellowship at Carnegie Mellon
Appendix A Related works
In this section, we review closely related literature on decentralized optimization, communicationefﬁcient algorithms, and communication compression.
Decentralized optimization Decentralized optimization, which is a special class of linearly constrained (consensus constraint) optimization problems, has been studied for a long time [3, 9].
Many centralized algorithms can be intuitively converted into decentralized counterparts by using gossip averaging [14, 52], which mixes parameters from neighboring clients to enforce consensus.
However, direct applications of gossip averaging often lead to either slow convergence or high error ﬂoors [33], and many ﬁxes have been proposed in response [42, 55, 37, 7, 34].
Among them, gradient tracking [37, 7, 34], which applies the idea of dynamic average consensus [58] to global gradient estimation, provides a systematic approach to reduce the variance and has been successfully applied to decentralize many algorithms with faster rates of convergence.
For nonconvex problems, a small sample of gradient tracking aided algorithms include GT-SAGA [54], D-GET [46], GT-SARAH [53], and DESTRESS [22].
Our BEER algorithm also leverages gradient tracking to eliminate the strong bounded gradient and bounded dissimilarity assumptions.
Communication-efﬁcient algorithms While decentralized optimization is a classical topic, the focus on communication efﬁciency is relatively new due to the advances in large-scale machine learning.
Roughly speaking, there are primarily two kinds of approaches to reduce communication cost: 1) local methods : in each communication round, clients run multiple local update steps before communicating, in the hope of reducing the number of communication rounds; 2) compressed methods : clients send compressed communication messages, in the hope of reducing the communication cost per communication round.
Both categories have received signiﬁcant attention in recent years.
For local methods, a small sample of examples include FedAvg [31], Local-SVRG [10], SCAFFOLD [13] and FedPAGE [57].
On the other hand, many compressed methods are proposed recently such as [1, 15, 47, 45, 16, 25, 11, 24, 39, 8, 56].
In this paper, we will adopt the second approach based on communication compression to enhance communication efﬁciency.
Decentralized nonconvex optimization with compression As discussed earlier and summarized in Table 1, there have been limited existing works on decentralized nonconvex optimization with communication compression.
In particular, SQuARM-SGD [43] can be viewed as CHOCO-SGD with momentum, but its theoretical convergence rate is slower than the original CHOCO-SGD .
Deepsqueeze [49] and CHOCO-SGD have a close relationship, where Deepsqueeze can be viewed as decentralized SGD ( DSGD or D-PSGD ) with the explicit error feedback framework, and CHOCO-SGD uses control variables to implicitly handle the compression error.
B Examples of Compression Operators
We provide some examples of compression operators satisfying Deﬁnition 1 that are used in our experiments.
gsgd b [1] gsgd b : R d → R d ( b > 1 ), or random dithering, is a compression operator satisfying the following formula
[Equation]
where τ = 1 + min (cid:110)
d 2 2( b − 1) , √ d 2 ( b − 1) (cid:111) , and u is the random dithering vector uniformly sampled from [0 , 1] d .
It follows that gsgd b satisﬁes Deﬁnition 1 with α = 1 /τ .
random k [51] random k :
R d → R d , or random sparsiﬁcation, is a compression operator satisfying the following formula
[Equation]
where u is uniformly sampled from the following set { u (cid:48) ∈ { 0 , 1 } d | (cid:107) u (cid:48) (cid:107) 1 = k } and (cid:12) denotes the Hadamard product or element-wise product.
In words, random k ( x ) randomly keeps k coordinates of x and sets the remaining coordinates of x to 0 .
It follows that random k ( x ) satisﬁes Deﬁnition 1 with α = k/d .
top k
[2, 45] top k : R d → R d is a compression operator satisfying the following formula
[Equation]
where u ( x ) ∈ { 0 , 1 } d that satisﬁes (cid:107) u {+(cid:107) 
+}
= k and u i = 1 for all i ∈ I
such that | x i | ≥ | x j | for any i ∈ I and j ∈ [ d ] \ I .
In words, top k keeps the coordinates of x with the k largest absolute values, and sets the other coordinates to 0 .
It follows that top k ( x ) satisﬁes Deﬁnition 1 with α = k/d .
C Additional Experiments
This section provides two numerical experiments in addition to Section 5 to investigate BEER ’s performance under different network topologies and compression operators.
Analogous to Section 5, we run logistic regression with nonconvex regularization ( α = 0 . 05 ) on unshufﬂed a9a dataset split evenly to 40 agents, and use FDLA matrix for weighted information aggregation.
C.1 Comparison between different communication topologies
This experiment compares BEER ’s performance on the following network topologies: ring topology ( ρ = 0 . 022 ), star topology ( ρ = 0 . 049 ), grid topology ( ρ = 0 . 063 ), and Erdös-Rènyi topology with connectivity probability p = 0 .
5 and p = 0 .
2 ( ρ = 0 .
51 and ρ = 0 . 77 , respectively).
All experiments use the same best-tuned step size η = 0 .
5 , batch size 100 and γ = 0 .
7 , to guarantee convergence while achieving fast convergence.
[Figure]
Figure 4 shows the experiment results, which empirically veriﬁes that BEER is robust to network topologies, i.e., despite the huge difference of spectral gap ρ between different topologies, BEER can use nearly the same hyperparameters to obtain similar performance.
The experiment results complement our theoretical analysis and show that BEER may converge way better in practice despite its cubic dependency of 1 /ρ in Theorem 2.
C.2 Comparison between different compression schemes
This experiment compares BEER ’s performances on a ring topology using the following compression algorithms: identity (no compression), gsgd 5 and top 10 , which are deﬁned in Appendix B. Parameters are chosen such that BEER with different compression operators transfer similar amount of data per communication round.
All experiments use the same best-tuned step size η = 0 .
5 , batch size 100 and γ = 0 .
7 , except that we use η = 0 .
005 and γ = 0 .
8 for top 10 compression.
[Figure]
T r a i n i n g g r a d
i e n t n o r m
[Figure]
[Figure]
Communication rounds
T e s t i n g a cc u r a c y [-
 [Figure] [Figure] [Figure]-]0 1 2 3 4· 10 0 .0 .0 .0 .
Communication bits
T r a i n i n g g r a d
i e n t n o r m 0 1 2 3 4· 100 .0 .0 .0 .
Communication bits
T e s t i n g a cc u r a c y
Identitygsgd 5 top
Results are shown in Figure 5.
From the right two panels in Figure 5, we can conclude using any compression operator outperforms the non-compressed baseline, in the sense that, all compressors converge to a solution with lower gradient norm and higher testing accuracy at a lower communication cost.
From the second to the left panel in Figure 5, we can ﬁnd in terms of communication rounds and testing accuracy, different compression operators can lead to signiﬁcantly behaviors.
For example, BEER with gsgd 5 compression operator converges faster than BEER without compression, but BEER with top 10 compression operator converges slower than BEER without compression.
Among all experiments, BEER with gsgd 5 reaches the highest ﬁnal testing accuracy, while behaves similar to
BEER without compression in terms of communication rounds, which implies that gsgd b (random quantization) may be a more practical compression operator, or may be more suitable for BEER .
D Proof of Main Theorems D.1 Technical preparation
We ﬁrst recall some classical inequalities that helps our derivation.
Proposition 1 Let { v 1 , . . .
, v τ } be a set of τ vectors in R d .
Then, ∀ β > 0 , we have
[Equation]
Here, (7) is referred as the Cauchy-Schwarz inequality, (8) and (9) are referred as Young’s inequality.
Additional notation The following notation will be used throughout our proof:
[Equation]
where ¯ x := 1 n X 1 with X =
[ x 1 , x 2 , . . .
, x n ] .
Properties of the mixing matrix We make note of several useful properties of the mixing matrix in the following lemma.
Lemma 1 Let W be a mixing matrix satisfying Assumption 1 and has spectral gap ρ , then for any matrix M ∈ R d × n and ¯ m = 1 n M 1 , we have
[Equation]
In addition, for any γ ∈ (0 , 1] , the matrix (cid:102) W =
I + γ ( W − I ) satisﬁes Assumption 1 with a spectral gap at least γρ .
Proof: The ﬁrst claim follows from the spectral decomposition of W .
Since W is a doubly stochastic matrix, the largest absolute eigenvalue of W is 1 and the corresponding eigenvector is 1 .
Let v 2 , . .
. , v n be the eigenvectors of W corresponding to the remaining eigenvalues.
Then, we have
[Equation]
where the ﬁrst equality follows from 1 (cid:62) W = 1 (cid:62) , m i denotes the transpose of i -th row of matrix
M , and ¯ m i denotes the average of m i .
Now we decompose m i − ¯ m i 1 using the eigenvectors of
W .
Noting that
[Equation]
and thus we can write
[Equation]
for some { c j } n j =2 .
Then, we have
[Equation]
and we conclude the proof of this claim.
For the second claim, recall the fact that if v is an eigenvector of W corresponding to the eigenvalue λ , then v is also an eigenvector of (cid:102) W with the corresponding eigenvalue (1 − γ ) + γλ .
This claim follows from simple computation based on this relation.
[Equation]
A key consequence of gradient tracking Before diving in the proofs of the main theorems, we record a key property of gradient tracking.
Speciﬁcally, we have the following lemma.
Lemma
If ¯ v 0 = 1 n ˜ ∇ b F ( X 0 ) 1 , then for any t ≥ 1 , we have
[Equation]
(11) and
[Equation]
Proof: We ﬁrst prove (11) by induction.
For the base case ( t = 0 ), the relation (11) is obviously true by the means of initialization.
Now suppose that at the t -th iteration, the relation (11) is true, i.e.,
[Equation]
then at the ( t + 1) -th iteration, we have
[Equation] [Equation]
where (13) follows from the update rule of BEER (cf.
Line 6), the penultimate line follows from
W 1 = 1 , and the last line follows from the induction hypothesis at the t -th iteration.
Thus the induction hypothesis is also true at the ( t + 1) -th iteration, and we complete the proof of (11).
For (12), it follows from the update rule of BEER (cf.
Line 3)
that
[Equation]
where the second line uses W 1 = 1 and (11).
[Equation]
D.2 Recursive relations of main errors
As mentioned previously, the proof is centered around controlling the following set of errors which we repeat below for convenience (cf.
[Equation]
In particular [Equation] we aim to build a set of recursive relations of Ω t 1 to Ω t 4 , which will be speciﬁed in the following lemma.
Lemma 3 Suppose Assumptions 1, 2 and 3 hold, then for any t ≥ 0 , we have
[Equation]
where
[Equation]
is the square of the maximum singular value of the matrix W − I .
Note that the eigenvalues of W and I all lies in [ − 1 , 1] , and thus clearly C ≤ 4 .
Proof: We will establish the inequalities in (14) one by one.
Bounding Ω t 1 in (14a)
First from the update rule of BEER (cf.
Line 5), we have
[Equation] [Equation]
where the ﬁrst inequality comes from the deﬁnition of compression operators (Deﬁnition 1) and the second inequality comes from Young’s inequality.
It then boils down to bound (cid:13)(cid:13)
X t +1 − X t (cid:13)(cid:13) 2 F , for which we have
[Equation]
[Equation] [Equation]
where in the ﬁrst line we use the update rule of BEER (cf. Line 3), in the second line we use the property of the mixing matrix 1 (cid:62) W = 1 (cid:62)
[Equation]
and in the third line, we apply Young’s inequality (cf.
{+In the fourth line, we use (cid:107) v (cid:107) 
+}
= (cid:107) v − ¯ v 1 (cid:107) 2 + n ¯ v 2 for any vector v with an average ¯ v .
Plugging this back into (16), we get
[Equation]
Plugging in the deﬁnitions of Ω ti , we obtain (14a).
Bounding Ω t 2 in (14b)
Similar to the derivation of (14a), by applying the update rule of G t in
BEER (Line 8), the deﬁnition of compression operators (Deﬁnition 1), and Young’s inequality, we have
[Equation]
It then boils down to bound (cid:13)(cid:13) V t +1 − V t (cid:13)(cid:13) 2 F .
By the update rule of BEER (cf.
Line 6), we have
[Equation]
F =
[Equation]
[Table]
[Equation]
where (i) comes from Young’s inequality (cf.
and basic facts of matrix norm (cf.
(15)), (ii) comes from the bounded variance assumption (Assumption 3) [Equation] (iii) comes from the smoothness assumption (Assumption 2)
[Equation]
and (iv) follows from (17).
Combining the above inequality with (18)
[Equation]
we have
[Equation]
Plugging in the deﬁnitions of Ω ti , we obtain (14b).
Bounding Ω t 3 in (14c)
To bound the consensus error (cid:13)(cid:13)
X t +1 − ¯ x t {++
 [Equation]+} 2 F , by the update rule of
BEER (cf.
Line 3), we have
[Equation]
where (i) follows from the deﬁnition (cid:102) W
= I + γ ( W − I ) , (ii) follows from applying Young’s inequality twice and Lemma 1, i.e.
[Equation]
(iii) follows by choosing β
= γρ/ 2 , and (iv) uses the deﬁnition of C (cf.
Plugging in the deﬁnitions of Ω ti , we obtain (14c).
Bounding Ω t 4 in (14d)
First, note that
[Equation]
Thus by the update rule of BEER (cf. Line 6), we have
[Equation]
[Table]
[Equation]
where (i) and (ii) are obtained similarly as the derivation of (14c), and the last line follows from (17).
Thus, we can get (14d) by plugging in the deﬁnitions of Ω t i and conclude the proof.
[Equation]
D.3 Proof of Theorem 1 and
Note that Theorem 2 is a strict generalization of Theorem 1, and thus we will directly prove Theorem 2.
This proof makes use of Lemma 2 and Lemma 3, by constructing some proper Lyapunov function and demonstrate its descending property using a linear system argument, which is also used in, e
[Equation]
g.,
Li et al.
[22], Liao et al.
Step 1: establishing a “descent” property of the function value First, we have the following inequality captures the “descent” of the function value.
[Equation]
where (i) comes from the L -smooth assumption (Assumption 2), (ii) comes from Lemma 2.
Take expectation on both sides, and using the bounded variance assumption (Assumption 3) and independence of stochastic samples, we get
E f
(¯ x t +1 )
[Equation]
where (i) comes from Young’s inequality
[Equation]
and (ii) comes from the L -smooth assumption (Assumption 2) again.
Finally, by substituting deﬁnitions of Ω t 3 and Ω t
[Equation]
we reach
[Equation]
Step 2: constructing the Lyapunov function By representing
[Equation]
[Equation]
Lemma 3 can be written more compactly as
[Equation]
Deﬁne the Lyapunov function
[Equation]
where
[Equation]
for some constants c 1 , c 2 , c 3 , c 4 that will be speciﬁed later.
By (21) from Lemma 3 and the descent property (19)
[Equation]
we have Φ t +
[Equation]
where q = {+[
 [Equation] [Equation]+}
For a moment we assume that there exist some constants c 1 , c 2 , c 3 , c 4 > 0 such that
[Equation]
leading to
[Equation]
The proof is thus completed by recursing the above relation over t = 0 , . .
, T − 1 .
Step 3: verifying (24) It boils down to verify (24) is feasible, and it is equivalent to verify there exist parameters
c 1 , c 2 , c 3 , c 4 , γ, η > 0 satisfying the following matrix inequality:
[Equation]
Note that by choosing γ =
c γ ρα, η = c η γρ 2 /L , and setting c γ ≤ 1 6 √ C and c η ≤ 19 , we get
[Equation]
Now [Equation] it sufﬁces to show that there exist c 1 , c 2 , c 3 , c 4 , c γ , c η > 0 such that the following inequalities are satisﬁed:
[Equation]
Given α ≤ 1 , ρ ≤ 1 , this can be further reduced to show the existence of c 1 , c 2 , c 3 , c 4 , c γ , c η > 0 such that
[Equation]
[Table] [Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]

[Table]
[Equation]
[Table]
 
[Table]
This can be easily veriﬁed by noting that as long as c η and c γ are set sufﬁciently small, it is straightforward to ﬁnd feasible c 1 , c 2 , c 3 , c 4 .
D.4 Proof of Theorem 3 and
Since Theorem 4 is a generalization of Theorem 3, it sufﬁces to directly prove Theorem 4.
The proof strategy of Theorem 4 is similar to that of Theorem 2.
However, in order to achieve the advertised linear convergence rate under the PL condition (Assumption 4), we need to use a slightly different linear system.
Denote κ :=
L/µ .
Taking the same Lyapunov function Φ t in (22), by the same argument of
Section D.3 up to (23), we have Φ
[Equation]
+
[Equation] where q = {+[
 [Equation]+} 0] (cid:62)
[Equation]
and the second inequality follows from the PL condition (Assumption 4).
If we can establish that there exist there exist some constants c 1 , c 2 , c 3 , c 4 such that
[Equation]
we arrive at
[Equation]
Recursing the above relation then complete the proof
[Equation]
It then boils down to establish (26).
By similar arguments as Section D.3, in view of (25) and α ≤ 1 , ρ ≤ 1 , it is sufﬁcient to show there exist constants c 1 , c 2 , c 3 , c 4 , c γ , c η > 0 such that
[Equation]

[Equation]

[Equation]
This can be easily veriﬁed by noting that as long as c η and c γ are set sufﬁciently small, it is straightforward to ﬁnd feasible c 1 , c 2 , c 3 , c 4 .