(Accelerated) Noise-adaptive Stochastic Heavy-Ball Momentum

Anh Dang, Reza Babanezhad, Sharan Vaswani
1/12/2024
math.OCcs.LGstat.ML

No official code found. Best implementation: anh-dang/accelerated_noise_adaptive_shb (1 star, last commit 2024-09-13).

Abstract

Stochastic heavy ball momentum (SHB) is commonly used to train machine learning models, and often provides empirical improvements over stochastic gradient descent. By primarily focusing on strongly-convex quadratics, we aim to better understand the theoretical advantage of SHB and subsequently improve the method. For strongly-convex quadratics, Kidambi et al. (2018) show that SHB (with a mini-batch of size $1$) cannot attain accelerated convergence, and hence has no theoretical benefit over SGD. They conjecture that the practical gain of SHB is a by-product of using larger mini-batches. We first substantiate this claim by showing that SHB can attain an accelerated rate when the mini-batch size is larger than a threshold $b^*$ that depends on the condition number $κ$. Specifically, we prove that with the same step-size and momentum parameters as in the deterministic setting, SHB with a sufficiently large mini-batch size results in an $O\left(\exp(-\frac{T}{\sqrtκ}) + σ\right)$ convergence when measuring the distance to the optimal solution in the $\ell_2$ norm, where $T$ is the number of iterations and $σ^2$ is the variance in the stochastic gradients. We prove a lower-bound which demonstrates that a $κ$ dependence in $b^*$ is necessary. To ensure convergence to the minimizer, we design a noise-adaptive multi-stage algorithm that results in an $O\left(\exp\left(-\frac{T}{\sqrtκ}\right) + \fracσ{\sqrt{T}}\right)$ rate when measuring the distance to the optimal solution in the $\ell_2$ norm. We also consider the general smooth, strongly-convex setting and propose the first noise-adaptive SHB variant that converges to the minimizer at an $O(\exp(-\frac{T}κ) + \frac{σ^2}{T})$ rate when measuring the distance to the optimal solution in the squared $\ell_2$ norm. We empirically demonstrate the effectiveness of the proposed algorithms.

View on arXivView PDF

Code Implementations(1)

Code for paper: (Accelerated) Noise-adaptive Stochastic Heavy-Ball Momentum

10Shell, PythonJun 10, 20242 years ago

Similar Papers

Cite this paper

@article{dang2024accelerated,
  title  = {(Accelerated) Noise-adaptive Stochastic Heavy-Ball Momentum},
  author = {Anh Dang and Reza Babanezhad and Sharan Vaswani},
  year   = {2024},
  eprint = {2401.06738},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.06738v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.06738.svg)](https://codeofpaper.com/paper/2401.06738)

Discussion