Distributed heavy-ball: A generalization and acceleration of first-order methods with gradient tracking
Ran Xin, Usman A. Khan
I Introduction
We consider distributed optimization, where agents collaboratively solve the following problem:
Early work on this topic builds on the seminal work by Tsitsiklis in and includes Distributed Gradient Descent (DGD) and distributed dual averaging over undirected graphs. Leveraging push-sum consensus , Refs. extend the DGD framework to directed graphs. Based on a similar concept, Refs. propose Directed-Distributed Gradient Descent (D-DGD) for directed graphs that is based on surplus consensus . In general, the DGD-based methods achieve sublinear convergence at , where is the number of iterations, because of the diminishing step-size used in the iterations. The convergence rate of DGD can be improved with the help of a constant step-size but at the expense of an inexact solution . Follow-up work also includes augmented Lagrangians , which shows exact linear convergence for smooth and strongly-convex functions, albeit requiring higher computation at each iteration.
To improve convergence and retain computational simplicity, fast first-order methods that do not (explicitly) use a dual update have been proposed. Reference describes a distributed Nesterov-type method based on multiple consensus inner loops, at for smooth and convex functions, with bounded gradients. EXTRA uses the difference of two consecutive DGD iterates to achieve an rate for arbitrary convex functions and a -linear rate for strongly-convex functions. DEXTRA combines push-sum and EXTRA to achieve an -linear rate over directed graphs given that a constant step-size is carefully chosen in some interval. Refs. apply an adapt-then-combine structure to EXTRA and generalize the symmetric weights in EXTRA to row-stochastic, over undirected graphs.
Noting that DGD-type methods are faster with a constant step-size, recent work uses a constant step-size and replaces the local gradient, at each agent in DGD, with an estimate of the global gradient. A method based on gradient tracking was first shown in over undirected graphs, which proposes Aug-DGM (that uses nonidentical step-sizes at the agents) with the help of dynamic consensus and shows convergence for smooth convex functions. When the step-sizes are identical, the convergence rate of Aug-DGM was derived to be for arbitrary convex functions and -linear for strongly-convex functions in . ADD-OPT extends to directed graphs by combining push-sum with gradient tracking and derives a contraction in an arbitrary norm to establish an -linear convergence rate when the global objective is smooth and strongly-convex. Ref. extends the analysis in to time-varying graphs and establishes an -linear convergence using the small gain theorem . In contrast to the aforementioned methods , where the weights are doubly-stochastic for undirected graphs and column-stochastic for directed graphs, FROST uses row-stochastic weights, which have certain advantages over column-stochastic weights. Ref. unifies EXTRA and gradient tracking methods in a primal-dual framework over static undirected graphs. More recently, Ref. proposes distributed Nesterov over undirected graphs that also uses gradient tracking and shows a convergence rate of for smooth, strongly-convex functions, where is the condition number of the global objective. Refs. , on the other hand, consider gradient tracking in distributed non-convex problems, while Ref. uses second-order information to accelerate the convergence.
Of significant relevance here is the algorithm , also appeared later in , which can be viewed as a generalization of distributed first-order methods with gradient tracking. In particular, the algorithms over undirected graphs in Refs. are a special case of because the doubly-stochastic weights therein are replaced by row- and column- stochastic weights. thus is naturally applicable to arbitrary directed graphs. Moreover, the use of both row- and column-stochastic weights removes the need for eigenvector estimationSimultaneous application of both row- and column-stochastic weights was first employed for average-consensus in and towards distributed optimization in , albeit without gradient tracking., required earlier in . Ref. derives an -linear rate for when the objective functions are smooth and strongly-convex. In this paper, we provide an improved understanding of and extend it to the algorithm, a distributed heavy-ball method, applicable to both undirected and directed graphs. We now summarize the main contributions:
We show that many of the existing accelerated first-order methods are either a special case of , or can be adapted from its equivalent forms .
We propose a distributed heavy-ball method, termed as , that combines with a heavy-ball (type) momentum term. To the best of our knowledge, this paper is the first to use a momentum term based on the heavy-ball method in distributed optimization.
employs nonidentical step-sizes at the agents and thus its analysis naturally carries to nonidentical step-sizes in and to the related algorithms in .
We cast a unifying framework for consensus over arbitrary graphs that results from and subsumes several well-known algorithms .
On the analysis front, we show that (without momentum) converges faster as compared to the algorithms over directed graphs in , where separate iterations for eigenvector estimation are applied nonlinearly to the underlying algorithm. Towards , we establish a global -linear convergence rate for smooth and strongly-convex objective functions when the largest step-size at the agents is positive and sufficiently small. This is in contrast to the earlier work on non-identical step-sizes within the framework of gradient tracking , which requires the heterogeneity among the step-sizes to be sufficiently small, i.e., the step-sizes are close to each other. We also acknowledge that similar to the centralized heavy-ball method , dating back to more than 50 years, and the recent work , a global acceleration can only be shown via numerical simulations. Following the standard practice, we provide simulations to verify that has accelerated convergence, the effect of which is more pronounced when the global objective function is ill-conditioned.
We now describe the rest of the paper. Section II provides preliminaries, problem formulation, and introduces distributed heavy-ball, i.e., the algorithm. Section III establishes the connection between and related algorithms. Section IV includes the main results on the convergence analysis, whereas Section V provides a family of average-consensus algorithms that result naturally from . Finally, Section VI provides numerical experiments and Section VII concludes the paper.
Basic Notation: We use lowercase bold letters to denote vectors and uppercase letters for matrices. The matrix, , is the identity, whereas () is the -dimensional column vector of all ones (zeros). For an arbitrary vector, , we denote its th element by and its largest and smallest element by and , respectively. We use to denote a diagonal matrix that has on its main diagonal. For two matrices, and , is a block-diagonal matrix with and on its main diagonal, and denotes their Kronecker product. The spectral radius of a matrix, , is represented by . For a primitive, row-stochastic matrix, , we denote its left and right eigenvectors corresponding to the eigenvalue of by and , respectively, such that ; similarly, for a primitive, column-stochastic matrix, , we denote its left and right eigenvectors corresponding to the eigenvalue of by and , respectively, such that . For a matrix , we denote as its infinite power (if it exists), i.e., From the Perron-Frobenius theorem , we have and . We denote and as some arbitrary vector norms, the choice of which will be clear in Lemma 1, while denotes the Euclidean matrix and vector norms.
II Preliminaries and Problem Formulation
Consider agents connected over a directed graph, , where is the set of agents, and is the collection of ordered pairs, , such that agent can send information to agent , i.e., . We define as the collection of in-neighbors of agent , i.e., the set of agents that can send information to agent . Similarly, is the set of out-neighbors of agent . Note that both and include agent . The agents solve the following problem:
The graph, , is strongly-connected.
where and .
It is well known that the best achievable convergence rate of the gradient descent algorithm,
is , where is the condition number of the objective function, . Clearly, gradient descent is quite slow when is large, i.e., when the objective function is ill-conditioned. The seminal work by Polyak proposes the following heavy-ball method:
where is interpreted as a “momentum” term, used to accelerate the convergence process. Polyak shows that with a specific choice of and , the heavy-ball method achieves a local accelerated rate of . By local, it is meant that the acceleration can only be analytically shown when is sufficiently small. Globally, i.e., for arbitrary initial conditions, only linear convergence is established, while an analytical characterization of the acceleration is still an open problem, see related work in . Numerical analysis and simulations are often employed to show global acceleration, i.e., it is possible to tune and such that the heavy-ball method is faster than gradient descent .
II-B Distributed heavy-ball: The 𝒜ℬm𝒜ℬ𝑚\mathcal{AB}m algorithm
where and are respectively the local step-size and the momentum parameter adopted by agent . The weights, ’s and ’s, are associated with the graph topology and satisfy the following conditions:
Note that the weight matrix, , in Eq. (2a) is RS (row-stochastic) and the weight matrix, in Eq. (2b) is CS (column-stochastic), both of which can be implemented over undirected and directed graphs alike. Intuitively, Eq. (2b) tracks the average of local gradients, , see , and therefore Eq. (2a) asymptotically approaches the centralized heavy-ball, Eq. (1), as the descent direction becomes the gradient of the global objective.
Vector form: For the sake of analysis, we now write in vector form. We use the following notation:
We note here that when , reduces to , albeit with two distinguishing features: (i) the algorithm in uses an identical step-size, , at each agent; and (ii) Eq. (2b) in is in an adapt-then-combine form.
III Connection with existing first-order methods
In this section, we provide a generalization of several existing methods that employ gradient tracking and show that lies at the heart of these approaches. To proceed, we rewrite the updates below (without momentum) .
Since uses both RS and CS weights simultaneously, it is natural to ask how are the optimization algorithms that require the weight matrices to be doubly-stochastic (DS) , or only CS , or only RS , are related to each other. We discuss this relationship next.
Optimization with DS weights: Refs. consider the following updates, termed as Aug-DGM in and DIGing in :
where , and is a DS weight matrix. Clearly, to obtain DS weights, the underlying graph must be undirected (or balanced) and thus the algorithm in Eqs. (6) is not applicable to arbitrary directed graphs. That generalizes Eqs. (6) is straightforward as the DS weights naturally satisfy the RS requirement in the top update and the CS requirement in the bottom update, while the reverse is not true. Similarly, we note that a related algorithm, EXTRA , is given by
where the two weight matrices, and , must be symmetric and satisfy some other stringent requirements, see for details. Eliminating the -update in , we note that can be written in the EXTRA format as follows:
It can be seen that the linear convergence of does not follow from the analysis in as and are not necessarily symmetric. Analysis of the algorithm, therefore, generalizes that of EXTRA to non-doubly-stochastic and non-symmetric weight matrices.
Optimization with CS weights: We now relate to ADD-OPT/Push-DIGing that only require CS weights . Since is already CS in , it suffices to seek a state transformation that transforms from RS to CS, while respecting the graph topology. To this aim, let us consider the following transformation on the -update in : where and is the left-eigenvector of the RS weight matrix, , corresponding to the eigenvalue . The resulting transformed is given by
where it is straightforward to show that is now CS and .
In order to implement the above equations, two different CS matrices ( and ) suffice, as long as they are primitive and respect the graph topology. The second update requires the right-eigenvector of the CS matrix used in the first update, i.e., . Since this eigenvector is not known locally to any agent, ADD-OPT/Push-DIGing propose learning this eigenvector with the following iterations: . The algorithms provided in essentially implement Eqs. (8), albeit with two differences: (i) the same CS weight matrix is used in all updates; and, (ii) the division in Eq. (8b) is replaced by the estimated component, , of the left-eigenvector at each agent. This nonlinearity causes stability issues in ADD-OPT/Push-DIGing, whereas their convergence compared to is slower because such an eigenvector estimation is not needed in the latter on the account of using the RS weights. Furthermore, the local step-sizes are now given by that shows that ADD-OPT/Push-DIGing should work with nonidentical step-sizes.
Optimization with RS weights: The state transformation technique discussed above also leads to an algorithm from that only requires RS weights. Since in is RS, a transformation now is imposed on the -update and is given by , where and is the right-eigenvector of the CS weight matrix, , corresponding to the eigenvalue . Equivalently, is given by
where is now RS and . Since the above form of cannot be implemented because is not locally known, an eigenvector estimation is used in FROST and the division in Eq. (9b) is replaced with the appropriate estimated component of . The observations on different weight matrices in the two updates, nonidentical step-sizes, stability, and convergence made earlier for ADD-OPT/Push-DIGing are also applicable here.
In conclusion, the algorithm has various equivalent representations and several already-known protocols can in fact be derived from these representations. In a similar way, leads to protocols that add momentum to Aug-DGM, ADD-OPT/Push-DIGing, and FROST. We will revisit the relationship and equivalence cast here in Sections V and VI. In Section V, we will show that both and naturally provide a non-trivial class of average-consensus algorithms, a special case of which are and surplus consensus . In Section VI, we will compare these algorithms numerically.
IV Convergence Analysis
We now start the convergence analysis of the proposed distributed heavy-ball method, . In the following, we first provide some auxiliary results borrowed from the literature.
The following lemma establishes contractions with RS and CS matrices under arbitrary norms ; note thacontraction in the Euclidean norm is not applicable unless the weight matrix is DS as in . A similar result was first presented in for CS matrices, and later in for RS matrices.
where and are some constants.
The next lemma from states that the sum of ’s preserves the sum of local gradients. This is a direct consequence of the dynamic consensus employed with CS weights in the -update of .
.
The next lemma is standard in the convex optimization theory . It states that the distance to the optimizer contracts at each step in the standard gradient descent method.
Let be -strongly-convex and -smooth. For , we have
where .
Finally, we provide a result from nonnegative matrix theory.
IV-B Main results
The convergence analysis of is based on deriving a contraction relationship between the following four quantities: (i) , the consensus error in the network; (ii) , the optimality gap; (iii) , the state difference; and (iv) , the (biased) gradient estimation error. We will establish an LTI-system inequality where the state vector is the collection of these four quantities and then develop the convergence properties of the corresponding system matrix. Before we proceed, note that since all vector norms on finite-dimensional vector spaces are equivalent , there exist positive constants such that
We also define and . In the following, we first provide an upper bound on the estimate, , of the gradient of the global objective that will be useful in deriving the aforementioned LTI system.
The following inequality holds, :
Recall that We have
We next bound :
where the first inequality uses Jensen’s inequality and the last inequality uses the fact that . The lemma follows by plugging Eq. (IV-B) into Eq. (12). ∎
In the next Lemmas 6-9, we derive the relationships among the four quantities mentioned above. We start with a bound on , the consensus error in the network.
The following inequality holds, :
First, note that . Following the -update of in Eq. (4a) and using the one-step contraction property of from Lemma 1, we have:
Next, we derive a bound for , which can be interpreted as the optimality gap between the network accumulation state, , and the global minimizer, .
The following inequality holds, , when
:
where
Recall the -update of in Eq. (4a), we have that
where in the last inequality, we use adapted from Lemma 2. Since the last two terms in Eq. (IV-B) match the last two terms in Eq. (7), what is left is to bound the first term. Before we proceed, define
Now we bound the first term in Eq. (IV-B). We have
and we bound and next. Using Lemma 3, we have that if ,
where We next bound . Since ,
and the lemma follows from Eqs. (IV-B), (IV-B), and (IV-B). ∎
The next step is to bound the state difference, .
The following inequality holds, :
Note that and hence is a zero matrix. Following the -update of , we have:
The final step in formulating the LTI system is to write , the biased gradient estimation error, in terms of the other three quantities. We call this biased to make a distinction with the unbiased gradient estimation error: , where is doubly-stochastic.
The following inequality holds, :
Note that . From Eq. (4b), we have:
where in the inequality above we use the contraction property of from Lemma 1. The proof follows by applying the result of Lemma 8 to the inequality above. ∎
With the help of the Lemmas 6-9, we now present the main result of this paper, i.e., the algorithm converges to the global minimizer at a global -linear rate.
Let , then the following LTI inequality holds entry-wise:
and the constants ’s in the above expression are
When the largest step-size, , satisfies
and when the largest momentum parameter, , satisfies
where are arbitrary constants such that
then and thus converges to zero linearly at the rate of .
It is straightforward to verify Eq. (18) by combining Lemmas 6-9. The next step is to find the range of and such that . In the light of Lemma 4, we solve for a positive vector and the range of and such that the following inequality holds:
which is equivalent to the following four conditions:
Recall in Lemma 7, when , we have
Therefore, the third condition in Eq. (37) is satisfied when
For the right hand side of the Eq. (36), (40), (38) and (39) to be positive, each one of these equations needs to satisfy the conditions we give below.
We first choose arbitrary positive constants, and , then pick satisfying Eqs. (45) and (48), and finally choose according to Eq. (42). Note that and are chosen to ensure that the upper bounds on are all positive. Subsequently, from Eqs. (41), (45), and (48), together with the requirement that , we obtain the upper bound on the largest step-size, . Finally, the original four conditions in Eqs. (36), (40), (38) and (39) lead to an upper bound on , and the theorem follows. ∎
Remark 1: In Theorem 1, we have established the -linear rate of when the largest step-size, , and the largest momentum parameter, , respectively follow the upper bounds described in Eq. (29) and Eq. (30). Note that therein are tunable parameters and only depend on the network topology and the objective functions. The upper bounds for and may not be computable for arbitrary directed graphs as the contraction coefficients, , , and the norm equivalence constants may be unknown. However, when the graph is undirected, we can obtain computable bounds for and , as developed in for example. The upper bound on also implies that if the step-sizes are relatively large, only small momentum parameters can be picked to ensure stability.
Remark 2: The nonidentical step-sizes in gradient tracking methods have previously been studied in . These works rely on some notion of heterogeneity among the step-sizes, defined respectively as the relative deviation of the step-sizes from their average, , in , and as the ratio of the largest to the smallest step-size, , in . The authors then show that when the heterogeneity is sufficiently small and when the largest step-size follows a bound that is a function of the heterogeneity, the proposed algorithms converge to the global minimizer. It is worth noting that sufficiently small step-sizes do not guarantee sufficiently small heterogeneity in both of the above definitions. In contrast, the upper bound on the largest step-size in this paper, Eq. (29), is independent of any notion of heterogeneity and only depends on the objective functions and the network topology. Each agent therefore locally picks a sufficiently small step-size without any coordination. Based on the discussion in Section III, our approach thus improves the analysis in . Besides, Eq. (29) allows the existence of zero step-sizes among the agents as long as the largest step-size is positive and is sufficiently small.
Remark 3: To show that has an -linear rate for sufficiently small and , one can alternatively use matrix perturbation analysis as in (Theorem 1). However, it does not provide explicit upper bounds on and in closed form.
V Average-Consensus from 𝒜ℬm𝒜ℬ𝑚\mathcal{AB}m
In this section, we show that subsumes a novel average-consensus algorithm over strongly-connected directed graphs. To show this, we choose the objective functions as
Clearly, the minimization of is now achieved at . The algorithm, Eq. (4), thus naturally leads to the following average-consensus algorithm, termed as -, with ; for the sake of simplicity, we choose :
Its local implementation at each agent is given by:
where and .
From the analysis of , an -linear convergence of - to the average of ’s is clear from Theorem 1. It may be possible to make concrete rate statements by studying the spectral radius of the following system matrix:
However, this analysis is beyond the scope of this paper. We note that when , the above equations still converge to the average of ’s according to Theorem 1. What is surprising is that, with , - reduces to
which is surplus consensus , after a state transformation with ; in fact, any state transformation of the form applies here as long as is diagonal (to respect the graph topology) and invertible. More importantly, compared with surplus consensus , - uses information from the past iterations. This history information is in fact the momentum from a distributed optimization perspective, which may lead to accelerated convergence as we will numerically show in Section VI.
Following this discussion, choosing the local functions as ’s in , or in ADD-OPT , or in FROST , we get average-consensus with only DS, CS, or RS weights. The protocol that results directly from is surplus consensus, while the one resulting directly from FROST was presented in . With the analysis provided in Section III, we see that the algorithm in is in fact related to surplus consensus after a state transformation. Clearly, accelerated average-consensus based exclusively on either row- or column-stochastic weights can be abstracted from the discussion herein, after adding a momentum term.
VI Numerical Experiments
We now provide numerical experiments to illustrate the theoretical findings described in this paper. To this aim, we use two different graphs: an undirected graph, , and a directed graph, . Both graphs have agents and are generated using nearest neighbor rules and then we add less than random links. The number of edges in all cases is less of the total possible edges. Since the graphs are randomly generated across experiments, two sample graphs are shown in Fig. 1, without the self-edges and random links for visual clarity. We generate DS weights using the Laplacian method: , where is the graph Laplacian and is the degree of node . Additionally, we generate RS and CS weights with the uniform weighting strategy: and . We note that both weighting strategies are applicable to undirected graphs, while only the uniform strategy can be used over directed graphs.
where is a regularization term used to prevent over-fitting of the data. The feature vectors, ’s, are randomly generated from a Gaussian distribution with zero mean and the binary labels are randomly generated from a Bernoulli distribution. We plot the average of residuals at each agent, , and first compare the performance of the following over undirected graphs in Fig. 2 (Left): (i) with RS and CS weights; (ii) with DS weights; (iii) distributed optimization based on gradient tracking from , with DS weights; (iv) EXTRA from ; and, (v) centralized gradient descent.
Next, we compare the performance similarly over directed graphs in Fig. 2 (Right). Here, the algorithms with doubly-stochastic weights are not applicable, and instead we compare with , ADD-OPT/Push-DIGing , and centralized gradient descent. The weight matrices are chosen as we discussed before and the algorithm parameters are hand-tuned for best performance (except for gradient descent where the optimal step-size is given by ). We note that momentum improves the convergence when compared to applicable algorithms without momentum, while ADD-OPT/Push-DIGing are much slower because of the eigenvector estimation, see Section III for details.
VI-B Distributed Quadratic Programming
For small condition numbers, we note that gradient descent is quite fast and the distributed algorithms suffer from a relatively slower fusion over the graphs. Recall that the optimal convergence rate of gradient decent is . When the condition number is large, gradient descent is quite conservative allowing fusion to catch up. Finally, we note that , with momentum, outperforms the centralized gradient descent when the condition number is large. This observation is consistent with the existing literature, see e.g., .
VI-C 𝒜ℬm𝒜ℬ𝑚\mathcal{AB}m and Average-Consensus
We now provide numerical analysis and simulations to show that -, in Eq. (49), possibly achieves acceleration when compared with surplus-consensus, in Eq. (56). To explain our choice of and , we first note that the power limit of the system matrix in Eq. (56), denoted as , is :
where . It is straightforward to show that Similarly, for the augmented system matrix, , in Eq. (49), we observe that
and it can be verified that We therefore use grid search to choose the optimal in and the optimal and in , which respectively minimize and . Numerically, we observe that it may be possible for the minimum of to be smaller than that of . The convergence speed comparison between - and surplus consensus is shown in Fig 5 over a directed graph, .
VII Conclusions
In this paper, we provide a framework for distributed optimization that removes the need for doubly-stochastic weights and thus is naturally applicable to both undirected and directed graphs. Using a state transformation based on the non- eigenvector, we show that the underlying algorithm, , based on a simultaneous application of both RS and CS weights, lies at the heart of several algorithms studied earlier that rely on eigenvector estimation when using only CS (or only RS) weights. We then propose the distributed heavy-ball method, termed as , that combines with a heavy-ball (type) momentum term. To the best of our knowledge, this paper is the first to use a momentum term based on the heavy-ball method in distributed optimization. We show that subsumes a novel average-consensus algorithm as a special case that unifies earlier attempts over directed graphs, with potential acceleration due to the momentum term.