An Accelerated Proximal Coordinate Gradient Method and its Application to Regularized Empirical Risk Minimization
Qihang Lin, Zhaosong Lu, Lin Xiao
Introduction
Coordinate descent methods have received extensive attention in recent years due to its potential for solving large-scale optimization problems arising from machine learning and other applications (e.g., ). In this paper, we develop an accelerated proximal coordinate gradient (APCG) method for solving problems of the following form:
where each denotes a sub-vector of with cardinality , and the collection form a partition of the components of . In addition to the capability of modeling nonsmooth terms such as , this model also includes optimization problems with block separable constraints. More specifically, each block constraints , where is a closed convex set, can be modeled by an indicator function defined as if and otherwise.
At each iteration, coordinate descent methods choose one block of coordinates to sufficiently reduce the objective value while keeping other blocks fixed. In order to exploit the known structure of each , a proximal coordinate gradient step can be taken . To be more specific, given the current iterate , we pick a block and solve a block-wise proximal subproblem in the form of
Here denotes the partial gradient of with respect to , and is the Lipschitz constant of the partial gradient (which will be defined precisely later).
One common approach for choosing such a block is the cyclic scheme. The global and local convergence properties of the cyclic coordinate descent method have been studied in, e.g., . Recently, randomized strategies for choosing the block to update became more popular . In addition to its theoretical benefits (randomized schemes are in general easier to analyze than the cyclic scheme), numerous experiments have demonstrated that randomized coordinate descent methods are very powerful for solving large-scale machine learning problems . Their efficiency can be further improved with parallel and distributed implementations . Randomized block coordinate descent methods have also been proposed and analyzed for solving problems with coupled linear constraints and a class of structured nonconvex optimization problems (e.g., ). Coordinate descent methods with more general schemes of choosing the block to update have also been studied; see, e.g., .
Inspired by the success of accelerated full gradient methods , several recent work extended Nesterov’s acceleration technique to speed up randomized coordinate descent methods. In particular, Nesterov developed an accelerated randomized coordinate gradient method for minimizing unconstrained smooth functions, which corresponds to the case of in (1). Lu and Xiao gave a sharper convergence analysis of Nesterov’s method using a randomized estimate sequence framework, and Lee and Sidford developed extensions using weighted random sampling schemes. Accelerated coordinate gradient methods have also been used to speed up the solution of linear systems . More recently, Fercoq and Richtárik proposed an APPROX (Accelerated, Parallel and PROXimal) coordinate descent method for solving the more general problem (1) and obtained accelerated sublinear convergence rate, but their method cannot exploit the strong convexity of the objective function to obtain accelerated linear rates.
In this paper, we propose a general APCG method that achieves accelerated linear convergence rates when the objective function is strongly convex. Without the strong convexity assumption, our method recovers a special case of the APPROX method . Moreover, we show how to apply the APCG method to solve the regularized empirical risk minimization (ERM) problem, and devise efficient implementations that avoid full-dimensional vector operations. For ill-conditioned ERM problems, our method obtains improved convergence rates than the state-of-the-art stochastic dual coordinate ascent (SDCA) method .
This paper is organized as follows. The rest of this section introduces some notations and state our main assumptions. In Section 2, we present the general APCG method and our main theorem on its convergence rate. We also give two simplified versions of APCG depending on whether or not the function is strongly convex, and explain how to exploit strong convexity in . Section 3 is devoted to the convergence analysis that proves our main theorem. In Section 4, we derive equivalent implementations of the APCG method that can avoid full-dimensional vector operations.
In Section 5, we apply the APCG method to solve the dual of the regularized ERM problem and give the corresponding complexity results. We also explain how to recover primal solutions to guarantee the same rate of convergence for the primal-dual gap. In addition, we present numerical experiments to demonstrate the performance of the APCG method.
2 Notations and assumptions
The gradient of function is block-wise Lipschitz continuous with constants , i.e.,
An immediate consequence of Assumption 1 is (see, e.g., [25, Lemma 1.2.3])
The convexity parameter of with respect to the norm is the largest such that the above inequality holds. Every convex function satisfies Assumption 2 with . If , then the function is called strongly convex.
Together with (5) and the definition of in (6), Assumption 2 implies .
The APCG method
In this section we describe the general APCG method, and its two simplified versions under different assumptions (whether or not the objective function is strong convex). We also present our main theorem on the convergence rates of the APCG method.
The general APCG method is given as Algorithm 1. At each iteration , the APCG method picks a random coordinate and generates , and . One can observe that and depend on the realization of the random variable
while is independent of and only depends on .
To better understand this method, we make the following observations. For convenience, we define
which is a full-dimensional update version of Step 3. One can observe that is updated as
Notice that from (7), (8), (9) and (10) we have
That is, in Step 4, we only need to update the block coordinates as in (13) and set the rest to be .
We now state an expected-value type of convergence rate for the APCG method.
Suppose Assumptions 1 and 2 hold. Let be the optimal value of problem (1), and be the sequence generated by the APCG method. Then, for any , there holds:
and is the set of optimal solutions of problem (1).
For , our results in Theorem 1 match exactly the convergence rates of the accelerated full gradient method in [25, Section 2.2]. For , our results improve upon the convergence rates of the randomized proximal coordinate gradient method described in (3) and (4). More specifically, if the block index is chosen uniformly at random, then the analysis in states that the convergence rate of (3) and (4) is on the order of
Thus we obtain both accelerated linear rate for strongly convex functions () and accelerated sublinear rate for non-strongly convex functions (). To the best of our knowledge, this is the first time that such an accelerated linear convergence rate is obtained for solving the general class of problems (1) using coordinate descent type of methods.
The proof of Theorem 1 is given in Section 3. Next we give two simplified versions of the APCG method, for the special cases of and , respectively.
For the strongly convex case with , we can initialize Algorithm 1 with the parameter , which implies and for all . This results in Algorithm 2. As a direct corollary of Theorem 1, Algorithm 2 enjoys an accelerated linear convergence rate:
where is the unique solution of (1) under the strong convexity assumption.
Algorithm 3 shows the simplified version for , which can be applied to problems without strong convexity, or if the convexity parameter is unknown. According to Theorem 1, Algorithm 3 has an accelerated sublinear convergence rate, that is
With the choice of , which implies , Algorithm 3 reduces to the APPROX method with single block update at each iteration (i.e., in their Algorithm 1).
2 Exploiting strong convexity in ΨΨ\Psi
In this section we consider problem (1) with strongly convex . We assume that and have convexity parameters and , both with respect to the standard Euclidean norm, denoted .
As a result of the above definitions, we see that problem (1) is equivalent to
Convergence analysis
In this section, we prove Theorem 1. First we establish some useful properties of the sequences and generated in Algorithm 1. Then in Section 3.1, we construct a sequence to bound the values of and prove a useful property of the sequence. Finally we finish the proof of Theorem 1 in Section 3.2.
Suppose and and and are generated in Algorithm 1. Then there hold:
and are well-defined positive sequences.
and for all .
and are non-increasing.
for all .
Due to (7) and (8), statement (iv) always holds provided that and are well-defined. We now prove statements (i) and (ii) by induction. For convenience, Let
Since and , one can observe that and
These together with continuity of imply that there exists such that , that is, satisfies (7) and is thus well-defined. In addition, by statement (iv) and , one can see . Therefore, statements (i) and (ii) hold for .
Suppose that the statements (i) and (ii) hold for some , that is, , and . Using these relations and (8), one can see that is well-defined and moreover . In addition, we have due to statement (iv) and . Using the fact (see the remark after Assumption 2), and a similar argument as above, we obtain and , which along with continuity of imply that there exists such that , that is, satisfies (7) and is thus well-defined. By statement (iv) and , one can see that . This completes the induction and hence statements (i) and (ii) hold.
Next, we show statement (iii) holds. Indeed, it follows from (8) that
which together with and implies that and hence is non-increasing. Notice from statement (iv) and that . It follows that is also non-increasing.
Statement (v) can be proved by using the same arguments in the proof of [25, Lemma 2.2.4], and the details can be found in [20, Section 4.2]. ∎
Motivated by , we give an explicit expression of as a convex combination of the vectors , and use the coefficients to construct a sequence to bound .
Let the sequences , , and be generated by Algorithm 1. Then each is a convex combination of . More specifically, for all ,
where the constants are nonnegative and sum to . Moreover, these constants can be obtained recursively by setting , , and for ,
We prove the statements by induction. First, notice that . Using this relation and (9), we see that . From (10) and , we obtain
Since (Lemma 1 (ii)), the vector is a convex combination of and with the coefficients , . For , substituting (9) into (10) yields
Substituting (20) into the above equality, and using from (7), we get
From the definition of in the above equation, we observe that
From the above expression, and using the facts , , and (Lemma 1), we conclude that . Also considering the definitions of and in (21), we conclude that for . In addition, one can observe from (9), (10) and (20) that is an affine combination of and , is an affine combination of and , and is an affine combination of , and . It is known that substituting one affine combination into another yields a new affine combination. Hence, the combination given in (21) must be affine, which together with for implies that it is also a convex combination.
Now suppose the recursion (19) holds for some . Substituting (9) into (10), we obtain that
Further, substituting (the induction hypothesis) into the above equation gives
This gives the form of (18) and (19). In addition, by the induction hypothesis, is an affine combination of . Also, notice from (9) and (10) that is an affine combination of and , and is an affine combination of , and . Using these facts and a similar argument as for , it follows that the combination (22) must be affine.
Finally, we claim for all . Indeed, we know from Lemma 1 that , , . Also, due to the induction hypothesis. It follows that for all . It remains to show that . To this end, we again use (7) to obtain , and use (19) and a similar argument as for to rewrite as
Together with , , and , this implies that . Therefore, is a convex combination of with the coefficients given in (19). ∎
In the following lemma, we construct the sequence and prove a recursive inequality.
Let denotes the convex combination of using the same coefficients given in Lemma 2, i.e.,
Then for all , we have and
The first result follows directly from convexity of . We now prove (23). First we deal with the case . Using (12), (19), and the facts and , we get
For , we use (12) and the definition of in (8) to obtain that
It follows from the above equation and convexity of that
In addition, from the definition of and , we have
Next, using the definition of and (19), we obtain
We next show that and . Indeed, notice that from (8) we have
Using this relation, (Lemma 1 (iv)), and the definition of in (3.1), we get
where the last equalities is due to (30). Finally, follows from and . These together with the inequality (3.1) yield the desired result. ∎
2 Proof of Theorem 1
We are now ready to present a proof for Theorem 1. We note that the proof in this subsection can also be recast into the framework of randomized estimate sequence developed in , but here we give a straightforward proof without using that machinery.
Dividing both sides of (7) by gives
which together with (31), (32) and (Lemma 1 (iv)) gives
Using this relation, (13) and Assumption 1, we have
where the second inequality follows from convexity of .
In addition, by (8), (32) and (Lemma 1 (iv)), we have
where the first equality used (32), the third one is due to (7) and (8), and . This equation together with (33) yields
Combining the above two inequalities, one can obtain that
Notice that has convexity parameter with respect to . By the optimality condition of (36), we have that for any ,
Using the above inequality and the definition of , we obtain
Now using the assumption that has convexity parameter with respect to , we have
Combining this inequality with (35), one see that
In addition, it follows from (8) and convexity of that
Using this relation and (12), we observe that
where the inequality follows from (38). Summing up this inequality and (3.2) gives
Taking expectation on both sides with respect to yields
which together with , and gives
The conclusion of Theorem 1 immediately follows from , Lemma 1 (v), the arbitrariness of and the definition of .
Efficient implementation
In order to avoid full-dimensional vector operations, Lee and Sidford proposed a change of variables scheme for accelerated coordinated gradient methods for unconstrained smooth minimization. Fercoq and Richtárik devised a similar scheme for efficient implementation in the non-strongly convex case () for composite minimization. Here we show that full vector operations can also be avoided in the strongly convex case for minimizing composite functions. For simplicity, we only present an efficient implementation of the simplified APCG method with (Algorithm 2), which is given as Algorithm 4.
The iterates of Algorithm 2 and Algorithm 4 satisfy the following relationships:
for all . That is, these two algorithms are equivalent.
We prove by induction. Notice that Algorithm 2 is initialized with , and its first step implies ; Algorithm 4 is initialized with and . Therefore we have
which means that (40) holds for . Now suppose that it holds for some , then
So in Algorithm 4 can be written as
Comparing with (11), and using , we obtain
In terms of the full dimensional vectors, using (12) and (41), we have
where the last step used (12). Now using the induction hypothesis , we have
We just showed that (40) also holds for . This finishes the induction. ∎
We note that in Algorithm 4, only a single block coordinates of the vectors and are updated at each iteration, which cost . However, computing the partial gradient may still cost in general. In Section 5.2, we show how to further exploit problem structure in regularized empirical risk minimization to completely avoid full-dimensional vector operations.
Application to regularized empirical risk minimization (ERM)
In this section, we show how to apply the APCG method to solve the regularized ERM problems associated with linear predictors.
where is a regularization parameter. For binary classification, given a label for each vector , for , we obtain the linear SVM (support vector machine) problem by setting and . Regularized logistic regression is obtained by setting . This formulation also includes regression problems. For example, ridge regression is obtained by setting and , and we get the Lasso if . Our method can also be extended to cases where each is a matrix, thus covering multiclass classification problems as well (see, e.g., ).
For each , let be the convex conjugate of , that is,
The dual of the regularized ERM problem (42), which we call the primal, is to solve the problem (see, e.g., )
The structure of above matches our general formulation of minimizing composite convex functions in (1) and (2) with
Therefore, we can directly apply the APCG method to solve the problem (44), i.e., to solve the dual of the regularized ERM problem. Here we assume that the proximal mappings of the conjugate functions can be computed efficiently, which is indeed the case for many regularized ERM problems (see, e.g., ).
In order to obtain accelerated linear convergence rates, we make the following assumption.
Each function is smooth, and the function has unit convexity parameter 1.
Here we slightly abuse the notation by overloading and , which appeared in Sections 2 and 3. In this section represents the (inverse) smoothness parameter of , and denotes the regularization parameter on . Assumption 3 implies that each has strong convexity parameter (with respect to the local Euclidean norm) and is differentiable and has Lipschitz constant 1.
In order to match the condition in Assumption 2, i.e., needs to be strongly convex, we can apply the technique in Section 2.2 to relocate the strong convexity from to . Without loss of generality, we can use the following splitting of the composite function :
Under Assumption 3, the function is smooth and strongly convex and each , for , is still convex. As a result, we have the following complexity guarantee when applying the APCG method to minimize the function .
Suppose Assumption 3 holds and for all . In order to obtain an expected dual optimality gap using the APCG method, it suffices to have
where the second inequality used the assumption that has convexity parameter and thus has Lipschitz constant . The coordinate-wise Lipschitz constants as defined in Assumption 1 are
The function has convexity parameter with respect to the Euclidean norm . Let be its convexity parameter with respect to the norm defined in (6). Then
According to Theorem 1, the APCG method converges geometrically:
where the constant is given in (48). Therefore, in order to obtain , it suffices to have the number of iterations to be larger than
Let us compare the result in Theorem 2 with the complexity of solving the dual problem (44) using the accelerated full gradient (AFG) method of Nesterov . Using the splitting in (45) and under Assumption 3, the gradient has Lipschitz constant , where denotes the spectral norm of , and has convexity parameter with respect to . So the condition number of the problem is
Suppose each iteration of the AFG method costs as much as times of the APCG method (as we will see in Section 5.2), then the complexity of the AFG method [27, Theorem 6] measured in terms of number of coordinate gradient steps is
The inequality above is due to . Therefore in the ill-conditioned case (assuming ), the complexity of AFG can be a factor of worse than that of APCG.
Several state-of-the-art algorithms for regularized ERM, including SDCA , SAG and SVRG , have the iteration complexity
Here the ratio can be interpreted as the condition number of the regularized ERM problem (42) and its dual (43). We note that our result in (47) can be much better for ill-conditioned problems, i.e., when the condition number is much larger than .
We note that the complexity bound for the aforementioned work are either for the primal optimality (SAG and SVRG) or for the primal-dual gap (SDCA and accelerated SDCA). Our results in Theorem 2 are in terms of the dual optimality . In Section 5.1, we show how to recover primal solutions with the same order of convergence rate. In Section 5.2, we show how to exploit problem structure of regularized ERM to compute the partial gradient , which together with the efficient implementation proposed in Section 4, completely avoid full-dimensional vector operations. The experiments in Section 5.3 illustrate that our method has superior performance in reducing both the primal objective value and the primal-dual gap.
Under Assumption 3, the primal problem (42) and dual problem (43) each has a unique solution, say and , respectively. Moreover, we have . With the definition
we have . When applying the APCG method to solve the dual regularized ERM problem, which generate a dual sequence , we can obtain a primal sequence . Here we discuss the relationship between the primal-dual gap and the dual optimality .
As a result, we obtain a subgradient of at , denoted , and
We note that is not only a measure of the dual optimality of , but also a measure of the primal feasibility of . In fact, it can also bound the primal-dual gap, which is the result of the following lemma.
Given any dual solution , let be defined as in (51) and (52). Then
Because of (51), we have . The -smoothness of implies
which leads to the inequality in the conclusion. The equality in the conclusion is due to (53). ∎
The following theorem states that under a stronger assumption than Assumption 3, the primal-dual gap can be bounded directly by the dual optimality gap, hence they share the same order of convergence rate.
Suppose is -strongly convex and each is -smooth and also -strongly convex (all with respect to the Euclidean norm ). Given any dual point , let the primal correspondence be , i.e., generated from (52). Then we have
where denotes the spectral norm of .
Since is -strongly convex, the function is differentiable and has Lipschitz constant . Similarly, since each is strongly convex, the function is differentiable and has Lipschitz constant . Therefore, the function is smooth and its gradient has Lipschitz constant
It is known that (e.g., [25, Theorem 2.1.5]) if a function is convex and -smooth, then
Under our assumptions, the saddle-point problem (50) has a unique solution , where and are the solutions to the primal and dual problems (42) and (43), respectively. Moreover, they satisfy the optimality conditions
Since is differentiable in this case, we have and . Now we choose and in (55) to be and respectively. This leads to
Then the conclusion can be derived from Lemma 4. ∎
The assumption that each is -smooth and -strongly convex implies that . Therefore the coefficient on the right-hand side of (54) satisfies This is consistent with the fact that for any pair of primal and dual points and , we always have .
Under the assumptions of Theorem 3, in order to obtain an expected primal-dual gap using the APCG method, it suffices to have
where the constant is defined in (48).
The above results require that each be both smooth and strongly convex. One example that satisfies such assumptions is ridge regression, where and . For problems that only satisfy Assumption 3, we may add a small strongly convex term to each loss , and obtain that the primal-dual gap (of a slightly perturbed problem) share the same accelerated linear convergence rate as the dual optimality gap. Alternatively, we can obtain the same guarantee with the extra cost of a proximal full gradient step. This is summarized in the following theorem.
Suppose Assumption 3 holds. Given any dual point , define
where and are defined in the simple splitting (45). Let
Notice that the Lipschitz constant of is , which is used in calculating . The corresponding gradient mapping at is
The conclusion can then be derived from Lemma 4. ∎
Here the coefficient in the right-hand side of (58), , can be less than . This does not contradict with the fact that the primal-dual gap should be no less than the dual optimality gap, because the primal-dual gap on the left-hand side of (58) is measured at rather than .
Suppose Assumption 3 holds. In order to obtain a primal-dual pair and such that , it suffices to run the APCG method for
steps and follow with a proximal full gradient step (56) and (57), where is defined in (48).
We note that the computational cost of the proximal full gradient step (56) is comparable with proximal coordinate gradient steps. Therefore the overall complexity of of this scheme is on the same order as necessary for the expected dual optimality gap to reach . Actually the numerical experiments in Section 5.3 show that running the APCG method alone without the final full gradient step is sufficient to reduce the primal-dual gap at a very fast rate.
2 Implementation details
Here we show how to exploit the structure of the regularized ERM problem to efficiently compute the coordinate gradient , and totally avoid full-dimensional updates in Algorithm 4.
We focus on the special case and show how to compute . In this case, and is the identity map. According to (46),
Notice that we do not form in Algorithm 4. By Proposition 1, we have
So we can store and update the two vectors
Since the update of both and at each iteration only involves the single coordinate , we can update and by adding or subtracting a scaled column , as given in (60). The resulting method is detailed in Algorithm 5.
In Algorithm 5, we use to represent to reflect the fact that we never form explicitly. The function in (59) is the one given in (46), i.e.,
Each iteration of Algorithm 5 only involves the two inner products and in computing , and the two vector additions in (60). They all cost rather than . When the ’s are sparse (the case of most large-scale problems), these operations can be carried out very efficiently. Basically, each iteration of Algorithm 5 only cost twice as much as that of SDCA .
In Step 3 of Algorithm 5, the division by in updating and may cause numerical problems because as the number of iterations getting large. To fix this issue, we notice that and are always accessed in Algorithm 5 in the forms of and . So we can replace and by
which can be updated without numerical problem. To see this, we have
3 Numerical experiments
In our experiments, we solve the regularized ERM problem (42) with smoothed hinge loss for binary classification. That is, we pre-multiply each feature vector by its label and let
The conjugate function of is if and otherwise. Therefore we have
For the regularization term, we use . We used three publicly available datasets obtained from . The characteristics of these datasets are summarized in Table 1.
In our experiments, we comparing the APCG method (Algorithm 5) with SDCA and the accelerated full gradient method (AFG) with and additional line search procedure to improve efficiency. When the regularization parameter is not too small (around ), then APCG performs similarly as SDCA as predicted by our complexity results, and they both outperform AFG by a substantial margin.
Figure 1 shows the reduction of primal optimality by the three methods in the ill-conditioned setting, with varying form to . For APCG, the primal points are generated simply as defined in (49). Here we see that APCG has superior performance in reducing the primal objective value compared with SDCA and AFG, even without performing the final proximal full gradient step described in Theorem 4.
Figure 2 shows the reduction of primal-dual gap by the two methods APCG and SDCA. We can see that in the ill-conditioned setting, the APCG method is more effective in reducing the primal-dual gap as well.