Dual Averaging for Distributed Optimization: Convergence Analysis and Network Scaling
John Duchi, Alekh Agarwal, Martin Wainwright
Introduction
The focus of this paper is the development and analysis of distributed algorithms for solving convex optimization problems that are defined over networks. Such network-structured optimization problems arise in a variety of application domains within the information sciences and engineering. For instance, problems such as multi-agent coordination, distributed tracking and localization, estimation problems in sensor networks and packet routing are all naturally cast as distributed convex minimization [BT89, LWHS02, LOT03, RN04, XBK07]. Common to these problems is the necessity for completely decentralized computation that is locally light—so as to avoid overburdening small sensors or flooding busy networks—and robust to periodic link or node failures. As a second example, data sets that are too large to be processed quickly by any single processor present related challenges. A canonical example that arises in statistical machine learning is the problem of minimizing a loss function averaged over a large dataset (e.g., optimization in support vector machines [CV95]). With terabytes of data, it is desirable to assign smaller subsets of the data to different processors, and the processors must communicate to find parameters that minimize the loss over the entire dataset. However, the communication should be efficient enough that network latencies do not offset computational gains.
Our paper makes two main contributions. The first contribution is to provide a new simple subgradient algorithm for distributed constrained optimization of a convex function; we refer to it as a dual averaging subgradient method, since it is based on maintaining and forming weighted averages of subgradients throughout the network. This approach is essentially different from previously developed methods [NO09, LO09, RNV10], and these differences facilitate our analysis of network scaling issues, meaning how convergence rates depend on network size and topology. Indeed, the second main contribution of this paper is a careful analysis that demonstrates a close link between convergence of the algorithm and the underlying spectral properties of the network. Our analysis splits the convergence rate of the algorithm into two terms: an optimization term and a network deviation term. We obtain the optimization penalty using techniques based on the optimization literature, specifically building on results due to Nesterov [Nes09]. This splitting approach can also be adapted to naturally handle issues such as constrained optimization, stochastic communication, and stochastic optimization due to elegant properties of the dual averaging algorithm. On the other hand, the network scaling terms are obtained using techniques from analysis of Markov chains coupled with the distributed communication protocol. We show that the network deviation terms we derive are sharp for our algorithm; in the special case of the consensus problem, these terms are known to be near-optimal [BGPS06].
By comparison to previous work, our convergence results and proofs are different, and our characterization of the network scaling terms are often much stronger. In particular, the convergence rates given by the papers [NO09, LO09] grow exponentially in the number of nodes in the network. Nedić et al. [NOOT09] and Ram et al. [RNV10] provide a much tighter analysis that yields convergence rates that scale polynomially in the network size, but are independent of the network topology (apart from requiring strong connectedness and degree independent of ). Specifically, Corollary 5.5 in the paper [RNV10] guarantees that their projected subgradient algorithm—under the assumptions that the number of time steps is known a priori and the stepsize is chosen optimally—obtains an -optimal solution to the optimization problem in time. Since this bound is essentially independent of network topology, it does not capture the intuition that distributed algorithms should converge much faster on “well-connected” networks—expander graphs being a prime example—than on poorly connected networks (e.g., chains, trees or single cycles). Johansson et al. [JRJ09] analyze a low communication peer-to-peer protocol that attains rates dependent on network structure. However, in their algorithm only one node has a current parameter value, while all nodes in our algorithm maintain good estimates of the optimum at all time. This is important in online, streaming, and control problems where nodes are expected to act or answer queries in real time. In additional comparison to previous work, our analysis gives network scaling terms that are often substantially sharper. Our development yields an algorithm with convergence rate that scales inversely in the spectral gap of the network. By exploiting known results on spectral gaps for graphs with nodes, we show that (disregarding logarithmic factors) our algorithm obtains an -optimal solution in iterations for a single cycle or path, iterations for a two-dimensional grid, and iterations for a bounded degree expander graph. Moreover, simulation results show an excellent agreement with these theoretical predictions.
Our analysis covers several settings for distributed minimization. We begin by studying fixed communication protocols, which are of interest in a variety of areas such as cluster computing or sensor networks with a fixed hardware-dependent protocol. We also investigate randomized communication protocols as well as randomized network failures, which are often essential to handle gracefully in wireless sensor networks and large clusters with potential node failures. Randomized communication also provides an interesting tradeoff between communication savings and convergence rates. In this setting, we obtain much sharper results than previous work by studying the spectral properties of the expected transition matrix of a random walk on the underlying graph. We also present an analysis of our algorithm with stochastic gradient information, which is not difficult when combined with our initial theorems. We describe an extension for (structured) regularized objectives that often arise in machine learning problems in Appendix D.
The remainder of this paper is organized as follows. Section 2 is devoted to a formal statement of the problem and description of the dual averaging algorithm, whereas Section 3 states the main results and consequences of our paper. Having stated our main results, in Section 4 we give a more in-depth comparison of our work with other recent work. In Section 5, we state and prove basic convergence results on the dual averaging algorithm, which we then exploit in Section 6 to derive concrete results that depend on the spectral gap of the network. Sections 7 and 8 treat extensions with noise, in particular algorithms with noisy communication and stochastic gradient methods respectively. In Section 9, we present the results of simulations that confirm the sharpness of our analysis.
Notation: We collect some notation used throughout the paper. We use to denote the all-ones vector. We also use standard asymptotic notation for sequences. If and are positive sequences, then means that , whereas means that . On the other hand, means that and means that . Finally, we write if and .
Problem set-up and algorithm
In this section, we provide a formal statement of the distributed minimization problem, and a description of the distributed dual averaging algorithm.
Problems of this nature arise in a variety of application domains, and as motivation for the analysis to follow, let us consider a few here. A first example is a sensor network, in which each agent represents a sensor mote, equipped with a radio transmitter for communication, some basic sensing devices, and some local memory and computational power. In environmental applications of sensor networks, each mote might take a measurement of the temperature, and the global objective could be to compute the median of the measurements . This median computation problem can be formulated as minimizing the scalar objective function , where . Similar formulations apply to the problem of computing other statistics such as means, variances, quantiles and other -estimators.
A second motivating example is the machine learning problem first described in Section 1. In this case, the set is the parameter space of the statistician or learner. Each function is the empirical loss over the subset of data assigned to the th processor, and assuming that each subset is of equal size (or that the are normalized suitably), the average is the empirical loss over the entire dataset. Here we use cluster computing as our computational model, where each processor is a node in the cluster, and the graph contains edges between those processors that are directly connected with small network latencies. A special case of our optimization problem within this computational model is the distributed perceptron, recently considered by McDonald et al. [MHM10].
2 Standard dual averaging
Our algorithm is based on a projected dual averaging algorithm [Nes09], designed for minimization of a (potentially nonsmooth) convex function subject to the constraint . We begin by describing the standard version of this algorithm, and then discuss the extensions for the distributed setting of interest in this paper.
In addition, we assume that for all and that ; these are standard assumptions that can be made without loss of generality. Examples of such proximal function and norm pairs include:
We assume that each function is -Lipschitz with respect to the same norm —that is,
There are many cost functions that satisfy this type of Lipschitz condition. For instance, it holds for any convex function on a compact domain , or for any polyhedral function on an arbitrary domain [HUL96a]. Note that the Lipschitz condition (2) implies that for any and any subgradient , we have
where denotes the dual norm to , defined by .
where is a non-increasing sequence of positive stepsizes and
is a type of projection. The intuition underlying this algorithm is as follows: given the current iterate , the next iterate to chosen to minimize an averaged first-order approximation to the function , while the proximal function and stepsize enforce that the iterates do not oscillate wildly. The algorithm is similar to the follow the perturbed leader and lazy projection algorithms developed in the context of online optimization [KV05], though in this form the algorithm seems to be originally due to Nesterov [Nes09]. In Section 5, we show that a simple analysis of the convergence of the above procedure allows us to relate it to the distributed algorithm we describe.
3 Distributed dual averaging
Using this notation, given the non-increasing sequence of positive stepsizes, each node performs the updates
where the projection was defined previously (4). In words, node computes the new dual parameter from a weighted average of its own subgradient and the parameters in its own neighborhood , and then computes the next local iterate by a projection defined by the proximal function and stepsize .
In the sequel, we show convergence of the local sequence to the optimum of (1) via the running local average
Main results and consequences
We will now state the main results of this paper and illustrate some of their consequences. We give the proofs and a deeper investigation of related corollaries at length in the sections that follow.
We start with a result on the convergence of the distributed dual averaging algorithm that provides a decomposition of the error into an optimization term and the cost associated with network communication. In order to state this theorem, we define the averaged dual variable , and we recall the definition (6) of the local average .
Let the sequences and be generated by the updates (5a) and (5b) with step size sequence . Then for any and for each node , we have
Theorem 1 guarantees that after steps of the algorithm, every node has access to a locally defined quantity such that the difference is upper bounded by a sum of four terms. The first two terms in the upper bound (1) are optimization error terms that are common to subgradient algorithms. The third and fourth terms are penalties incurred due to having different estimates at different nodes in the network, and they measure the deviation of each node’s estimate of the average gradient from the true average gradient.The fact that the term appears an extra time is no significant difficulty, as we will bound the difference uniformly for all when giving concrete convergence results. Thus, roughly, Theorem 1 ensures that as long the bound on the deviation is tight enough, for appropriately chosen (say ), the error of is small uniformly across all nodes , and asymptotically approaches 0. See Theorem 2 in the next section for a precise statement of rates.
It is worthwhile comparing the optimization error term from the bound (1) to known results. Subgradient descent on the average function has identical convergence rate, as does the randomized version of incremental subgradient descent [NB01]. However, the distributed nature of the algorithm gives a computational advantage over full gradient descent—the gradient computation requires computation per computer rather than on a single computer. To highlight the benefits compared to incremental subgradient descent, consider the common problem in machine learning and statistics of minimizing a loss on a large dataset. A randomized incremental gradient descent method must access random subsets of data at every iteration, leading to randomized disk seeks with high latency, which the distributed algorithm avoids. In addition, we expect (and empirically see that this is indeed the case) our method to produce more stable iterates, as we observe the gradients of all functions at every round, albeit with a network communication lag.
2 Convergence rates and network topology
We now turn to investigation of the effects of network topology on convergence rates. In this section, we assume that the network topology is static and that communication occurs via a fixed doubly stochastic weight matrix at every round.In later sections, we weaken these conditions. Since is doubly stochastic, it has largest singular value . As summarized in the following result, the convergence rate of the distributed projection algorithm is controlled by the spectral gap of the matrix .
Under the conditions and notation of Theorem 1, suppose moreover that . With step size choice , we have
To the best of our knowledge, this theorem is the first to establish a tight connection between the convergence rate of distributed subgradient methods to the spectral properties of the underlying network. In particular, the inverse dependence on the spectral gap is quite natural, since it is well-known to determine the rates of mixing in random walks on graphs [LPW08], and the propagation of information in our algorithm is integrally tied to the random walk on the underlying graph with transition probabilities specified by .
Using Theorem 2, one can derive explicit convergence rates for several classes of interesting networks, and Figure 1 illustrates four different graph topologies that are of interest. As a first example, the -connected cycle in panel (a) is formed by placing nodes on a circle and connecting each node to its neighbors on the right and left. For small , the cycle graph is rather poorly connected, and our analysis will show that this leads to slower convergence rates than other graphs with better connectivity. The grid graph in two dimensions is obtained by connecting nodes to their nearest neighbors in axis-aligned directions. For instance, panel (b) shows an example of a degree grid graph in two-dimensions. Both the cycle and grid topologies are possible models for clustered computing as well as sensor networks.
In panel (c), we show a random geometric graph, constructed by placing nodes uniformly at random in and connecting any two nodes separated by a distance less than some radius . These graphs are used to model the connectivity patterns of devices, such as wireless sensor motes, that can communicate with all nodes in some fixed radius ball, and have been studied extensively (e.g., [GK00, Pen03]). There are natural generalizations to dimensions as well as to cases in which the spatial positions are drawn from a non-uniform distribution.
Finally, panel (d) shows an instance of a bounded degree expander, which belongs to a special class of sparse graphs that have very good mixing properties [Chu98]. Expanders are an attractive option for the network topology in distributed computation since they are known to have large spectral gaps. For many random graph models, a typical sample is an expander with high probability; for instance, a randomly chosen bipartite graph satisfies this property [Alo86], as do random degree regular graphs [FKS89]. In addition, there are several deterministic constructions of expanders that are degree regular (see Section 6.3 of Chung [Chu98] for further details). The deterministic constructions are of interest because they can be used to design a network, while the random constructions are of interest since they are often much simpler.
Note that the graph Laplacian is always symmetric, positive semidefinite, and satisfies . Therefore, when the graph is degree-regular ( for all ), the standard random walk with self loops on given by the matrix is doubly stochastic and is valid for our theory. For non-degree regular graphs, we need to make a minor modification in order to obtain a doubly stochastic matrix.
Letting denote the maximum degree, we define the modified matrix
This matrix is symmetric by construction, and moreover, for all , so it is also doubly stochastic. Note that if the graph is -regular, then is the standard choice above. Modulo a small technical detail about the ratios of to and the eigenvalue order of (see Sec. 6.2), plugging from (8) above into Theorem 2 immediately relates the convergence of distributed dual averaging to the spectral properties of the graph Laplacian, in particular, we have:
The following result summarizes our conclusions for the choice of stochastic matrix in (8) via (9) in application to different network topologies.
Under the conditions of Theorem 2, we have the following convergence rates:
For -connected grids,
For random geometric graphs with connectivity radius for any ,
For expanders with bounded ratio of minimum to maximum node degree,
Note that up to logarithmic factors, the optimization term in the convergence rate is always of the order , while the remaining terms vary depending on the network topology. Instead of stating convergence rates, in order to understand scaling issues as a function of network size and topology, it can be useful to re-state these results in terms of the number of iterations required to achieve error for network type with nodes. As some special cases, Corollary 1 implies the following scalings:
for the -connected single cycle graph, we have .
for the two-dimensional grid, we have , and
for a bounded degree expander, we have .
In general, Theorem 2 implies that at most
iterations are required to achieve an -accurate solution when using the matrix previously defined in (8).
It is interesting to ask whether the upper bound (10) from our analysis is actually a sharp result, meaning that it cannot be improved (up to constant factors). On one hand, it is known that (even for centralized optimization algorithms), any subgradient method requires at least iterations to achieve -accuracy [NY83], so that the term is unavoidable. The next proposition addresses the complementary issue, namely whether the inverse spectral gap term is unavoidable for the dual averaging algorithm. For the quadratic proximal function , the following result establishes a lower bound on the number of iterations in terms of graph topology and network structure:
Consider the dual averaging algorithm (5a) and (5b) with quadratic proximal function and communication matrix . For any graph with nodes, the number of iterations required to achieve a fixed accuracy is lower bounded as
The proof of this result, given in Section 6.3, involves constructing a “hard” optimization problem and lower bounding the number of iterations required for our algorithm to solve it. In conjunction with Corollary 1, Proposition 1 implies that our predicted network scaling is sharp. Indeed, in Section 9, we show that the theoretical scalings from Corollary 1—namely, quadratic, linear, and constant in network size —are well-matched in simulations of our algorithm.
3 Extensions to stochastic communication links
Our results also extend to the case when the communication matrix is time-varying and random—that is, the matrix is potentially different for each and randomly chosen (but it still obeys the constraints imposed by ). Such stochastic communication is of interest for a variety of reasons. If there is an underlying dense network topology, we might want to avoid communicating along every edge at each round to decrease communication and network congestion. For instance, the use of a gossip protocol [BGPS06], in which one edge in the network is randomly chosen to communicate at each iteration, allows for a more refined trade-off between communication cost and number of iterations. Communication in real networks also incurs errors due to congestion or hardware failures, and we can model such errors by a stochastic process.
The following theorem provides a convergence result for the case of time-varying random communication matrices. In particular, it applies to sequences and generated by the dual averaging algorithm with updates (5a) and (5b) with step size sequence , but in which is replaced with .
We provide a proof of the theorem in Section 7. Note that the upper bound from the theorem is valid for any sequence of non-increasing positive stepsizes . The bound consists of three terms, with the first growing and the last two shrinking as the stepsize choice is reduced. If we assume that , then we can optimize the tradeoff between these competing terms, and we find that the stepsize sequence approximately minimizes the bound bound in the theorem. This yields the scaling
for a universal constant . We can also boost the probability with which this result holds to for any —without modifying the algorithm—at the cost of incurring a slightly higher constant penalty in the error bound.
The setting of stochastic communication for distributed optimization was previously considered by Lobel and Ozdaglar [LO09]. They established convergence by assuming lower bounds on the entries of whenever two nodes communicated. As a consequence, their bounds grew exponentially in the number of nodes in the network.More precisely, inspection of the constant in equation (37) of their paper shows that it is of order , where is the lower bound on non-zero entries of , so it is at least . In contrast, the rates given here for stochastic communication are directly comparable to the convergence rates in the previous section for fixed transition matrices. More specifically, we have inverse dependence on the spectral gap of the expected network, and consequently polynomial scaling for any network, as well as faster rates dependent on network structure.
4 Results for stochastic gradient algorithms
Finally, none of our convergence results rely on the gradients being correct. Specifically, we can straightforwardly extend our results to the case of noisy gradients corrupted with zero-mean bounded-variance noise. This setting is especially relevant in situations such as distributed learning or wireless sensor networks, when data observed is noisy. Let be the -field containing all information up to time , that is, and for all . We define a stochastic oracle that provides gradient estimates satisfying
As a special case, this model includes an additive noise oracle that takes an element of the subgradient and adds to it bounded variance zero-mean noise. Theorem 4 gives our result in the case of stochastic gradients. We give the proof and further discussion in Section 8, noting that because we adapt the dual averaging algorithm, the analysis follows quite cleanly from the earlier analysis for the previous three theorems.
Let the sequence be as in Theorem 1, except that at each round of the algorithm agent receives a vector from an oracle satisfying condition (12). For each , we have
If we assume in addition that has finite radius and that , then with probability at least ,
If we further assume that the gradient estimates are uncorrelated given , then with probability at least ,
Related Work
Having stated and discussed our main results in the previous section, we can now more explicitly compare the results in this paper to those in previous work. Our aim here is to give a clear understanding of how our algorithm and results relate to and, in many cases, improve upon prior results. Specifically, with the results of Theorem 2 and Corollary 1 in hand, we can more directly compare our results to other work.
As discussed in the introduction, other researchers have designed algorithms for solving the problem (1). Most previous work [LO09, NO09, NOOT09, RNV10] studies convergence of a (projected) gradient method in which each node in the network maintains , and at time performs the update
for . With the update (13), Corollary 5.5 in the paper [RNV10] shows that
(we use our notation and assumptions from Theorem 2). The above bound is minimized by setting the stepsize , giving convergence rate . It is clear that this convergence rate is substantially slower than all the rates in Corollary 1.
The distributed dual averaging algorithm (5a)–(5b) is quite different from the update (13). The use of the proximal function allows us to address problems with non-Euclidean geometry, which is useful, for example, for very high-dimensional problems or where the domain is the simplex (e.g. [NY83, Chapter 3]). The differences between the algorithms become more pronounced in the analysis. Since we use dual averaging, we can avoid some technical difficulties introduced by the projection step in the update (13). Precisely because of this technical issue, earlier works [NO09, LO09] studied unconstrained optimization, and the averaging in seems essential to the faster rates our approach achieves as well as the ease with which we can extend our results to stochastic settings.
In other related work, Johansson et al. [JRJ09] establish network-dependent rates for Markov incremental gradient descent (MIGD), which maintains a single vector at all times. A token determines an active node at time , and at time step the token moves to one of its neighbors , each with probability . Letting , the update is
Johansson et al. show that with optimal setting of and symmetric transition matrix , MIGD has convergence rate , where is the return time matrix . In this case, let denote the th eigenvalue of . The eigenvalues of are thus and for , and so we have
Consequently, the bound in Theorem 2 is never weaker, and for certain graphs, our results are substantially tighter, as shown in Corollary 1. For -dimensional grids (where ) we have , whereas MIGD scales as . For well-connected graphs, such as expanders and the complete graph, the MIGD algorithm scales as , essentially a factor of worse than our results.
Basic convergence analysis for distributed dual averaging
In this section, we prove convergence of the distributed algorithm based on the updates (5a) and (5b). We begin in Section 5.1 by defining some auxiliary quantities and establishing lemmas useful in the proof, and we prove Theorem 1 in Section 5.2.
Using techniques related to those used in past work [NO09], we establish convergence via two auxiliary sequences, given by
We begin by showing that the average sum of gradients evolves in a very simple way. In particular, we have
Consider the right-hand side above, let be the matrix of vectors , and denote . Since the matrix is doubly stochastic, we have
Consequently, the (negative of the) averaged dual sequence evolves almost like standard subgradient descent on the function , the only difference being is a subgradient at (which need not be the same as the subgradient at ). The simple evolution (16) of the averaged dual sequence allows us to avoid difficulties with the non-linearity of projection that have been challenging in earlier work.
For any non-increasing sequence of positive stepsizes, and for any , we have
Next we state a lemma that allows us to restrict our analysis to the easier to analyze centralized sequence from (15):
Consider the sequences , , and defined according to equations (5a), (5b), and (15). Recall that each is -Lipschitz. For each , we have
Similarly, with the definitions and , we have
Equipped with these tools, we now turn the proof of Theorem 1.
2 Proof of Theorem 1
Our proof is based on analyzing the sequence . Given an arbitrary , we have
where the inequality follows by the -Lipschitz condition on .
Let be a subgradient of at . Using convexity, we have the bound
Breaking up the right hand side of (19) into two pieces, we obtain
By definition of the updates for and , we have
Thus, we see that the first term in the decomposition (20) can be written in the same way as the bound in Lemma 2, and as a consequence, we have the bound
It remains to control the final two terms in the bounds (18) and (20). Since by assumption, we have
By the -Lipschitz continuity of the projection operator (see Appendix A.3), we have
Combining this bound with (18) and (21) yields the running sum bound
Applying Lemma 3 to (22) gives that is upper bounded by
Dividing both sides by and using convexity of yields the bound (1).
Convergence rates, spectral gap, and network topology
In this section, we will give concrete convergence rates for the distributed dual averaging algorithm based on the mixing time of a random walk according to the doubly stochastic matrix . The understanding of the dependence of our convergence rates in terms of the underlying network topology is crucial, because it can provide important cues to the system administrator in a clustered computing environment or for the locations and connectivities of sensors in a sensor network. We begin in Section 6.1 with the proof of Theorem 2. In Section 6.2, we prove the graph-specific convergence rates stated in Corollary 1, whereas Section 6.3 contains a proof of the lower bound stated in Proposition 1.
For a brief review of the relevant standard Perron-Frobenius and matrix theory, we refer the reader to Appendix B.
We focus on controlling the network error term in the bound (1), namely the quantity
Define the matrix (in the sequel we allow the stochastic matrix to change as a function of time). Let be the th entry of the th column of . Then via a bit of algebra, we can write
Clearly the above reduces to the standard update (5a) when . Since evolves simply as in (16), we assume that to avoid notational clutter—we can simply start with —and use (24) to see
We use the fact that for all and and (25) to see that
Now we break the sum in (26) into two terms separated by a cutoff point . The first term consists of “throwaway” terms, that is, timesteps for which the Markov chain with transition matrix has not mixed, while the second consists of steps for which is small. Note that the indexing on implies that for small , is close to uniform. From (23), . Hence, if
Thus, by setting , for , we have
For larger , we simply have . The above suggests that we split the sum at . We break apart the sum in (26) and use (27) to see that since and there are at most steps in the summation,
The last inequality follows from the concavity of , since .
Combining (28) with the running sum bound in (22) of the proof of the basic theorem, Theorem 1, we immediately see that for ,
Appealing to Lemma 3 allows us to obtain the same result on the sequence with slightly worse constants. Note that . Thus, using the assumption that , using convexity to bound (and similarly for ), and setting as in the statement of the theorem completes the proof.
2 Proof of Corollary 1
The corollary is based on bounding the spectral gap of the matrix from equation (8).
The matrix satisfies the bound
Proof By a theorem of Ostrowski on congruent matrices (cf. Theorem 4.5.9, [HJ85]), we have
Since , we have , and so it suffices to focus on and . From the definition (8), the eigenvalues of are of the form . The bound (30) coupled with the fact that all the eigenvalues of are non-negative implies that \sigma_{2}(P)=\max_{k<n}\big{\{}\big{|}1-(\delta_{\operatorname{max}}+1)^{-1}\lambda_{k}(D^{1/2}\mathcal{L}D^{1/2})\big{|}\big{\}} is upper bounded by the larger of
Much of spectral graph theory is devoted to bounding sufficiently far away from zero, and Lemma 4 allows us to conveniently leverage such results for bounding the convergence rate of our algorithm.
Note that computing the upper bound in Lemma 4 requires controlling both and . In order to circumvent this complication, we use the well-known idea of a “lazy” random walk [Chu98, LPW08], in which we replace by . The resulting symmetric matrix has the same eigenstructure as , and moreover, we have
Consequently, it is sufficient to bound only , which is more convenient from a technical standpoint. The convergence rate implied by the lazy random walk through Theorem 2 is no worse than twice that of the original walk, which is insignificant for the analysis in this paper.
We are now equipped to address each of the graph classes covered by Corollary 1.
Recall the regular -connected cycle from Figure 1(a), constructed by placing the nodes on a circle and connecting every node to neighbors on the right and left. For this graph, the Laplacian is a circulant matrix with diagonal entries and off-diagonal non-zero entries . Known results on circulant matrices (see Chapter 3 of Gray [Gra06]) imply that it has th eigenvalue
For and , the last equation can be massaged into [BGPS06, Section VI.A]
By performing a Taylor expansion of , we see that for .
Now consider the regular -connected path, a path in which each node is connected to the neighbors on its right and left. By computing Cheeger constants (see Lemma 6 in Appendix C), we see that if , then . Note also that for the -connected path on nodes, and . Thus, we can combine the previous two paragraphs with Lemma 4 to see that for regular -connected paths or cycles with ,
Substituting the bound (32) into Theorem 2 yields the claim of Corollary 1(a).
Now consider the case of a -by- grid, focusing specifically on regular -connected grids, in which any node is joined to every node that is fewer than horizontal or vertical edges away in an axis-aligned direction. In this case, we use results on Cartesian products of graphs [Chu98, Section 2.6] to analyze the eigen-structure of the Laplacian. In particular, the toroidal -by- -connected grid is simply the Cartesian product of two regular -connected cycles of nodes. The second smallest eigenvalue of a Cartesian product of graphs is half the minimum of second-smallest eigenvalues of the original graphs [Chu98, Theorem 2.13]. Thus, based on the preceding discussion of -connected cycles, we conclude that if , then we have . For a non-toroidal -by- grid (in which the network is not “wrapped” on its boundaries, as in Figure 1(b)), we use the previous discussion of regular -connected paths, since the grid is the Cartesian product of two -connected paths of nodes. We immediately see that . In both cases, for -by- -connected grids, we use Lemma 4 and (31) to see that for ,
The result in Corollary 1(b) immediately follows.
Using the proof of Lemma 10 from Boyd et al. [BGPS06], we see that for any , if , then with probability at least ,
Thus, letting be the graph Laplacian of a random geometric graph, if we can bound , (34) coupled with Lemma 4 will control the convergence rate of our algorithm.
Recent work of von Luxburg et al. [vLRH10] gives concentration results on the second-smallest eigenvalue of a geometric graph. In particular, their Theorem 3 says that there are universal constants such that with probability at least , . Parsing this a bit, we see that if , then with exceedingly high probability, . Using (34), we see that for ,
with high probability. Combining the above equation with Lemma 4 and (31), we have
Thus we have obtained the result of Corollary 1(c). Our bounds show that a grid and a random geometric graph exhibit the same convergence rate up to logarithmic factors.
The constant spectral gap in expanders [Chu98, Chapter 6] removes any penalty due to network communication (up to logarithmic factors), and hence yields Corollary 1(d).
3 Proof of Proposition 1
We now give a proof of Proposition 1, which shows that the dependence of our convergence rates on the spectral gap is tight. The proof is based on construction of a set of objective functions that force convergence to be slow by using the second eigenvector of the communication matrix .
for some constant to be chosen. Note that each is -Lipschitz. By construction, we see immediately that is optimal for the global problem.
In order to establish a lower bound, it suffices to show that at least one node is far from the optimum after steps, and we focus on node . Since , the evolution (36) guarantees that
Recalling that for this scalar setting, we have
Hence is the projection of onto $z_{1}(t)>0$ we have
If is overly small, the relation (37) will guarantee that , so that is far from the optimum. If we choose , then a little calculation shows that we require in order to drive below zero.
Convergence rates for stochastic communication
In this section, we develop theory appropriate for stochastic and time-varying communication, which we model by a sequence of random matrices. We begin in Section 7.1 with basic convergence results in this setting, and then prove Theorem 3. Section 7.2 contains a more detailed treatment of the case of gossip algorithms, and Section 7.3 contains the setting of edge failures.
Recall that Theorem 1 involves the sum . In Section 6, we showed how to control this sum when communication between agents occurs on a static underlying network structure via a doubly-stochastic matrix . We now relax the assumption that is fixed and instead let vary over time.
We use to denote the doubly stochastic symmetric matrix at iteration . The update employed by the algorithm, modulo changes in , is given by the usual updates (5a) and (5b)—namely,
In this case, our analysis makes use of the modified definition . However, we still have the evolution of from equation (16), and moreover, (25) holds essentially unchanged:
To show convergence for the random communication model, we must control the convergence of to the uniform distribution. We first claim that
which we establish by recalling and modifying a few known results [BGPS06].
Let denote the -dimensional probability simplex and the vector be arbitrary. Consider the random sequence generated by the recursion . Let correspond to the portion of orthogonal to the all s vector. Calculating the second moment of , we have
since , is orthogonal to the first eigenvector of , and is symmetric. Applying Chebyshev’s inequality yields
Replacing with and noting that yields the claim (39).
1.2 Proof of Theorem 3
Using the probabilistic bound (39), note that
then we are guaranteed that if , then
It remains to bound the sum . For any fixed pair , since the matrices are doubly stochastic, we have
where the final inequality uses the bound . From the bound (40), we have the bound \big{\|}{\Phi(t-1,t-\widehat{t}-1)e_{i}-1\!\!1/n}\big{\|}_{2}\leq\frac{1}{T^{2}n} with probability at least . Since ranges between and in the summation , we conclude that
with probability at least . Applying the union bound over all iterations and nodes , we obtain
Recalling the master bound from Theorem 1 completes the proof.
In the remainder of this section, we give some applications of the stochastic framework outlined above, showing a few sampling schemes and giving bounds on their convergence rates.
2 Gossip-like protocols
Gossip algorithms are procedures for achieving consensus in a network robustly and quickly by randomly selecting one edge in the network for communication at each iteration [BGPS06]. Once nodes and are selected, their values are averaged. Gossip algorithms drastically reduce communication in the network, yet they still enjoy fast convergence and are robust to changes in topology.
In a partially asynchronous iterative method, agents synchronize their iterations [BT89]. This is the model of standard gossip protocols, where computation proceeds in rounds, and in each round communication occurs on one random edge. In our framework, this corresponds to using the random transition matrix . It is clear that , since is a projection matrix.
Let be the adjacency matrix of the graph and be the diagonal matrix of its degrees as in Section 6.2. At round , edge (with ) is chosen with probability . Thus,
since . Using an identical argument as that for Lemma 4, we see that (42) implies that
Note that , so that for approximately regular graphs, , and . Thus, at the expense of a factor of roughly in convergence rate, we can reduce the number of messages sent per round from the number of edges in the graph, , to one. In a clustered computing environment with some centralized control, it is possible to select more than one edge per round so long as no two edges share vertices (for example, by selecting a random maximal matching) and still have . For a -regular graph, choosing a random maximal matching achieves a spectral gap within constant factors of the spectral gap of the underlying graph but uses only as much communication.
2.2 Totally asynchronous gossip protocol
Now we relax the assumption that agents have synchronized clocks, so the iterations of the algorithm are no longer synchronized. Suppose that each agent has a random clock ticking at real-valued times, and at each clock tick, the agent randomly chooses one of its neighbors to communicate with. Further assume that each agent computes an iterative approximation to , and that the approximation is always unbiased (an example of this is when is the sum of several functions, and agent simply computes the subgradient of each function sequentially). We assume that no two agents have clocks tick at the same time. This communication corresponds to a gossip protocol with stochastic subgradients, and its convergence can be described simply by combining (42) with Theorem 4. This type of algorithm is well-suited to completely decentralized environments, such as sensor networks.
3 Random edge inclusion and failure
Using (43), we see that the spectral gap decreases (and hence convergence rate may slow) by a factor proportional to the maximum degree in the graph. This is not surprising, since the amount of communication performed decreases by the same factor.
A related model we can analyze is that of a network in which at every time step of the algorithm, an edge fails with probability independently of the other edges. We assume we are using the model of communication in the prequel, so . Let , , and be as before and be the Laplacian of the underlying graph; we easily have
Stochastic Gradient Optimization
We begin by using convexity and the Lipschitz continuity of the (see equations (18) and (19)), thereby obtaining that the running sum is upper bounded as
We bound the first two terms of (44) using the same derivation as that for Theorem 1. In particular, , and nothing in Lemma 2 assumes that is related to . So we upper bound the first term in (44) with
Further, and by assumption for and , so
Recalling that , we proceed by putting expectations around the norm terms in (26) and (28) to see that
Coupled with the above arguments, we can bound the expectation of (44) by
Taking the expectation for the final term in the bound (46), we recall that , so
which completes the proof of the first statement of the theorem.
To show that the statement holds with high-probability when is compact and , it is sufficient to establish that the sequence is a bounded martingale, and then apply Azuma’s inequality [Azu67]. (Here we are exploiting the fact that under compactness and bounded norm conditions, our previous bounds on terms in the decomposition (45) now hold for the analogous terms in the decomposition (46) without taking expectations.)
By assumption on the compactness of and the Lipschitz assumptions on , we have
Recalling (47), we conclude that the last sum in the decomposition (46) is a bounded difference martingale, and Azuma’s inequality implies that
Dividing by and setting the probability above equal to , we obtain that with probability at least ,
The second statement of the theorem is now obtained by appealing to Lemma 3. By convexity, we have , thereby completing the proof.
Proving the last statement of the theorem—the concentration result with uncorrelated noise at each node—requires a martingale extension of Bernstein’s inequality [Fre75]. Indeed, one form of Freedman’s inequality states that if is a martingale difference sequence, uniformly, and , then for any ,
To extend the above bound to our setting, we recall that is Martingale difference sequence uniformly bounded by . Further, since the expectation is zero, we have
The decorrelation equality in (48) follows by our assumption that and are uncorrelated given , and that , , and . Substituting as an upper bound for the variance in Freedman’s inequality, we have
To find a so that term is less than or equal to , we solve
Solving the above quadratic in , we have equality with zero for
In particular, noting that , it is sufficient that
for the inequality in (49) to be satisfied. Thus with probability at least ,
Dividing by completes the proof of the last statement of Theorem 4.
Simulations
In this section, we report experimental results on the network scaling behavior of the distributed dual averaging algorithm as a function of the graph structure and number of processors . These results illustrate the excellent agreement of the empirical behavior with our theoretical predictions.
Figure 2 provides plots of the function error versus the number of iterations for grid graphs with a varying number of nodes . In addition to demonstrating convergence, these plots also show how the convergence time scales as a function of the graph size . In particular, for a given class of optimization problems, define to be the number of iterations required to obtain -accurate solution for a graph with nodes. As shown in Figure 2, for any fixed , the function shifts to the right as is increased, and the goal of network scaling analysis is to gain a precise understanding of this shifting.
As discussed following Corollary 1, for cycles, grids, and expanders, we have the following upper bounds on the quantity :
In Figure 3, we compare these theoretical predictions with the actual behavior of dual subgradient averaging. Each panel shows the function versus the graph size for the fixed value ; the three different panels correspond to different graph types: cycles (a), grids (b) and expanders (c). In each panel, each point on the blue curve is the average of trials, and the bars show standard errors. For comparison, the dotted black line shows the theoretical prediction (51). Note that the agreement between the empirical behavior and theoretical predictions is excellent in all cases. In particular, panel (a) exhibits the quadratic scaling predicted for the cycle, panel (b) exhibits the the linear scaling expected for the grid, and panel (c) shows that expander graphs have the desirable property of having constant network scaling.
Though our focus in this paper is mostly a theoretical one, in our final set of experiments we compare the distributed dual averaging method (DDA) that we present to the Markov incremental gradient descent (MIGD) method [JRJ09] and the distributed projected gradient method [RNV10], which seem to have the sharpest convergence rates currently in the literature. In Figure 4, we plot the quantity versus graph size for DDA and MIGD on grid and expander graphs. We use the optimal stepsize suggested by the analyses for each method. (We do not plot results for the distributed projected gradient method [RNV10] because the optimal choice of stepsize according to the analysis therein results in such slow convergence that it does not fit on the plots.) Fig. 4 makes it clear that—especially on graphs with good connectivity properties such as the expander in Fig. 4(b)—the dual averaging algorithm gives improved performance.
Conclusions and Discussion
In this paper, we proposed and analyzed a distributed dual averaging algorithm for minimizing the sum of local convex functions over a network. It is computationally efficient, and we provided a sharp analysis of its convergence behavior as a function of the properties of the optimization functions and the underlying network topology. Our analysis demonstrates a close connection between convergence rates and mixing times of random walks on the underlying graph; such a connection is natural given the local and graph-constrained nature of our updates. In addition to analysis of deterministic updates, our results also include the case of stochastic communication protocols, for instance when communication occurs only along a random subset of the edges at each round. Such extensions allow for the design of protocols that provide interesting tradeoffs between the amount of communication and convergence rates. We also demonstrate that our algorithm is robust to noise by providing an analysis for the case of stochastic optimization with noisy gradients. We confirmed the sharpness of our theoretical predictions by implementation and simulation of our algorithm.
There are several interesting open questions that remain to be explored. For instance, it would be interesting to analyze the convergence properties of other kinds of network-based optimization problems, by combining local information in different structures. It would also be of interest to study what other optimization procedures from the standard setting can be converted into efficient distributed algorithms to better exploit problem structure when possible.
AA was supported by a Microsoft Research Fellowship and JCD was supported by the National Defense Science and Engineering Graduate Fellowship (NDSEG) Program. In addition, MJW was partially supported by NSF-CAREER-0545862 and AFOSR-09NL184. We thank John Tsitsiklis for a careful reading of the paper and providing helpful comments and several anonymous reviewers for useful feedback.
Appendix A The Dual Averaging Algorithm
In this section, we give a simple convergence proof for the basic (non-distributed) dual averaging algorithm (3). In particular, we recall the updates
which is compact since is closed and is strongly convex. Thus, since the supremum is uniquely attained and is differentiable in , [HUL96a, Theorem 4.4.2].
This fact has two important consequences. First, since the projection is Lipschitz-continuous (see Lemma 5), we have the bound
Consequently, an integration argument (e.g., [Nes04, Lemma 1.2.3]) yields the upper bound
To bound the sequence of inner products, we note that for any , we have
Finally, we combine the upper bound on from equation (55) with the earlier bound (54), thereby obtaining that for any , the sum is upper bounded as
The last line exploited the facts that and . This completes the proof of the claim.
A.2 Proof of Lemma 3
Via the -Lipschitz continuity of the , we can write
For the second bound, we again use the -Lipschitz continuity of the and the triangle inequality,
Lipschitz-continuity of the projection (Lemma 5) shows that which gives both the desired results.
A.3 Lipschitz continuity of projections
The following lemma on the Lipschitz-continuity of the projection operator is well-known, but we state and prove it for completeness.
Setting and in these two inequalities (respectively) yields
Adding the above two inequalities, we obtain the bound
On the other hand the strong convexity of implies that , with an analogous bound with the roles of and exchanged. Some algebra then leads to
which, when combined with (56), gives the desired result. ∎
Appendix B Background on stochastic matrices
If we take , denoting a canonical basis vector for , then we see that . Taking , the -dimensional simplex, gives
which establishes the bound (23). (The factor in the bound is standard in the Markov chain literature, e.g., [DS91, Proposition 3].)
Appendix C Eigenvalues of paths
Let be a graph and be a subset of the nodes in the graph. Let denote the set of edges crossing between and , and let the volume of be the sum of the degrees of the nodes in , that is, . The Cheeger constant of a graph is defined as
If is the Laplacian of , then (e.g., see Lemma 2.1 and Theorem 2.2 in Chung [Chu98]).
Let be a -connected path with nodes and . Then its normalized graph Laplacian satisfies .
Proof We invoke Theorem 4.13 in Chung [Chu98] to conclude that , since is a subgraph of the -connected cycle. It thus suffices to prove that the Cheeger constant is lower bounded as .
Let be the set of nodes achieving the minimum in the definition (57). To make the rest of the proof easier, assume that the degree of each node is . (We may do so without loss of generality, since it only has the effect of increasing and in the Cheeger constant calculation, and so any Cheeger constant calculated under this assumption lower bounds the true Cheeger constant.)
Appendix D Composite Objectives
In this section, we show how to generalize the dual averaging algorithm to incorporate composite objectives, specifically those of the form for known . Though it is possible to perform similar derivations to those in Lemma 2, for brevity we refer to recent work of Xiao [Xia10]. Nonetheless, the algorithm is conceptually very similar to the dual averaging algorithm (updates (5a) and (5b)), and equally as simple to write. We assume that is closed convex and non-negative, and is closed. We define the composite projection operator as
The mapping is -Lipschitz with respect to and , that is,
As in Lemma 5, (59) is a consequence of the fact that the conjugate dual of a -strongly convex function has -Lipschitz continuous gradient with respect to the associated dual norm, and the gradient of the conjugate of is simply [HUL96b, Theorem X.4.2.1].
The distributed algorithm based on the update (58) is essentially identical to the dual averaging algorithm discussed in the main body of the paper. Each agent maintains the gradient vector
As in (16), we have . The following proposition, a simplification of [Xia10, Section B.2], allows us to give a convergence guarantee for the algorithm described by (60) and (61).
The above proposition, combined with the techniques used to derive Theorem 1, allow us to easily prove convergence of distributed composite-objective dual averaging. As earlier, let , and assume that the are -Lipschitz with respect to . Then as in (18), (19), and (20), for any , we immediately have
By definition of , we see that Proposition 2 bounds the above by
Finally, we use the fact that the mapping is -Lipschitz to see that for the distributed composite-objective projection algorithm of (60) and (61),
Any of the techniques in the prequel can be used to bound (62).