Linearly convergent stochastic heavy ball method for minimizing generalization error

Nicolas Loizou, Peter Richtárik

Introduction

In this paper we study the stochastic optimization problem:

In , the authors consider solving (1) via stochastic gradient descent (SGD)

where ω>0\omega>0 is a fixed stepsize and Sk{\bf S}_{k} is sampled afresh in each iteration from D{\cal D}. It is shown that, SGD converges to an x∗x_{*} which satisfies

where x0x_{0} is the starting point. It was observed that, surprisingly, SGD is in this setting equivalent to the stochastic (pseudo)-Newton method, and the stochastic proximal point method, and that it converges at a linear rate despite the following obstacles: ff is not necessarily strongly convex, (1) is not a finite-sum problem, and a fixed stepsize ω\omega is used.

In this paper we take an alternative route, and develop a stochastic variant of the heavy ball method for solving the stochastic optimization problem (1). Applied to (1), the classical heavy ball method of Polyak , with constant stepsize ω>0\omega>0 and constant momentum parameter β≥0\beta\geq 0, takes the form

This method introduces the momentum term β(xk−xk−1)\beta(x_{k}-x_{k-1}) into the gradient descent method to achieve acceleration.

Our stochastic variant of the heavy ball method, which we henceforth simply refer to by the name stochastic heavy ball method (SHB), replaces the (costly) computation of the gradient by an unbiased estimator of the gradient (“stochastic gradient”) which is hopefully much cheaper to compute:

2 Related Work

Stochastic variants of heavy ball method have been employed widely in practice, especially in the area of deep learning . Despite the popularity of the method both in convex and non-convex optimization its convergence properties are not very well understood. Recent papers that provide complexity analysis of SHB (in different setting than ours) include and . In the authors analyzed SHB for general Lipshitz continuous convex objective functions (with bounded variance) and proved the sublinear rate O(1/k)O(1/\sqrt{k}). In , a complexity analysis is provided for the case of quadratic strongly convex smooth coercive functions. A sublinear convergence rate O(1/kβ)O(1/k^{\beta}), where β∈(0,1)\beta\in(0,1), was proved. In contrast to our results, where we assume fixed stepsize ω\omega, both papers analyze SHB with diminishing stepsizes. For our problem, variance reduction methods like SVRG , S2GD , mS2GD , SAG and SAGA are not necessary. To the best of our knowledge, our work provides the first linear convergence rate for SHB in any setting.

Convergence Results

In this section we state our convergence results for SHB.

satisfy a1+a2<1a_{1}+a_{2}<1. Let x∗x_{*} be the projection of x0x_{0} onto {x  :  Ax=b}\{x\;:\;\mathbf{A}x=b\}. Then

where q=a1+a12+4a22q=\frac{a_{1}+\sqrt{a_{1}^{2}+4a_{2}}}{2} and δ=q−a1\delta=q-a_{1}. Moreover, a1+a2≤q<1a_{1}+a_{2}\leq q<1.

In the above theorem we obtain global linear rate. To the best of our knowledge, this is the first time that linear rate is established for a stochastic variant of the heavy ball method in any setting. All existing results are sublinear.

If we choose ω∈(0,2)\omega\in(0,2), then the condition a1+a2<1a_{1}+a_{2}<1 is satisfied for all

If β=0\beta=0, SHB reduces to the “basic method” in (SGD with constant stepsize). In this special case, q=1−ω(2−ω)λmin⁡+q=1-\omega(2-\omega)\lambda_{\min}^{+}, which is the rate established in . Hence, our result is more general.

Let q(β)q(\beta) be the rate as a function of β\beta. Note that since β≥0\beta\geq 0, we have

Clearly, the lower bound on qq is an increasing function of β\beta. Also, for any β\beta the rate is always inferior to that of SGD (β=0\beta=0). It is an open problem whether one can prove a strictly better rate for SHB than for SGD.

2 Cesaro average: sublinear rate without exactness assumption

In this section we present convergence results for function values computed at the Cesaro average of all past iterates. Again, our results are global in nature. To the best of our knowledge, an analysis of the Cesaro average for the SHB with O(1/k)O(1/k) rate was not established before for any class of functions. Moreover, the result holds without the exactness assumption.

Choose x0=x1x_{0}=x_{1} and let {xk}k=0∞\{x_{k}\}_{k=0}^{\infty} be the random iterates produced by SHB, where the momentum parameter 0≤β<10\leq\beta<1 and relaxation parameter (stepsize) ω>0\omega>0 satisfy ω+2β<2\omega+2\beta<2. Let x∗x_{*} be any vector satisfying f(x∗)=0f(x_{*})=0. If we let x^k=1k∑t=1kxt\hat{x}_{k}=\frac{1}{k}\sum_{t=1}^{k}x_{t}, then

3 L​1𝐿1L1 convergence: accelerated linear rate

In this section we show that by a proper combination of the stepsize parameter ω\omega and the momentum parameter β\beta the proposed algorithm enjoys accelerated linear convergence rate with respect to the expected iterates.

If we choose ω=1\omega=1 and β=(1−0.99λmin⁡+)2\beta=\left(1-\sqrt{0.99\lambda_{\min}^{+}}\right)^{2}, then

and the iteration complexity becomes O(1/λmin⁡+log⁡(1/ϵ)){\cal O}\left(\sqrt{1/\lambda_{\min}^{+}}\log(1/\epsilon)\right).

If we choose ω=1/λmax⁡\omega=1/\lambda_{\max} and β=(1−0.99λmin⁡+/λmax⁡)2\beta=\left(1-\sqrt{0.99\lambda_{\min}^{+}/\lambda_{\max}}\right)^{2}, then

and the iteration complexity becomes O(λmax⁡/λmin⁡+log⁡(1/ϵ)){\cal O}\left(\sqrt{\lambda_{\max}/\lambda_{\min}^{+}}\log(1/\epsilon)\right)

Note that the convergence factor is precisely equal to the value of the momentum parameter.

Experiments

This is a randomized Kaczmarz method (RK) with momentum. Note that for β=0\beta=0 and ω=1\omega=1 this reduces to the celebrated Randomized Kaczmarz method (RK) of Strohmer and Vershynin . In Figure 1, RK with momentum is tested for several values of the momentum parameters β\beta and fixed stepsize ω=1\omega=1. For the evaluation we use both the relative error measure ∥xk−x∗∥2/∥x0−x∗∥2\|x_{k}-x_{*}\|^{2}/\|x_{0}-x_{*}\|^{2} and the function suboptimality f(xk)−f(x∗)f(x_{k})-f(x_{*}). The starting point is chosen as x0=0x_{0}=0. For the horizontal axis we use either the number of iterations or the wall-clock time measured using the tic-toc Julia function. It is clear that in this setting the addition of momentum parameter is beneficial and leads to faster convergence.

References