Fast Distributed Coordinate Descent for Non-Strongly Convex Losses
Olivier Fercoq, Zheng Qu, Peter Richtárik, Martin Takáč
Introduction
In this paper we are concerned with solving regularized convex optimization problems in huge dimensions in cases when the loss being minimized is not strongly convex. That is, we consider the problem
For examples of regularizers and loss functions satisfying the above assumptions, relevant to machine learning applications, we refer the reader to .
It is increasingly the case in modern applications that the data describing the problem (encoded in and in the above model) is so large that it does not fit into the RAM of a single computer. In such a case, unless the application at hand can tolerate slow performance due to frequent HDD reads/writes, it is often necessary to distribute the data among the nodes of a cluster and solve the problem in a distributed manner.
While efficient distributed methods exist in cases when the regularized loss is strongly convex (e.g., Hydra ), here we assume that is not strongly convex. Problems of this type arise frequently: for instance, in the SVM dual, is typically a non-strongly convex quadratic, is the number of examples, is the number of features, encodes the data, and is a - indicator function encoding box constraints (e.g., see ). If , then will not be strongly convex.
In this paper we propose “Hydra2” (Hydra “squared”; Algorithm 1) – the first distributed stochastic coordinate descent (CD) method with fast convergence rate for our problem. The method can be seen both as a specialization of the APPROX algorithm to the distributed setting, or as an accelerated version of the Hydra algorithm (Hydra converges as for our problem). The core of the paper forms the development of new stepsizes, and new efficiently computable bounds on the stepsizes proposed for distributed CD methods in . We show that Hydra2 is able to solve a big data problem with equal to 50 billion.
The Algorithm
Assume we have nodes/computers available. In Hydra2 (Algorithm 1), the coordinates are first partitioned into sets , each of size . The columns of are partitioned accordingly, with those belonging to partition stored on node . During one iteration, all computers , in parallel, pick a subset of coordinates from those they own, i.e., from , uniformly at random, where is a parameter of the method (Step 6). From now on we denote by the union of all these sets, , and refer to it by the name distributed sampling.
The main work is done in Step 8 where the update scalars are computed. This step is a proximal forward-backward operation similar to what is to be done in FISTA but we only compute the proximal operator for the coordinates in .
The partial derivatives are computed at . For the algorithm to be efficient, the computation should be performed without computing the sum . As shown in , this can be done for functions of the form
where for all , is a one-dimensional differentiable (convex) function. Indeed, let be the set of such for which . Assume we store and update and , then
The average cost for this computation is , i.e., each processor needs to access the elements of only one column of the matrix .
Steps 8 and 9 depend on a deterministic scalar sequence , which is being updated in Step 12 as in . Note that by taking for all , remains equal to 0, and Hydra2 reduces to Hydra .
The output of the algorithm is . We only need to compute this vector sum at the end of the execution and when we want to track . Note that one should not evaluate and at each iteration since these computations have a non-negligible cost.
Convergence rate
where is a diagonal matrix with diag. elements and is the distributed sampling described above.
The above ESO assumption involves the smooth function , the sampling and the parameters . It has been first introduced by Richtárik and Takáč for proposing a generic approach in the convergence analysis of the Parallel Coordinate Descent Methods (PCDM). Their generic approach boils down the convergence analysis of the whole class of PCDMs to the problem of finding proper parameters which make the ESO assumption hold. The same idea has been extended to the analysis of many variants of PCDM, including the Accelerated Coordinate Descent algorithm (APPROX) and the Distributed Coordinate Descent method (Hydra).
In particular, the following complexity result, under the ESO assumption 3.1, can be deduced from [4, Theorem 3] using Markov inequality:
Choose and and
Then under Assumption 3.1, the iterates of Algorithm 1 satisfy
The bound on the number of iterations in (4) suggests to choose the smallest possible satisfying the ESO assumption 3.1.
New Stepsizes
In this section we propose new stepsize parameters for which the ESO assumption is satisfied.
Let be the number of nonzeros in the th row of and be the number of “partitions active at row ”, i.e., the number of indexes for which the set is nonempty. Note that since does not have an empty row or column, we know that and . Moreover, we have the following characterization of these two quantities. For notational convenience we denote for all .
Let , then and by Cauchy-Schwarz we have
Equality is reached when for some constant for all (this is feasible since the subsets are disjoint). Hence, we proved (6). The characterization (5) follows from (6) by setting . ∎
where , , .
Below is the main result of this section.
For a convex differentiable function satisfying (2) and a distributed sampling described in Section 2, the ESO assumption 3.1 is satisfied for
Existing Stepsizes and New Bounds
We now desribe stepsizes previously suggested in the literature. For simplicity, let . Define:
The quantities and are identical to those defined in (although the definitions are slightly different). The following stepsize parameters have been introduced in :
where and
In general, the computation of and can be done using the Power iteration method . However, the number of operations required in each iteration of the Power method is at least twice as the number of nonzero elements in . Hence the only computation of the parameters and would already require quite a few number of passes through the data. Instead, if one could provide some easily computable upper bound for and , where by ’easily computable’ we mean computable by only one pass through the data, then we can run Algorithm 1 immediately without spending too much time on the computation of and . Note that the ESO assumption will still hold when and in (13) are replaced by some upper bounds.
In , the authors established the following bound
which is independent of the partition . This bound holds for . Further, they showed that
Then in view of (15), (16) and Lemma 5.1, the ESO assumption 3.1 is also satisfied for the following easily computable parameters:
2 Improved bounds on existing stepsizes
In what follows, we show that both (15) and (16) can be improved so that smaller parameters are allowed in the algorithm.
Suppose (note that then ). For all the following holds
Both sides of the inequality are linear functions of . It therefore suffices to verify that the inequality holds for and , which can be done. ∎
The following result is an improvement on (15), which was shown in [3, Lemma 2].
If , then .
We only need to apply Lemma 5.2 to (14) with , and additionally use the bound . This gives , from which the result follows. ∎
The above lemma leads to an important insight: as long as , the effect of partitioning the data (across the nodes) on the iteration complexity of Hydra2 is negligible, and vanishes as increases.
Indeed, consider the complexity bound provided by stepsizes given in (13), used within Theorem 3.2 and note that the effect of the partitioning on the complexity is through only (which is not easily computable!), which appears in only. However, by the above lemma, for any partitioning (to sets each containing coordinates). Hence, i) each partitioning is near-optimal and ii) one does not even need to know to run the method as it is enough to use stepsizes with replaced by the upper bound provided by Lemma 5.3.
Note that the same reasoning can be applied to the Hydra method since the same stepsizes can be used there. Also note that for the effect of partitioning can have a dramatic effect on the complexity.
Applying the same reasoning to the new stepsizes we can show that for all . This is not as useful as Lemma 5.3 since does not need to be approximated ( is easily computable).
We next give a tighter upper bound on than (16).
The rest follows from the definition of . ∎
By combining Lemma 5.1, Lemma 5.3 and Lemma 5.4, we obtain the following smaller (compared to (17)) admissible and easily computable stepsize parameters:
Comparison of old and new stepsizes
So far we have seen four different admissible stepsize parameters, some old and some new. For ease of reference, let us call the new parameters defined in (8), the existing one given in (see (13)), the upper bound of used in (see (17)) and the new upper bound of defined in (20).
In the next result we compare the four stepsizes. The lemma implies that and are uniformly smaller (i.e., better – see Theorem 3.2) than and . However, involves quantities which are hard to compute (e.g., ). Moreover, is always smaller than .
Let . The following holds for all :
Proof. We only need to show that , the other relations are already proved. It follows from (19) that
Now, for all , we can write
Note that we do not have a simple relation between and . Indeed, for some coordinates the new stepsize parameters could be smaller than , see Figure 1. in the next section for an illustration.
Numerical Experiments
In this section we present preliminary computational results involving real and synthetic data sets. In particular, we first compare the relative benefits of the 4 stepsize rules, and then demonstrate that Hydra2 can significantly outperform Hydra on a big data non-strongly convex problem involving 50 billion variables.
The experiments were performed on two problems:
Dual of SVM: This problem can be formulated as finding that minimizes
The computation were performed on Archer (http://archer.ac.uk/), which is UK’s leading supercomputer.
In this section we compare the four different stepsize parameters and show how they influence the convergence of Hydra2 . In the experiments of this section we used the astro-ph dataset.Astro-ph is a binary classification problem which consists of abstracts of papers from physics. The dataset consists of samples and the feature space has dimension . Note that for the SVM dual problem, coordinates correspond to samples whereas for the LASSO problem, coordinates correspond to features. The problem that we solve is the SVM dual problem (for more details, see ).
Figure 1 plots the values of , , and for in and . The dataset we consider is normalized (the diagonal elements of are all equal to 1), and the parameters are equal to a constant for all (the same holds for and ). Recall that according to Theorem 3.2, a faster convergence rate is guaranteed if smaller (but theoretically admissible) stepsize parameters are used. Hence it is clear that and are better choices than and . However, as we mentioned, computing the parameters would require a considerable computational effort, while computing is as easy as passing once through the dataset. For this relatively small dataset, the time is about 1 minute for computing and less than 1 second for .
In order to investigate the benefit of the new stepsize parameters, we solved the SVM dual problem on the astro-ph dataset for . Figure 2 shows evolution of the duality gap, obtained by using the four stepsize parameters mentioned previously. We see clearly that smaller stepsize parameters lead to faster convergence, as predicted by Theorem 3.2. Moreover, using our easily computable new stepsize parameters , we achieve comparable convergence speed with respect to the existing parameters .
2 Hydra2 vs Hydra
In this section, we report experimental results comparing Hydra with Hydra2 on a synthetic big data LASSO problem. We generated a sparse matrix having the same block angular structure as the one used in [3, Sec 7.], with billion, , (note that ) and . The average number of nonzero elements per row of (i.e., ) is , and the maximal number of nonzero elements in a row of (i.e., ) is . The dataset size is TB.
We have used 128 physical nodes of the ARCHER www.archer.ac.uk supercomputing facility, which is based on Cray XC30 compute nodes connected via Aries interconnect. On each physical node we have run two MPI processes – one process per NUMA (NonUniform Memory Access) region. Each NUMA region has 2.7 GHz, 12-core E5-2697 v2 (Ivy Bridge) series processor and each core supports 2 hardware threads (Hyperthreads). In order to minimize communication we have chosen (hence each thread computed an update for 8,138 coordinates during one iteration, on average).
We show in Figure 4 the decrease of the error with respect to the number of iterations, plotted in log scale. It is clear that Hydra2 provides faster iteration convergence rate than Hydra. Moreover, we see from Figure 4 that the speedup in terms of the number of iterations is significantly large so that Hydra2 converges faster in time than Hydra even though the run time of Hydra2 per iteration is on average two times more expensive.