On the Last-Iterate Convergence of Shuffling Gradient Methods

Zijian Liu, Zhengyuan Zhou

Executive Summary

This paper provides the first theoretical proof for the "last-iterate" convergence of shuffling gradient methods—such as Random Reshuffle—for general convex problems. It bridges a long-standing gap between machine learning practice, where engineers simply deploy the final model after training, and optimization theory, which previously struggled to guarantee performance for the last iterate without assuming the problem was "strongly convex."

The Problem: Average vs. Last Iterate

In machine learning, models are typically trained using Stochastic Gradient Descent (SGD) or its "shuffling" variants. While standard SGD picks a random data point with replacement at every step, shuffling methods process the entire dataset in "epochs" using permutations of the data. Common variants include:

  • Random Reshuffle (RR): A new random permutation is drawn for every epoch.
  • Shuffle Once (SO): A single random permutation is drawn and reused for all epochs.
  • Incremental Gradient (IG): A fixed, deterministic order is used throughout.

Practitioners overwhelmingly prefer shuffling methods because they tend to converge faster than standard SGD. However, theoretical analysis is notoriously difficult because the gradients used in each step are "biased" by the data points already seen in that epoch.

Until now, most theoretical guarantees for these methods focused on the average iterate (the average of all models produced during training). But in the real world, practitioners rarely use the average; they use the last iterate (the final model produced). Previous theories only guaranteed last-iterate success for "strongly convex" problems, which are mathematically well-behaved but fail to cover many practical scenarios like Lasso or constrained optimization. This paper finally establishes convergence rates for the last iterate across a much wider range of convex problems.

Methodology

The authors analyze the Proximal Shuffling Gradient Method, a framework general enough to encompass RR, SO, and IG.

The core of their contribution is a novel proof technique. They move away from traditional "descent inequalities" and instead adapt a recent strategy used for standard Gradient Descent. They construct a "virtual" auxiliary sequence of points ($z_k$) that are convex combinations of previous models and the optimal solution. By bounding the gap between the last iterate and this virtual sequence, they derive an "anytime inequality" that holds for every epoch, eventually leading to the final convergence rate.

Key Insights

  • The Shuffling Advantage is Real: The paper confirms that for smooth functions, shuffling methods are theoretically faster than standard SGD. While SGD typically converges at a rate of $\mathcal{O}(1/\sqrt{T})$, shuffling methods can reach $\tilde{\mathcal{O}}(1/K^{2/3})$ or even $\tilde{\mathcal{O}}(1/K^2)$ depending on the settings (where $K$ is the number of epochs).
  • No Strong Convexity Needed: The most significant breakthrough is that the objective function does not need to be "strongly convex" to achieve a tight last-iterate bound. This extends the theory to a much broader class of ML problems, including those with constraints or non-smooth regularizers (like the $L_1$ penalty).
  • Matching Lower Bounds: For many settings, the new upper bounds provided in this paper either match or nearly match the known mathematical "speed limits" (lower bounds) for these algorithms, indicating that the analysis is remarkably tight.

Key Results

The paper provides specific convergence rates for the function value gap ($F(\mathbf{x}_{K+1}) - F(\mathbf{x}_*)$). The results demonstrate that as the number of epochs ($K$) increases, the error drops significantly faster than the $1/K$ rate typically associated with standard SGD.

Convergence rates for smooth and strongly convex functions

As shown in the table above, the authors establish last-iterate rates of $\tilde{\mathcal{O}}(K^{-2/3})$ for general smooth functions and $\tilde{\mathcal{O}}(K^{-2})$ for strongly convex functions, matching or improving upon previous average-iterate bounds.

Convergence rates for Lipschitz functions

For non-smooth (Lipschitz) functions, the theory shows that shuffling methods achieve an $\mathcal{O}(1/\sqrt{K})$ rate for the last iterate, matching the complexity of standard Gradient Descent.

Limitations and Future Work

  • Step Size Sensitivity: The proofs require a specific step size that includes an extra $1 + \log K$ factor. The authors note it remains unclear if this is a strict mathematical necessity or merely an artifact of their proof technique.
  • Constant Step Sizes: Currently, the theory relies on a constant step size chosen based on the total number of epochs ($K$) planned. Finding a "time-varying" step size that achieves these same optimal rates is an open challenge.
  • Non-smooth Sample Complexity: For non-smooth (Lipschitz) problems, the current theory shows shuffling methods match the complexity of standard Gradient Descent but are still theoretically slower than SGD. Future work will investigate whether random permutations could close this theoretical gap.

Summary updated

BibTeX
@inproceedings{liu2024last,
  author = {Zijian Liu and Zhengyuan Zhou},
  title = {{On the Last-Iterate Convergence of Shuffling Gradient Methods}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=Xdy9bjwHDu},
}
Figure