On the Convergence of Decentralized Adaptive Gradient Methods
Abstract
11 1 The work of Xiangyi Chen was conducted while he was an intern at Baidu Research – Bellevue in Summer 2019.Adaptive gradient methods including Adam, AdaGrad, and their variants have been very successful for training deep learning models, such as neural networks. Meanwhile, given the need for distributed computing, distributed optimization algorithms are rapidly becoming a focal point. With the growth of computing power and the need for using machine learning models on mobile devices, the communication cost of distributed training algorithms needs careful consideration. In this paper, we introduce novel convergent decentralized adaptive gradient methods and rigorously incorporate adaptive gradient methods into decentralized training procedures. Specifically, we propose a general algorithmic framework that can convert existing adaptive gradient methods to their decentralized counterparts. In addition, we thoroughly analyze the convergence behavior of the proposed algorithmic framework and show that if a given adaptive gradient method converges, under some specific conditions, then its decentralized counterpart is also convergent. We illustrate the benefit of our generic decentralized framework on a prototype method, i.e., AMSGrad, both theoretically and numerically.
1 Introduction
Distributed training of machine learning models has been drawing growing attention in the past few years due to its practical benefits and necessities. Given the evolution of computing capabilities of CPUs and GPUs, computation time in distributed settings is gradually dominated by the communication time in many circumstances (Chilimbi et al., 2014; McMahan et al., 2017). As a result, a large number of recent works have been focusing on reducing communication cost for distributed learning (Alistarh et al., 2017; Lin et al., 2018; Wangni et al., 2018; Stich et al., 2018; Wang et al., 2018; Tang et al., 2019). In the traditional parameter (central) server setting, where a parameter server is employed to manage communication in the whole network (Zhao et al., 2020), many effective communication reductions have been proposed based on gradient compression (Aji and Heafield, 2017) and quantization (Chen et al., 2010; Jégou et al., 2011; Ge et al., 2013; Xu et al., 2021) techniques. Despite these communication reduction techniques, its cost still, usually, scales linearly with the number of workers. Due to this limitation and with the sheer size of decentralized devices, the decentralized training paradigm (Duchi et al., 2012), where the parameter server is removed and each node only communicates with its neighbors, is drawing attention. It has been shown in Lian et al. (2017) that decentralized training algorithms can outperform parameter server-based algorithms when the training bottleneck is the communication cost. The decentralized paradigm is also preferred when a central parameter server is not available.
In light of recent advances in nonconvex optimization, an effective way to accelerate training is by using adaptive gradient methods like AdaGrad (Duchi et al., 2011), Adam (Kingma and Ba, 2015) or AMSGrad (Reddi et al., 2018). Their popularity are due to their practical benefits in training neural networks, featured by faster convergence and ease of parameter tuning compared with Stochastic Gradient Descent (SGD) (Robbins and Monro, 1951). Despite a large number of studies within the distributed optimization literature, few works have considered bringing adaptive gradient methods into distributed training, largely due to the lack of understanding of their convergence behaviors. Notably, Reddi et al. (2021) develop a decentralized ADAM method for distributed optimization problems with a direct application to federated learning. An inner loop is employed to compute mini-batch gradients on each node and a global adaptive step is applied to update the global parameter at each outer iteration. Yet, in the settings of our paper, nodes can only communicate to their neighbors on a fixed communication graph while a server/worker communication is required in Reddi et al. (2021). Designing adaptive methods in such settings is highly non-trivial due to the already complex update rules and to the interaction between the effect of using adaptive learning rates and the decentralized communication protocols. This paper is an attempt at bridging the gap between both realms in nonconvex optimization. Our contributions are summarized as follows:
- •
We investigate the use of adaptive gradient methods in the decentralized training paradigm, where nodes have only a local view of the whole communication graph. We develop a general technique that converts an adaptive gradient method from a centralized method to its decentralized variant and highlight the importance of adaptive learning rate consensus.
- •
By using our proposed technique, we present a new decentralized optimization algorithm, called decentralized AMSGrad, as the decentralized counterpart of AMSGrad.
- •
We provide a theoretical verification interface, in Theroem 2, for analyzing the behavior of decentralized adaptive gradient methods obtained as a result of our technique. Thus, we characterize the convergence rate of decentralized AMSGrad, which is the first convergent decentralized adaptive gradient method, to the best of our knowledge.
The paper is organized as follows. In Section 2, we show the importance of adaptive learning rate consensus by proving a divergent example for a recently proposed decentralized adaptive gradient method, DADAM (Nazari et al., 2019). In Section 3, we develop our general framework for converting adaptive gradient methods into their decentralized counterparts along with convergence analysis and converted algorithms. Illustrative experiments are presented in Section 4. Section 5 concludes our work.
Notations: denotes variable at node and iteration . denotes the entry-wise norm of a matrix, i.e., . We introduce important notations used throughout the paper: for any , where denotes the matrix (where is a column vector), , , , , , , , , and .
2 Decentralized Adaptive Training and Divergence of DADAM
2.1 Related Work
Decentralized optimization. Traditional decentralized optimization methods include well-know algorithms such as ADMM (Boyd et al., 2011), Dual Averaging (Duchi et al., 2012), Distributed Subgradient Descent (Nedic and Ozdaglar, 2009). More recent algorithms include Extra (Shi et al., 2015), Next (Lorenzo and Scutari, 2016), Prox-PDA (Hong et al., 2017), GNSD (Lu et al., 2019), and Choco-SGD (Koloskova et al., 2019). While these algorithms are commonly used in applications other than deep learning, recent algorithmic advances in the machine learning community have shown that decentralized optimization can also be useful for training deep models such as neural networks. Lian et al. (2017) demonstrate that a stochastic version of Decentralized Subgradient Descent can outperform parameter server-based algorithms when the communication cost is high. Tang et al. (2018) propose the D2 algorithm improving the convergence rate over Stochastic Subgradient Descent. Assran et al. (2019) propose the Stochastic Gradient Push that is more robust to network failures for training neural networks. The study of decentralized training algorithms in the machine learning community is only at its initial stage. No existing work, to our knowledge, has seriously considered integrating adaptive gradient methods in the setting of decentralized learning. One noteworthy work (Nazari et al., 2019) proposes a decentralized version of AMSGrad (Reddi et al., 2018) and it is proven to satisfy some non-standard regret.
Adaptive gradient methods. Adaptive gradient methods have been popular in recent years due to their superior performance in training neural networks. Most commonly used adaptive methods include AdaGrad (Duchi et al., 2011) or Adam (Kingma and Ba, 2015) and their variants. Key features of such methods lie in the use of momentum and adaptive learning rates (which means that the learning rate is changing during the optimization and is anisotropic, i.e., depends on the dimension). The method of reference, called Adam, has been analyzed in Reddi et al. (2018) where the authors point out an error in previous convergence analyses. Since then, a variety of papers have been focusing on analyzing the convergence behavior of the numerous existing adaptive gradient methods. Ward et al. (2019), Li and Orabona (2019) derive convergence guarantees for a variant of AdaGrad without coordinate-wise learning rates. Chen et al. (2019) analyze the convergence behavior of a broad class of algorithms including AMSGrad and AdaGrad. Zhou et al. (2018) give a more refined analysis of AMSGrad with better convergence rate. Zou and Shen (2018) provide a unified convergence analysis for AdaGrad with momentum. Noticeable recent works on adaptive gradient methods can be found in Agarwal et al. (2019); Luo et al. (2019); Zaheer et al. (2018).
2.2 Decentralized Optimization
In distributed optimization (with nodes), we aim at solving the following problem
| (1) |
where is the vector of parameters and is only accessible by the -th node. Through the prism of empirical risk minimization procedures, can be viewed as the average loss of the data samples located at node , for . Throughout the paper, we make the following mild assumptions required for analyzing the convergence behavior of the different decentralized optimization algorithms introduced above:
A 1.
For all , is differentiable and the gradients are -Lipschitz, i.e., for all , .
A 2.
We assume that, at iteration , node accesses a stochastic gradient . The stochastic gradients and the gradients of have bounded norms, i.e., , .
A 3.
The gradient estimators are unbiased and each coordinate has bounded variance, i.e., and .
Assumptions A1 and A3 are standard in the distributed optimization literature. A2 is slightly stronger than the traditional assumption stating that the estimator has bounded variance, yet, it is commonly used for the analysis of adaptive gradient methods (Chen et al., 2019; Ward et al., 2019). Note that the bounded gradient estimator assumption A2 implies the bounded variance assumption A3. In decentralized optimization, the nodes are connected as a graph and each node only communicates to its neighbors. Hence, one usually constructs an matrix for information sharing when designing new training algorithms. We denote by its -th largest eigenvalue and define . The matrix cannot be arbitrary, its required key properties are listed in the following assumption:
A 4.
The matrix satisfies: (i) , , , (ii) , , and (iii) if node and node are not neighbors.
We now present the convergence failure of current decentralized adaptive method before introducing our general framework for decentralized adaptive gradient methods.
2.3 Divergence of DADAM
Recently, Nazari et al. (2019) initiated an attempt to bring adaptive gradient methods into decentralized optimization with Decentralized ADAM (DADAM), shown in Algorithm 1. DADAM is essentially a decentralized version of ADAM and the key modification is the use of a consensus step on the optimization variable to transmit information across the network, encouraging its convergence.
The matrix is a doubly stochastic matrix (which satisfies A4) employed for achieving average consensus of . Introducing such mixing matrix is standard while designing the extension of an algorithm to its decentralized variant, such as distributed gradient descent (Nedic and Ozdaglar, 2009; Yuan et al., 2016). It is proven in Nazari et al. (2019) that DADAM admits a non-standard regret bound in the online setting. Nevertheless, whether the algorithm can converge to stationary points in standard offline settings such training neural networks is still unknown. The next theorem shows that DADAM may fail to converge in the offline settings.
Theorem 1.
Proof.
Consider a two-node setting with objective function and , . We set the mixing matrix . The optimal solution is . Both and are smooth and convex with bounded gradient norm 4 and 2, respectively. We also have (defined in A1). If we initialize with and run DADAM with and , we will get and . Since due to bounded gradient, and are non-decreasing, we have . Thus, after , DADAM is equivalent to running decentralized gradient descent (D-PSGD) (Yuan et al., 2016) with a re-scaled and , i.e., running D-PSGD on with and , which unique optimal . Define , then by Theorem 2 in Yuan et al. (2016), we have when , . Since has a unique optima , the above bound implies is converging to which has non-zero gradient on function . ∎
Theorem 1 shows that, even though DADAM is proven to satisfy some regret bounds (Nazari et al., 2019), it can fail to converge to stationary points in the nonconvex offline setting (common for training neural networks). We conjecture that this inconsistency in the convergence behavior of DADAM is due to the definition of the regret in Nazari et al. (2019). We want to remark that this is not the first time adaptive gradient methods are found to be divergent. For example, Reddi et al. (2018) constructs examples showing that ADAM is divergent and Chen et al. (2020) exhibits a naive application of adaptive gradient methods under the federated learning settings that can potentially fail to converge. All these examples contribute to our motivation to rigorously study the convergence of adaptive gradient methods in the decentralized setting. The next section presents decentralized adaptive gradient methods that are guaranteed to converge to stationary points under assumptions and provide a characterization of that convergence in finite-time and independently of the initialization.
3 On the Convergence of Decentralized Adaptive Gradient Methods
In this section, we discuss the difficulties of designing adaptive gradient methods in decentralized optimization and introduce an algorithmic framework that can turn existing convergent adaptive gradient methods into their decentralized counterparts. We also develop the first convergent decentralized adaptive gradient method, converted from AMSGrad, as an instance of this framework.
3.1 Importance and Difficulties of Consensus on Adaptive Learning Rates
The divergent example provided in the previous section implies that one should synchronize the adaptive learning rates on different nodes. This can easily be achieved in the parameter server setting where all the nodes are sending their gradients to a central server at each iteration. The parameter server can then exploit the received gradients to maintain a sequence of synchronized adaptive learning rates when updating the parameters, see Reddi et al. (2021) for further details. However, in our decentralized setting, every node can only communicate with its neighbors and such central server does not exist. Under that setting, the information for updating the adaptive learning rates can only be shared locally instead of broadcasted over the whole network. This makes it impossible to obtain, in a single iteration, a synchronized adaptive learning rate update using all the information in the network.
Systemic Approach: On a systemic level, one way to alleviate this bottleneck is to design communication protocols in order to give each node access to the same aggregated gradients over the whole network, at least periodically if not at every iteration. Therefore, the nodes can update their individual adaptive learning rates based on the same shared information. However, such solution may introduce an extra communication cost since it involves broadcasting the information over the whole network.
Algorithmic Approach: Our contributions being on an algorithmic level, another way to solve the aforementioned problem is by letting the sequences of adaptive learning rates, present on different nodes, to gradually consent, through the iterations. Intuitively, if the adaptive learning rates can consent fast enough, the difference among the adaptive learning rates on different nodes will not affect the convergence behavior of the algorithm. Consequently, no extra communication costs need to be introduced. We now develop this exact idea within the existing adaptive methods stressing on the need for a relatively low-cost and easy-to-implement consensus of adaptive learning rates.
Below is main archetype of the adaptive rates consensus mechanism within a decentralized framework that we propose in this paper.
3.2 Unifying Decentralized Adaptive Gradient Framework
While each node can have different in DADAM (Algorithm 1), one can keep track of the min/max/average of these adaptive learning rates and use that latter quantity as the new adaptive learning rate. The upstream definition of some convergent lower and upper bounds may also lead to a gradual synchronization of the adaptive learning rates on different nodes as developed for AdaBound in Luo et al. (2019).
In this paper, we present an algorithm framework for decentralized adaptive gradient methods as Algorithm 2, which uses average consensus of (see consensus update in line 8 and 11) to help convergence. Algorithm 2 can become different adaptive gradient methods by specifying as different functions. E.g., when we choose , Algorithm 2 becomes a decentralized version of AdaGrad. When one chooses to be the adaptive learning rate for AMSGrad, we get decentralized AMSGrad (Algorithm 3). The intuition of using average consensus is that for adaptive gradient methods such as AdaGrad or Adam, approximates the second moment of the gradient estimator, the average of the estimations of those second moments from different nodes is an estimation of second moment on the whole network. Also, this design will not introduce any extra hyperparameters that can potentially complicate the tuning process ( in line 9 is important for numerical stability as in vanilla Adam). The following result gives a finite-time convergence rate for our framework described in Algorithm 2.
Theorem 2.
In addition, one can specify to show convergence in terms of , , and . An immediate result, shown in Corollary 2.1, is by setting :
Corollary 2.1.
Corollary 2.1 indicates that if and is bounded from above, then Algorithm 2 is guaranteed to converge to stationary points of the loss function. Intuitively, this means that if the adaptive learning rates on different nodes do not change too fast, the algorithm can converge. In convergence analysis, the term upper bounds the total bias in update direction caused by the correlation between and . It is shown in Chen et al. (2019) that when , for AdaGrad and AMSGrad. Besides, for Adam which do not converge. Later, we will show convergence of decentralized versions of AMSGrad and AdaGrad by bounding this term as and , respectively. Corollary 2.1 also conveys the benefits of using more nodes in the graph employed. When is large enough such that the term dominates the right hand side of (3), then linear speedup can be achieved by increasing the number of nodes .
Another point worth discussion is the choice of since the convergence rate depends on which is depedent on . A common way to set for undirected graph is the maximum-degree method (MDM) in Boyd et al. (2004). Denote as degree of vertex and , MDM sets , if and is an edge, and otherwise. This ensures Assumption A4 for many common connected graph types, so does the variant for any . A more refined choice of coupled with a comprehensive discussion on in our Theorem 2 can be found in Boyd et al. (2009), e.g., for cycle graphs, for hypercube graphs, for fully connected graph. Intuitively, can be close to 1 for sparse graphs and to 0 for dense graphs. This is consistent (2), whose RHS is large for close to 1 and small for close to 0 since average consensus on sparser graphs is expected to take longer time.
3.3 Application to AMSGrad algorithm
We now present, in Algorithm 3, a notable special case of our algorithmic framework, namely Decentralized AMSGrad, which is a decentralized variant of AMSGrad. Compared with DADAM, the above algorithm exhibits a dynamic average consensus mechanism to keep track of the average of , stored as on -th node, and uses for updating the adaptive learning rate for -th node. As the number of iteration grows, even though on different nodes can converge to different constants, the will converge to the same number if the limit exists.
This average consensus mechanism enables the consensus of adaptive learning rates on different nodes, which accordingly guarantees the convergence of the method to stationary points. The consensus of adaptive learning rates is the key difference between decentralized AMSGrad and DADAM and is the reason why decentralized AMSGrad is convergent while DADAM is not.
One may notice that decentralized AMSGrad does not reduce to AMSGrad for since the quantity in line 10 is calculated based on instead of . This design encourages the execution of gradient computation and communication in a parallel manner. Specifically, line 4-7 (line 4-6) in Algorithm 3 (Algorithm 2) can be executed in parallel with line 8-9 (line 7-8) to overlap communication and computation time. If depends on which in turn depends on , the gradient computation must finish before the consensus step of the adaptive learning rate in line 9. This can slow down the running time per-iteration of the algorithm. To avoid such delayed adaptive learning, adding before line 9 and getting rid of line 12 in Algorithm 2 is an option. Similar convergence guarantees will hold since one can easily modify our proof of Theorem 2 for such update rule. As stated above, Algorithm 3 converges, with the following rate:
Theorem 3.
where , , , , and . are independent of , and defined in Theorem 2. In addition, the consensus of variables at different nodes is given by .
Theorem 3 shows that Algorithm 3 converges with a rate of when is large, which is the best known convergence rate under the given assumptions. Note that in some related works, SGD admits a convergence rate of without any dependence on the dimension of the problem. Such improved convergence rate is derived under the assumption that the gradient estimator have a bounded norm, which can thus hide a dependency of in the final convergence rate. Another remark is the convergence measure can be converted to using the fact that (by update rule of Algorithm 3), for the ease of comparison with existing literature.
Proof Sketch of Theorem 2: The detailed proofs are reported in the appendix of this paper.
Step 1: Reparameterization. Similarly to Yan et al. (2018); Chen et al. (2019) with SGD (with momentum) and centralized adaptive gradient methods, define the following auxiliary sequence: with . Such an auxiliary sequence can help us deal with the bias brought by the momentum and simplifies the convergence analysis.
Step 2: Bounding gradient. With the help of , we can remove the complicated update dependence on , and perform convergence analysis to bound gradient of . Then bound gradient of by smoothness of gradient, which yields:
| (4) |
where and are three terms, defined in Appendix B, and can be tightly bounded from above. We first bound using the following quantities of interest:
where and recall that is -th largest eigenvalue of .
Then, bounding and give rise to the terms related to .
Step 3: Bounding the drift term variance. An important term that needs upper bounding in our proof is the variance of the gradients multiplied (element-wise) by the adaptive learning rate, , where . We can then transform into by splitting out two error terms, then bounding the error terms as operated for and . Then, by plugging it into (4), we obtain the desired bound in Theorem 2.
Proof of Theorem 3: Recall the bound in (3) of Theorem 2. Since Algorithm 3 is a special case of Algorithm 2, the remaining of the proof consists of characterizing the growth rate of . By construction, is non decreasing, so that . We can also prove using . Then we have . Substituting into (3) yields the desired convergence bound for Algorithm 3.
3.4 Application to AdaGrad algorithm
In this section, we provide a decentralized version of AdaGrad (Duchi et al., 2011) (optionally with momentum) converted by Algorithm 2, further supporting the usefulness of our decentralization framework. The required modification for decentralized AdaGrad is to specify line 4 of Algorithm 2 as follows: , which is equivalent to . In this section, we call this algorithm decentralized AdaGrad.
The pseudo code of the algorithm is shown in Algorithm 4. There are two details in Algorithm 4 worth mentioning. The first one is that the introduced framework leverages momentum in updates, while original AdaGrad does not use momentum. The momentum can be turned off by setting and the convergence results will still hold. The other one is that in Decentralized AdaGrad, we use the average instead of the sum in the term . In other words, we write . This latter point is different from the original AdaGrad which actually uses .
The reason is that in the original AdaGrad, a constant stepsize ( independent of or ) is used with . This is equivalent to using a well-known decreasing stepsize sequence with . In our convergence analysis, which can be found below, we use a constant stepsize to replace the decreasing stepsize sequence . Such a replacement is popularly used in Stochastic Gradient Descent analysis for the sake of simplicity and to achieve a better convergence rate. In addition, it is easy to modify our theoretical framework to include decreasing stepsize sequences such as . The convergence analysis for decentralized AdaGrad is shown in Theorem 4.
4 Numerical Experiments
In this section, we conduct some experiments to test the performance of Decentralized AMSGrad, developed in Algorithm 3, on both homogeneous data and heterogeneous data distribution (i.e., the data generating distribution on different nodes are assumed to be different). Comparison with DADAM and the decentralized parallel stochastic gradient descent (D-PSGD) developed in Lian et al. (2017) are conducted. We train a Convolutional Neural Network (CNN) with 3 convolution layers followed by a fully connected layer on MNIST (LeCun, 1998). We set for both Decentralized AMSGrad and DADAM. The learning rate is chosen from the grid based on validation accuracy for all algorithms. In the following experiments, the graph contains 5 nodes and each node can only communicate with its two adjacent neighbors forming a cycle. Regarding the mixing matrix , we set if nodes and are neighbors and otherwise. The implementation was based on the PaddlePaddle deep learning platform.
4.1 Effect of heterogeneity


Homogeneous data: The whole dataset is shuffled and evenly split into different nodes. Such a setting is possible when the nodes are in a computer cluster. We see, Figure 1(a), that decentralized AMSGrad and DADAM perform quite similarly while D-PSGD (labelled as DGD) is much slower both in terms of training loss and test accuracy. Though the (possible) non convergence of DADAM, mentioned in this paper, its performance are empirically good on homogeneous data. The reason is that the adaptive learning rates tend to be similar on different nodes in presence of homogeneous data distribution. We thus compare these algorithms under the heterogeneous regime.
Heterogeneous data: Here, each node only contains training data with two labels out of ten. Such a setting is common when data shuffling is prohibited, such as in federated learning and other privacy-sensitive scenarios. We can see that each algorithm converges significantly slower than with homogeneous data. Especially, the performance of DADAM deteriorates significantly. Decentralized AMSGrad achieves the best training and testing performance in that setting as observed in Figure 1(b). These experiments show that although DADAM is shown to have good performance on homogeneous data in Nazari et al. (2019), heterogeneous data can be detrimental to its performance. On the contrary, decentralized AMSGrad is less impacted by heterogeneous data distribution as a convergent variant, and it enjoys some benefits of adaptive gradient methods.
4.2 Sensitivity to the Learning Rate
We compare the training loss and testing accuracies of different D-PSGD, DADAM, and our proposed decentralized AMSGrad, with different stepsizes on heterogeneous data distribution. We use 5 nodes and the heterogeneous data distribution is created by assigning each node with data of only two labels. Note that there are no overlapping labels between different nodes.
We observe Figure2(a) and (d) that the stepsize works best for D-PSGD in terms of test accuracy and works best in terms of training loss. This difference is caused by the inconsistency among the model parameters on different nodes when the stepsize is large.
Figure 2(b) and (e) shows the performance of decentralized AMSGrad with different stepsizes. We see that its best performance is better than the one of D-PSGD and the performance is more stable (the test performance is less sensitive to stepsize tuning). As expected, the performance of DADAM is not as good as D-PSGD or decentralized AMSGrad, see Figure 2(c) and (f). Its divergence characteristic, highlighted Section 2.3, coupled with the heterogeneity in the data amplify its non-convergence issue in our experiments. From the experiments above, we can see the advantages of decentralized AMSGrad in terms of both performance and ease of parameter tuning, and the importance of ensuring the theoretical convergence of any newly proposed methods in the presented setting.
5 Conclusion
This paper studies the problem of designing adaptive gradient methods for decentralized training. We propose a unifying algorithmic framework that can convert existing adaptive gradient methods to decentralized settings. With rigorous convergence analysis, we show that if the original algorithm converges under some minor conditions, the converted algorithm obtained using our proposed framework is guaranteed to converge to stationary points of the regret function. By applying our framework to AMSGrad, we propose the first convergent adaptive gradient methods, namely Decentralized AMSGrad. We also give an extension to a decentralized variant of AdaGrad for completeness of our converting scheme. Experiments show that the proposed algorithm achieves better performance than the baselines.
lemmasectiontheoremsectionalgorithmsection
Appendix
We provide the proofs for our convergence analysis. After having established several important Lemmas in Section A, we provide a proof for Theorem 2 in Section B. Section C and Section D correspond to the proofs for the extension and application of Theorem 2 to the AMSGrad and AdaGrad algorithms used as prototypes of our general class of decentralized adaptive gradient methods.
Appendix A Proof of Auxiliary Lemmas
Similarly to Yan et al. (2018); Chen et al. (2019) with SGD (with momentum) and centralized adaptive gradient methods, define the following auxiliary sequence:
| (5) |
with . Such an auxiliary sequence can help us deal with the bias brought by the momentum and simplifies the convergence analysis.
Lemma 1.
For the sequence defined in (5), we have
Proof: By update rule of Algorithm 2, we first have
where (i) is due to an interchange of summation and . Then, we have
which is the desired result.
Lemma 2.
Given a set of numbers and denote their mean to be . Define and . For any and with we have
| (6) |
and when , we have
| (7) |
Proof: Without loss of generality, assume when , i.e., is a non-decreasing sequence. Define
We need to prove that is a non-increasing function of . First, it is easy to see that is a continuous function of with non-differentiable points , thus is a piece-wise linear function.
Next, we will prove that is non-increasing in each piece. Define to be the largest index with , and to be the largest index with . Note that we have for , and for since is a non-decreasing sequence. Therefore, we have
and
Taking derivative of the above form, we know the derivative of at differentiable points is
Appendix B Proof of Theorem 2
To prove convergence of the algorithm, we first define an auxiliary sequence
| (8) |
with . Since and is a function of (which denotes ), we have
Assuming smoothness (A1) we have
Using Lemma 1 into the above inequality and take expectation over given , we have
Then take expectation over and rearrange, we have
| (9) |
In addition, we have
| (10) |
and the first term on RHS of the equality can be lower bounded as
| (11) |
where the inequalities are all due to Cauchy-Schwartz. Substituting (11) and (10) into (9), yields
Then sum over the above inequality from to and divide both sides by , we have
| (12) |
Next we need to upper bound all the terms on RHS of the above inequality to obtain the convergence rate. For the terms composing in (12), we can upper bound them by
| (13) |
and
| (14) |
using Jensen’s inequality, Lipschitz continuity of , and the fact that . Next we need to bound and . Recall the update rule of , we have
| (15) |
where we define . Since is a symmetric matrix, we can decompose it as where is a orthonormal matrix and is a diagonal matrix whose diagonal elements correspond to eigenvalues of in an descending order, i.e., with being -th largest eigenvalue of . In addition, because is a doubly stochastic matrix, we know and . With eigen-decomposition of , we can rewrite as
| (16) |
In addition, we can rewrite (15) as
| (17) |
where the last equality is because , for all and thus . Then we have when ,
| (18) |
since is orthonormal and , for all .
Combining (16) and (18) yields
| (19) |
where the last inequality follows from the fact that , , and . Now let us turn to , it can be rewritten as
Now we know both and are in the order of and thus is in the order of . Next we will bound and . Define , , and . Then we have
| (20) |
where the last inequality is due to , for all .
To simplify notations, define to be the entry-wise norm of a matrix , then we obtain
where the second inequality is due to Lemma 2, introduced Section A, and the fact that (element-wise max operator). Recall from update rule of , by defining and , we have for all , . Thus, we obtain
Then we further obtain when ,
where the last equality is due to the definition (recall that ) and when . Note that by definition of , we have for all , then
| (21) |
where . Combining (20) and (21), we have
Now we need to bound , we have
| (22) |
where is due to and the function is 1-Lipschitz. In addition, by update rule of , we have
| (23) |
Combining (22) and (23) yields
| (24) |
What remains is to bound . By update rule of , we have
| (25) |
where the last inequality is again due to the definition that and the fact that is 1-Lipschitz. Then, we have
where the last inequality is due to (23).
We now bound the last term on RHS of the above inequality. A trivial bound can be
due to and , for all (verified from update rule of and the assumption that , for all ). However, the above bound is independent of , to get a better bound, we need a more involved analysis to show its dependency on . To do this, we first notice that
where (a) is due to and is independent of , for all , and , for all , (b) comes from the fact that , are fixed given , (c) is due to and by definition. Then we have
| (26) |
In standard analysis of SGD-like distributed algorithms, the term corresponding to will be merged with the first order descent when the stepsize is chosen to be small enough. However, in our case, the term cannot be merged because it is different from the first order descent in our algorithm. A brute-force upper bound is possible but this will lead to a worse convergence rate in terms of . Thus, we need a more detailed analysis for the term in the following.
Summing over , we have
| (27) |
For the last term on RHS of (27), we can bound it similarly as what we did for from (20) to (21), which yields
| (28) |
Further, we have
and the last term on RHS of the above inequality can be bounded following similar procedures from (14) to (19), as what we did for . Completing the procedures yields
| (29) |
Finally, combining (26) to (29), we obtain
where the last inequality is due to each element of is lower bounded by by definition.
Combining all above, we obtain
| (30) |
where . Set and when , we further have
where the first inequality is obtained by moving the term on the RHS of (30) to the LHS to cancel it using the assumption followed by multiplying both sides by 2. The constants introduced in the last step are defined as following
Substituting into completes the proof.
Appendix C Proof of Theorem 3
Under some assumptions stated in Corollary 2.1, we have that
| (32) |
where denotes the entry-wise norm of a matrix (i.e ) and are defined in Theorem 2.
Since Algorithm 3 is a special case of 2, building on result of Theorem 2, we just need to characterize the growth speed of to prove convergence of Algorithm 3. By the update rule of Algorithm 3, we know is non decreasing and thus
| (33) |
where the last equality is because we defined previously.
Further, because for all and is a exponential moving average of , we know , for all . In addition, by update rule of , we also know each element of also cannot be greater than , i.e., , for all . Given the fact that , we have
Substituting the above into (32), we have
| (34) |
where we have
| (35) |
and we conclude the proof.
Appendix D Proof of Theorem 4
The proof follows the same flow as that of Theorem 3. Under assumptions stated in Corollary 2.1, set , we have that
| (36) |
where denotes the entry-wise norm of a matrix (i.e ) and are defined in Theorem 2.
References
- Agarwal et al. (2019) Naman Agarwal, Brian Bullins, Xinyi Chen, Elad Hazan, Karan Singh, Cyril Zhang, and Yi Zhang. Efficient full-matrix adaptive regularization. In Proceedings of the 36th International Conference on Machine Learning (ICML), pages 102–110, Long Beach, CA, 2019.
- Aji and Heafield (2017) Alham Fikri Aji and Kenneth Heafield. Sparse communication for distributed gradient descent. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 440–445, Copenhagen, Denmark, 2017.
- Alistarh et al. (2017) Dan Alistarh, Demjan Grubic, Jerry Li, Ryota Tomioka, and Milan Vojnovic. QSGD: communication-efficient SGD via gradient quantization and encoding. In Advances in Neural Information Processing Systems (NIPS), pages 1709–1720, Long Beach, CA, 2017.
- Assran et al. (2019) Mahmoud Assran, Nicolas Loizou, Nicolas Ballas, and Michael G. Rabbat. Stochastic gradient push for distributed deep learning. In Proceedings of the 36th International Conference on Machine Learning (ICML), pages 344–353, Long Beach, CA, 2019.
- Boyd et al. (2004) Stephen P. Boyd, Persi Diaconis, and Lin Xiao. Fastest mixing markov chain on a graph. SIAM Rev., 46(4):667–689, 2004.
- Boyd et al. (2009) Stephen P. Boyd, Persi Diaconis, Pablo A. Parrilo, and Lin Xiao. Fastest mixing markov chain on graphs with symmetries. SIAM J. Optim., 20(2):792–819, 2009.
- Boyd et al. (2011) Stephen P. Boyd, Neal Parikh, Eric Chu, Borja Peleato, and Jonathan Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Found. Trends Mach. Learn., 3(1):1–122, 2011.
- Chen et al. (2019) Xiangyi Chen, Sijia Liu, Ruoyu Sun, and Mingyi Hong. On the convergence of A class of adam-type algorithms for non-convex optimization. In Proceedings of the 7th International Conference on Learning Representations (ICLR), New Orleans, LA, 2019.
- Chen et al. (2020) Xiangyi Chen, Xiaoyun Li, and Ping Li. Toward communication efficient adaptive gradient method. In Proceedings of the ACM-IMS Foundations of Data Science Conference (FODS), pages 119–128, Virtual Event, USA, 2020.
- Chen et al. (2010) Yongjian Chen, Tao Guan, and Cheng Wang. Approximate nearest neighbor search by residual vector quantization. Sensors, 10(12):11259–11273, 2010.
- Chilimbi et al. (2014) Trishul M. Chilimbi, Yutaka Suzue, Johnson Apacible, and Karthik Kalyanaraman. Project adam: Building an efficient and scalable deep learning training system. In Proceedings of the 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI), pages 571–582, Broomfield, CO, 2014.
- Duchi et al. (2011) John C. Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. J. Mach. Learn. Res., 12:2121–2159, 2011.
- Duchi et al. (2012) John C. Duchi, Alekh Agarwal, and Martin J. Wainwright. Dual averaging for distributed optimization: Convergence analysis and network scaling. IEEE Trans. Autom. Control., 57(3):592–606, 2012.
- Ge et al. (2013) Tiezheng Ge, Kaiming He, Qifa Ke, and Jian Sun. Optimized product quantization for approximate nearest neighbor search. In Proceedings of the 2013 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2946–2953, Portland, OR, 2013.
- Hong et al. (2017) Mingyi Hong, Davood Hajinezhad, and Ming-Min Zhao. Prox-pda: The proximal primal-dual algorithm for fast distributed nonconvex optimization and learning over networks. In Proceedings of the 34th International Conference on Machine Learning (ICML), pages 1529–1538, Sydney, Australia, 2017.
- Jégou et al. (2011) Hervé Jégou, Matthijs Douze, and Cordelia Schmid. Product quantization for nearest neighbor search. IEEE Trans. Pattern Anal. Mach. Intell., 33(1):117–128, 2011.
- Kingma and Ba (2015) Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), San Diego, CA, 2015.
- Koloskova et al. (2019) Anastasia Koloskova, Sebastian U. Stich, and Martin Jaggi. Decentralized stochastic optimization and gossip algorithms with compressed communication. In Proceedings of the 36th International Conference on Machine Learning (ICML), pages 3478–3487, Long Beach, CA, 2019.
- LeCun (1998) Yann LeCun. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/, 1998.
- Li and Orabona (2019) Xiaoyu Li and Francesco Orabona. On the convergence of stochastic gradient descent with adaptive stepsizes. In Proceedings of the 22nd International Conference on Artificial Intelligence and Statistics (AISTATS), pages 983–992, Naha, Japan, 2019.
- Lian et al. (2017) Xiangru Lian, Ce Zhang, Huan Zhang, Cho-Jui Hsieh, Wei Zhang, and Ji Liu. Can decentralized algorithms outperform centralized algorithms? A case study for decentralized parallel stochastic gradient descent. In Advances in Neural Information Processing Systems (NIPS), pages 5330–5340, Long Beach, CA, 2017.
- Lin et al. (2018) Yujun Lin, Song Han, Huizi Mao, Yu Wang, and Bill Dally. Deep gradient compression: Reducing the communication bandwidth for distributed training. In Proceedings of the 6th International Conference on Learning Representations (ICLR), Vancouver, Canada, 2018.
- Lorenzo and Scutari (2016) Paolo Di Lorenzo and Gesualdo Scutari. NEXT: in-network nonconvex optimization. IEEE Trans. Signal Inf. Process. over Networks, 2(2):120–136, 2016.
- Lu et al. (2019) Songtao Lu, Xinwei Zhang, Haoran Sun, and Mingyi Hong. GNSD: a gradient-tracking based nonconvex stochastic algorithm for decentralized optimization. In Proceedings of the IEEE Data Science Workshop (DSW), pages 315–321, Minneapolis, MN, 2019.
- Luo et al. (2019) Liangchen Luo, Yuanhao Xiong, Yan Liu, and Xu Sun. Adaptive gradient methods with dynamic bound of learning rate. In Proceedings of the 7th International Conference on Learning Representations (ICLR), New Orleans, LA, 2019.
- McMahan et al. (2017) Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Agüera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS), pages 1273–1282, Fort Lauderdale, FL, 2017.
- Nazari et al. (2019) Parvin Nazari, Davoud Ataee Tarzanagh, and George Michailidis. DADAM: A consensus-based distributed adaptive gradient method for online optimization. CoRR, abs/1901.09109, 2019.
- Nedic and Ozdaglar (2009) Angelia Nedic and Asuman E. Ozdaglar. Distributed subgradient methods for multi-agent optimization. IEEE Trans. Autom. Control., 54(1):48–61, 2009.
- Reddi et al. (2018) Sashank J. Reddi, Satyen Kale, and Sanjiv Kumar. On the convergence of Adam and beyond. In Proceedings of the 6th International Conference on Learning Representations (ICLR), Vancouver, Canada, 2018.
- Reddi et al. (2021) Sashank J. Reddi, Zachary Charles, Manzil Zaheer, Zachary Garrett, Keith Rush, Jakub Konečný, Sanjiv Kumar, and Hugh Brendan McMahan. Adaptive federated optimization. In Proceedings of the 9th International Conference on Learning Representations (ICLR), Virtual Event, Austria, 2021.
- Robbins and Monro (1951) Herbert Robbins and Sutton Monro. A stochastic approximation method. The Annals of Mathematical Statistics, pages 400–407, 1951.
- Shi et al. (2015) Wei Shi, Qing Ling, Gang Wu, and Wotao Yin. EXTRA: an exact first-order algorithm for decentralized consensus optimization. SIAM J. Optim., 25(2):944–966, 2015.
- Stich et al. (2018) Sebastian U. Stich, Jean-Baptiste Cordonnier, and Martin Jaggi. Sparsified SGD with memory. In Advances in Neural Information Processing Systems (NeurIPS), pages 4452–4463, Montréal, Canada, 2018.
- Tang et al. (2018) Hanlin Tang, Xiangru Lian, Ming Yan, Ce Zhang, and Ji Liu. D: Decentralized training over decentralized data. In Proceedings of the 35th International Conference on Machine Learning (ICML), pages 4855–4863, Stockholmsmässan, Sweden, 2018.
- Tang et al. (2019) Hanlin Tang, Chen Yu, Xiangru Lian, Tong Zhang, and Ji Liu. Doublesqueeze: Parallel stochastic gradient descent with double-pass error-compensated compression. In Proceedings of the 36th International Conference on Machine Learning (ICML), pages 6155–6165, Long Beach, CA, 2019.
- Wang et al. (2018) Hongyi Wang, Scott Sievert, Shengchao Liu, Zachary B. Charles, Dimitris S. Papailiopoulos, and Stephen J. Wright. ATOMO: communication-efficient learning via atomic sparsification. In Advances in Neural Information Processing Systems (NeurIPS), pages 9872–9883, Montréal, Canada, 2018.
- Wangni et al. (2018) Jianqiao Wangni, Jialei Wang, Ji Liu, and Tong Zhang. Gradient sparsification for communication-efficient distributed optimization. In Advances in Neural Information Processing Systems (NeurIPS), pages 1306–1316, Montréal, Canada, 2018.
- Ward et al. (2019) Rachel Ward, Xiaoxia Wu, and Léon Bottou. Adagrad stepsizes: sharp convergence over nonconvex landscapes. In Proceedings of the 36th International Conference on Machine Learning (ICML), pages 6677–6686, Long Beach, CA, 2019.
- Xu et al. (2021) Zhiqiang Xu, Dong Li, Weijie Zhao, Xing Shen, Tianbo Huang, Xiaoyun Li, and Ping Li. Agile and accurate CTR prediction model training for massive-scale online advertising systems. In Proceedings of the International Conference on Management of Data (SIGMOD), pages 2404–2409, Virtual Event, China, 2021.
- Yan et al. (2018) Yan Yan, Tianbao Yang, Zhe Li, Qihang Lin, and Yi Yang. A unified analysis of stochastic momentum methods for deep learning. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence (IJCAI), pages 2955–2961, Stockholm, Sweden, 2018.
- Yuan et al. (2016) Kun Yuan, Qing Ling, and Wotao Yin. On the convergence of decentralized gradient descent. SIAM J. Optim., 26(3):1835–1854, 2016.
- Zaheer et al. (2018) Manzil Zaheer, Sashank J. Reddi, Devendra Singh Sachan, Satyen Kale, and Sanjiv Kumar. Adaptive methods for nonconvex optimization. In Advances in Neural Information Processing Systems (NeurIPS), pages 9815–9825, Montréal, Canada, 2018.
- Zhao et al. (2020) Weijie Zhao, Deping Xie, Ronglai Jia, Yulei Qian, Ruiquan Ding, Mingming Sun, and Ping Li. Distributed hierarchical GPU parameter server for massive scale deep learning ads systems. In Proceedings of Machine Learning and Systems 2020 (MLSys), Austin, TX, 2020.
- Zhou et al. (2018) Dongruo Zhou, Yiqi Tang, Ziyan Yang, Yuan Cao, and Quanquan Gu. On the convergence of adaptive gradient methods for nonconvex optimization. CoRR, abs/1808.05671, 2018.
- Zou and Shen (2018) Fangyu Zou and Li Shen. On the convergence of weighted adagrad with momentum for training deep neural networks. CoRR, abs/1808.03408, 2018.