On the Convergence of Decentralized Gradient Descent
Kun Yuan, Qing Ling, Wotao Yin
Introduction
Consider that agents form a connected network and collaboratively solve a consensus optimization problem
where each is only available to agent . A pair of agents can exchange data if and only if they are connected by a direct communication link; we say that such two agents are neighbors of each other. Let denote the set of solutions to (2), which is assumed to be non-empty, and let denote the optimal objective value.
The traditional (centralized) gradient descent iteration is
where is the stepsize, either fixed or varying with . To apply iteration (3) to problem (2) under the decentralized situation, one has two choices of implementation:
let a fusion center (which can be a designated agent) carry out iteration (3);
let all the agents carry out the same iteration (3) in parallel.
In either way, (and thus ) is only known to agent . Therefore, in order to obtain , every agent must have , compute , and then send out . This approach requires synchronizing and scattering/collecting , , over the entire network, which incurs a significant amount of communication traffic, especially if the network is large and sparse. A decentralized approach will be more viable since its communication is restricted to between neighbors. Although there is no guarantee that decentralized algorithms use less communication (as they tend to take more iterations), they provide better network load balance and tolerance to the failure of individual agents. In addition, each agent can keep its and private to some extent Neighbors of may know the samples of and/or at some points through data exchanges and thus obtain an interpolation of ..
Decentralized gradient descent does not rely on a fusion center or network-wide communication. It carries out an approximate version of (3) in the following fashion:
let each agent update its to the weighted average of its neighborhood;
let each agent apply to decrease .
At each iteration , each agent performs the following steps:
computes the neighborhood weighted average , where only if is a neighbor of or ;
applies .
Steps 1 and 2 can be carried out in parallel, and their results are used in Step 3. Putting the three steps together, we arrive at our main iteration
When is not differentiable, by replacing with a member of we obtain the decentralized subgradient method . Other decentralization methods are reviewed Section 1.2 below.
We assume that the mixing matrix is symmetric and doubly stochastic. The eigenvalues of are real and sorted in a nonincreasing order . Let the second largest magnitude of the eigenvalues of be denoted as
The optimization of matrix and, in particular, , is not our focus; the reader is referred to .
Some basic questions regarding the decentralized gradient method include: (i) When does converge? (ii) Does it converge to ? (iii) If is not the limit, does consensus (i.e., , ) hold asymptotically? (iv) How do the properties of and the network affect convergence?
The study on decentralized optimization can be traced back to the seminal work in the 1980s . Compared to optimization with a fusion center that collects data and performs computation, decentralized optimization enjoys the advantages of scalability to network sizes, robustness to dynamic topologies, and privacy preservation in data-sensitive applications . These properties are important for applications where data are collected by distributed agents, communication to a fusion center is expensive or impossible, and/or agents tend to keep their raw data private; such applications arise in wireless sensor networks , multivehicle and multirobot networks , smart grids , cognitive radio networks , etc. The recent research interest in big data processing also motivates the work of decentralized optimization in machine learning . Furthermore, the decentralized optimization problem (2) can be extended to the online or dynamic settings where the objective function becomes an online regret or a dynamic cost .
To demonstrate how decentralized optimization works, we take spectrum sensing in a cognitive radio network as an example. Spectrum sensing aims at detecting unused spectrum bands, and thus enables the cognitive radios to opportunistically use them for data communication. Let be a vector whose elements are the signal strengths of spectrum channels. Each cognitive radio takes time-domain measurement , where is the channel fading matrix, is the inverse Fourier transform matrix, and is the measurement noise. To each cognitive radio , assign a local objective function or the regularized function , where promotes a certain structure of . To estimate , a set of geologically nearby cognitive radios collaboratively solve the consensus optimization problem (2). Decentralized optimization is suitable for this application since communication between nearby cognitive radios are fast and energy-efficient and, if a cognitive radio joins and leaves the network, no reconfiguration is needed.
2 Related methods
The decentralized stochastic subgradient projection algorithm handles constrained optimization; the fast decentralized gradient methods adopts Nesterov’s acceleration; the distributed online gradient descent algorithmHere we consider its decentralized batch version. has nested iterations, where the inner loop performs a fine search; the dual averaging subgradient method carries out a projection operation after averaging and descending. Unsurprisingly, decentralized computation tends to require more assumptions for convergence than similar centralized computation. All of the above algorithms are analyzed under the assumption of bounded (sub)gradients. Unbounded gradients can potentially cause algorithm divergence. When using a fixed stepsize, the above algorithms (and iteration (4) in particular) converge to a neighborhood of rather than itself. The size of the neighborhood goes monotonic in the stepsize. Convergence to can be achieved by using diminishing stepsizes in at the price of slower rates of convergence. With diminishing stepsizes, shows an outer loop complexity of under Nesterov’s acceleration when the inner loop performs a substantial search job, without which the rate reduces to .
3 Contribution and notation
This paper studies the convergence of iteration (4) under the following assumptions.
For , is proper closed convex, lower bounded, and Lipschitz differentiable with constant .
The network has a synchronized clock in the sense that (4) is applied to all the agents at the same time intervals, the network is connected, and the mixing matrix is symmetric and doubly stochastic with (see (5) for the definition of ).
Unlike , which characterize the ergodic convergence of where , this paper establishes the non-ergodic convergence of all local solution sequences . In addition, the analysis in this paper does not assume bounded . Instead, the following stepsize condition will ensure bounded :
where . This result is obtained through interpreting the iteration (4) for all the agents as a gradient descent iteration applied to a certain Lyapunov function.
Under Assumption 1 and condition (6), the rate of for “near” convergence is shown. Specifically, the objective errors evaluated at the mean solution, , and at any local solution, , both reduce at until reaching the level . The rate of the mean solution is obtained by analyzing an inexact gradient descent iteration, somewhat similar to . However, all of their rates are given for the ergodic solution . Our rates are non-ergodic.
In addition, a linear rate of “near” convergence is established if is also strongly convex with modulus , namely,
or is restricted strongly convex with modulus ,
Since our analysis uses a fixed stepsize, the local solutions will not be asymptotically consensual. To adapt our analysis to diminishing stepsizes, significant changes will be needed.
Based on iteration (4), a decentralized algorithm is derived for the basis pursuit problem with distributed data to recover a sparse signal in Section 3. The algorithm converges linearly until reaching an -neighborhood of the sparse signal.
Section 4 presents numerical results on the test problems of decentralized least squares and decentralized basis pursuit to verify our developed rates of convergence and the levels of the landing neighborhoods.
Throughout the rest of this paper, we employ the following notations of stacked vectors:
Convergence analysis
Previous methods and analysis assume bound gradients or subgradients of . The assumption indeed plays a key role in the convergence analysis. For decentralized gradient descent iteration (4), it gives bounded deviation from mean . It is necessary in the convergence analysis of subgradient methods, whether they are centralized or decentralized. But as we show below, the boundedness of does not need to be guaranteed but is a consequence of bounded stepsize , with dependence on the spectral properties of . We derive a tight bound on for to be bounded.
and . This is a trivial average consensus problem with and . Take any and let the mixing matrix be
which is symmetric doubly stochastic. We have . Start from . Simple calculations yield:
if , then converges to , ; (The consensus among as is due to design.)
if , then diverges and is asymptotically unbounded where ;
if , then equals at odd and at even .
Clearly, if converges, then converges and thus stays bounded. In the above example is the critical stepsize.
As each is Lipschitz continuous with constant , is Lipschitz continuous with constant
We formally show that ensures bounded . The analysis is based on the Lyapunov function
which is convex since all are convex and the remaining terms is also convex (and uniformly nonnegative) due to . In addition, is Lipschitz continuous with constant . Rewriting iteration (4) as
we can observe that decentralized gradient descent reduces to unit-stepsize centralized gradient descent applied to minimize .
then, starting from , , the sequence generated by the iteration (4) converges. In addition we also have
for all , where and .
Note that the iteration (4) is equivalent to the gradient descent iteration for the Lyapunov function (8). From the classic analysis of gradient descent iteration in and , , and hence , will converge to a certain point when .
Next we show (10). Since , we have and . Hence,
Recall that is nonnegative. Therefore, we have
On the other hand, for any differentiable convex function with the minimizer and Lipschitz constant , we have and . Then, where . Applying this inequality and (11), we obtain
where and . Note that exists because of Assumption 1. Besides, we denote . This completes the proof. ∎
In the above theorem, we choose for convenience. For general , a different bound for can still be obtained. Indeed, if , then \alpha^{-1}\xi_{\alpha}(0)=\sum_{i=1}^{n}f_{i}(0)+\frac{1}{2\alpha}\big{(}\sum_{i=1}^{n}\|x_{(i)}(0)\|^{2}-\sum_{i,j=1}^{n}w_{ij}x_{(i)}(0)^{T}x_{(j)}(0)\big{)} in (11). Hence we have \|h(k)\|^{2}\leq 2L_{h}\big{(}\sum_{i=1}^{n}f_{i}(0)-f^{o}\big{)}+\frac{L_{h}}{\alpha}\big{(}\sum_{i=1}^{n}\|x_{(i)}(0)\|^{2}-\sum_{i,j=1}^{n}w_{ij}x_{(i)}(0)^{T}x_{(j)}(0)\big{)}. The initial values of do not influence the stepsize condition though they change the bound of gradient. For simplicity, we let in the rest of the paper.
Dependence on stepsize. In (4), the negative gradient step does not diminish at . Even if we let for all , will immediately change once is applied. Therefore, the term prevents the consensus of . Even worse, because both terms in the right-hand side of (4) change , they can possibly add up to an uncontrollable amount and cause to diverge. The local averaging term is stable itself, so the only choice we have is to limit the size of by bounding .
Network spectrum. One can design so that and thus simply bound (9) to
2 Bounded deviation from mean
be the mean of . We will later analyze the error in terms of and then each . To enable that analysis, we shall show that the deviation from mean is bounded uniformly over and . Then, any bound of will give a bound of . Intuitively, if the deviation from mean is unbounded, then there would be no approximate consensus among . Without this approximate consensus, descending individual will not contribute to the descent of and thus convergence is out of the question. Therefore, it is critical to bound the deviation .
If (10) holds and , then the total deviation from mean is bounded, namely,
Recall the definition of and , from the equation (4) we have
where denotes the Kronecker product. From it, we obtain
where (14) holds since is doubly stochastic. From and , it follows that
The proof of Lemma 1 utilizes the spectral property of the mixing matrix . The constant in the upper bound is proportional to the stepsize and monotonically increasing with respect to the second largest eigenvalue modulus . The papers , , and also analyze the deviation of local solutions from their mean, but their results are different. The upper bound in is given at the termination time of the algorithm, which is not uniform in . The two papers and , instead of bounding , decompose it as the sum of element-wise and then bounds it with the minimum nonzero element in .
As discussed after Theorem 1, is affected by the value of , if it is nonzero. In Lemma 1, if , then . Substituting it into the proof of Lemma 1 we obtain
When , and, therefore, the last term dominates.
A consequence of Lemma 1 is that the distance between the following two quantities is also bounded
Under Assumption 1, if (10) holds and , then
where the last inequality follows from Lemma 1. On the other hand, we have
We are interested in since updates the average of . To see this, by taking the average of (4) over and noticing is doubly stochastic, we obtain
On the other hand, since the exact gradient of is , iteration (15) can be viewed as an inexact gradient descent iteration (using instead of ) for the problem
It is easy to see that is Lipschitz continuous with the constant
If any is strongly convex, then so is , with the modulus . Based on the above interpretation, next we bound and .
3 Bounded distance to minimum
We consider the convex, restricted strongly convex, and strongly convex cases. In the former two cases, the solution may be non-unique, so we use the set of solutions . We need the followings for our analysis:
objective error , ;
Under Assumption 1, if , then while
(where constants and are defined in (17) and (10), respectively), the reduction of obeys
In other words, decreases at a minimal rate of until reaching .
Next we show the convergence of . By the assumption, we have , and thus
where the last inequality follows from Young’s inequality for any . Although we can later optimize over , we simply take . Since , we can apply Theorem 1 and then Lemma 2 to the last term above, and obtain
Since as shown in (17), from , we obtain that
Hence, while or equivalently , we have . Dividing both sides by gives . Hence, increase at , or reduces at , which completes the proof. ∎
Theorem 2 shows that until reaching , reduces at the rate of . For fixed , there is a tradeoff between the convergence rate and optimality. Again, upon the stopping of iteration (4), is not available to any of the agents but obtainable by invoking an average consensus algorithm.
Since is convex, we have for all :
From Theorem 2 we conclude that , like , converges at until reaching .
This nearly sublinear convergence rate is stronger than those of the distributed subgradient method and the dual averaging subgradient method . Their rates are in terms of objective error evaluated at the ergodic solution .
Next, we bound under the assumption of restricted or standard strong convexities. To start, we present a lemma.
Suppose that is Lipschitz continuous with constant . Then, we have
(where and ) for the following cases:
([21, Theorem 2.1.12]) if is strongly convex with modulus , then and ;
([37, Lemma 2]) if is restricted strongly convex with modulus , then and for any .
Under Assumption 1, if is either strongly convex with modulus or restricted strongly convex with modulus , and if and , then we have
constants and are given in Lemma 3, and , and is any positive constant. In particular, if we set such that , then we have
where the last inequality follows again from for any . The bound of follows from Lemma 2 and Theorem 1, and we shall bound , which is a standard exercise; we repeat below for completeness. Applying Lemma 3 and noticing by definition, we have
We shall pick so that . Then from the last two inequality arrays, we have
Note that if is strongly convex, then ; if is restricted strongly convex, then because and . Therefore we have . When , .
As a result, if is strongly convex, then geometrically converges until reaching an -neighborhood of the unique solution ; on the other hand, if is restricted strongly convex, then geometrically converges until reaching an -neighborhood of the solution set .
4 Local agent convergence
Under Assumption 1, if is either strongly convex or restricted strongly convex, and , then we have
where are solutions defined at the beginning of subsection 2.3 and the constants , , are the same as given in Theorem 3.
Similar to Theorem 3 and Remark 1, if we set , and if is strongly convex, then geometrically converges to an -neighborhood of the unique solution ; if is restricted strongly convex, then geometrically converges to an -neighborhood of the solution set .
Decentralized basis pursuit
We derive an algorithm for solving a decentralized basis pursuit problem to illustrate the application of iteration (4).
where . This formulation is a column-partitioned version of decentralized basis pursuit, as opposed to the row-partitioned version in and . Both versions find applications in, for example, collaborative spectrum sensing , sparse event detection , and seismic modeling .
Developing efficient decentralized algorithms to solve (18) is nontrivial since the objective function is neither differentiable nor strongly convex, and the constraint couples all the agents. In this paper, we turn to an equivalent and tractable reformulation by appending a strongly convex term and solving its Lagrange dual problem by decentralized gradient descent. Consider the augmented form of (18) motivated by :
where the regularization parameter is chosen so that (19) returns a solution to (18). Indeed, provided that is consistent, there always exists such that the solution to (19) is also a solution to (18) for any . Linearized Bregman iteration proposed in is proven to converge to the unique solution of (19) efficiently. See for its analysis and for important improvements. Since the problem (19) is now solved over a network of agents, we need to devise a decentralized version of linearized Bregman iteration.
The Lagrange dual of (19), casted as a minimization (instead of maximization) problem, is
The function is defined with and , where matrix is the private information of agent . The local objective functions are differentiable with the gradients given as
Applying the iteration (4) to the problem (21) starting with , we obtain the iteration
Note that the primal solution is iteratively updated, as a middle step for the update of .
It is easy to verify that the local objective functions are Lipschitz differentiable with the constants . Besides, given that is consistent, proves that is restricted strongly convex with a computable constant . Therefore, the objective function in (20) has , and . By Theorem 3, any local dual solution generated by iteration (23) linearly converges to a neighborhood of the solution set of (20), and the primal solution linearly converges to a neighborhood of the unique solution of (19).
Consider generated by iteration (23) and . The unique solution of (19) is and the projection of onto the optimal solution set of (20) is . If the stepsize , we have
where the constants and are the same as given in Theorem 3. In particular, if we set such that , then . On the other hand, the primal solution satisfies
The result (24) is a corollary of Corollary 1. We focus on showing (25).
Given any dual solution , the primal solution of (19) is . Recall that and . We have
Due to the contraction of the shrinkage operator, we have the bound . Combining this inequality with (26), we get (25). ∎
Numerical experiments
In this section, we report our numerical results applying the iteration (4) to a decentralized least squares problem and the iteration (23) to a decentralized basis pursuit problem.
We generate a network consisting of agents with edges that are uniformly randomly chosen, where and are chosen for all the tests. We ensure a connected network.
We apply the iteration (4) to the least squares problem
Fig. 1 depicts the convergence of the error corresponding to five different stepsizes. It shows that reduces linearly until reaching an -neighborhood, which agrees with Theorem 3. Not surprisingly, a smaller causes the algorithm to converge more slowly.
Fig. 2 compares our theoretical stepsize bound in Theorem 1 to the empirical bound of . The theoretical bound for this experimental network is . In Fig. 2, we choose and then the slightly larger . We observe convergence with but clear divergence with . This shows that our bound on is quite close to the actual requirement.
2 Decentralized gradient descent for basis pursuit
In this subsection we test the iteration (23) for the decentralized basis pursuit problem (18).
Conclusion
Consensus optimization problems in multi-agent networks arise in applications such as mobile computing, self-driving cars’ coordination, cognitive radios, as well as collaborative data mining. Compared to the traditional centralized approach, a decentralized approach offers more balanced communication load and better privacy protection. In this paper, our effort is to provide a mathematical understanding to the decentralized gradient descent method with a fixed stepsize. We give a tight condition for guaranteed convergence, as well as an example to illustrate the fail of convergence when the condition is violated. We provide the analysis of convergence and the rates of convergence for problems with different properties and establish the relations between network topology, stepsize, and convergence speed, which shed some light on network design. The numerical observations reasonably matches the theoretical results.
Acknowledgements
Q. Ling is supported by NSFC grant 61004137. W. Yin is supported by ARL and ARO grant W911NF-09-1-0383 and NSF grants DMS-0748839 and DMS-1317602. The authors thank Yangyang Xu for helpful comments.