On the Last Iterate Convergence of Momentum Methods

Xiaoyu Li, Mingrui Liu, Francesco Orabona

TL;DR

This paper bridges a long-standing gap between the theory and practice of momentum-based optimization. The authors prove that standard Stochastic Gradient Descent with Momentum (SGDM) with a constant momentum factor is theoretically suboptimal for last-iterate convergence, and they propose a new FTRL-based SGDM variant that achieves the optimal $O(1/\sqrt{T})$ rate without requiring common theoretical "crutches" like iterate averaging or projections onto bounded domains.

What Problem Does This Paper Address?

In the world of deep learning, SGDM is a workhorse. However, there is a significant mismatch between how practitioners use it and how theorists analyze it.

Practitioners typically use the last iterate (the final weights after training) and rarely use projections to keep weights within a specific bound. In contrast, most existing convergence proofs for SGDM rely on iterate averaging (taking the mean of all weights across all steps) or require projections onto bounded domains to guarantee stability.

The authors set out to answer two main questions:

  1. Does the last iterate of standard SGDM actually converge at the optimal rate for convex functions?
  2. Can we design a momentum algorithm that is theoretically optimal for the last iterate in an unconstrained setting (no projections) without needing to know the total number of iterations in advance?

Methods

The paper approaches these questions through both a "negative" proof (a lower bound) and a "positive" algorithmic contribution:

  • The Lower Bound: The authors prove that for any constant momentum factor $\beta$, there exists a specific convex, Lipschitz function where the last iterate of SGDM converges at a suboptimal rate of $\Omega(\frac{\ln T}{\sqrt{T}})$. This confirms that the "standard" way of using momentum has a theoretical ceiling.
  • FTRL-based SGDM: To overcome this, they introduce a new variant based on the Follow-The-Regularized-Leader (FTRL) framework. Unlike standard SGDM, this version uses increasing momentum and shrinking updates.
  • Primal Averaging: They leverage the insight that SGDM can be viewed as a "primal averaging" procedure. By using FTRL instead of Online Mirror Descent (OMD) as the base, they eliminate the need for projections, making the algorithm suitable for unconstrained optimization.
  • Adaptivity: They extend the framework to include adaptive learning rates (similar to AdaGrad), creating AdaFTRL-M, which adapts to the noise and sparsity of the gradients.

Datasets

The authors evaluated their proposed algorithms against standard SGDM, SGDM-AVG, and AdaGrad using:

  • Synthetic Data: A binary classification task with a synthetic dataset ($n=8000, d=100$) designed to satisfy the "interpolation condition" (where noise vanishes at the optimum).
  • Real-world Datasets: Three classification datasets from the LIBSVM library:
  • real-sim (72,309 samples, 20,958 features)
    • w8a (49,749 samples, 300 features)
    • phishing (11,055 samples, 68 features)

Key Insights and Ideas

  • Constant Momentum is a Bottleneck: The proof that constant momentum leads to a $\ln T$ suboptimality is a major theoretical contribution. It suggests that for the last iterate to be optimal, the momentum schedule must change over time.
  • FTRL as a Projection-Free Alternative: Most optimization theory uses OMD, which breaks down in unconstrained settings without projections. FTRL naturally handles unconstrained domains, which aligns much better with how neural networks are actually trained.
  • Optimal "Any-time" Convergence: The proposed FTRL-SGDM achieves the optimal $O(1/\sqrt{T})$ rate for the last iterate without needing to know the total number of steps ($T$) beforehand. This is summarized in the comparison table below:
Table 1: Last iterate convergence of momentum methods in convex setting

Key Results

  • Theoretical Optimality: FTRL-SGDM is shown to have an expected suboptimality gap of $O(1/\sqrt{T})$ for the last iterate on convex functions, disproving previous conjectures that a $\ln T$ factor was unavoidable in certain settings.
  • Empirical Performance: In synthetic tests, AdaFTRL-M showed the steepest convergence slope in log-log plots, indicating faster convergence than standard methods.
  • Real-world Robustness: On LIBSVM datasets, the adaptive FTRL-based methods consistently matched or outperformed standard AdaGrad and SGDM, particularly in the final stages of training. The results highlight that while non-adaptive stepsizes often struggle, the FTRL framework combined with adaptivity is highly effective.

Limitations and Future Work

  • Convexity Assumption: The primary theoretical results are for convex functions. While SGDM is most famous for non-convex deep learning, this paper focuses on establishing a solid foundation in the convex case first.
  • Practical Impact of $\ln T$: The authors acknowledge that the theoretical improvement (removing a $\ln T$ factor) might be small in some practical applications, though their empirical results suggest the new variants are indeed competitive.
  • Future Directions: The authors plan to extend this work by studying high-probability convergence (rather than just expected convergence) for FTRL-based SGDM, which would provide even stronger guarantees for individual training runs.

Summary updated

BibTeX
@inproceedings{li2022last,
  author = {Xiaoyu Li and Mingrui Liu and Francesco Orabona},
  title = {{On the Last Iterate Convergence of Momentum Methods}},
  booktitle = {ALT},
  year = {2022},
  url = {https://openreview.net/forum?id=pcS2XH7lo4},
}
Figure