A random coordinate descent algorithm for optimization problems with composite objective function and linear coupled constraints
Ion Necoara, Andrei Patrascu
Introduction
The basic problem of interest in this paper is the following convex minimization problem with composite objective function:
Linearly constrained optimization problems with composite objective function arise in many applications such as compressive sensing CanRom:06, image processing CheDon:01, truss topology design NesShp:12, distributed control NecNed:11, support vector machines TseYun:07, traffic equilibrium and network flow problems Ber:03 and many other areas. For problems of moderate size there exist many iterative algorithms such as Newton, quasi-Newton or projected gradient methods DaiFle:06; FerMun:03; LinLuc:09. However, the problems that we consider in this paper have the following features: the dimension of the optimization variables is very large such that usual methods based on full gradient computations are prohibitive. Moreover, the incomplete structure of information that may appear when the data are distributed in space and time, or when there exists lack of physical memory and enormous complexity of the gradient update can also be an obstacle for full gradient computations. In this case, it appears that a reasonable approach to solving problem (1) is to use (block) coordinate descent methods. These methods were among the first optimization methods studied in literature Ber:99. The main differences between all variants of coordinate descent methods consist of the criterion of choosing at each iteration the coordinate over which we minimize our objective function and the complexity of this choice. Two classical criteria, used often in these algorithms, are the cyclic and the greedy (e.g., Gauss-Southwell) coordinate search, which significantly differ by the amount of computations required to choose the appropriate index. The rate of convergence of cyclic coordinate search methods has been determined recently in BecTet:12; SahTew:12. Also, for coordinate descent methods based on the Gauss-Southwell rule, the convergence rate is given in TseYun:06; TseYun:07; TseYun:09. Another interesting approach is based on random coordinate descent, where the coordinate search is random. Recent complexity results on random coordinate descent methods were obtained by Nesterov in Nes:10 for smooth convex functions. The extension to composite objective functions was given in RicTak:11; RicTak:12 and for the grouped Lasso problem in QinSch:10. However, all these papers studied optimization models where the constraint set is decoupled (i.e., characterized by Cartesian product). The rate analysis of a random coordinate descent method for linearly coupled constrained optimization problems with smooth objective function was developed in NecNes:12.
The paper is organized as follows. In order to present our main results, we introduce some notations and assumptions for problem (1) in Section 1.1. In Section 2 we present the new random coordinate descent (RCD) algorithm. The main results of the paper can be found in Section 3, where we derive the rate of convergence in expectation, probability and for the strongly convex case. In Section 4 we generalize the algorithm and extend the previous results to a more general model. We also analyze its complexity and compare it with other methods from the literature, in particular the coordinate descent method of Tseng TseYun:09 in Section 5. Finally, we test the practical efficiency of our algorithm through extensive numerical experiments in Section 6.
We assume that the entire space dimension is decomposable into blocks:
We denote by the blocks of the identity matrix:
For model (1) we make the following assumptions:
The smooth and nonsmooth parts of the objective function in optimization model (1) satisfy the following properties:
Function is convex and has block-coordinate Lipschitz continuous gradient:
The nonsmooth function is convex and coordinatewise separable.
where . Often, a large factor induces sparsity in the solution of optimization problem (1). Note that the function in (2) belongs to the general class of coordinatewise separable piecewise linear/quadratic functions with pieces. Another special case is the box indicator function, i.e.:
Adding box constraints to a quadratic objective function in (1) leads e.g., to support vector machine (SVM) problems ChaLin:11; TseYun:07. The reader can easily find many other examples of function satisfying Assumption 1 .
Based on Assumption 1 , the following inequality can be derived Nes:04:
Note that these norms satisfy the Cauchy-Schwartz inequality:
Based on Assumption 1 we can derive from (4) the following result:
Let function be convex and satisfy Assumption 1. Then, the function has componentwise Lipschitz continuous gradient w.r.t. every pair , i.e.:
where we define .
where in the third inequality we used that for all . Now, note that the function satisfies the Assumption 1 . If we apply the above inequality to we get the following relation:
On the other hand, applying the same inequality to , which also satisfies Assumption 1 , we have:
Further, denoting and adding up the resulting inequalities we get:
It is straightforward to see that we can obtain from Lemma 1 the following inequality (see also Nes:04):
Random coordinate descent algorithm
In this section we introduce a variant of Random Coordinate Descent (RCD) method for solving problem (1) that performs a minimization step with respect to two block variables at each iteration. The coupling constraint (that is, the weighted sum constraint ) prevents the development of an algorithm that performs a minimization with respect to only one variable at each iteration. We will therefore be interested in the restriction of the objective function on feasible directions consisting of at least two nonzero (block) components.
Let be a two dimensional random variable, where with and be its probability distribution. Given a feasible , two blocks are chosen randomly with respect to a probability distribution and a quadratic model derived from the composite objective function is minimized with respect to these coordinates. Our method has the following iteration: given a feasible initial point , that is , then for all
where the directions and are chosen as follows: if we use for simplicity the notation instead of , the direction is given by
Note that for the scalar case (i.e., ) and given by (2) or (3), the direction in (6) can be computed in closed form. For the block case (i.e., for all ) and if is a coordinatewise separable, strictly convex and piece-wise linear/quadratic function with pieces (e.g., given by (2)), there are algorithms for solving the above subproblem in linear-time (i.e., operations) TseYun:09. Also for given by (3), there exist in the literature algorithms for solving the subproblem (6) with overall complexity BerKov:93; Kiw:07.
In algorithm (RCD) we consider and . Moreover, we know that the complexity of choosing randomly a pair with a uniform probability distribution requires operations. ∎
We assume that random variables are i.i.d. In the sequel, we use notation for the entire history of random pair choices and for the expected value of the objective function w.r.t. , i.e.:
We briefly review some well-known methods from the literature for solving the optimization model (1). In TseYun:06; TseYun:07; TseYun:09 Tseng studied optimization problems in the form (1) and developed a (block) coordinate gradient descent(CGD) method based on the Gauss-Southwell choice rule. The main requirement for the (CGD) iteration is the solution of the following problem: given a feasible and a working set of indexes , the update direction is defined by
In TseYun:09, the authors proved for the particular case when function is piece-wise linear/quadratic with pieces that an -optimal solution is attained in iterations, where denotes the Euclidean distance from the initial point to some optimal solution. Also, in TseYun:09 the authors derive estimates of order on the computational complexity of each iteration for this choice of .
Furthermore, for a quadratic function and a box indicator function (e.g., support vector machine (SVM) applications) one of the first decomposition approaches developed similar to (RCD) is Sequential Minimal Optimization (SMO) Pla:99. SMO consists of choosing at each iteration two scalar coordinates with respect to some heuristic rule based on KKT conditions and solving the small QP subproblem obtained through the decomposition process. However, the rate of convergence is not provided for the SMO algorithm. But the numerical experiments show that the method is very efficient in practice due to the closed form solution of the QP subproblem. List and Simon LisSim:05 proposed a variant of block coordinate descent method for which an arithmetic complexity of order is proved on a quadratic model with a box indicator function and generalized linear constraints. Later, Hush et al. HusKel:06 presented a more practical decomposition method which attains the same complexity as the previous methods.
A random coordinate descent algorithm for model (1) with and being the indicator function for a Cartesian product of sets was analyzed by Nesterov in Nes:10. The generalization of this algorithm to composite objective functions has been studied in QinSch:10; RicTak:11. However, none of these papers studied the application of coordinate descent algorithms to linearly coupled constrained optimization models. A similar random coordinate descent algorithm as the (RCD) method described in the present paper, for optimization problems with smooth objective and linearly coupled constraints, has been developed and analyzed by Necoara et al. in NecNes:12. We further extend these results to linearly constrained composite objective function optimization and provide in the sequel the convergence rate analysis for the previously presented variant of the (RCD) method (see Algorithm 1 (RCD)).
Convergence results
In the following subsections we derive the convergence rate of Algorithm 1 (RCD) for composite optimization model (1) in expectation, probability and for strongly convex functions.
In this section we study the rate of convergence in expectation of algorithm (RCD). We consider uniform probability distribution, i.e., the event of choosing a pair can occur with probability:
since we assume that and (see Remark 1 (ii)). In order to provide the convergence rate of our algorithm, first we have to define the conformal realization of a vector introduced in Roc:67; Roc:84.
An elementary vector of is a vector for which there is no nonzero vector conformal to and .
Based on Exercise 10.6 in Roc:84 we state the following lemma:
Roc:84 Given , if is an elementary vector, then . Otherwise, has a conformal realization:
where and are elementary vectors conformal to for all .
For the scalar case, i.e., and , the method provided in TseYun:09 finds a conformal realization with dimension within operations. We observe that elementary vectors in Lemma 2 for the case (i.e., ) have at most nonzero components.
Our convergence analysis is based on the following lemma, whose proof can be found in (TseYun:09, Lemma 6.1):
For the simplicity of the analysis we introduce the following linear subspaces:
A simplified update rule of algorithm (RCD) is expressed as:
We denote by and the optimal value and the optimal solution set for problem (1), respectively. We also introduce the maximal residual defined in terms of the norm :
which measures the size of the level set of given by . We assume that this distance is finite for the initial iterate .
Now, we prove the main result of this section:
Let satisfy Assumption 1. Then, the random coordinate descent algorithm (RCD) based on the uniform distribution generates a sequence satisfying the following convergence rate for the expected values of the objective function:
For simplicity, we drop the index and use instead of and the notation and , respectively. Based on (5) we derive:
Taking expectation in both sides w.r.t. random variable and recalling that , we get:
for all possible and pairs with .
Based on Lemma 2 for , it follows that any has a conformal realization defined by , where the vectors are conformal to and have only two nonzero components. Thus, for any there is a pair such that . Therefore, for any we can choose an appropriate set of pairs and vectors conformal to such that . As we have seen, the above chain of relations in (8) holds for any set of pairs and vectors . Therefore, it also holds for the set of pairs and vectors such that . In conclusion, we have from (8) that:
for all . Moreover, observing that and applying Lemma 3 in the previous inequality for coordinatewise separable functions and , we obtain:
Based on this choice and using similar reasoning as in Nes:07; RicTak:11 for proving the convergence rate of gradient type methods for composite objective functions, we derive the following:
where in the first inequality we used the convexity of while in the second and third inequalities we used basic optimization arguments. Therefore, at each iteration the following inequality holds:
Taking expectation with respect to and using convexity properties we get:
Further, if we denote and we get:
Dividing both sides with and using the fact that we get:
Finally, summing up from we easily get the above convergence rate. ∎
Let us analyze the convergence rate of our method for the two most common cases of the extended norm introduced in this section: w.r.t. extended Euclidean norm (i.e., ) and norm (i.e., ). Recall that the norm is defined by:
Under the same assumptions of Theorem 3.1, the algorithm (RCD) generates a sequence such that the expected values of the objective function satisfy the following convergence rates for and :
We usually have and this shows the advantages that the general norm has over the Euclidean norm. Indeed, if we denote by , then we can provide upper bounds on and . Clearly, the following inequality is valid:
and the inequality holds with equality only for for all . We recall that . Therefore, in the majority of cases the estimate for the rate of convergence based on norm is much better than that based on the Euclidean norm .
2 Convergence for strongly convex functions
Now, we assume that the objective function in (1) is -strongly convex with respect to norm , i.e.:
where denotes some subgradient of at . Note that if the function is -strongly convex w.r.t. extended Euclidean norm, then we can remark that it is also -strongly convex function w.r.t. norm and the following relation between the strong convexity constants holds:
Taking in (11) and from optimality conditions for all we obtain:
Next, we state the convergence result of our algorithm (RCD) for solving the problem (1) with -strongly convex objective w.r.t. norm .
Under the assumptions of Theorem 3.1, let be also -strongly convex w.r.t. . For the sequence generated by algorithm (RCD) we have the following rate of convergence of the expected values of the objective function:
Then, using similar derivation as in Theorem 1 we have:
where the last inequality results from (12). The statement of the theorem is obtained by noting that and the following subcases:
If and we take the expectation w.r.t. we get:
if and we take the expectation w.r.t. we get:
3 Convergence in probability
Further, we establish some bounds on the required number of iterations for which the generated sequence attains -accuracy with prespecified probability. In order to prove this result we use Theorem 1 from RicTak:11 and for a clear understanding we present it bellow.
RicTak:11 Let be a constant, and consider a nonnegative nonincreasing sequence of (discrete) random variables with one of the following properties:
for all , where is a constant,
for all such that , where is a constant.
Then, for some confidence level we have in probability that:
for a number of iterations which satisfies
Based on this lemma we can state the following rate of convergence in probability:
Let be a -strongly convex function satisfying Assumption 1 and be the confidence level. Then, the sequence generated by algorithm (RCD) using uniform distribution satisfies the following rate of convergence in probability of the expected values of the objective function:
where
Based on relation (10), we note that taking as , the property of Lemma 4 holds and thus we get the first part of our result. Relations (13) and (14) in the strongly convex case are similar instances of property in Theorem 4 from which we get the second part of the result. ∎
Generalization
In this section we study the optimization problem (1), but with general linearly coupling constraints:
where the direction is chosen as follows:
We can easily see that the linearly coupling constraints prevent the development of an algorithm that performs at each iteration a minimization with respect to less than coordinates. Therefore we are interested in the class of iteration updates which restricts the objective function on feasible directions that consist of at least (block) components.
Let satisfy Assumption 1. Then, the random coordinate descent algorithm (RCD)N that chooses uniformly at each iteration blocks generates a sequence satisfying the following rate of convergence for the expected values of the objective function:
The proof is similar to that of Theorem 3.1 and we omit it here for brevity.
Complexity analysis
In this section we analyze the total complexity (arithmetic complexity Nes:04) of algorithm (RCD) based on extended Euclidean norm for optimization problem (1) and compare it with other complexity estimates. Tseng presented in TseYun:09 the first complexity bounds for the (CGD) method applied to our optimization problem (1). Up to our knowledge there are no other complexity results for coordinate descent methods on the general optimization model (1).
Note that the algorithm (RCD) has an overall complexity w.r.t. extended Euclidean norm given by:
where is the complexity per iteration of algorithm (RCD). On the other hand, algorithm (CGD) has the following complexity estimate:
where is the iteration complexity of algorithm (CGD). Based on the particularities and computational effort of each method, we will show in the sequel that for some optimization models arising in real-world applications the arithmetic complexity of (RCD) method is lower than that of (CGD) method. For certain instances of problem (1) we have that the computation of the coordinate directional derivative of the smooth component of the objective function is much more simpler than the function evaluation or directional derivative along an arbitrary direction. Note that the iteration of algorithm (RCD) uses only a small number of coordinate directional derivatives of the smooth part of the objective, in contrast with the (CGD) iteration which requires the full gradient. Thus, we estimate the arithmetic complexity of these two methods applied to a class of optimization problems containing instances for which the directional derivative of objective function can be computed cheaply. We recall that the process of choosing a uniformly random pair in our method requires operations.
Let us structure a general coordinate descent iteration in two phases: Phase 1: Gather first-order information to form a quadratic approximation of the original optimization problem. Phase 2: Solve a quadratic optimization problem using data acquired at Phase 1 and update the current vector. Both algorithms (RCD) and (CGD) share this structure but, as we will see, there is a gap between computational complexities. We analyze the following example:
Further, we estimate the iteration complexity of the algorithms (RCD) and (CGD). Given a feasible , from the expression
we note that if the residual is already known, then the computation of requires operations. We consider that the dimension of each block is of order . Thus, the (RCD) method updates the current point on coordinates and summing up with the computation of the new residual , which in this case requires operations, we conclude that up to this stage, the iteration of (RCD) method has numerical complexity . However, the (CGD) method requires the computation of the full gradient for which are necessary operations. As a preliminary conclusion, Phase 1 has the following complexity regarding the two algorithms:
Suppose now that for a given , the blocks are known for (RCD) method or the entire gradient vector is available for (CGD) method within previous computed complexities, then the second phase requires the finding of an update direction with respect to each method. For the general linearly constrained model (1), evaluating the iteration complexity of both algorithms can be a difficult task. Since in TseYun:09 Tseng provided an explicit total computational complexity for the cases when the nonsmooth part of the objective function is separable and piece-wise linear/quadratic with pieces, for clarity of the comparison we also analyze the particular setting when is a box indicator function as given in equation (3). For algorithm (RCD) with , at each iteration, we require the solution of the following problem (see (3)):
It is shown in Kiw:07 that problem (18) can be solved in operations. However, in the scalar case (i.e., ) problem (18) can solved in closed form. Therefore, Phase 2 of algorithm (RCD) requires operations. Finally, we estimate for algorithm (RCD) the total arithmetic complexity in terms of the number of blocks as:
On the other hand, due to the Gauss-Southwell rule, the (CGD) method requires at each iteration the solution of a quadratic knapsack problem of dimension . It is argued in Kiw:07 that for solving the quadratic knapsack problem we need operations. In conclusion, the Gauss-Southwell procedure in algorithm (CGD) requires the conformal realization of the solution of a continuous knapsack problem and the selection of a “good” set of blocks . This last process has a different cost depending on . Overall, we estimate the total complexity of algorithm (CGD) for one equality constraint, , as:
First, we note that in the case and (i.e., the block case) algorithm (RCD) has better arithmetic complexity than algorithm (CGD) and previously mentioned block-coordinate methods HusKel:06; LisSim:05 (see Table 1). When and (i.e., the scalar case), by substitution in the above expressions from Table 1, we have a total complexity for algorithm (RCD) comparable to the complexity of algorithm (CGD) and the algorithms from HusKel:06; LisSim:05.
On the other hand, the complexity of choosing a random pair in algorithm (RCD) is very low, i.e., we need operations. Thus, choosing the working pair in our algorithm (RCD) is much simpler than choosing the working set within the Gauss-Southwell rule for algorithm (CGD) which assumes the following steps: first, compute the projected gradient direction and second, find the conformal realization of computed direction; the overall complexity of these two steps being . In conclusion, the algorithm (RCD) has a very simple implementation due to simplicity of the random choice for the working pair and a low complexity per iteration.
For the case the algorithm (RCD) needs in Phase 1 to compute coordinate directional derivatives with complexity and in Phase 2 to find the solution of a 3-block dimensional problem of the same structure as (18) with complexity . Therefore, the iteration complexity of the (RCD) method in this case is still . On the other hand, the iteration complexity of the algorithm (CGD) for is given by TseYun:09.
For , the complexity of Phase 1 at each iteration of our method still requires operations and the complexity of Phase 2 is , while in the (CGD) method the iteration complexity is TseYun:09.
For the case , a comparison between arithmetic complexities of algorithms (RCD) and (CGD) is provided in Table 2. We see from this table that depending on the values of and , the arithmetic complexity of (RCD) method can be better or worse than that of the (CGD) method.
We conclude from the rate of convergence and the previous complexity analysis that algorithm (RCD) is easier to be implemented and analyzed due to the randomization and the typically very simple iteration. Moreover, on certain classes of problems with sparsity structure, that appear frequently in many large-scale real applications, the arithmetic complexity of (RCD) method is better than that of some well-known methods from the literature. All these arguments make the algorithm (RCD) to be competitive in the composite optimization framework. Moreover, the (RCD) method is suited for recently developed computational architectures (e.g., distributed or parallel architectures).
Numerical Experiments
We have implemented all the algorithms in C-code and the experiments were run on a PC with an Intel Xeon E5410 CPU and 8 GB RAM memory. In all algorithms we considered the scalar case, i.e., and we worked with the extended Euclidean norm (). In our applications the smooth part of the composite objective function is of the form (17). The coordinate directional derivative at the current point for algorithm (RCD) is computed efficiently by knowing at each iteration the residual . For the (CGD) method, the working set is chosen accordingly to Section 6 in TseYun:07. Therefore, the entire gradient at the current point, , is required, which is computed efficiently using the residual . For gradient and residual computations we used an efficient sparse matrix-vector multiplication procedure. We coded the standard (CGD) method presented in TseYun:09 and we have not used any heuristics recommended by Tseng in TseYun:07, e.g., the “3-pair” heuristic technique. The direction at the current point from subproblem (6) for algorithm (RCD) is computed in closed form for all three applications considered in this section. For computing the direction at the current point from subproblem (7) in the (CGD) method for the first two applications we coded the algorithm from Kiw:07 for solving quadratic knapsack problems of the form (18) that has linear time complexity. For the second application, the direction at the current point for algorithm (GM) is computed using a linear time simplex projection algorithm introduced in JudRay:08. For the third application, we used the equivalent formulation of the subproblem (7) given in TseYun:09, obtaining for both algorithms (CGD) and (GM) an iteration which requires the solution of some double size quadratic knapsack problem of the form (18).
In the following tables we present for each algorithm the final objective function value (obj), the number of iterations (iter) and the necessary CPU time for our computer to execute all the iterations. As the algorithms (CGD), LIBSVM and (GM) use the whole gradient information to obtain the working set and to find the direction at the current point, we also report for the algorithm (RCD) the equivalent number of full-iterations which means the total number of iterations divided by (i.e., the number of iterations groups ).
In order to better understand the practical performance of our method, we have tested the algorithms (RCD), (CGD) and LIBSVM on two-class data classification problems with linear kernel, which is a well-known real-world application that can be posed as a large-scale optimization problem in the form (1) with a sparsity structure. In this section, we describe our implementation of algorithms (RCD), (CGD) TseYun:07 and LIBSVM ChaLin:11 and report the numerical results on different test problems. Note that linear SVM is a technique mainly used for text classification, which can be formulated as the following optimization problem:
We report in Table the results for algorithms (RCD), (CGD) and LIBSVM implemented in the scalar case, i.e., . The data used for the experiments can be found on the LIBSVM webpage (http://www.csie.ntu.edu.tw/cjlin/libsvmtools/ datasets/). For problems with very large dimensions, we generated the data randomly (see “test1” and “test2”) such that the nonzero elements of fit into the available memory of our computer. For each algorithm we present the final objective function value (obj), the number of iterations (iter) and the necessary CPU time (in minutes) for our computer to execute all the iterations. For the algorithm (RCD) we report the equivalent number of full-iterations, that is the number of iterations groups . On small test problems we observe that LIBSVM outperforms algorithms (RCD) and (CGD), but we still have that the CPU time for algorithm (RCD) does not exceed min, while algorithm (CGD) performs much worse. On the other hand, on large-scale problems the algorithm (RCD) has the best behavior among the three tested algorithms (within a factor of ). For very large problems (), LIBSVM has not returned any result within hours.
For the block case (i.e., ), we have plotted for algorithm (RCD) on the test problem “a7a” the CPU time and total time (in minutes) to solve knapsack problems (left) and the number of full-iterations (right) for different dimensions of the blocks . We see that the number of iterations decreases with the increasing dimension of the blocks, while the CPU time increases w.r.t. the scalar case due to the fact that for the direction cannot be computed in closed form as in the scalar case (i.e., ), but requires solving a quadratic knapsack problem (18) whose solution can be computed in operations Kiw:07.
2 Chebyshev center of a set of points
where is the radius and is the center of the enclosing ball. It can be immediately seen that the dual formulation of this problem is a particular case of our linearly constrained optimization model (1):
where is the matrix containing the given points as columns. Once an optimal solution for the dual formulation is found, a primal solution can be recovered as follows:
The direction at the current point in the algorithm (RCD) is computed in closed form. For computing the direction in the (CGD) method we need to solve a quadratic knapsack problem that has linear time complexity Kiw:07. The direction at the current point for algorithm (GM) is computed using a linear time simplex projection algorithm introduced in JudRay:08. We compare algorithms (RCD), (CGD) and (GM) for a set of large-scale problem instances generated randomly with a uniform distribution. We recover a suboptimal radius and Chebyshev center using the same set of relations (21) evaluated at the final iteration point for all three algorithms.