Stochastic Gradient-Push for Strongly Convex Functions on Time-Varying Directed Graphs
Angelia Nedic, Alex Olshevsky
I Introduction
We consider the problem of cooperatively minimizing a separable convex function by a network of nodes. Our motivation stems from much recent interest in distributed optimization problems which arise when large clusters of nodes (which can be sensors, processors, autonomous vehicles or UAVs) wish to collectively optimize a global objective by means of actions taken by each node and local coordination between neighboring nodes.
Our focus here is on the case when the communication topology connecting the nodes is time-varying and directed. In the context of wireless networks, time-varying communication topologies arise if the nodes are mobile or if the communication between them is subject to unpredictable bouts of interference. Directed communication links are also a natural assumption as in many cases there is no reason to expect different nodes to transmit wirelessly at the same power level. Transmissions at different power levels will result in unidirectional communication between nodes (usually, after an initial bidirectional exchange of “hello” messages).
In our previous work we proposed an algorithm which is guaranteed to drive all nodes to an optimal solution in this setting. Our algorithm, which we called the subgradient-push, can be implemented in a fully distributed way: no knowledge of the (time-varying) communication topology or even of the total number of nodes is required, although every node is required to know its out-degree at each time. The subgradient-push is a generalization of the so-called push-sum protocol for computing averages on directed graphs proposed over a decade ago (see also the more recent development in ).
Our main result in was that the subgradient-push protocol drives all the nodes to an optimal solution at a rate . Here, we consider the effect of stronger assumptions on the individual functions. Our main result is that if the functions at each node are strongly convex, then even if each node only has access to noisy gradients of its own function, an improvement to an rate can be achieved.
Note that our convergence rate is quite close to best achievable rate of in (centralized) strongly convex optimization with noisy gradient samples of bounded variance . Obtaining an algorithm with a rate in our setting of distributed, noisy, strongly-convex optimization over time-varying directed graphs of unknown size remains an open problem.
Our work here contributes to the growing literature on distributed methods for optimization over networks . It is a part of a recent strand of the distributed optimization literature which studies effective protocols when interactions between nodes are unidirectional . Our work is most closely related to recent developments in . We specifically mention , which were the first papers to suggest the use of push-sum-like updates for optimization over directed graphs as well as which derived O( convergence rates in the less stringent setting when every graph is fixed and undirected.
Our paper is organized as follows. In Section II, we describe the problem formally and present the algorithm along with the main results. The results are then proved in Sections III and IV. We conclude with some simulations in Section V and some concluding remarks in Section VI.
II Problem, Algorithm and Main Result
We consider a network of nodes which would like to collectively solve the following minimization problem:
We make the assumption that at each time , node can only send messages to its out-neighbors in some directed graph , where the graph has vertex set and edge set . We will be assuming that the sequence is -strongly-connected, which means that there is a positive integer such that the graph with edge set
is strongly connected for each . Intuitively, we are assuming the time-varying network must be repeatedly connected over sufficiently long time scales.
We use and denote the in- and out-neighborhoods of node at time , respectively, where by convention node is always considered to be an in- and out- neighbor of itself, so for all . We use to denote the out-degree of node , and we assume that every node knows its out-degree at every time .
where the variables are initialized as for all . Here, we use to abbreviate the notation (see Eq. (1)). The positive stepsize will be specified later.
These updates have a simple physical implementation: each node broadcasts the quantities to all of the nodes in its out-neighborhood. Each neighbor then sums the received messages to obtain and . The updates of then do not require any additional communications among the nodes at step .
Since the chain is ergodic, the matrices converge to a rank-one matrix with identical columns, i.e., , where is a stochastic vector with for all . Therefore, for we have
Consider the coordinate-wise ratio of the vectors and . The limits of these ratios satisfy the following relation
which relies on the fact that (these values cancel out in the ratio). Thus, any influence that the chain may induce, as reflected in different steady state values , do not appear in the limiting ratios of . Furthermore, as indicated by Eq. (7), if we set , we obtain
showing that the ratios approach the initial average as . When the underlying Markov chain is time-varying (i.e., the matrix is time-varying, then one would expect that the limits of the ratios track the running averages with increasing accuracy.
The algorithm (3) is motivated by the insight that the ratios can track the running averages with the accuracy that can been characterized by the connectivity stricture of the underlying graphs. Additionally, the running averages are controlled by the ”gradient” field in order to move them toward the set of optimal solutions of the problem of our interest. Specifically, in the light of the above discussion, the updates and in the algorithm (3) correspond to updates of vector-variables of the nodes, where variables serve to cancel out the effects of scaling (which is due to a time-varying Markov chain, as reflected by the graph structure). The updates of in algorithm (3) are just keeping track of the ratios at the nodes (as these will be consenting in a long run). The last update step in algorithm (3) is basically forcing the consensus point to asymptotically approach an optimal solution of the problem.
Our previous work in provided a rate estimate for a suitable averaged version of the variables with the stepsize choice . In particular, we showed in that, for each , a suitably averaged version of converges to the same global minimum of the function at a rate of . Our main contribution in this paper is an improved convergence rate estimate under the strong convexity assumption on the functions .
where is any subgradient of at .
We next provide precise statements of our improved rate estimates. For convenience, we define
to be the vector which averages all the at each node. Furthermore, let us introduce some notation for the assumptions we will be making.
(a) The graph sequence is -strongly-connected. (b) Each function is -strongly convex with .
Note that Assumption 1(b) implies the existence of a unique global minimizer of .
This can easily be done recursively, e.g., by setting and updating as
We are now ready to state our first main result, which deals with the speed at which the averaged iterates we have just described converge to the global minimizer of .
Suppose Assumption 1 is satisfied and for , where the constant is such that
Suppose further that there exists a scalar such that with probability , . Then, we have for all ,
where is the largest-possible Euclidean norm of any subgradient of on the ball of radius around the origin, , , while the scalars and are functions of the graph sequence which satisfy
Moreover, if each of the graphs is regularA directed graph is regular if every out-degree and every in-degree of a node in equals for some ., then
and is the second-largest singular value of .
Note that each term on the right-hand side of the bound in the above theorem has a in the denominator and an or a constant in the numerator. The convergence time above should therefore be interpreted as proving a decay with time which decreases at an expected rate with the number of iterations . Note that this is an extended and corrected version of a result from the conference version of this paper .
We remark that our result is new even for undirected graphs, which are included as a special case of the above theorem; indeed, to our knowledge, we are the first to demonstrate a decay rate of for stochastic gradient descent over time-varying undirected graphs (however, recall our earlier discussion of which derived similar decay rates for the deterministic case with a fixed undirected graph). Surprisingly, the undirected and directed cases do not appear to be very different; the main difference seems to do with the constant and . Indeed, note that the bounds for the constants and which appear in the bound are rather large in the most general case; in particular, they grow exponentially in the number of nodes . At present, this scaling appears unavoidable: those constants reflect the best available bounds on the performance of average consensus protocols in directed graphs, and it is an open question whether average consensus on directed graphs can be done in time polynomial in . In the case of regular graphs, the bounds scale polynomially in due to the availability of good bounds on the convergence of consensus. Similarly, for undirected case, the possibility of modifyin the protocol by instead choosing a symmetric matrix leads to good bounds on and . Our results therefore further motivate problem of finding consensus algorithms with good convergence times, especially on directed graphs.
Finally, we remark that choosing a stepsize parameter so that Eq. (10) is satisfied is most easily done by instead insuring that . This is a more conservative condition than that of Eq. (10) but ensuring it requires the nodes only to compute . This is more convenient because the minimum of any collection of numbers (with stored at node ) can be easily computed by the following distributed protocol: node sets its initial value to and then repeatedly replaces its value with the minimum of the values of its in-neighbors. It is easy to see that on any fixed network, this process converges to the minimum in as many steps as the diameter. Furthermore, on any -strongly-connected sequence this processes converges in the optimal steps. Thus, the pre-processing required to come up with a suitable step-size parameter is reasonably small.
A shortcoming of Theorem 1 is that we must assume that the iterates remain bounded (as opposed to obtaining this as a by-product of the theorem). This is a common situation in the analysis of subgradient-type methods in non-differentiable optimization: the boundedness of the iterates or their subgradients often needs to be assumed in advance in order to obtain a result about convergence rate.
We next show that we can remedy this shortcoming at the cost of imposing additional assumptions on the functions , namely that they are differentiable and their gradients are Lipschitz.
Each is differentiable and its gradients are Lipschitz continuous, i.e., for a scalar ,
Suppose that Assumption 1 and Assumption 2 hold and suppose . Then, there exists a scalar such that with probability , for all .
The proof of this theorem is constructive in the sense than an explicit expression for can be derived in terms of the level set growth of the functions . Additionally, the scalar depends on the initial points , the step-size sequence , the functions , the Lipschitz constants and the noise bounds (cf. (2)).
Putting Theorems 1 and 2 together, we obtain our main result: for strongly convex functions with Lipschitz gradients, the stochastic (sub)gradient-push with appropriately chosen step-size and averaging strategy converges at an rate.
III Proof of Theorem 1
We briefly sketch the main ideas of the proof of Theorem 1. First, we will argue that if the subgradient terms in the subgradient-push protocol are bounded, then as a consequence of the decaying stepsize , the protocol will achieve consensus. We will then analyze the evolution of the average and show that, as a consequence of the protocol achieving consensus, satisfies approximately the same recursion as the iterates of the ordinary subgradient method. Finally, the key idea in our proof is the observation in that, for a noisy gradient update on a strongly convex function, a decay of can be achieved by a simple averaging of iterates that places more weight on recent iterations, specifically by weighting the ’th iterate proportional to . Here, we show that, for the perturbed subgradient method which is followed by the averaging step , a nearly identical rate can be achieved.
Our starting point is an analysis of a perturbation of the so-called push-sum protocol of for computing averages in directed networks. We next describe this perturbed push-sum protocol. Every node maintains scalar variables , where for all . Every node updates these variables according to the following rule: for ,
where is some (perhaps adversarially chosen) perturbation at time . Without the perturbation term , the method in Eq. (12) is called push-sum. For the perturbed push-sum method above in Eq. (12), we have that the following is true.
Consider the sequences , generated by the method in Eq. (12). Assuming that the graph sequence is -strongly-connected, we have that for all ,
We refer the reader to for a proof where this statement is Lemma 1. Informally, the push-sum protocol ensures that all track the running averages with a geometric rate , while the perturbations push the node values apart. The perturbations can be viewed as an external force that influences the node values and causes additional disagreement. Lemma 1 provides a bound on the size of the disagreements among the agents in terms of the network caused imbalances and the imbalances due to the external force.
Consider the update of Eq. (12) with the scalar variables replaced by the vector variables for each . Assuming that the graph sequence is -strongly-connected, for all we have
where satisfy the same inequalities as in Theorem 1.
we then have that for all and all
The parameters and satisfy the same inequalities as in Theorem 1.
We use Corollary 1. The first term in the estimate follows immediately. The second term requires some attention:
and the result follows from the usual bound on the sum of harmonic series, . ∎
In the proof of Theorem 1, we also use the following result, which is a generalization of Lemma 8 in . Before stating this lemma, we introduce some notation. We define to be all the information generated by the stochastic gradient-push method by time , i.e., all the and so forth for . We then have the following lemma.
where and constants are from (2).
where the last equality follows from the definition of . Since the matrices are column stochastic, the sums of are preserved at all times, i.e., for all . Furthermore, for all and . Thus, relation (19) shows that each vector is a convex combination of , implying that for all
Thus, with probability 1, we have
We next show the relation stated in the lemma. Due to the column-stochasticity of the matrices , for the stochastic gradient-push update of Eq. (3) we have
Taking expectations of both sides with respect to , and using (see Eq. (1)) and the relation
Next, we upper-bound the last term in the preceding relation. By using the inequality we obtain that with probability ,
since from Eq. (2). This implies for all ,
Now, consider each of the cross-terms in (22), for which we write
By using the Cauchy-Schwarz inequality we have with probability 1,
As for the term , we use the fact that the function is -strongly convex to obtain
By writing and by using the convexity of , we have
where is a subgradient of at . In view of relation (20), the sub-gradients are also bounded with probability 1, so we have
From relation (30), (32) and (34), we conclude that with probability 1,
By substituting the estimates of Eqs. (28) and (36) back in relation (25), and using we obtain
Plugging this relation into Eq. (22), we obtain the statement of this lemma. ∎
With Lemma 2 in place, we are now ready to provide the proof of Theorem 1. Besides Lemma 2, our arguments will also crucially rely on the results established earlier for the perturbed push-sum method.
The function has a unique minimum which we will denote by . In Lemma 2 we let to obtain for all ,
Next, we estimate the term in the above equation by breaking it into two parts. On the one hand,
On the other hand, since the function is Lipschitz continuous with constant over the ball of radius around the origin to which all always belong (by assumption and by Lemma 2), we also have that for any
Therefore, using the preceeding two estimates we obtain for all ,
Combining relation (42) with Eq. (37), we obtain that for each , with probability 1,
Now plugging in the expression for and using the definition of to combine the first two terms, we see that for all and all ,
where . We multiply the preceding relation by , and we obtain that for all and all ,
By iterating the expectations in (45) and applying the resulting inequality, recursively, we obtain that all ,
Thus, by Corollary 2 we obtain for all ,
Upon substituting the preceding inequality into relation (50) and dividing both sides by , after re-arranging the terms, we obtain for all
Combining the first two terms on the right hand side of the preceding relation, using and canceling from both sides, we get
Finally, by convexity we have for each ,
Putting together Eqs. (53) and (56) concludes the proof. ∎
IV Proof of Theorem 2
We begin by briefly sketching the main idea of the proof. The proof proceeds by simply arguing that if gets large, it decreases. Since the stochastic subgradient-push protocol (Eq. (3)) is somewhat involved, proving this will require some involved arguments relying on the level-set boundedness of strongly convex functions with Lipschitz gradients and some special properties of element-wise ratios of products of column-stochastic matrices.
Our starting point is a lemma that exploits the structure of strongly convex functions with Lipschitz gradients.
where .
The strong convexity of the function implies
For the last term in the preceding relation, we write
where the last inequality is obtained by using Eq. (59) and by exploiting the Lipchitz property of the gradient of . Similarly, using the given growth-property of we obtain
By substituting Eqs. (60)–(62) in relation (58), we find
which for yields
Define the set to be the following level set of :
Being the level-set of a strongly-convex function, the set is compact (see Proposition 2.3.1(b), page 93). Let be the Euclidean ball centered at the origin and with a radius . Define the set as follows:
If is such that and (i.e., ), then by relation (63), we obtain On the other hand, if , then by using the definition of and the bound we can see that
By using the upper bound on we obtain the stated relation. ∎
We next state an important relation for the images of two vectors under a linear transformation with a column-stochastic matrix. This is a generalization of a relation from , Section 7.3.2.
Define the vectors and with their ’th entries given by and , respectively. Then, we have
Since and , the preceding equation can be rewritten as
Since has all entries positive and has positive diagonal entries, it follows that also has all entries positive. Therefore,
Define the matrix from this equation, i.e., for all . The fact that is row-stochastic follows from . ∎
Informally speaking, the above lemma reduces the “push-sum” iteration to a simple stochastic “consensus” update. We note that it could be used to provide considerable simplifications of many of the arguments that have been used to show the convergence of push-sum in the past, though this is beyond the scope of the present paper. With this lemma in place, we now proceed to prove our second theorem.
Letting be the vector with entries , we can write where is the matrix given in Eq. (11). Thus, since for all , we have
where is the vector with all entries equal to 1. Under Assumption 1(a), we have shown in (see there Corollary 2(b)) that for all ,
Thus, using the definition of , we can see that for all ,
Since the matrix is column stochastic and , we have that . Therefore, , which together with Eq. (65) and yields
Therefore, for every , there is a time such that for all . Hence, for each , Lemma 3 applies to the vector for . By Lemma 3, it follows that for each function , there is a compact set and a time such that for all ,
Let . By using the mathematical induction, we will prove that for all ,
where . Indeed, relation (70) is true for . Suppose it is true at some time . Then, by Eq. (69) we have
where is a row stochastic matrix with entries . By the convexity of the Euclidean norm, it follows that for all ,
which together with Eq. (71) yields , thus implying that at time we have
Hence, Eq. (70) is valid for all .
Note that the constant is random as it depends on the random vectors , , where the time is deterministic. However, we next argue that we may replace with a deterministic constant which upper bounds all . Indeed, it would suffice to find a constant which upper bounds all with and .
Using Eqs. (66) and (72), we can see that for all ,
Let be the minimizer of , which exists and is unique due to the strong convexity of . Then, by Assumption 2 it follows that
where , , , and . Thus, using the preceding relation recursively for and the fact that the initial points are deterministic, we conclude that there exists a uniform deterministic bound on for all and . ∎
Remark: It is possible to generalize our results to more general models of noise where
and each is small compared to . We omit the details as the proofs are essentially identical to the proofs given here for the case of .
V Simulations
We report some simulations of the subgradient-push method which experimentally demonstrate its performance. We consider the scalar function where is a variable that is known only to node . This is a canonical problem in distributed estimation, whereby the nodes are attempting to measure a parameter . Each node measures , where are jointly Gaussian and zero mean. Letting be the inverse of the variance of , the maximum likelihood estimate is the minimizer of ( is unique provided that for at least one ). Each is a uniformly random variable taking values between and . The initial points are generated as independent random variables, each with a standard Gaussian distribution. This setup is especially attractive since the optimal solution can be computed explicitly (it is a weighted average of the ) allowing us to see exactly how far from optimality our protocol is at every stage.
The subgradient-push method is run for 200 iterations with the stepsize and . The graph sequence is constructed over 1000 nodes with a random connectivity pattern.
Figure 1 shows the results obtained for simple random graphs where every node has two out-neighbors, one belonging to a fixed cycle and the other one chosen uniformly at random at each step. The top plot shows how decays on average (over 25 Monte Carlo simulations) for five randomly selected nodes. The bottom plot shows a sample of for a single Monte Carlo run and the same selection of 5 nodes.
Figure 2 illustrates the same quantities for the sequence of graphs which alternate between two (undirected) star graphs.
We see that the error decays at a fairly speedy rate, especially given both the relatively large number of nodes in the system (a thousand) and the sparsity of the graph at each stage (every node has two out-neighbors). Our simulation results suggest the gradient-push methods we have proposed have the potential to be effective tools for network optimization problems. For example, the simulation of Figure 1 shows that a relatively fast convergence time can be obtained if each node can support only a single long-distance out-link.
VI Conclusion
We have considered a variant of the subgradient-push method of our prior work , where the nodes have access to noisy subgradients of their individual objective functions . Our main result was that the functions are strongly convex functions with Lipchitz gradients, we have established convergence rate of the method, which is an improvement of the previously known rate for (noiseless) subgradient-push method shown in .
Our work suggests a number of open questions. Our bounds on the performance of the (sub)gradient-push directly involve the convergence speed of consensus on directed graphs. Thus the problem of designing well-performing consensus algorithms is further motivated by this work. In particular, a directed average consensus algorithm with polynomial scaling with on arbitrary time-varying graphs would lead to polynomial convergence-time scalings for distributed optimization over time-varying directed graphs. However, such an algorithm is not available to the best of the authors’ knowledge.
Moreover, it would be interesting to relate the convergence speed of distributed optimization procedures to the properties possessed by the individual functions. We have begun on this research program here by showing an improved rate for strongly convex functions with Lipschitz gradients. However, one might expect that stronger results might be available under additional assumptions. It is not clear, for example, under what conditions a geometric rate can be achieved when graphs are directed and time-varying, if at all.
Finally, in many applications convergence speed should be measured not by the number of iterations but by different metrics. For example, it may be appropriate to count the number of bits that have to be exchanged before all nodes are close to the solution. Alternatively, when some of the variables correspond to physical positions which must be adjusted as a result of the protocol, the dominating factor may be the total distance traveled by each node. Furthermore, there may be tradeoffs between these metrics that we do not at present understand. Understanding the performance of protocols for convex optimization in these scenarios remains an open problem.