On Optimal Probabilities in Stochastic Coordinate Descent Methods
Peter Richtárik, Martin Takáč
Introduction
In this work we consider the optimization problem
where is strongly convex and smooth. We propose a new algorithm, and call it ‘NSync (Nonuniform SYNchronous Coordinate descent).
In ‘NSync, we first assign a probability to every subset of , with , and pick stepsize parameters , . At every iteration, a random set is generated, independently from previous iterations, following the law , and then coordinates are updated in parallel by moving in the direction of the negative partial derivative with stepsize . The updates are synchronized: no processor/thread is allowed to proceed before all updates are applied, generating the new iterate . We specifically study samplings which are non-uniform in the sense that is allowed to vary with . By we mean , where is the -th unit coordinate vector.
Serial stochastic coordinate descent methods were proposed and analyzed in , and more recently in various settings in . Parallel methods were considered in , and more recently in . A memory distributed method scaling to big data problems was recently developed in . A nonuniform coordinate descent method updating a single coordinate at a time was proposed in , and one updating two coordinates at a time in . To the best of our knowledge, ‘NSync is the first nonuniform parallel coordinate descent method.
Analysis
Our analysis of ‘NSync is based on two assumptions. The first assumption generalizes the ESO concept introduced in and later used in to nonuniform samplings. The second assumption requires that be strongly convex.
Notation: For we write , , and . For and , let .
Assume and that for some positive vector and all ,
Inequalities of type (2), in the uniform case ( for all ), were studied in .
We assume that is -strongly convex with respect to the norm , where and . That is, we require that for all ,
We can now establish a bound on the number of iterations sufficient for ‘NSync to approximately solve (1) with high probability.
Let Assumptions 1 and 2 be satisfied. Choose , and , where . Let
If are the random iterates generated by ‘NSync, then
Moreover, we have the lower bound .
We first claim that is -strongly convex with respect to the norm , i.e.,
where . Indeed, this follows by comparing (3) and (6) in the light of (4). Let be such that . Using (6) with ,
Let . Then , and utilizing Assumption 1, we get
Taking expectations in the last inequality and rearranging the terms, we obtain . Using this, Markov inequality, and the definition of , we finally get . Let us now establish the last claim. First, note that (see [16, Sec 3.2] for more results of this type),
Letting , we have
where the last equality follows since optimal is proportional to . ∎
Theorem 3 is generic in the sense that we do not say when Assumptions 1 and 2 are satisfied, how should one go about to choose the stepsizes and probabilities . In the next section we address these issues. On the other hand, this abstract setting allowed us to write a brief complexity proof.
Change of variables. Consider the change of variables , where . Defining , we get . It can be seen that (2), (3) can equivalently be written in terms of , with replaced by and replaced by . By choosing , we obtain for all , recovering standard strong convexity.
Nonuniform samplings and ESO
Consider now problem (1) with of the form
where . Note that Assumption 2 is satisfied. We further make the following two assumptions.
has Lipschitz gradient with respect to the coordinates, with positive constants . That is, for all and .
, where is a finite collection of nonempty subsets of and are differentiable convex functions such that depends on coordinates only. Let . We say that is separable of degree .
Uniform parallel coordinate descent methods for regularized problems with of the above structure were analyzed in .
Let , where . Then and , whence is the maximum # of nonzeros in a row of .
Instead of considering the general case of arbitrary assigned to all subsets of , here we consider a special kind of sampling having two advantages: i) sets can be generated easily, ii) it leads to larger stepsizes and hence improved convergence rate. Fix and and let be a collection of (possibly overlapping) subsets of such that for all and . Moreover, let be a probability vector. Let be -nice sampling from ; that is, picks subsets of having cardinality , uniformly at random. We assume these samplings are independent. Now, is generated as follows. We first pick with probability , and then draw . Note that we do not need to compute the quantities , , to execute ‘NSync. In fact, it is much easier to implement the sampling via the two-tier procedure explained above. Sampling is a nonuniform variant of the -nice sampling studied in , which here arises as a special case for . Note that
where if , and otherwise.
Let Assumptions 4 and 5 be satisfied, and let be the sampling described above. Then Assumption 1 is satisfied with given by (12) and any for which
where .
Since is separable of degree , so is (because is separable). Now,
where the last inequality follows from the ESO for -nice samplings established in [16, Theorem 15]. The claim now follows by comparing the above expression and (2). ∎
Optimal probabilities
Observe that formula (13) can be used to design a sampling (characterized by the sets and probabilities ) that minimizes , which in view of Theorem 3 optimizes the convergence rate of the method.
Serial setting. Consider the serial version of ‘NSync (). We can model this via , with and for all . In this case, using (12) and (13), we get . Minimizing in (4) over the probability vector gives the optimal probabilities (we refer to this as the optimal serial method) and optimal complexity
respectively. Note that the uniform sampling, for all , leads to (we call this the uniform serial method), which can be much larger than . Moreover, under the change of variables , the gradient of has coordinate Lipschitz constants , while the weights in (11) change to . Hence, the condition numbers can not be improved via such a change of variables.
Optimal serial method can be faster than the fully parallel method. To model the fully parallel setting (i.e., the variant of ‘NSync updating all coordinates at every iteration), we can set and , which yields . Since , it is clear that . However, for large enough it will be the case that , implying, surprisingly, that the optimal serial method can be faster than the fully parallel method.
Parallel setting. Fix and sets , , and define . Consider running ‘NSync with stepsizes (note that , so we are fine). From (4), (12) and (13) we see that the complexity of ‘NSync is determined by
The probability vector minimizing this quantity can be computed by solving a linear program with variables (), linear inequality constraints and a single linear equality constraint:
where , , are given by .
Experiments
We now conduct 2 preliminary small scale experiments to illustrate the theory; the results are depicted below. All experiments are with problems of the form (11) with chosen as in Example 6.
In the left plot we chose , , , for and for all . We compare the US method (, blue) with the OS method ( given by (16), red). The dashed lines show 95% confidence intervals (we run the methods 100 times, the line in the middle is the average behavior). While OS can be faster, it is sensitive to over/under-estimation of the constants . In the right plot we show that a nonuniform serial (NS) method can be faster than the fully parallel (FP) variant (we have chosen , and 3 values of ). On the horizontal axis we display the number of epochs, where 1 epoch corresponds to updating coordinates (for FP this is a single iteration, whereas for NS it corresponds to iterations).