Coordinate Descent with Arbitrary Sampling II: Expected Separable Overapproximation
Zheng Qu, Peter Richtárik
Introduction
Coordinate descent methods have been popular with practitioners for many decades due to their inherent conceptual simplicity and ease with which one can produce a working code. However, up to a few exceptions , they have been largely ignored in the optimization community until recently when a renewed interest in coordinate descent was sparked by several reports of their remarkable success in certain applications . Additional and perhaps more significant reason behind the recent flurry of research activity in the area of coordinate descent comes from breakthroughs in our theoretical understanding of these methods through the introduction of randomization in the iterative process . Traditional variants of coordinate descent rely on cyclic or greedy rules for the selection of the next coordinate to be updated.
It has recently become increasingly clear that the design and complexity analysis of randomized coordinate descent methods is intimately linked with and can be better understood through the notion of expected separable overapproximation (ESO) and . This refers to an inequality involving the objective function and the sampling (a random set valued mapping describing the law with which subsets of coordinates are selected at each iteration), capturing in a compact way certain smoothness properties of the function in a random subspace spanned by the sampled coordinates.
A (coordinate) sampling is a random set-valued mapping with values being subsets of . It will be useful to write
We will compactly write .
Instead of the above general definition, it will be useful to the reader to instead think about the form of this inequality in the simple case when , where is the L2 norm, and . Letting , in this case inequality (2) takes the form
The ESO inequality is of key importance for randomized coordinate descent methods for several reasons:
The parameters for which ESO holds are neededAll existing parallel coordinate coordinate descent methods for which a complexity analysis has been performed are designed with fixed stepsizes. Designing a line-search procedure in such a setup is a nontrivial task, and to the best of our knowledge, only a single paper in the literature deals with this issue . Certainly, properly designed line search has the potential to improve the practical performance of these methods. to run coordinate descent. Indeed, they are used to set the stepsizes to a suitable value.
The size of these parameters directly influences the complexity of the method (see Table 1).
There are problems for which updating more coordinates in each iteration, as opposed to updating just one, may not lead to fewer iterations (which suggests that perhaps the resources should be instead utilized in some other way). Whether this happens or not can be understood through a careful study of the complexity result and its dependence, through the vectors and , on the number of coordinates updated in each iteration .
The ESO assumption is generic in the sense that as soon as function and sampling satisfy it, the complexity result follows. This leads to a natural dichotomy in the study of coordinate descent: i) the search for new variants of coordinate descent (e.g., parallel, accelerated, distributed) and study of their complexity under the ESO assumption, and ii) the search for pairs for which one can compute such that . Our current study follows this dichotomy: in we deal with the algorithmic and complexity aspects, and in this paper we deal with the ESO aspect.
2 Complexity of coordinate descent
For instance, the NSync boundComplexity of NSync depends on the initial () and optimal () points, but have hidden this dependence. The full bound is obtained by replacing by , where is the objective function. in Table 1 applies to the problem of unconstrained minimization of a smooth strongly convex function. It was in where the general form of the ESO inequality used in this paper was first mentioned and used to derive a complexity result for a coordinate descent method with arbitrary sampling.
The Quartz algorithm , on the other hand, applies to a much more serious problem – a problem of key importance in machine learning. In particular, it applies to the regularized empirical risk minimization problem, where the loss functions are convex and have Lipschitz gradients and the regularizer is strongly convex and possibly nonsmooth. Coordinate ascent is applied to the dual of this problem, and the bound appearing in Table 1 applies to the duality gapComplexity of Quartz depends on an initial pair of primal and dual vectors; we have omitted this dependence from the table. The full complexity result is obtained by replacing by , where is the difference between the primal and dual function values for a pair of (primal and dual) starting points..
The APPROX method was first proposed in and then generalized to an arbitrary sampling (among other things) in . In its accelerated variant it enjoys a rate, whereas it’s non-accelerated variant has a slower rate. Again, the complexity of the method explicitly depends on the vector of probabilities and the ESO parameter .
3 Historical remarks
4 Contributions
We now briefly list the contributions of this work.
ESO inequalities were previously established for special classes of samplings only, almost invariably for uniform samplings , and often using seemingly disparate approaches. We give the first systematic study of ESO inequalities for arbitrary samplings.
We recover existing ESO results by applying our general technique.
Our approach to deriving ESO inequalities is via the study of random principal submatrices of a positive semidefinite matrix. In particular, we give bounds on the largest eigenvalue of the mean of the random submatrix. This may be of independent interest.
5 Outline of the paper
Our paper is organized as follows. In Section 2 we describe the class of functions () we consider in this paper and briefly establish some basic terminology related to samplings (). In Section 3 we study probability matrices associated with samplings (), in Section 4 we study eigenvalues of these probability matrices ( and ) and in Section 5 we design a general technique for computing parameter for which the ESO inequality holds (i.e., for which ). We illustrate the use of these techniques in Section 5.4 and conclude with Section 7.
Functions and samplings
Recall that in the paper we are concerned with establishing inequality (2) which we succinctly write as . In Section 2.1 we describe the class of functions we consider in this paper and in Section 2.2 we briefly review several elementary facts related to samplings.
In the subsequent text, we shall often refer to the set of columns of for which the entry in the -th row of is nonzero:
Assumption 2.1 holds for many functions of interest in optimization and machine learning. Coordinate descent methods for functions explicitly required to satisfy Assumption 2.1 were studied in .
The following simple observation will help us relate the above assumption with standing assumptions considered in various papers on randomized coordinate descent methods.
It remains to add these inequalities for . ∎
By we denote the -by- identity matrix and for we will use the notation for the -by- matrix obtained from by retaining elements for which and zeroing out all other elements.
We now apply Proposition 2.1 to several special cases:
Partial separability. Let and , where for each , . Then is of the form
That is, depends on coordinates of belonging to set only. By Proposition 2.1, satisfies (3), where is the -by- diagonal matrix given by
Functions of the form (6) (i.e., partially separable functions) were considered in the context of parallel coordinate descent methods in . However, in the authors only assume the sum to have a Lipschitz gradient (which is more general, but somewhat complicates the analysis), whereas we assume that all component functions have Lipschitz gradient.
Linear transformation of variables. Let . Then is of the form
By Proposition 2.1, satisfies (3), where is given by
A functions of the form (7) appears in the dual problem of the standard primal-dual formulation to which stochastic dual coordinate ascent methods are applied [27, MinibatchASDCA, 33, 10, 18].
By Proposition 2.1, satisfies (3), with given by
Functions of the form (8) play an important role in the design of efficiently implementable accelerated coordinate descent methods . These functions also appear in the primal problem of the standard primal-dual formulation to which stochastic dual coordinate ascent methods are applied.
2 Samplings
As defined in the introduction, by sampling we mean a random set-valued mapping with values in (the set of subsets of ).
Of key importance in this paper are elementary samplings, defined next.
Let be a partition of such that for all . That is, . Now let be independent -nice samplings from , respectively. Then the sampling
is called -distributed sampling.
The -nice sampling arises as a special case of the -distributed sampling (for ) which we define next.
Sampling is called -nice if it picks only subsets of of cardinality , uniformly at random. More formally, it is defined by
Operations with samplings.
We now define several basic operations with samplings (convex combination, intersection and restriction).
Let be samplings and let be nonnegative scalars summing to 1. By we denote the sampling obtained as follows: we first pick , with probability , and then sample according to . More formally, is defined as follows:
Note that (11) indeed defines a sampling, since
Each sampling is a convex combination of elementary samplings. Indeed, for each we have
We now show that each doubly uniform sampling arises as a convex combination of -nice samplings.
Let be a doubly uniform sampling and let be the -nice sampling, for . Then
where the last equality follows from the definition of doubly uniform and -nice samplings. The statement then follows from (11) (i.e., by definition of convex combination of samplings). ∎
It will be useful to define two more operations with samplings; intersection and restriction.
For two samplings and we define the intersection as the sampling for which:
Let be a sampling and . By restriction of to we mean the sampling . By abuse of notation we will also write this sampling as .
Graph sampling.
Let be an undirected graph with vertex and be an edge in if and only if there is such that . If is an independent set of graph , then necessarily
Denote by the collection of all independent sets of the graph . We now define the graph sampling as follows:
Let be a graph sampling. In view of (12), for some nonnegative constants adding up to 1:
Let be a partition of , i.e.,
The product sampling is obtained by choosing , uniformly at random; that is, via:
A similar sampling was first considered in [18, Section 3.3] with an additional group separability assumption on the partition , which can be equivalently stated as:
In other words, it is both a product sampling and graph sampling. Note that in Definition 2.8 we do not make any assumption on the partition. Also, the product sampling is a nonuniform sampling as long as all the sets do not have the same cardinality, which occurs necessarily if , representing the number of processors, is not divisible by .
Probability matrix associated with a sampling
In this section we define the notion of a probability matrix associated with a sampling. As we shall see in later sections, this matrix encodes all information about which is relevant for development of ESO inequality.
With each sampling we associate an -by- “probability matrix” defined by
We shall write when it is important to indicate which sampling is behind the probability matrix, otherwise we simply write .
Using the notation we have just established, probability matrices of elementary samplings are given by
We now establish a simple but particularly insightful result, leading to many useful identities.
The set of probability matrices is the convex hull of the probability matrices corresponding to elementary samplings.
for each .
Since multiplying a matrix in the Hadamard sense by a fixed matrix is a linear operation,
Identity (20) follows from (19) by setting :
Finally, (22) (resp. (23)) follows from (20) (resp. (21)) by setting . ∎
2 Operations with samplings
We now give formulae for the probability matrix of the sampling arising as a convex combination, intersection or a restriction, in terms of the probability matrices of the constituent samplings.
We have seen in (12) that each sampling is a convex combination of elementary samplings. In view of Theorem 3.1, the probability matrices of the samplings are related the same way:
More generally, as formalized in the following lemma, the probability matrix of a convex combination of samplings is equal to the convex combination of the probability matrices of these samplings.
Let be samplings and be non-negative scalars summing up to 1. Then
Let be the convex combination of samplings and fix any . By definition,
Intersection of samplings.
The probability matrix of the intersection of two independent samplings is equal to the Hadamard product of the probability matrices of these samplings. This is formalized in the following lemma.
Let be independent samplings. Then
Restriction.
By Lemma 3.2, the probability matrix of the restriction of arbitrary sampling to is given by (we give several alternative ways of writing the result):
Note that is the matrix obtained from by keeping only elements and zeroing out all the rest. Furthermore, by combining the formulae derived above, we get
3 Probability matrix of special samplings
The probability matrix of the -distributed samplings is computed in the following lemma.
Let be the ()-distributed sampling associated with the partition of such that for (see Definition 2.2). Then
Note that is the 0-1 matrix with if and only if belong to the same partition.
Let . It is easy to see that
As a corollary of the above in the case we obtain the probability matrix of the -nice sampling:
Fix and let be the -nice sampling. Then
where . If , then is the zero matrix.
For this follows from Lemma 3.3 in the special case when (note that and ). ∎
Finally, we compute the probability matrix of a doubly uniform sampling.
Largest eigenvalues of the probability matrix
For an positive semidefinite matrix we denote by the largest eigenvalue of :
Note that .
In this section we study (standard and normalized) largest eigenvalue of the probability matrix associated with a sampling:
Recall that by Theorem 3.1, is positive semidefinite for each sampling . For convenience, we write (resp. ) instead of (resp. ). We study these quantities since, as we will show in later sections, they are useful in computing parameter for which ESO holds.
In the case of elementary samplings the situation is simple. Indeed, for any , we have
Since and , (39) can equivalently be written as
2 Bounds for arbitrary samplings
In the first result of this section we give sharp bounds for for arbitrary sampling .
Upper bound. If is a constant such that with probability 1, then
Identity. If with probability 1, then .
where the last inequality holds since is upper bounded by the sum of all elements of . It remains to apply identities (22) and (23).
In view of (12), we can represent as a convex combination of elementary samplings:
The result follows by combining the upper and lower bounds. ∎
In the next result we study the quantity .
Lower and upper bounds. For any sampling we have
Sharper upper bound. If is uniform and with probability one, then the upper bound can be improved to
Identity. If is uniform and with probability one, then
By combining (38) and Theorem 4.1 (ii) we obtain:
The result follows by combining the lower bound from (i) with the upper bound in (ii).∎
3 Bounds for restrictions of selected samplings
In this part we study the normalized eigenvalue associated with the restriction of a few selected samplings (or families of samplings). In particular, we first give a (necessarily rough) bound that holds for arbitrary samplings, followed by a bound for the -distributed sampling and the -nice sampling (both are specific uniform samplings). Finally, we give a bound for the family of doubly uniform samplings.
Let be an arbitrary sampling and let be such that with probability 1. Then for all , we have
Note that with probability 1. We only need to apply the upper bound in Theorem 4.1 to the restriction sampling . ∎
We now proceed to the -distributed sampling (recall Definition 2.2).
Let be the ()-distributed sampling associated with a partition of such that for . Fix arbitrary and let be the number of sets which have a nonempty intersection with ; that is, let . Then
By applying Lemma 3.2 and Lemma 3.3, we get
where the inequality is an application of the Cauchy-Schwartz inequality. It follows that
Finally, note that . ∎
We now specialize the above result to the case, obtaining a formula for in the case when is the -nice sampling (recall Definition 2.3).
Let be the -nice sampling. Then for all ,
Let . Since -nice sampling is the -distributed sampling, by applying Proposition 4.2 we get:
Next, by direct calculation we can verify that
which together with the lower bound established in Theorem 4.1 yields:
Note that (48) is much better (i.e., smaller) than the right hand side in (43). This is to be expected as the bound (43) applies to all samplings (which have size at most with probability 1).
Finally, we give a bound on the normalized largest eigenvalue of the restriction of a doubly uniform sampling.
Expected Separable Overapproximation
In this section we develop a general technique for computing parameters for which the ESO inequality (2) holds.
The reason for defining and studying probability matrices is motivated by the following result, which for functions satisfying Assumption 2.1 reduces the ESO Assumption to the problem of bounding the Hadamard product of the probability matrix and the data matrix from above by a diagonal matrix. Note that because , in view of (50),the Hadamard product is positive semidefinite.
Let us substitute into (3) and take expectation in of both sides. Applying (19), we obtain:
We next focus on the problem of finding vector for which (51) holds. The following direct consequence of (50) will be helpful in this regard:
In particular, (53) can be used to establish the first part of the following useful lemma.
If and , then
By definition, , which together with (53) implies:
Applying the same reasoning to the matrix we obtain: Combining the two results, we obtain (54). Inequality (55) follows from:
2 ESO I: no coupling between the sampling and data
By applying Lemma 5.2, Eq (54), to and , we obtain a formula for satisfying (51).
Let satisfy Assumption 2.1 and let be an arbitrary sampling. Then for defined by
Let . To establish the main statement, it is sufficient to apply Lemma 5.1 and Lemma 5.2 and note that for defined by (56), . ∎
If for some , with probability 1, then in view of Theorem 4.1, we have . Furthermore,
Hence, in view of Lemma 5.1, we can pick the ESO parameter conservatively as follows:
An ESO inequality with similar to (57) was established in , but for a different class of functions (-partially separable functions: functions expressed as a sum of functions each of which depends on at most coordinates) and uniform samplings only. Indeed, the bound established therein for arbitrary uniform samplings uses , where is the degree of separability of and is the Lipschitz constant of associated with coordinate . In our setting, and corresponds to . Hence, (57) could be seen as a generalization of the ESO bound in to arbitrary samplings.
Note that computation of the normalized eigenvalue could be time-consuming, and would require a number of passes through the data prior to running a coordinate descent method, which may be prohibitive. In the next section we follow a different approach, one in which this issue is avoided. The main idea is to decompose as a sum of the rank one matrices and then bound each term separately.
3 ESO II: coupling the sampling with data
In this section we use a different strategy for satisfying (51). We first write
where denote the th row vector of matrix and then bound each term in the last sum individually. Recall the definition of set from (4): .
Let be an arbitrary sampling and be defined by:
Let and denote the th row vector of matrix . By the definition of ,
Thus, . We now apply Lemma 5.2 to the sampling and the matrix and obtain:
where is the vector of probability defined in (1) and is defined in (58). For completeness, let us show that the second inequality in (59) can be replaced by equality. Indeed, from (40) and the fact that , we obtain . Finally, using the upper bound in Theorem 4.1, we know that . Hence, . ∎
The benefit of this approach is twofold: First, if the data matrix is sparse, the sets have small cardinality, and from Proposition 4.1 (or other results in Section 4.3, depending on the sampling used) we conclude that is small. Hence, the parameters obtained through (58) get better (i.e., smaller) with sparser data. Second, the formula for does not involve the need to compute an eigenvalue associated with the data matrix. On the other hand, instead of having to compute (which, as we have seen, is equal to if with probability 1), we now need to compute the normalized largest eigenvalue of restrictions of , for all . However, for this there is a good upper bound available through Proposition 4.1 for an arbitrary sampling, and refined bounds can be derived for specific samplings (for examples, see Section 4.3).
4 ESO without eigenvalues
In this section we illustrate the use of the techniques developed in the preceding sections to derive ESO inequalities, for selected samplings, which do not depend on any eigenvalues, and lead to easily computable ESO parameters . The techniques can be used to derive similar ESO inequalities for other samplings as well.
Let satisfy Assumption 2.1 and let sets be defined as in (4). Then provided that the sampling and vector are chosen in any of the following ways:
is an arbitrary sampling such that with probability 1, and
is the -distributed sampling and
where for .
is the -nice sampling (for ) and
is a doubly uniform sampling (which is not nil) and
is a serial sampling (i.e., a sampling for which with probability 1) and is defined as in (64).
A direct consequence of Theorem 5.2 and Proposition 4.1.
A direct consequence of Theorem 5.2 and Proposition 4.2.
This is a special case of part (ii) for .
A direct consequence of Theorem 5.2 and Proposition 4.4.
For a graph sampling it is clear that with probability 1 for all . The result then follows from Theorem 5.2.
A special case of (v). Indeed, a single vertex is an independent set of a graph.
Remarks: Note that part (i) of Proposition 5.1 is a strict improvement on (57). Also, this is strict improvement, both in the quality of the bound and in generality of the sampling, on the result in , which was proved for uniform samplings only and where the bound involved instead of . Part (ii) should be compared with the results obtained in and part (iii) with those in .
Discussion
As stressed before, smaller parameter leads to better convergence result (see Table 1) but computing the smallest admissible would require too large computational effort. Nevertheless, using a cheaply computed parameter would lead to large iteration complexity and slow convergence. The trade-off between the preprocessing time for computing the parameter and the iteration complexity of the algorithm shall be discussed next.
For specific samplings such as -nice sampling and -distributed sampling, admissible can be computed using dedicated formulae 61 and 62, which appeared respectively in and . For arbitrary sampling , admissible parameter can be computed according to 57, 58 or 60, which are given for the first time. While 58 requires computing the largest eigenvalue for matrices of sizes , both 57 and 60 can be computed in at most two passes over the data. In return, 58 provides a smaller parameter which improves the iteration complexity.
For approximating , one can apply power method on the positive semidefinite matrix . The number of operations needed in one iteration of the power method is and if we apply iterations of power method Note that as the matrix is positive semidefinite, the power method always converges to the largest eigenvalue even if it is not a dominant eigenvalue. We defer the study on the convergence rate of power method for different matrices to a future work. , then the total number of operations needed for computing using 58 is
where the big notation hides constants independent of the data matrix .
Recall from Table 1 how the iteration complexity of different methods depends on the parameter . Let us consider the strongly convex smooth objective function setup and assume that the random sampling has cardinality with probability 1. Then the computational time of one epoch ( iterations) is of the same order as passes over the data. Therefore, given a parameter , the number of passes over the data is bounded by:
where is the target accuracy and is the strong convexity parameter of the problem.
The comparison of the three formulae in terms of overall complexity is reported in Table 2, where the big notation hides constants independent of the data matrix . It is clear from the table that the trade-off between the preprocessing and the iteration complexity mainly depends on the proportion between and . In Table 3 we report the actual computing time of using different formulae and the corresponding value of , for two real data matrices w8a and dorothea. To facilitate the comparison we normalized the two data sets so that the diagonal elements of are all one. The samplings that we used in the experiments are all product sampling (Definition 2.8) with respect to some random partition of the set . The number of iterations for the power method is fixed to 10 and we multiply the obtained value by 1.01. Because of the comparable processing time, Formula 60 is clearly better than Formula 57. From Table 3 we also see that Formula 58 requires significant computational effort for computing comparing to the other two but also reduces the value of by order of magnitude in most of the regimes. Let us take the example of dorothea with , then the overall number of passes over data is if is computed using Formula 60 and if is computed using Formula 58. Hence for small enough strong convexity parameter , it is worth to spend more time in computing a good parameter using Formula 58, which will then be compensated by a smaller iteration complexity.
2 Optimal sampling
Proposition 5.1 should be understood in the context of complexity results for randomized coordinate descent, such as those in Table 1. For instance, in view of (60) for an arbitrary sampling such that with probability 1, the accelerated coordinate descent method developed in has complexity
Naturally, the bound improves if we use a specialized sampling, such as the -nice sampling (since the constants become smaller).
Sometimes, one can find a sampling which minimizes the complexity bound. For instance, if we restrict our attention to serial samplings only (samplings picking a single coordinate at a time), then one can find probabilities , which uniquely define a sampling, minimizing the complexity bound:
where . Note that if the th coordinate is optimal at the starting point (i.e., if ), then the prediction is to choose (i.e., to never update coordinate ) – this is what one would expect. Using the serial sampling defined by (66), the complexity (65) takes the form
While for all , these quantities can be equal, in which case is times better than .
Conclusion
We have conducted a systematic study of ESO inequalities for a large class of functions (those satisfying Assumption 2.1) and arbitrary samplings. These inequalities are crucial in the design and complexity analysis of randomized coordinate descent methods. This led us to study standard and normalized largest eigenvalue of the Hadamard product of the probability matrix associated with a sampling and a certain positive semidefinite matrix containing the data defining the function. Using our approach we have established new ESO results and also re-derived ESO results already established in the literature (in the case of uniform samplings) via different techniques. Our approach can be used to derive further bounds for specific samplings and can potentially be of interest outside the domain of randomized coordinate descent.