Accelerated, Parallel and Proximal Coordinate Descent
Olivier Fercoq, Peter Richtárik
Introduction
Developments in computing technology and ubiquity of digital devices resulted in an increased interest in solving optimization problems of extremely big sizes. Applications can be found in all areas of human endeavor where data is available, including the internet, machine learning, data science and scientific computing. The size of these problems is so large that it is necessary to decompose the problem into smaller, more manageable, pieces. Traditional approaches, where it is possible to rely on full-vector operations in the design of an iterative scheme, must be revisited.
Coordinate descent methods appear as a very popular class of algorithms for such problems as they can break down the problem into smaller pieces, and can take advantage of sparsity patterns in the data. With big data problems it is necessary to design algorithms able to utilize modern parallel computing architectures. This resulted in an interest in parallel and distributed coordinate descent methods.
In this work we focus on the solution of convex optimization problems with a huge number of variables of the form
Here is a decision vector composed of blocks, with ,
where are smooth convex functions, and is a block separable regularizer (e.g., norm).
In this work we make the following three main contributions:
We design and analyze the first stochastic coordinate descent method which is simultaneously accelerated, parallel and proximal. In fact, we are not aware of any published results on accelerated coordinate descent which would either be proximal or parallel.
Our method is accelerated in the sense that it achieves an convergence rate, where is the iteration counter. The first gradient method with this convergence rate is due to Nesterov ; see also . Accelerated stochastic coordinate descent method, for convex minimization without constraints, was originally proposed in 2010 by Nesterov .
Various variants of proximal and parallel (but non-accelerated) stochastic coordinate descent methods were proposed . In Table 1 we provide a listThis list is necessarily incomplete, it was not our goal to be comprehensive. For a somewhat more substantial review of these and other works we refer the reader to . of some recent research papers proposing and analyzing stochastic coordinate descent methods. The table substantiates our observation that while the proximal setting is standard in the literature, parallel methods are much less studied, and finally, there is just a handful of papers dealing with accelerated variants.
We propose new stepsizes for parallel coordinate descent methods, based on a new expected separable overapproximation (ESO). These stepsizes can for some classes of problems (e.g., =quadratics), be much larger than the stepsizes proposed for the (non-accelerated) parallel coordinate descent method (PCDM) in . Let be the number of of blocks function depends on. The stepsizes, and hence the resulting complexity, of PCDM, depend on the quantity . However, our stepsizes take all the values into consideration and the result of this is complexity that depends on a data-weighted average of the values . Since can be much smaller than , our stepsizes result in dramatic acceleration for our method and other methods whose analysis is based on an ESO .
We identify a large subclass of problems of the form (1) for which the full-vector operations inherent in accelerated methods can be eliminated. This contrasts with Nesterov’s accelerated coordinate descent scheme , which is impractical due to this bottleneck. Having established his convergence result, Nesterov remarked that:
“However, for some applications […] the complexity of one iteration of the accelerated scheme is rather high since for computing it needs to operate with full-dimensional vectors.”
Subsequently, in part due to these issues, the work of the community focused on simple methods as opposed to accelerated variants. For instance, Richtárik & Takáč use Nesterov’s observation to justify their focus on non-accelerated methods in their work on coordinate descent methods in the proximal/composite setting.
Recently, Lee & Sidford were able to avoid full dimensional operations in the case of minimizing a convex quadratic without constraints, by a careful modification of Nesterov’s method. This was achieved by introducing an extra sequence of iterates and observing that for quadratic functions it is possible to compute partial derivative of evaluated at a linear combination of full dimensional vectors without ever forming the combination. We extend the ideas of Lee & Sidford to our general setting (1) in the case when , where are scalar convex functions with Lipschitz derivative and the vectors are block-sparse.
The rest of the paper is organized as follows. We start by describing new stepsizes for parallel coordinate descent methods, based on novel assumptions, and compare them with existing stepsizes (Section 2). We then describe our algorithm and state and comment on the main complexity result (Section 3). Subsequently, we give a proof of the result (Section 4). We then describe an efficient implementation of our method, one that does not require the computation of full-vector operations (Section 5), and finally comment on our numerical experiments (Section 6).
Notation.
It will be convenient to define natural operators acting between the spaces and . In particular, we will often wish to lift a block from to , filling the coordinates corresponding to the remaining blocks with zeros. Likewise, we will project back into . We will now formalize these operations.
Let be the identity matrix, and let be its decomposition into column submatrices . For , let be the block of variables corresponding to the columns of , that is, , . Any vector can be written, uniquely, as . For and , we write
In words, is a vector in obtained from by zeroing out the blocks that do not belong to . For convenience, we will also write
for the vector of partial derivatives of corresponding to coordinates belonging to block .
With each block we associate a positive definite matrix and a scalar , and equip and with the norms
The corresponding conjugate norms, defined by , are given by
We also write .
Stepsizes for parallel coordinate descent methods
The framework for designing and analyzing (non-accelerated) parallel coordinate descent methods, developed by Richtárik & Takáč , is based on the notions of block sampling and expected separable overapproximation (ESO). We now briefly review this framework as our accelerated method is cast in it, too. Informally, a block sampling is the random law describing the selection of blocks at each iteration. An ESO is an inequality, involving and , which is used to compute updates to selected blocks. The complexity analysis in our paper is based on the following generic assumption.
is a uniform block sampling. That is, is a random subset of with the propertyIt is easy to see that if is a uniform sampling, then necessarily, for all . that for all . Let .
There are computable constants for which the pair admits the Expected Separable Overapproximation (ESO):
In the context of parallel coordinate descent methods, uniform block samplings and inequalities (7) involving such samplings were introduced and systematically studied by Richtárik & Takáč . An ESO inequality for a uniform distributed sampling was developed in and that nonuniform samplings and ESO, together with a parallel coordinate descent method based on such samplings, was proposed in .
Fercoq & Richtárik [3, Theorem 10] observed that inequality (7) is equivalent to requiring that the gradients of the functions
The change of norms is done so as to enforce that the weights in the norm sum to , which means that different ESOs can be compared using the constants . The above observations are useful in understanding what the ESO inequality encodes: By moving from to
one is taking a step in a random subspace of spanned by the blocks belonging to . If , which is often the case in big data problemsIn fact, one may define a “big data” problem by requiring that the number of parallel processors available for optimization is much smaller than the dimension of the problem., the step is confined to a low-dimensional subspace of . It turns out that for many classes of functions arising in applications, for instance for functions exhibiting certain sparsity or partial separability patterns, it is the case that the gradient of varies much more slowly in such subspaces, on average, than it does in . This in turn would imply that updates based on minimizing the right hand side of (7) would produce larger steps, and eventually lead to faster convergence.
where depends on blocks only. Let , and .
The functions have block-Lipschitz gradient with constants . That is, for all and ,
Assumption 2 is stronger than the assumption considered in . Indeed, in the authors only assumed that the sum , as opposed to the individual functions , has a block-Lipschitz gradient, with constants . That is,
It is easy to see that if the stronger condition is satisfied, then the weaker one is also satisfied with no worse than .
2 New ESO
We now derive an ESO inequality for functions satisfying Assumption 2 and -nice sampling . That is, is a random subset of of cardinality , chosen uniformly at random. One can derive similar bounds for all uniform samplings considered in using the same approach.
If is a -nice sampling, then for all ,
Moreover, for all we have
Note that is a data-weighted average of the values and that .
Statement (ii) is a special case of (i) for (notice that ). We hence only need to prove (i). A well known consequence of (8) is
where . That is, . Equation (10) then follows by adding upAt this step we could have also simply applied Theorem 10 from , which give the formula for an ESO for a conic combination of functions given ESOs for the individual functions. The proof, however, also amounts to simply adding up the inequalities. the inequalities (15) for all . Let us now prove the claim.This claim is a special case of Theorem 14 in which gives an ESO bound for a sum of functions ( here we only have a single function). We include the proof as in this special case it more straightforward. We fix and define
We now adopt the convention that expectation conditional on an event which happens with probability 0 is equal to 0. Let , and using this convention, we can write
For any for which , we now use use convexity of to write
where the second equality follows from Equation (41) in . Finally,
where the last identity is Equation (40) in , and hence (17) is established. ∎
We now give a formula for the constants in the case when arises as a composition of a scalar function whose derivative has a known Lipschitz constant (this is often easy to compute), and a linear functional. Let be an real matrix and for and define
That is, is a row vector composed of the elements of row of corresponding to block .
Let , where is a function with -Lipschitz derivative:
Then has a block Lipshitz gradient with constants
In other words, satisfies (8) with constants given above.
For any , and we have
where the last step follows by applying the Cauchy-Schwartz inequality. ∎
Then , where and .
Consider the block setup with (all blocks are of size 1) and for all . Then . In Table 3 we list stepsizes for coordinate descent methods proposed in the literature. It can be seen that our stepsizes are better than those proposed by Richtárik & Takáč and those proposed by Necoara & Clipici . Indeed, for all . The difference grows as grows; and there is equality for . We also have , but here the difference decreases with ; and there is equality for .
Choose nontrivial block sizes and define data-driven block norms with , where , assuming that the matrices are positive definite. Then
Table 2 lists constants for selected scalar loss functions popular in machine learning.
Accelerated parallel coordinate descent
We are interested in solving the regularized optimization problem
where is a (possibly nonsmooth) convex regularizer that is separable in the blocks :
We now describe our method (Algorithm 1). It is presented here in a form that facilitates analysis and comparison with existing methods. In Section 5 we rewrite the method into a different (equivalent) form – one that is geared towards practical efficiency.
The method starts from and generates three vector sequences, . In Step 3, is defined as a convex combination of and , which may in general be full dimensional vectors. This is not efficient; but we will ignore this issue for now. In Section 5 we show that it is possible to implement the method in such a way that it not necessary to ever form . In Step 4 we generate a random block sampling and then perform steps 5–9 in parallel. The assignment is not necessary in practice; the vector should be overwritten in place. Instead, Steps 5–8 should be seen as saying that we update blocks of , by solving proximal problems in parallel, and call the resulting vector . Note in Step 9, should also be computed in parallel. Indeed, is obtained from by changing the blocks of that belong to - this is because and differ in those blocks only. Note that gradients are evaluated only at . We show in Section 5 how this can be done efficiently, for some problems, without the need to form .
We now formulate the main result of this paper.
In other words, for any , the number of iterations for obtaining an -solution in expectation does not exceed
The proof of Theorem 3 can be found in Section 4. We now comment on the result:
Note that we do not assume that be of the form (1); all that is needed is Assumption 1.
If , we recover Tseng’s proximal gradient descent algorithm . If , and , we obtain a new version of (serial) accelerated coordinate descent for minimizing smooth functions. Note that no existing accelerated coordinate descent methods are either proximal, or parallel. Our method is both proximal and parallel.
In the case when we update all blocks in one iteration (), the bound (26) simplifies to
If we use stepsize proposed in Theorem 1, then in view of part (ii) of that theorem, bound (29) takes the form
as advertised in the abstract. Recall that is a data-weighted average of the values .
In contrast, using the stepsizes proposed by Richtárik & Takáč (see Table 3), we get
Note that in the case when the functions are convex quadratics (), for instance, we have , and hence the new ESO leads to a vast improvement in the complexity in cases when . On he other hand, in cases where (which can happen with logistic regression, for instance), the result based on the Richtárik-Takáč stepsizes may be better.
Consider the smooth case (): and . By part (ii) of Theorem 1, is Lipschitz with constant wrt . Choosing and , we get
Now, consider running Algorithm 1 with a -nice sampling and stepsize parameter as in Theorem 1. Letting , where is defined by
iterations suffice to produce an -solution in expectation. Hence, we get linear speedup in the number of parallel updates / processors. This is different from the situation in simple (non-accelerated) parallel coordinate descent methods where parallelization speedup depends on the degree of separability (speedup is better if is small). In APPROX, the average degree of separability is decoupled from , and hence one benefits from separability even for large . This means that accelerated methods are more suitable for parallelization.
We focused on the case of uniform samplings, but with a proper change in the definition of ESO, one can also handle non-uniform samplings .
Complexity analysis
We first establish four lemmas and then prove Theorem 3.
In the first lemma we summarize well-known properties of the sequence used in Algorithm 1.
The sequence defined in Algorithm 1 is decreasing and satisfies and
We now give an explicit characterization of as a convex combination of the vectors .
Let be the iterates of Algorithm 1. Then for all we have
where the coefficients are non-negative and sum to 1. That is, is a convex combination of the vectors . In particular, the constants are defined recursively in by setting , , and for ,
Moreover, for all , the following identity holds
We proceed by induction. First, notice that . This implies that , which in turn together with gives . Assuming now that (35) holds for some , we obtain
By applying Lemma 1, together with the inductive assumption that for all , we observe that for all . It remains to show that the constants sum to 1. This is true since is a convex combination of , and by (4.1), is an affine combination of , and . ∎
From this and the definition of we see that
The next lemma is an application to a specific function of a well-known result that can be found, for instance, in . The result was used by Tseng to construct a simplified complexity proof for a proximal gradient descent method. This lemma requires the norms to be Euclidean – and this is the only place in our analysis where this is required.
Let . Then
For any and ,
Let be any uniform sampling and . Theorem 4 in implies that
The remaining statement follows from the last identity in (43) used with . ∎
2 Proof of Theorem 3
Using Lemma 2 and convexity of , for all we have
Note that from the definition of in the algorithm, we have
For all we define an upper bound on ,
and bound the expectation of in as follows:
After dividing both sides of (49) by , using (34), and rearranging the terms, we obtain
We now apply total expectation to the above inequality and unroll the recurrence for between 0 and , obtaining
where in the last step we have used the facts that , , and the estimate from Lemma 1.
Implementation without full-dimensional vector operations
Algorithm 1, as presented, performs full-dimensional vector operations. Indeed, is defined as a convex combination of and . Also, is obtained from by changing coordinates; however, if is small, the latter operation is not costly. In any case, vectors and will in general be dense, and hence computation of may cost arithmetic operations. However, simple (i.e., non-accelerated) coordinate descent methods are successful and popular precisely because they can avoid such operations.
Note that if instead of updating the constants as in line 10 we keep them constant throughout, , then for all . The resulting method is precisely the PCDM algorithm (non-accelerated parallel block-coordinate descent method) proposed and analyzed in .
As it is not immediately obvious that the two methods(Algorithms 1 and 2) are equivalent, we include the following result. Its proof can be found in the appendix.
We now show that this can be done for functions of the form (2), where is as in Theorem 2:
This will be small if are small and is small. For simplicity, assume all blocks are of equal size, . Then
The favorable situation described above is the consequence of the block sparsity of the data matrix and does not depend on insofar as the evaluation of its derivative takes work. Hence, it applies to convex quadratics (), logistic regression () and also to the smooth approximation of , defined by
with smoothing parameter , as considered in . Vector is as defined in ; is a weighted norm in .
Numerical experiments
In all tests we used a shared-memory workstation with 32 Intel Xeon processors at 2.6 GHz and 128 GB RAM. In the experiments, we have departed from the theory in two ways: i) our implementation of APPROX is asynchronous in order to limit communication costs, and ii) we approximated the -nice sampling by a -independent sampling as in (the latter is very easy to generate in parallel; please note that our analysis can be very easily extended to cover the -independent sampling). For simplicity, in all tests we assume all blocks are of size 1 ( for all ). However, further speedups can be obtained by working with larger block sizes as then each processor is better utilized.
In this experiment, we compare the performance of the new stepsizes ( introduced in Section 2.2) with those proposed in (see Table 3). We generated random instances of the -regularized least squares problem (LASSO),
with various distributions of the separability degrees (= number of nonzero elements on the th row of ) and studied the weighted distance to the optimum for the initial point . This quantity appears in the complexity estimate (28) and depends on (the number of processors). We chose a random matrix of small size: as this is sufficient to make our point, and consider .
In particular, we consider three different distributions of : uniform, intermediate and extreme. The results are summarized in Table 4. First, we generated a uniformly sparse matrix with for all . In this case, , and hence the results are the same. We then generated an intermediate instance, with . The matrix has many rows with a few nonzero elements and some rows with up to 30 nonzero elements. Looking at the table, clearly, the new stepsizes are better. The improvement is moderate when there are a few processors, but for , the complexity is 25% better. Finally, we generated a rather extreme matrix with and for . We can see that the new stepsizes are much better, even with few processors, and can lead to speedup.
In the experiments above, we have first fixed a sparsity pattern and then generated a random matrix based on it. However, much larger differences can be seen for special matrices . We shall now comment on this.
Consider the case . In view of (29), the complexity of APPROX is proportional to . Fix and and let us ask the question: for what data matrix will the ratio be maximized? Since and , we the maximal ratio is given by
The extreme case is attained for some matrix with at least one dense row () and one maximally sparse row (), leading to . So, there are instances for which the new stesizes can lead to an up to speedup for APPROX when compared to the stepsizes . Needless to say, these extreme instances are artificially constructed.
2 L1-regularized L1 regression
with . Because the objective is nonsmooth and non-separable, we apply the smoothing technique presented in for the first part of the objective and use the smoothed parallel coordinate descent method proposed in (this methods needs special stepsizes which are studied in that paper). The level of smoothing depends on the expected accuracy: we chose , which corresponds to 0.0125% of the initial value.
We compared 4 algorithms (see Figure 1), all run with 4 processors. As one can see, the coordinate descent method is very efficient on this problem. However, the accelerated coordinate descent is still able to outperform it. As the problem is of small size (which is sufficient for the sake of comparison), we could compute the optimal solution using an interior point method for linear programming and compare the value at each iteration to the optimal value (Table 5). Each line of the table gives the time needed by APPROX and PCDM to reach a given accuracy target. In the beginning (until ), the algorithms are in a transitional phase. Then, when one runs the algorithm twice as long, is divided by 2 for SPCDM and by 4 for APPROX. This highlights the difference in the convergence speeds: compared to . As a result, APPROX gives an -solution in 156.5 seconds while SPCDM has not finished yet after 2000 seconds.
3 Lasso
We now consider regularized least squares regression on the KDDB dataset . It consists of a medium size sparse feature matrix with , and , and a vector . We wish to find that minimizes
We compare APPROX (Algorithm 2) with the (non-accelerated) parallel coordinate descent method (PCDM ) in Figure 2, both run with processors.
Both algorithms converge quickly. PCDM is faster in the beginning because each iteration is half as expensive. However, APPROX is faster afterwards. For this problem, the optimal value is not known so it is difficult to compare the actual accuracy.
Let us remark that an important feature of the -regularization is that it promotes sparsity in the optimization variable . As APPROX only involves proximal steps on the variable, only is encouraged to be sparse but not , or . A possible way to obtain a sparse solution with APPROX is to first compute and then post-process with a few iterations of a sparsity-oriented method (such as iterative hard thresholding, full proximal gradient descent or cyclic/randomized coordinate descent).
4 Training linear support vector machines
Our last experiment is the dual of Support Vector Machine problem . For the dual SVM, the coordinates correspond to examples.
We wish to find that minimizes
with . We compare APPROX (Algorithm 2) with Stochastic Dual Coordinate Ascent (SDCA ); the results are in Figure 3. We have used a single processor only ().
For this problem, one can recover a primal solution and thus we can compare the decrease in the duality gap; summarized in Table 6. One can see that APPROX is about twice as fast as SDCA on this instance.
Conclusion
In summary, we proposed APPROX: a stochastic coordinate descent method combining the following four acceleration strategies:
Our method is accelerated, i.e., it achieves a convergence rate. Hence, the method is better able to obtain a high-accuracy solution on non-strongly convex problem instances.
Our method is parallel. Hence, it is able to better utilize modern parallel computing architectures and effectively taming the problem dimension .
We have proposed new longer stepsizes for faster convergence on functions whose degree of separability is larger than their degree of separability .
We have shown that our method can be implemented without the need to perform full-dimensional vector operations.
References
Appendix A Proof of Proposition 1 (equivalence)
Now looking at the steps of Algorithm 2, we see that