Stochastic Polyak Step-sizes and Momentum: Convergence Guarantees and Practical Performance
Dimitris Oikonomou, Nicolas Loizou
TL;DR
This work tackles the practical challenge of tuning step-sizes and momentum in stochastic optimization with momentum (SHB) by introducing Polyak-type adaptive step-sizes via an Iterate Moving Average (IMA) view. It proposes three SHB variants—$\text{MomSPS}_{\max}$, $\text{MomDecSPS}$, and $\text{MomAdaSPS}$—that adaptively set the learning rate $\gamma_t$ in concert with momentum $\beta$, achieving convergence to a neighborhood without interpolation and, in two variants, convergence to the exact minimizer without prior problem-parameter knowledge. The analysis shows that naive SPS with momentum can be unstable, but the IMA-based formulations yield tight, generation-spanning guarantees that reduce to known SPS results for $\beta=0$ and extend them to SHB; corollaries include robust constant-step behavior and a projection-based extension. Empirically, the proposed methods demonstrate robust performance across convex and nonconvex tasks, including deep networks, with open-source code provided, underscoring practical impact for scalable training where hyperparameter tuning is costly.
Abstract
Stochastic gradient descent with momentum, also known as Stochastic Heavy Ball method (SHB), is one of the most popular algorithms for solving large-scale stochastic optimization problems in various machine learning tasks. In practical scenarios, tuning the step-size and momentum parameters of the method is a prohibitively expensive and time-consuming process. In this work, inspired by the recent advantages of stochastic Polyak step-size in the performance of stochastic gradient descent (SGD), we propose and explore new Polyak-type variants suitable for the update rule of the SHB method. In particular, using the Iterate Moving Average (IMA) viewpoint of SHB, we propose and analyze three novel step-size selections: MomSPS$_{\max}$, MomDecSPS, and MomAdaSPS. For MomSPS$_{\max}$, we provide convergence guarantees for SHB to a neighborhood of the solution for convex and smooth problems (without assuming interpolation). If interpolation is also satisfied, then using MomSPS$_{\max}$, SHB converges to the true solution at a fast rate matching the deterministic HB. The other two variants, MomDecSPS and MomAdaSPS, are the first adaptive step-size for SHB that guarantee convergence to the exact minimizer - without a priori knowledge of the problem parameters and without assuming interpolation. Our convergence analysis of SHB is tight and obtains the convergence guarantees of stochastic Polyak step-size for SGD as a special case. We supplement our analysis with experiments validating our theory and demonstrating the effectiveness and robustness of our algorithms.
