# On optimal probabilities in stochastic coordinate descent methods

- First Online:

- Received:
- Accepted:

DOI: 10.1007/s11590-015-0916-1

- Cite this article as:
- Richtárik, P. & Takáč, M. Optim Lett (2016) 10: 1233. doi:10.1007/s11590-015-0916-1

- 3 Citations
- 966 Downloads

## Abstract

We propose and analyze a new parallel coordinate descent method—NSync—in which at each iteration a random subset of coordinates is updated, in parallel, allowing for the subsets to be chosen using an *arbitrary probability law*. This is the first method of this type. We derive convergence rates under a strong convexity assumption, and comment on how to assign probabilities to the sets to optimize the bound. The complexity and practical performance of the method can outperform its uniform variant by an order of magnitude. Surprisingly, the strategy of updating a single randomly selected coordinate per iteration—with optimal probabilities—may require less iterations, both in theory and practice, than the strategy of updating all coordinates at every iteration.

### Keywords

Coordinate descentArbitrary samplingFirst order methodComplexity## 1 Introduction

*arbitrary probability law (sampling)*to be used for this.

### 1.1 The algorithm

*every subset*

*S*of the set of coordinates \([n]:=\{1,\dots ,n\}\), with

*i*th unit coordinate vector.

*arbitrary*sampling \(\hat{S}\). In particular, \(\hat{S}\) can be

*non-uniform*in the sense that the probability that coordinate

*i*is chosen,

*i*.

### 1.2 Literature

Serial stochastic coordinate descent methods were proposed and analyzed in [8, 15, 20, 23], and more recently in various settings in [4, 9–11, 14, 24, 26, 29]. Parallel methods were considered in [2, 19, 21], and more recently in [1, 5, 6, 12, 13, 25, 27, 28]. A memory distributed method scaling to big data problems was recently developed in [22]. A nonuniform coordinate descent method updating a single coordinate at a time was proposed in [20], and one updating two coordinates at a time in [14].

NSync is the first randomized method in the literature which is capable of updating a subset of the coordinates without any restrictions, i.e., according to an *arbitrary probability law*, except for the necessary requirement that \(p_i>0\) for all *i*. In particular, NSync is the first *nonuniform parallel coordinate descent method.*

In the time between the first online appearance of this work on arXiv (October 2013; arXiv:1310.3438), and the time this paper went to press, this work led to a number of extensions [3, 7, 16–18]. All of these papers share the defining feature of NSync, namely, its ability to work with an *arbitrary probability law* defining the selection of the active coordinates in each iteration. These works also utilize the nonuniform ESO assumption introduced here (Assumption 1), as it appears to be key in the study of such methods.

## 2 Analysis

In this section we provide a complexity analysis of NSync.

### 2.1 Assumptions

Our analysis of NSync is based on two assumptions. The first assumption generalizes the ESO concept introduced in [21] and later used in [5, 6, 22, 27, 28] to *nonuniform* samplings. The second assumption requires that \(\phi \) be strongly convex.

*Notation* For \(x,y,u \in \mathbf {R}^n\) we write \(\Vert x\Vert _u^2 :=\sum _i u_i x_i^2\), \(\langle x, y\rangle _u :=\sum _{i=1}^n u_i y_i x_i\), \(x \bullet y :=(x_1 y_1, \dots , x_n y_n)\) and \(u^{-1} :=(1/u_1,\dots ,1/u_n)\). For \(S\subseteq [n]\) and \(h\in \mathbf {R}^n\), let \(h_{[S]} :=\sum _{i\in S} h_i e^i\).

**Assumption 1**

*Nonuniform ESO: Expected Separable Overapproximation*) Assume that \(p=(p_1,\dots ,p_n)^T>0\) and that for some positive vector \(w\in \mathbf {R}^n\) and all \(x,h \in \mathbf {R}^n\), the following inequality holds:

As soon as \(\phi \) has a Lipschitz continuous gradient, then for *every random sampling*\(\hat{S}\) there exist positive weights \(w_1,\dots ,w_n\) such that Assumption 1 holds. In this sense, the assumption is not restrictive. Inequalities of the type (2), in the *uniform* case (\(p_i=p_j\) for all *i*, *j*), were studied in [6, 21, 22, 27]. Motivated by the introduction of the nonuniform ESO assumption in this paper, and the development in Sect. 3 of our work, an entire paper was recently written, dedicated to the study of nonuniform ESO inequalities [16].^{1}

We now turn to the second and final assumption.

**Assumption 2**

*Strong convexity*) We assume that \(\phi \) is \(\gamma \)-strongly convex with respect to the norm \(\Vert \cdot \Vert _{v}\), where \(v=(v_1,\dots ,v_n)^T>0\) and \(\gamma >0\). That is, we require that for all \(x,h \in \mathbf {R}^n\),

### 2.2 Complexity

We can now establish a bound on the number of iterations sufficient for NSync to approximately solve (1) with high probability. We believe it is remarkable that the proof is very concise.

**Theorem 3**

*Proof*

*K*, we finally get

Theorem 3 is generic in the sense that we do not say when Assumption 1 is satisfied and how should one go about choosing the stepsizes \(\{w_i\}\) and probabilities \(\{p_S\}\). In the next section we address these issues. On the other hand, this abstract setting allowed us to write a brief complexity proof.

The quantity \(\Lambda \), defined in (4), can be interpreted as a *condition number* associated with the problem and our method. Hence, as we vary the distribution of \(\hat{S}\), \(\Lambda \) will vary. It is clear intuitively that \(\Lambda \) can be arbitrarily bad. Indeed, by choosing a sampling \(\hat{S}\) which “nearly” ignores one or more of the coordinates (by setting \(p_i\approx 0\) for some *i*), we should expect the number of iterations to grow as the method will necessarily be very slow in updating these coordinates.

In the light of this, inequality (6) is useful as it gives a useful expression for bounding \(\Lambda \) from below.

### 2.3 Change of variables

Consider the change of variables \(y={{\mathrm{Diag}}}(d) x\), where \(d>0\). Defining \(\phi ^d(y):=\phi (x)\), we get \(\nabla \phi ^d(y) = ({{\mathrm{Diag}}}(d))^{-1}\nabla \phi (x)\). It can be seen that (2), (3) can equivalently be written in terms of \(\phi ^d\), with *w* replaced by \(w^d :=w \bullet d^{-2}\) and *v* replaced by \(v^d :=v \bullet d^{-2}\). By choosing \(d_i=\sqrt{v_i}\), we obtain \(v^d_i=1\) for all *i*, recovering standard strong convexity.

## 3 Nonuniform samplings and ESO

In this section we consider a problem with *standard* assumptions and show that the (admittedly nonstandard) ESO assumption, Assumption 1, is satisfied.

**Assumption 4**

*Smoothness*) Function

*f*has Lipschitz gradient with respect to the coordinates, with positive constants \(L_1,\dots ,L_n\). That is,

**Assumption 5**

*Partial separability*) Function

*f*has the form

*n*] and \(f_J\) are differentiable convex functions such that \(f_J\) depends on coordinates \(i\in J\) only. Let \(\omega :=\max _{J} |J|\). We say that

*f*is

*separable of degree*\(\omega \).

*Uniform* parallel coordinate descent methods for regularized problems with *f* of the above structure were analyzed in [21].

*Example 1*

*i*th column of

*A*, \(A_{j:}\) is the

*j*th row of

*A*and \(\Vert \cdot \Vert \) is the standard L2 norm. Then \(\omega \) is the maximum # of nonzeros in a row of

*A*.

*Nonuniform sampling* Instead of considering the general case of arbitrary \(p_S\) assigned to all subsets of [*n*], here we consider a special kind of sampling having two advantages: (i) sets can be generated easily, (ii) it leads to larger stepsizes \(1/w_i\) and hence improved convergence rate.

*n*] such that

Note that we do not need to compute the quantities \(p_S\), \(S\subseteq [n]\), to execute NSync. In fact, it is much easier to implement the sampling via the two-tier procedure explained above. Sampling \(\hat{S}\) is a nonuniform variant of the \(\tau \)-nice sampling studied in [21], which here arises as a special case for \(c=1\).

In our next result we show that Assumption 1 is satisfied for *f* and the sampling described above.

**Theorem 6**

*p*given by (11) and any \(w=(w_1,\dots ,w_n)^T\) for which

*Proof*

*f*is separable of degree \(\omega \), so is \(\phi \) (because \(\frac{1}{2}\Vert x\Vert _v^2\) is separable). Now,

## 4 Optimal probabilities

Observe that the formula (12) can be used to *design* a sampling (characterized by the sets \(S_j\) and probabilities \(q_j\)) that *maximizes*\(\mu \), which in view of Theorem 3*optimizes the convergence rate* of the method.

### 4.1 Serial setting

*p*gives the

*optimal probabilities*(we refer to this as the

*optimal serial*method)

*optimal complexity*

*uniform sampling*, defined by \(p_i=1/n\) for all \(i\in [n]\), leads to

*uniform serial*method.

Moreover, the condition numbers \(L_i/v_i\) can not be improved via such a change of variables. Indeed, under the change of variables \(y={{\mathrm{Diag}}}(d)x\), the gradient of \(f^d(y):=f({{\mathrm{Diag}}}(d^{-1})y)\) has coordinate Lipschitz constants \(L_i^d = L_i/d_i^2\), while the weights in (10) change to \(v_i^d = v_i/d_i^2\).

### 4.2 Optimal serial method can be faster than the fully parallel method

*all*coordinates at every iteration), we can set \(c=1\) and \(\tau =n\), which yields

### 4.3 Parallel setting

*q*minimizing this quantity can be computed by solving a linear program with \(c+1\) variables (\(q_1,\dots ,q_c,\alpha \)), 2

*n*linear inequality constraints and a single linear equality constraint:

## 5 Experiments

*f*chosen as in Example 1.

In the *left plot* we chose \(A\in \mathbf {R}^{2\times 30}\), \(\gamma =1\), \(v_1=0.05\), \(v_i=1\) for \(i\ne 1\) and \(L_i=1\) for all *i*. We compare the US method (\(p_i = 1/n\), blue) with the OS method [\(p_i\) given by (13), 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 \(L_i,v_i\). In the *right plot* we show that a nonuniform serial (NS) method can be faster than the fully parallel (FP) variant (we have chosen \(m=8\), \(n=10\) and three values of \(\omega \)). On the horizontal axis we display the number of epochs, where one epoch corresponds to updating *n* coordinates (for FP this is a single iteration, whereas for NS it corresponds to *n* iterations).

*w*for which (2) holds, under an assumption that is slightly weaker than Lipschitz continuity of the gradient of \(\phi \). In particular, they study functions \(\phi \) admitting the global quadratic upper bound

*i*th column of

*A*. Moreover, as long as \(\mathbf {Prob}(|\hat{S}|\le \tau )=1\) for some \(\tau \), then (2) holds for \(w_i=\tau \Vert A_{:i}\Vert ^2\). However, this choice of parameters is rather conservative. The goal of [16] is to give explicit and tight formulas for

*w*, where hopefully \(w_i\) will be much smaller than \(\tau \Vert A_{:i}\Vert ^2\), utilizing specific properties of the sampling \(\hat{S}\) and data matrix

*A*.

## Acknowledgments

This work appeared on arXiv in October 2013 (arXiv:1310.3438). P. Richtárik and M. Takáč were partially supported by the Centre for Numerical Algorithms and Intelligent Software (funded by EPSRC grant EP/G036136/1 and the Scottish Funding Council). The second author also acknowledge support from the EPSRC Grant EP/K02325X/1, Accelerated Coordinate Descent Methods for Big Data Optimization.

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.