Making the Last Iterate of SGD Information Theoretically Optimal

Prateek Jain, Dheeraj Nagaraj, Praneeth NetrapalliCOLT 2019

Abstract

Stochastic Gradient Descent (SGD) is the cornerstone of large-scale optimization in machine learning. While classical theoretical analysis often focuses on the average of iterates to achieve optimal convergence rates, practitioners typically rely on the final iterate. This paper addresses the long-standing "logarithmic gap" between the performance of the average and the last iterate. By introducing a horizon-aware step-size schedule, the authors demonstrate that the last iterate can achieve information-theoretically optimal convergence rates for both convex and strongly convex functions, matching known lower bounds.

1. Introduction

In the landscape of modern machine learning, Stochastic Gradient Descent (SGD) is ubiquitous. However, a persistent disconnect exists between the theoretical recommendations and practical implementations of the algorithm. Theoretical guarantees for SGD in convex optimization often rely on "iterate averaging"—taking the mean of all points visited during the optimization process—to achieve optimal convergence rates. In contrast, practitioners almost exclusively use the last iterate, as it is simpler to implement and often performs better in non-convex settings like deep learning.

For non-smooth convex problems, standard step-size sequences (e.g., $\eta_t \propto 1/\sqrt{t}$) lead to a last-iterate convergence rate that is suboptimal by a factor of $\log T$, where $T$ is the number of iterations. This "log gap" has been a point of theoretical friction for years. This research investigates whether this suboptimality is an inherent property of SGD or a consequence of the chosen step-size schedules.

2. The Challenge: The "Log T" Penalty

The suboptimality of the last iterate stems from the behavior of the algorithm near the end of the optimization horizon. With standard decaying step sizes, the algorithm continues to "chatter" or oscillate around the optimum because the step sizes do not decrease rapidly enough to counteract the stochastic noise in the gradients. While averaging these iterates cancels out the noise to reach the optimal $O(1/\sqrt{T})$ rate, the final point remains trapped in a region of suboptimality defined by that extra $\log T$ factor.

3. Methodology: Horizon-Aware Step Sizes

The authors propose a novel step-size modification scheme that leverages knowledge of the total iteration budget $T$. Unlike "any-time" sequences that are agnostic to the stopping point, this schedule is specifically designed with the final horizon in mind.

The proposed schedule operates in two primary phases:

  1. Exploration Phase: The step size remains relatively large for the majority of the iterations, allowing the algorithm to traverse the search space and reach the vicinity of the optimum.
  2. Rapid Decay Phase: As the algorithm approaches the horizon $T$, the step size drops precipitously.

This rapid decay at the end of the run effectively "freezes" the algorithm, preventing the late-stage oscillations that typically plague the last iterate. The authors utilize a novel proof technique that tracks the "best iterate" within specific time windows, ensuring that the final progress is preserved and matches the theoretical limits of averaged SGD.

4. Theoretical Results

The primary contribution of this work is the proof that the last iterate of SGD, when using the proposed schedule, achieves information-theoretically optimal convergence rates.

  • Non-Strongly Convex Functions: The last iterate achieves a rate of $O(1/\sqrt{T})$.
  • Strongly Convex Functions: The last iterate achieves a rate of $O(1/T)$.

These results are significant because they match the known lower bounds for these classes of optimization problems. Furthermore, the authors extend these results to standard (non-stochastic) Gradient Descent (GD) for non-smooth functions, achieving the same optimal rates. Notably, the paper provides "high probability" guarantees, ensuring that the method is robust and reliable across different runs, rather than just performing well on average.

5. Discussion and Limitations

The main trade-off introduced by this method is the requirement of a fixed horizon $T$. Because the step-size decay is tuned to the total number of steps, the algorithm is not "any-time." If the optimization is terminated early, or if one wishes to extend the optimization beyond $T$, the optimality guarantees may no longer hold.

The authors conjecture that this is not a weakness of their specific method, but rather a fundamental limit of optimization. They suggest that any "any-time" algorithm—one that does not know $T$ in advance—is mathematically destined to suffer the $\log T$ error factor. This conjecture presents a compelling open question for the optimization community: is the knowledge of the horizon strictly necessary for last-iterate optimality?

6. Conclusion

This paper bridges the gap between the theoretical ideal of iterate averaging and the practical reality of last-iterate usage. By demonstrating that the "log gap" can be eliminated with a horizon-aware step-size schedule, the authors provide a more rigorous foundation for the common practice of using the final result of SGD. While currently limited to convex settings and fixed horizons, this work sets a new benchmark for what is achievable in stochastic optimization.

Summary updated

BibTeX
@inproceedings{jain2019making,
  author = {Prateek Jain and Dheeraj Nagaraj and Praneeth Netrapalli},
  title = {{Making the Last Iterate of SGD Information Theoretically Optimal}},
  booktitle = {Conference on Learning Theory},
  year = {2019},
  url = {https://openreview.net/forum?id=1iblcjxeTsB},
}
Figure