Parallel Coordinate Descent Methods for Big Data Optimization
Peter Richtárik, Martin Takáč
Keywords:
Parallel coordinate descent, big data optimization, partial separability, huge-scale optimization, iteration complexity, expected separable over-approximation, composite objective, convex optimization, LASSO.
Introduction
Recently there has been a surge in interest in the design of algorithms suitable for solving convex optimization problems with a huge number of variables . Indeed, the size of problems arising in fields such as machine learning , network analysis , PDEs , truss topology design and compressed sensing usually grows with our capacity to solve them, and is projected to grow dramatically in the next decade. In fact, much of computational science is currently facing the “big data” challenge, and this work is aimed at developing optimization algorithms suitable for the task.
Coordinate descent methods.
Parallelization.
We wish to point out that for truly huge-scale problems it is absolutely necessary to parallelize. This is in line with the rise and ever increasing availability of high performance computing systems built around multi-core processors, GPU-accelerators and computer clusters, the success of which is rooted in massive parallelization. This simple observation, combined with the remarkable scalability of serial CDMs, leads to our belief that the study of parallel coordinate descent methods (PCDMs) is a very timely topic.
Research Idea.
The work presented in this paper was motivated by the desire to answer the following question:
Under what natural and easily verifiable structural assumptions on the objective function does parallelization of a coordinate descent method lead to acceleration?
Our starting point was the following simple observation. Assume that we wish to minimize a separable function of variables (i.e., a function that can be written as a sum of functions each of which depends on a single variable only). For simplicity, in this thought experiment, assume that there are no constraints. Clearly, the problem of minimizing can be trivially decomposed into independent univariate problems. Now, if we have processors/threads/cores, each assigned with the task of solving one of these problems, the number of parallel iterations should not depend on the dimension of the problemFor simplicity, assume the distance from the starting point to the set of optimal solutions does not depend on the dimension.. In other words, we get an -times speedup compared to the situation with a single processor only. Note that any parallel algorithm of this type can be viewed as a parallel coordinate descent method. Hence, a PCDM with processors should be -times faster than a serial one. If processors are used instead, where , one would expect a -times speedup.
By extension, one would perhaps expect that optimization problems with objective functions which are “close to being separable” would also be amenable to acceleration by parallelization, where the acceleration factor would be reduced with the reduction of the “degree of separability”. One of the main messages of this paper is an affirmative answer to this. Moreover, we give explicit and simple formulae for the speedup factors.
As it turns out, and as we discuss later in this section, many real-world big data optimization problems are, quite naturally, “close to being separable”. We believe that this means that PCDMs is a very promising class of algorithms when it comes to solving structured big data optimization problems.
Minimizing a partially separable composite objective.
where is a (block) partially separable smooth convex function and is a simple (block) separable convex function. We allow to have values in , and for regularization purposes we assume is proper and closed. While (1) is seemingly an unconstrained problem, can be chosen to model simple convex constraints on individual blocks of variables. Alternatively, this function can be used to enforce a certain structure (e.g., sparsity) in the solution. For a more detailed account we refer the reader to . Further, we assume that this problem has a minimum (). What we mean by “smoothness” and “simplicity” will be made precise in the next section.
Let us now describe the key concept of partial separability. Let be decomposed into non-overlapping blocks of variables (this will be made precise in Section 2). We assume throughout the paper that is partially separable of degree , i.e., that it can be written in the form
where is a finite collection of nonempty subsets of (possibly containing identical sets multiple times), are differentiable convex functions such that depends on blocks for only, and
Clearly, . The PCDM algorithms we develop and analyze in this paper only need to know , they do not need to know the decomposition of giving rise to this .
Examples of partially separable functions.
Many objective functions naturally encountered in the big data setting are partially separable. Here we give examples of three loss/objective functions frequently used in the machine learning literature and also elsewhere. For simplicity, we assume all blocks are of size 1 (i.e., ). Let
where is the number of examples, is the vector of features, are labeled examples and is one of the three loss functions listed in Table 1. Let with row equal to .
Often, each example depends on a few features only; the maximum over all features is the degree of partial separability . More formally, note that the -th function in the sum (4) in all cases depends on coordinates of (the number of nonzeros in the -th row of ) and hence is partially separable of degree
All three functions of Table 1 are smooth (based on the definition of smoothness in the next section). We refer the reader to for more examples of interesting (but nonsmooth) partially separable functions arising in graph cuts and matrix completion.
Brief literature review.
Several papers were written recently studying the iteration complexity of serial CDMs of various flavours and in various settings. We will only provide a brief summary here, for a more detailed account we refer the reader to .
Classical CDMs update the coordinates in a cyclic order; the first attempt at analyzing the complexity of such a method is due to . Stochastic/randomized CDMs, that is, methods where the coordinate to be updated is chosen randomly, were first analyzed for quadratic objectives , later independently generalized to -regularized problems and smooth block-structured problems , and finally unified and refined in . The problems considered in the above papers are either unconstrained or have (block) separable constraints. Recently, randomized CDMs were developed for problems with linearly coupled constraints .
A greedy CDM for -regularized problems was first analyzed in ; more work on this topic include . A CDM with inexact updates was first proposed and analyzed in . Partially separable problems were independently studied in , where an asynchronous parallel stochastic gradient algorithm was developed to solve them.
When writing this paper, the authors were aware only of the parallel CDM proposed and analyzed in . Several papers on the topic appeared around the time this paper was finalized or after . Further papers on various aspects of the topic of parallel CDMs, building on the work in this paper, include .
Contents.
We start in Section 2 by describing the block structure of the problem, establishing notation and detailing assumptions. Subsequently we propose and comment in detail on two parallel coordinate descent methods. In Section 3 we summarize the main contributions of this paper. In Section 4 we deal with issues related to the selection of the blocks to be updated in each iteration. It will involve the development of some elementary random set theory. Sections 5-6 deal with issues related to the computation of the update to the selected blocks and develop a theory of Expected Separable Overapproximation (ESO), which is a novel tool we propose for the analysis of our algorithms. In Section 7 we analyze the iteration complexity of our methods and finally, Section 8 reports on promising computational results. For instance, we conduct an experiment with a big data (cca 350GB) LASSO problem with a billion variables. We are able to solve the problem using one of our methods on a large memory machine with 24 cores in 2 hours, pushing the difference between the objective value at the starting iterate and the optimal point from down to . We also conduct experiments on real data problems coming from machine learning.
Parallel Block Coordinate Descent Methods
In Section 2.1 we formalize the block structure of the problem, establish notationTable 8 in the appendix summarizes some of the key notation used frequently in the paper. that will be used in the rest of the paper and list assumptions. In Section 2.2 we propose two parallel block coordinate descent methods and comment in some detail on the steps.
Some elements of the setup described in this section was initially used in the analysis of block coordinate descent methods by Nesterov (e.g., block structure, weighted norms and block Lipschitz constants).
The block structure of (1) is given by a decomposition of into subspaces as follows. Let be a column permutationThe reason why we work with a permutation of the identity matrix, rather than with the identity itself, as in , is to enable the blocks being formed by nonconsecutive coordinates of . This way we establish notation which makes it possible to work with (i.e., analyze the properties of) multiple block decompositions, for the sake of picking the best one, subject to some criteria. Moreover, in some applications the coordinates of have a natural ordering to which the natural or efficient block structure does not correspond. of the identity matrix and further let be a decomposition of into submatrices, with being of size , where .
Any vector can be written uniquely as
where . Moreover, .
Noting that is the identity matrix, we have . Let us now show uniqueness. Assume that , where . Since
for every we get . ∎
In view of the above proposition, from now on we write , and refer to as the -th block of . The definition of partial separability in the introduction is with respect to these blocks. For simplicity, we will sometimes write .
For and we write
That is, given , is the vector in whose blocks are identical to those of , but whose other blocks are zeroed out. In view of Proposition 1, we can equivalently define block-by-block as follows
Inner products.
The standard Euclidean inner product in spaces and , , will be denoted by . Letting , the relationship between these inner products is given by
For any and we further define
For vectors and we write .
Norms.
Spaces , , are equipped with a pair of conjugate norms: , where is an positive definite matrix and , . For , define a pair of conjugate norms in by
Note that these norms are induced by the inner product (9) and the matrices . Often we will use , where the constants are defined below.
Smoothness of f𝑓f.
We assume throughout the paper that the gradient of is block Lipschitz, uniformly in , with positive constants , i.e., that for all , and ,
where . An important consequence of (11) is the following standard inequality :
Separability of ΩΩ\Omega.
We assume thatFor examples of separable and block separable functions we refer the reader to . For instance, is separable and block separable (used in sparse optimization); and , where the norms are standard Euclidean norms, is block separable (used in group lasso). One can model block constraints by setting for , where is some closed convex set, and for . is (block) separable, i.e., that it can be decomposed as follows:
where the functions are convex and closed.
Strong convexity.
In one of our two complexity results (Theorem 20) we will assume that either or (or both) is strongly convex. A function is strongly convex with respect to the norm with convexity parameter if for all ,
where is any subgradient of at . The case with reduces to convexity. Strong convexity of may come from or (or both); we write (resp. ) for the (strong) convexity parameter of (resp. ). It follows from (14) that
The following characterization of strong convexity will be useful. For all and ,
It can be shown using (12) and (14) that .
2 Algorithms
In this paper we develop and study two generic parallel coordinate descent methods. The main method is PCDM1; PCDM2 is its “regularized” version which explicitly enforces monotonicity. As we will see, both of these methods come in many variations, depending on how Step 3 is performed.
Let us comment on the individual steps of the two methods.
Step 3. At the beginning of iteration we pick a random set () of blocks to be updated (in parallel) during that iteration. The set is a realization of a random set-valued mapping with values in or, more precisely, it the sets are iid random sets with the distribution of . For brevity, in this paper we refer to such a mapping by the name sampling. We limit our attention to uniform samplings, i.e., random sets having the following property: is independent of . That is, the probability that a block gets selected is the same for all blocks. Although we give an iteration complexity result covering all such samplings (provided that each block has a chance to be updated, i.e., ), there are interesting subclasses of uniform samplings (such as doubly uniform and nonoverlapping uniform samplings; see Section 4) for which we give better results.
Step 4. For we defineA similar map was used in (with and ) and (with ) in the analysis of serial coordinate descent methods in the smooth and composite case, respectively. In loose terms, the novelty here is the introduction of the parameter and in developing theory which describes what value should have. Maps of this type are known as composite gradient mapping in the literature, and were introduced in .
and , are parameters of the method that we will comment on later. Note that in view of (5), (10) and (13), is block separable;
Consequently, we have , where
We mentioned in the introduction that besides (block) separability, we require to be “simple”. By this we mean that the above optimization problem leading to is “simple” (e.g., it has a closed-form solution). Recall from (8) that is the vector in identical to except for blocks , which are zeroed out. Hence, Step 4 of both methods can be written as follows:
Parameters and depend on and and stay constant throughout the algorithm. We are not ready yet to explain why the update is computed via (17) and (18) because we need technical tools, which will be developed in Section 4, to do so. Here it suffices to say that the parameters and come from a separable quadratic overapproximation of , viewed as a function of . Since expectation is involved, we refer to this by the name Expected Separable Overapproximation (ESO). This novel concept, developed in this paper, is one of the main tools of our complexity analysis. Section 5 motivates and formalizes the concept, answers the why question, and develops some basic ESO theory.
Section 6 is devoted to the computation of and for partially separable and various special classes of uniform samplings . Typically we will have , while will depend on easily computable properties of and . For example, if is chosen as a subset of of cardinality , with each subset chosen with the same probability (we say that is -nice) then, assuming , we may choose and , where is the degree of partial separability of . More generally, if is any uniform sampling with the property with probability 1, then we may choose and . Note that in both cases and that the latter is always larger than (or equal to) the former one. This means, as we will see in Section 7, that we can give better complexity results for the former, more specialized, sampling. We analyze several more options for than the two just described, and compute parameters and that should be used with them (for a summary, see Table 4).
Step 5. The reason why, besides PCDM1, we also consider PCDM2, is the following: in some situations we are not able to analyze the iteration complexity of PCDM1 (non-strongly-convex where monotonicity of the method is not guaranteed by other means than by directly enforcing it by inclusion of Step 5). Let us remark that this issue arises for general only. It does not exist for , and for encoding simple constraints on individual blocks; in these cases one does not need to consider PCDM2. Even in the case of general we sometimes get monotonicity for free, in which case there is no need to enforce it. Let us stress, however, that we do not recommend implementing PCDM2 as this would introduce too much overhead; in our experience PCDM1 works well even in cases when we can only analyze PCDM2.
Smmary of Contributions
In this section we summarize the main contributions of this paper (not in order of significance).
Problem generality. We give the first complexity analysis for parallel coordinate descent methods for problem (1) in its full generality.
Complexity. We show theoretically (Section 7) and numerically (Section 8) that PCDM accelerates on its serial counterpart for partially separable problems. In particular, we establish two complexity theorems giving lower bounds on the number of iterations sufficient for one or both of the PCDM variants (for details, see the precise statements in Section 7) to produce a random iterate for which the problem is approximately solved with high probability, i.e., . The results, summarized in Table 2, hold under the standard assumptions listed in Section 2.1 and the additional assumption that and satisfy the following inequality for all :
This inequality, which we call Expected Separable Overapproximation (ESO), is the main new theoretical tool that we develop in this paper for the analysis of our methods (Sections 4-6 are devoted to the development of this theory).
The main observation here is that as the average number of block updates per iteration increases (say, ), enabled by the utilization of more processors, the leading term in the complexity estimate, , decreases in proportion. However, will generally grow with , which has an adverse effect on the speedup. Much of the theory in this paper goes towards producing formulas for (and ), for partially separable and various classes of uniform samplings . Naturally, the ideal situation is when does not grow with at all, or if it only grows very slowly. We show that this is the case for partially separable functions with small . For instance, in the extreme case when is separable (), we have and we obtain linear speedup in . As increases, so does , depending on the law governing . Formulas for and for various samplings are summarized in Table 4.
Algorithm unification. Depending on the choice of the block structure (as implied by the choice of and the matrices ) and the way blocks are selected at every iteration (as given by the choice of ), our framework encodes a family of known and new algorithmsAll the methods are in their proximal variants due to the inclusion of the term in the objective. (see Table 3).
In particular, PCDM is the first method which “continuously” interpolates between serial coordinate descent and gradient (by manipulating and/or ).
Partial separability. We give the first analysis of a coordinate descent type method dealing with a partially separable loss / objective. In order to run the method, we need to know the Lipschitz constants and the degree of partial separability . It is crucial that these quantities are often easily computable/predictable in the huge-scale setting. For example, if and we choose all blocks to be of size , then is equal to the squared Euclidean norm of the -th column of and is equal to the maximum number of nonzeros in a row of . Many problems in the big data setting have small compared to .
Choice of blocks. To the best of our knowledge, existing randomized strategies for paralleling gradient-type methods (e.g., ) assume that (or an equivalent thereof, based on the method) is chosen as a subset of of a fixed cardinality, uniformly at random. We refer to such by the name nice sampling in this paper. We relax this assumption and our treatment is hence much more general. In fact, we allow for to be any uniform sampling. It is possible to further consider nonuniform samplingsRevision note: See ., but this is beyond the scope of this paper.
In particular, as a special case, our method allows for a variable number of blocks to be updated throughout the iterations (this is achieved by the introduction of doubly uniform samplings). This may be useful in some settings such as when the problem is being solved in parallel by unreliable processors each of which computes its update with probability and is busy/down with probability (binomial sampling).
Uniform, doubly uniform, nice, binomial and other samplings are defined, and their properties studied, in Section 4.
ESO and formulas for and . In Table 4 we list parameters and for which ESO inequality (19) holds. Each row corresponds to a specific sampling (see Section 4 for the definitions). The last 5 samplings are special cases of one or more of the first three samplings. Details such as what is and “monotonic” ESO are explained in appropriate sections later in the text. When a specific sampling is used in the algorithm to select blocks in each iteration, the corresponding parameters and are to be used in the method for the computation of the update (see (17) and (18)).
En route to proving the iteration complexity results for our algorithms, we develop a theory of deterministic and expected separable overapproximation (Sections 5 and 6) which we believe is of independent interest, too. For instance, methods based on ESO can be compared favorably to the Diagonal Quadratic Approximation (DQA) approach used in the decomposition of stochastic optimization programs .
Parallelization speedup. Our complexity results can be used to derive theoretical parallelization speedup factors. For several variants of our method, in case of a non-strongly convex objective, these are given in Section 7.1 (Table 5). For instance, in the case when all block are updated at each iteration (we later refer to having this property by the name fully parallel sampling), the speedup factor is equal to . If the problem is separable (), the speedup is equal to ; if the problem is not separable (), there may be no speedup. For strongly convex the situation is even better; the details are given in Section 7.2.
Relationship to existing results. To the best of our knowledge, there are just two papers analyzing a parallel coordinate descent algorithm for convex optimization problems. In the first paper all blocks are of size , corresponds to what we call in this paper a -nice sampling (i.e., all sets of coordinates are updated at each iteration with equal probability) and hence their algorithm is somewhat comparable to one of the many variants of our general method. While the analysis in works for a restricted range of values of , our results hold for all . Moreover, the authors consider a more restricted class of functions and the special case , which is simpler to analyze. Lastly, the theoretical speedups obtained in , when compared to the serial CDM method, depend on a quantity that is hard to compute in big data settings (it involves the computation of an eigenvalue of a huge-scale matrix). Our speedups are expressed in terms of natural and easily computable quantity: the degree of partial separability of . In the setting considered by , in which more structure is available, it turns out that is an upper boundRevision note requested by a reviewer: In the time since this paper was posted to arXiv, a number of follow-up papers were written analyzing parallel coordinate descent methods and establishing connections between a discrete quantity analogous to (degree of partial/Nesterov separability) and a spectral quantity analogous to (largest eigenvalue of a certain matrix), most notably . See also , which uses a spectral quantity, which can be directly compared to . on . Hence, we show that one can develop the theory in a more general setting, and that it is not necessary to compute (which may be complicated in the big data setting). The parallel CDM method of the second paper only allows all blocks to be updated at each iteration. Unfortunately, the analysis (and the method) is too coarse as it does not offer any theoretical speedup when compared to its serial counterpart. In the special case when only a single block is updated in each iteration, uniformly at random, our theoretical results specialize to those established in .
Computations. We demonstrate that our method is able to solve a LASSO problem involving a matrix with a billion columns and 2 billion rows on a large memory node with 24 cores in 2 hours (Section 8), achieving a speedup compared to the serial variant and pushing the residual by more than 30 degrees of magnitude. While this is done on an artificial problem under ideal conditions (controlling for small ), large speedups are possible in real data with small relative to . We also perform additional experiments on real data sets from machine learning (e.g., training linear SVMs) to illustrate that the predictions of our theory match reality.
Code. The open source code with an efficient implementation of the algorithm(s) developed in this paper is published here: http://code.google.com/p/ac-dc/.
Block Samplings
In Step 3 of both PCDM1 and PCDM2 we choose a random set of blocks to be updated at the current iteration. Formally, is a realization of a random set-valued mapping with values in , the collection of subsets of . For brevity, in this paper we refer to by the name sampling. A sampling is uniquely characterized by the probability mass function
that is, by assigning probabilities to all subsets of . Further, we let , where
In Section 4.1 we describe those samplings for which we analyze our methods and in Section 4.2 we prove several technical results, which will be useful in the rest of the paper.
A sampling is proper if for all blocks . That is, from the perspective of PCDM, under a proper sampling each block gets updated with a positive probability at each iteration. Clearly, PCDM can not converge for a sampling that is not proper.
A sampling is uniform if all blocks get updated with the same probability, i.e., if for all . We show in (33) that, necessarily, . Further, we say is nil if . Note that a uniform sampling is proper if and only if it is not nil.
All our iteration complexity results in this paper are for PCDM used with a proper uniform sampling (see Theorems 19 and 20) for which we can compute and giving rise to an inequality (we we call “expected separable overapproximation”) of the form (43). We derive such inequalities for all proper uniform samplings (Theorem 12) as well as refined results for two special subclasses thereof: doubly uniform samplings (Theorem 15) and nonoverlapping uniform samplings (Theorem 13). We will now give the definitions:
Doubly Uniform (DU) samplings. A DU sampling is one which generates all sets of equal cardinality with equal probability. That is, whenever . The name comes from the fact that this definition postulates a different uniformity property, “standard” uniformity is a consequence. Indeed, let us show that a DU sampling is necessarily uniform. Let for and note that from the definition we know that whenever is of cardinality , we have . Finally, using this we obtain
It is clear that each DU sampling is uniquely characterized by the vector of probabilities ; its density function is given by
Nonoverlapping Uniform (NU) samplings. A NU sampling is one which is uniform and which assigns positive probabilities only to sets forming a partition of . Let be a partition of , with for all . The density function of a NU sampling corresponding to this partition is given by
Note that .
Let us now describe several interesting special cases of DU and NU samplings:
Nice sampling. Fix . A -nice sampling is a DU sampling with .
Interpretation: There are processors/threads/cores available. At the beginning of each iteration we choose a set of blocks using a -nice sampling (i.e., each subset of blocks is chosen with the same probability), and assign each block to a dedicated processor/thread/core. Processor assigned with block would compute and apply the update . This is the sampling we use in our computational experiments.
Independent sampling. Fix . A -independent sampling is a DU sampling with
where and for .
Interpretation: There are processors/threads/cores available. Each processor chooses one of the blocks, uniformly at random and independently of the other processors. It turns out that the set of blocks selected this way is DU with as given above. Since in one parallel iteration of our methods each block in is updated exactly once, this means that if two or more processors pick the same block, all but one will be idle. On the other hand, this sampling can be generated extremely easily and in parallel! For this sampling is a good (and fast) approximation of the -nice sampling. For instance, for and we have , , and for .
Binomial sampling. Fix and . A -binomial sampling is defined as a DU sampling with
Notice that and .
Interpretation: Consider the following situation with independent equally unreliable processors. We have processors, each of which is at any given moment available with probability and busy with probability , independently of the availability of the other processors. Hence, the number of available processors (and hence blocks that can be updated in parallel) at each iteration is a binomial random variable with parameters and . That is, the number of available processors is equal to with probability .
Case 1 (explicit selection of blocks): We learn that processors are available at the beginning of each iteration. Subsequently, we choose blocks using a -nice sampling and “assign one block” to each of the available processors.
Case 2 (implicit selection of blocks): We choose blocks using a -nice sampling and assign one to each of the processors (we do not know which will be available at the beginning of the iteration). With probability , of these will send their updates. It is easy to check that the resulting effective sampling of blocks is -binomial.
Serial sampling. This is a DU sampling with . Also, this is a NU sampling with and for . That is, at each iteration we update a single block, uniformly at random. This was studied in .
Fully parallel sampling. This is a DU sampling with . Also, this is a NU sampling with and . That is, at each iteration we update all blocks.
The following simple result says that the intersection between the class of DU and NU samplings is very thin. A sampling is called vacuous if .
There are precisely two nonvacuous samplings which are both DU and NU: i) the serial sampling and ii) the fully parallel sampling.
Assume is nonvacuous, NU and DU. Since is nonvacuous, . Let be any set for which . If , then there exists of the same cardinality as having a nonempty intersection with . Since is doubly uniform, we must have . However, this contradicts the fact that is non-overlapping. Hence, can only generate sets of cardinalities or with positive probability, but not both. One option leads to the fully parallel sampling, the other one leads to the serial sampling. ∎
2 Technical results
For a given sampling and we let
The following simple result has several consequences which will be used throughout the paper.
Let and be any sampling. If , , and , for are real constants, thenSum over an empty index set will, for convenience, be defined to be zero.
Proof. We prove the first statement, proof of the remaining statements is essentially identical:
The consequences are summarized in the next theorem and the discussion that follows.
Let and be an arbitrary sampling. Further, let , and let be a block separable function, i.e., . Then
Moreover, the matrix is positive semidefinite.
Proof. Noting that , , , and
all five identities follow directly by applying Lemma 3. Finally, for any ,
The above results hold for arbitrary samplings. Let us specialize them, in order of decreasing generality, to uniform, doubly uniform and nice samplings.
Uniform samplings. If is uniform, then from (28) using we get
Plugging (33) into (28), (30), (31) and (32) yields
Doubly uniform samplings. Consider the case ; the case is trivial. For doubly uniform , is constant for :
Substituting (38) and (33) into (29) then gives
Nice samplings. Finally, if is -nice (and ), then and , which used in (39) gives
Moreover, assume that (this happens precisely when and ). Then for all ,
Expected Separable Overapproximation
Recall that given , in PCDM1 the next iterate is the random vector for a particular choice of . Further recall that in PCDM2,
again for a particular choice of . While in Section 2 we mentioned how is computed, i.e., that is the minimizer of (see (17) and (18)), we did not explain why is computed this way. The reason for this is that the tools needed for this were not yet developed at that point (as we will see, some results from Section 4 are needed). In this section we give an answer to this why question.
Given , after one step of PCDM1 performed with update we get . On the the other hand, after one step of PCDM2 we have
So, for both PCDM1 and PCDM2 the following estimate holds,
A good choice for to be used in the algorithms would be one minimizing the right hand side of inequality (42). At the same time, we would like the minimization process to be decomposable so that the updates , , could be computed in parallel. However, the problem of finding such is intractable in general even if we do not require parallelizability. Instead, we propose to construct/compute a “simple” separable overapproximation of the right-hand side of (42). Since the overapproximation will be separable, parallelizability is guaranteed; “simplicity” means that the updates can be computed easily (e.g., in closed form).
From now on we replace, for simplicity and w.l.o.g., the random vector by a fixed deterministic vector . We can thus remove conditioning in (42) and instead study the quantity . Further, fix . Note that if we can find and such that
we indeed find a simple separable overapproximation of :
where we recall from (18) that .
That is, (44) says that the expected objective value after one parallel step of our methods, if block is updated by , is bounded above by a convex combination of and . The natural choice of is to set
Note that this is precisely the choice we make in our methods. Since , both PCDM1 and PCDM2 are monotonic in expectation.
The above discussion leads to the following definition.
Let , and let be a proper uniform sampling. We say that admits a -ESO with respect to if inequality (43) holds for all . For simplicity, we write .
Inflation. If , then for and , .
Reshuffling. Since for any we have , one can “shuffle” constants between and as follows:
Strong convexity. If , then
Indeed, it suffices to take expectation in (14) with replaced by and compare the resulting inequality with (43) (this gives , which must hold for all ).
Recall that Step 5 of PCDM2 was introduced so as to explicitly enforce monotonicity into the method as in some situations, as we will see in Section 7, we can only analyze a monotonic algorithm. However, sometimes even PCDM1 behaves monotonically (without enforcing this behavior externally as in PCDM2). The following definition captures this.
Assume and let be as in (45). We say that the ESO is monotonic if , with probability 1, for all .
The following theorem will be useful in deriving ESO for uniform samplings (Section 6.1) and nonoverlapping uniform samplings (Section 6.2). It will also be useful in establishing monotonicity of some ESOs (Theorems 12 and 13).
Assume is partially separable (i.e., it can be written in the form (2)). Letting , for all we have
Proof. Let us fix and define . Fixing , we need to show that for , where . One can define functions in an analogous fashion from the constituent functions , which satisfy
Now, since depends on the intersection of and the support of its argument only, we have
The argument in the last expression can be written as a convex combination of vectors: the zero vector (with weight ) and the vectors (with weights ):
Finally, we plug (53) into (52) and use convexity and some simple algebra:
Besides the usefulness of the above result in deriving ESO inequalities, it is interesting on its own for the following reasons.
Block Lipschitz continuity of . The DSO inequality (48) is a generalization of (12) since (12) can be recovered from (48) by choosing with for .
Global Lipschitz continuity of . The DSO inequality also says that the gradient of is Lipschitz with Lipschitz constant with respect to the norm :
Indeed, this follows from (48) via . For this has been shown in ; our result for partially separable functions appears to be new.
Tightness of the global Lipschitz constant. The Lipschitz constant is “tight” in the following sense: there are functions for which cannot be replaced in (54) by any smaller number. We will show this on a simple example. Let with (blocks are of size 1). Note that we can write , and that . Let . We need to argue that there exists for which . Since we know that (otherwise (54) would not hold), all we need to show is that there is and for which
Since , where is the -th row of , we assume that each row of has at most nonzeros (i.e., is partially separable of degree ). Let us pick with the following further properties: a) is a 0-1 matrix, b) all rows of have exactly ones, c) all columns of have exactly the same number () of ones. Immediate consequences: for all , and . If we let be the vector of all ones and be the vector of all ones, and set , then
establishing (55). Using similar techniques one can easily prove the following more general result: Tightness also occurs for matrices which in each row contain identical nonzero elements (but which can vary from row to row).
2 ESO for a convex combination of samplings
Let be a collection of samplings and let be a probability vector. By we denote the sampling given by
This procedure allows us to build new samplings from existing ones. A natural interpretation of is that it arises from a two stage process as follows. Generating a set via is equivalent to first choosing with probability , and then generating a set via .
Let be arbitrary samplings, a probability vector and any function mapping subsets of to reals. If we let , then
,
,
, for any ,
If are uniform (resp. doubly uniform), so is .
Statement (i) follows by writing as
Statement (ii) follows from (i) by choosing , and (iii) follows from (i) by choosing as follows: if and otherwise. Finally, if the samplings are uniform, from (33) we know that for all and . Plugging this into identity (iii) shows that is independent of , which shows that is uniform. Now assume that are doubly uniform. Fixing arbitrary , for every such that we have
As the last expression depends on via only, is doubly uniform. ∎
If we fix and define if and otherwise, then statement (i) of Lemma8 reduces to (56).
All samplings arise as a combination of elementary samplings, i.e., samplings whose all weight is on one set only. Indeed, let be an arbitrary sampling. For all subsets of define by and let . Then clearly, .
All doubly uniform samplings arise as convex combinations of nice samplings.
Often it is easier to establish ESO for a simple class of samplings (e.g., nice samplings) and then use it to obtain an ESO for a more complicated class (e.g., doubly uniform samplings as they arise as convex combinations of nice samplings). The following result is helpful in this regard.
Let be uniform samplings satisfying and let be a probability vector. If is not nil, then
First note that from part (iv) of Lemma 8 we know that is uniform and hence it makes sense to speak about ESO involving this sampling. Next, we can write
It now remains to use (43) and part (ii) of Lemma 8:
where . In the third step we have also used the fact that which follows from the assumption that is not nil. ∎
3 ESO for a conic combination of functions
We now establish an ESO for a conic combination of functions each of which is already equipped with an ESO. It offers a complementary result to Theorem 9.
If for , then for any we have
Proof. Letting , we get
Expected Separable Overapproximation (ESO) of Partially Separable Functions
Here we derive ESO inequalities for partially separable smooth functions and (proper) uniform (Section 6.1), nonoverlapping uniform (Section 6.2), nice (Section 6.3) and doubly uniform (Section 6.4) samplings.
Consider an arbitrary proper sampling and let be defined by
Proof. Let us use Theorem 7 with replaced by . Note that . Taking expectations of both sides of (48) we therefore get
It remains to bound the last term in the expression above. Letting , we have
The above lemma will now be used to establish ESO for arbitrary (proper) uniform samplings.
If, in addition, (we say that is -uniform), then
First, (60) follows from (57) since for a uniform sampling one has for all . If , we get for all ; (61) therefore follows from (60). Let us now establish monotonicity. Using the deterministic separable overapproximation (48) with ,
Now let and recall that
So, by definition, minimizes and hence, (recall (7)) minimizes the upper bound (63). In particular, is better than a nil update, which immediately gives . ∎
Besides establishing an ESO result, we have just shown that, in the case of -uniform samplings with a conservative estimate for , PCDM1 is monotonic, i.e., . In particular, PCDM1 and PCDM2 coincide. We call the estimate “conservative” because it can be improved (made smaller) in special cases; e.g., for the -nice sampling. Indeed, Theorem 14 establishes an ESO for the -nice sampling with the same (), but with , which is better (and can be much better than) . Other things equal, smaller directly translates into better complexity. The price for the small in the case of the -nice sampling is the loss of monotonicity. This is not a problem for strongly convex objective, but for merely convex objective this is an issue as the analysis techniques we developed are only applicable to the monotonic method PCDM2 (see Theorem 19).
2 Nonoverlapping uniform samplings
Let be a (proper) nonoverlapping uniform sampling as defined in (23). If , for some , define
and let .
Note that, for example, if is the serial uniform sampling, then and for , whence for all . For the fully parallel sampling we have and , whence for all .
If a nonoverlapping uniform sampling, then
By Theorem 7, used with replaced by for , we get
Since with probability ,
which establishes (65). It now only remains to establish monotonicity. Adding to (66) with replaced by , we get . From this point on the proof is identical to that in Theorem 12, following equation (62). ∎
3 Nice samplings
In this section we establish an ESO for nice samplings.
If is the -nice sampling and , then
Proof. Let us fix and define and as in the proof of Theorem 7. Since
Let us now adopt the convention that expectation conditional on an event which happens with probability 0 is equal to 0. Letting , and using this convention, we can write
Note that the last identity follows if we assume, without loss of generality, that all sets have the same cardinality (this can be achieved by introducing “dummy” dependencies). Indeed, in such a case does not depend on . Now, for any for which (for some and hence for all), using convexity of , we can now estimate
If we now sum the inequalities (70) for all , we get
Finally, (68) follows after plugging (71) into (69):
4 Doubly uniform samplings
We are now ready, using a bootstrapping argument, to formulate and prove a result covering all doubly uniform samplings.
If is a (proper) doubly uniform sampling, then
Letting and , we have
This theorem could have alternatively been proved by writing as a convex combination of nice samplings and applying Theorem 9. ∎
Note that Theorem 15 reduces to that of Theorem 14 in the special case of a nice sampling, and gives the same result as Theorem 13 in the case of the serial and fully parallel samplings.
Iteration Complexity
In this section we prove two iteration complexity theoremsThe development is similar to that in for the serial block coordinate descent method, in the composite case. However, the results are vastly different.. The first result (Theorem 19) is for non-strongly-convex and covers PCDM2 with no restrictions and PCDM1 only in the case when a monotonic ESO is used. The second result (Theorem 20) is for strongly convex and covers PCDM1 without any monotonicity restrictions.
Let us first establish two auxiliary results.
For all , .
Let be an optimal solution of (1), and let . Then
If and , then for all ,
Part (i): Since we do not assume strong convexity, we have , and hence
Minimizing the last expression in gives ; the result follows. Part (ii): Letting , and , we have
The last inequality follows from the identity . ∎
We could have formulated part (ii) of the above result using the weaker assumption , leading to a slightly stronger result. However, we prefer the above treatment as it gives more insight.
The following lemma will be used to finish off the proof of the complexity result of this section.
Fix and let be a sequence of random vectors in with depending on only. Let be a nonnegative function and define . Lastly, choose accuracy level , confidence level , and assume that the sequence of random variables is nonincreasing and has one of the following properties:
, for all , where is a constant,
, for all such that , where is a constant.
If property (i) holds and we choose , or if property (ii) holds, and we choose , then .
This lemma was recently extended in so as to aid the analysis of a serial coordinate descent method with inexact updates, i.e., with chosen as an approximate rather than exact minimizer of (see (17)). While in this paper we deal with exact updates only, the results can be extended to the inexact case.
Assume that , where is a proper uniform sampling, and let . Choose satisfying
where is an optimal point of (1). Further, choose target confidence level , target accuracy level and iteration counter in any of the following two ways:
and
If , , are the random iterates of PCDM (use PCDM1 if the ESO is monotonic, otherwise use PCDM2), then .
Since either PCDM2 is used (which is monotonic) or otherwise the ESO is monotonic, we must have for all . In particular, in view of (75) this implies that . Letting , we have
Consider case (i) and let . Continuing with (78), we then get
for all . Since , it suffices to apply Lemma 18(i). Consider now case (ii) and let . Observe now that whenever , from (78) we get . By assumption, , and hence it remains to apply Lemma 18(ii). ∎
The important message of the above theorem is that the iteration complexity of our methods in the convex case is . Note that for the serial method (PCDM1 used with being the serial sampling) we have and (see Table 4), and hence . It will be interesting to study the parallelization speedup factor defined by
Table 5, computed from the data in Table 4, gives expressions for the parallelization speedup factors for PCDM based on a DU sampling (expressions for 4 special cases are given as well).
The speedup of the serial sampling (i.e., of the algorithm based on it) is 1 as we are comparing it to itself. On the other end of the spectrum is the fully parallel sampling with a speedup of . If the degree of partial separability is small, then this factor will be high — especially so if is huge, which is the domain we are interested in. This provides an affirmative answer to the research question stated in italics in the introduction.
Let us now look at the speedup factor in the case of a -nice sampling. Letting (degree of partial separability normalized), the speedup factor can be written as
Note that as long as , the speedup factor will be at least . Also note that . Finally, if a speedup of at least is desired, where , one needs to use at least processors. For illustration, in Figure 1 we plotted for a few values of . Note that for small values of , the speedup is significant and can be as large as the number of processors (in the separable case). We wish to stress that in many applications will be a constant independent of , which means that will indeed be very small in the huge-scale optimization setting.
2 Iteration complexity: strongly convex case
In this section we assume that is strongly convex with respect to the norm and show that converges to linearly, with high probability.
Assume is strongly convex with . Further, assume , where is a proper uniform sampling and let . Choose initial point , target confidence level , target accuracy level and
If are the random points generated by PCDM1 or PCDM2, then .
Proof. Letting , we have
Note that since and by (47). By taking expectation in , we obtain . Finally, it remains to use Markov inequality:
Instead of doing a direct calculation, we could have finished the proof of Theorem 20 by applying Lemma 18(ii) to the inequality . However, in order to be able to use Lemma 18, we would have to first establish monotonicity of the sequence , . This is not necessary using the direct approach of Theorem 20. Hence, in the strongly convex case we can analyze PCDM1 and are not forced to resort to PCDM2. Consider now the following situations:
. Then the leading term in (80) is .
. Then the leading term in (80) is .
is “large enough”. Then and the leading term in (80) is .
In a similar way as in the non-strongly convex case, define the parallelization speedup factor as the ratio of the leading term in (80) for the serial method (which has and ) and the leading term for a parallel method:
First, note that the speedup factor is independent of . Further, note that as , the speedup factor approaches the factor we obtained in the non-strongly convex case (see (79) and also Table 5). That is, for large values of , the speedup factor is approximately equal , which is the average number of blocks updated in a single parallel iteration. Note that thuis quantity does not depend on the degree of partial separability of .
Numerical Experiments
In Section 8.1 we present preliminary but very encouraging results showing that PCDM1 run on a system with 24 cores can solve huge-scale partially-separable LASSO problems with a billion variables in 2 hours, compared with 41 hours on a single core. In Section 8.2 we demonstrate that our analysis is in some sense tight. In particular, we show that the speedup predicted by the theory can be matched almost exactly by actual wall time speedup for a particular problem.
In this experiment we solve a single randomly generated huge-scale LASSO instance, i.e., (1) with
where has rows and columns. We generated the problem using a modified primal-dual generator enabling us to choose the optimal solution (and hence, indirectly, ) and thus to control its cardinality , as well as the sparsity level of . In particular, we made the following choices: , each column of has exactly 20 nonzeros and the maximum cardinality of a row of is (the degree of partial separability of ). The histogram of cardinalities is displayed in Figure 2.
We solved the problem using PCDM1 with -nice sampling , and , for , on a single large-memory computer utilizing of its 24 cores. The problem description took around 350GB of memory space. In fact, in our implementation we departed from the just described setup in two ways. First, we implemented an asynchronous version of the method; i.e., one in which cores do not wait for others to update the current iterate within an iteration before reading and proceeding to another update step. Instead, each core reads the current iterate whenever it is ready with the previous update step and applies the new update as soon as it is computed. Second, as mentioned in Section 4, the -independent sampling is for a very good approximation of the -nice sampling. We therefore allowed each processor to pick a block uniformly at random, independently from the other processors.
Choice of the first column of Table 6. In Table 6 we show the development of the gap as well as the elapsed time. The choice and meaning of the first column of the table, , needs some commentary. Note that exactly coordinate updates are performed after iterations. Hence, the first column denotes the total number of coordinate updates normalized by the number of coordinates . As an example, let and . Then if the serial method is run for iterations and the parallel one for iteration, both methods would have updated the same number () of coordinates; that is, they would “be” in the same row of Table 6. In summary, each row of the table represents, in the sense described above, the “same amount of work done” for each choice of .
Progress to solving the problem. One can conjecture that the above meaning of the phrase “same amount of work done” would perhaps be roughly equivalent to a different one: “same progress to solving the problem”. Indeed, it turns out, as can be seen from the table and also from Figure 3(a), that in each row for all algorithms the value of is roughly of the same order of magnitude. This is not a trivial finding since, with increasing , older information is used to update the coordinates, and hence one would expect that convergence would be slower. It does seem to be slower—the gap is generally higher if more processors are used—but the slowdown is limited. Looking at Table 6 and/or Figure 3(a), we see that for all choices of , PCDM1 managed to push the gap below after to coordinate updates.
The progress to solving the problem during the final 1 billion coordinate updates (i.e., when moving from the last-but-one to the last nonempty line in each of the columns of Table 6 showing ) is remarkable. The method managed to push the optimality gap by 9-12 degrees of magnitude. We do not have an explanation for this phenomenon; we do not give local convergence estimates in this paper. It is certainly the case though that once the method managed to find the nonzero places of , fast local convergence comes in.
Parallelization speedup. Since a parallel method utilizing cores manages to do the same number of coordinate updates as the serial one times faster, a direct consequence of the above observation is that doubling the number of cores corresponds to roughly halving the number of iterations (see Figure 3(b). This is due to the fact that and . It turns out that the number of iterations is an excellent predictor of wall time; this can be seen by comparing Figures 3(b) and 3(c). Finally, it follows from the above, and can be seen in Figure 3(d), that the speedup of PCDM1 utilizing cores is roughly equal to . Note that this is caused by the fact that the problem is, relative to its dimension, partially separable to a very high degree.
2 Theory versus reality
In our second experiment we demonstrate numerically that our parallelization speedup estimates are in some sense tight. For this purpose it is not necessary to reach for complicated problems and high dimensions; we hence minimize the function with . Matrix was generated so that its every row contains exactly non-zero values all of which are equal (recall the construction in point 3 at the end of Section 5.1).
We generated 4 matrices with and and measured the number of iterations needed for PCDM1 used with -nice sampling to get within of the optimal value. The experiment was done for a range of values of (between 1 core and 1000 cores).
The solid lines in Figure 4 present the theoretical speedup factor for the -nice sampling, as presented in Table 5. The markers in each case correspond to empirical speedup factor defined as
As can be seen in Figure 4, the match between theoretical prediction and reality is remarkable! A partial explanation of this phenomenon lies in the fact that we have carefully designed the problem so as to ensure that the degree of partial separability is equal to the Lipschitz constant of (i.e., that it is not a gross overestimation of it; see Section 5.1). This fact is useful since it is possible to prove complexity results with replaced by . However, this answer is far from satisfying, and a deeper understanding of the phenomenon remains an open problem.
3 Training linear SVMs with bad data for PCDM
In this experiment we test PCDM on the problem of training a linear Support Vector Machine (SVM) based on labeled training examples: , . In particular, we consider the primal problem of minimizing L2-regularized average hinge-loss,
and the dual problem of maximizing a concave quadratic subject to zero-one box constraints,
where with . It is a standard practice to apply serial coordinate descent to the dual. Here we apply parallel coordinate descent (PCDM; with -nice sampling of coordinates) to the dual; i.e., minimize the convex function subject to box constraints. In this setting all blocks are of size . The dual can be written in the form (1), i.e.,
where whenever for all , and otherwise.
We consider the rcv1.binary datasethttp://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html#rcv1.binary. The training data has examples, features, nonzero elements and requires cca 1GB of RAM for storage. Hence, this is a small-scale problem. The degree of partial separability of is (i.e., the maximum number of examples sharing a given feature). This is a very large number relative to , and hence our theory would predict rather bad behavior for PCDM. We use PCDM1 with -nice sampling ( approximating it by -independent sampling for added efficiency) with following Theorem 14: .
The results of our experiments are summarized in Figure 5. Each column corresponds to a different level of regularization: . The rows show the 1) duality gap, 2) dual suboptimality, 3) train error and 4) test error; each for 1,4 and 16 processors (). Observe that the plots in the first two rows are nearly identical; which means that the method is able to solve the primal problem at about the same speed as it can solve the dual problemRevision comment: We did not propose primal-dual versions of PCDM in this paper, but we do so in the follow up work . In this paper, for the SVM problem, our methods and theory apply to the dual only..
Observe also that in all cases, duality gap of around is sufficient for training as training error (classification performance of the SVM on the train data) does not decrease further after this point. Also observe the effect of on training accuracy: accuracy increases from about for , through for to above with . In our case, choosing smaller does not lead to overfitting; the test error on test dataset (# features =677,399, # examples = 20,242) increases as decreases, quickly reaching about (after 2 seconds of training) for and for the smallest going beyond .
Note that PCDM with is about 2.5 faster than PCDM with . This is much less than linear speedup, but is fully in line with our theoretical predictions. Indeed, for we get . Consulting Table 5, we see that the theory says that with processors we should expect the parallelization speedup to be .
4 L2𝐿2L2-regularized logistic regression with good data for PCDM
In our last experiment we solve a problem of the form (1) with being a sum of logistic losses and being an L2 regularizer,
where , , are labeled examples.
We have used the the KDDB dataset from the same source as the rcv1.binary dataset considered in the previous experiment. The data contains features and is divided into two parts: a training set with examples (and nonzeros; cca 8.5 GB) and a testing with examples (and nonzeros; cca 0.32 GB).
This training dataset is good for PCDM as each example depends on at most 75 features. That is, , which is much smaller than . As before, we will use PCDM1 with -nice sampling (approximated by -independent sampling) for and set .
Figure 6 depicts the evolution of the regularized loss throughout the run of the 4 versions of PCDM (starting with for which ). Each marker corresponds to approximately coordinate updates ( coordinate updates will be referred to as an “epoch”). Observe that as more processors are used, it takes less time to achieve any given level of loss; nearly in exact proportion to the increase in the number of processors.
Table 7 offers an alternative view of the same experiment. In the first 4 columns () we can see that no matter how many processors are used, the methods produce similar loss values after working through the same number of coordinates. However, since the method utilizing processors updates 8 coordinates in parallel, it does the job approximately 8 times faster. Indeed, we can see this speedup in the table.
Let us remark that the training and testing accuracy stopped increasing after having trained the classifier for 1 epoch; they were and , respectively. This is in agreement with the common wisdom in machine learning that training beyond a single pass through the data rarely improves testing accuracy (as it may lead to overfitting). This is also the reason behind the success of light-touch methods, such as coordinate descent and stochastic gradient descent, in machine learning applications.