NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Demystifying the Myths and Legends of Nonconvex Convergence of SGD

Aritra Dutta, El Houcine Bergou, Soumia Boucherouite, Nicklas Werge, Melih Kandemir, Xin Li · DOI

Abstract

In deep learning practice, the final iterate of Stochastic Gradient Descent (SGD) is almost exclusively used for model deployment. However, classical nonconvex optimization theory typically only guarantees that the minimum gradient norm over the entire training trajectory converges to zero, leaving the quality of the last iterate theoretically uncertain. This paper addresses this discrepancy by proving that $\epsilon$-stationary points are not merely sporadic occurrences but actually populate the final "tail" of the training process with high density. We provide a theoretical foundation for the "last-iterate" heuristic, showing that as training progresses, the probability of the current iterate being a high-quality solution approaches unity.

1. Introduction

SGD is the fundamental optimization algorithm for training modern neural networks. Despite its success, a significant gap exists between its theoretical analysis and practical application. Standard convergence proofs for nonconvex functions often focus on the minimum gradient norm across all $T$ iterations: $\min_{t=0 \dots T} \|\nabla F(x_t)\|^2 \le \epsilon$. This "weak" guarantee implies that while a good solution exists somewhere in the history, the final state of the model might be poor. Practitioners, however, rarely pick iterates at random or search the history; they simply use the last one. This work provides the mathematical justification for this intuition, focusing on the convergence of the "tail" of the SGD process.

2. Theoretical Framework: Tail Analysis and Expected Smoothness

The authors move beyond traditional "bounded variance" assumptions, which can be overly restrictive for complex neural landscapes. Instead, they employ the Expected Smoothness assumption, a more realistic bound on stochastic gradient noise.

The core of the analysis lies in a refined treatment of the descent inequality. Rather than averaging performance over the full interval $[0, T]$, the authors analyze the behavior within a "tail" window $[(1-\eta)T, T]$, where $\eta \in (0, 1]$ represents a fixed fraction of the total training budget. By unrolling recurrence relations specifically for this window and applying a novel weighting scheme to the iterates, they demonstrate that the optimal $O(1/\sqrt{T})$ convergence rate applies to this final segment of training. This analysis is further extended to Random Reshuffling SGD (RR-SGD), the variant most commonly used in frameworks like PyTorch and TensorFlow.

3. The Density of Stationary Points

A central contribution of this work is the concept of stationary point "density." The theory predicts that as the total iteration count $T$ increases, the fraction of iterates within the tail that satisfy the $\epsilon$-stationarity condition (where $\|\nabla F\| \le \epsilon$) approaches 1.

Figure 2: Convergence of gradient norms and objective values over epochs. The horizontal line in the first plot indicates the stationarity threshold, showing how iterates eventually cluster below it.

This finding explicitly demystifies "Myth I"—the notion that convergence is only a property of the global minimum of the gradient norm. Instead, the results show that the "tail" becomes saturated with high-quality points, making the last iterate a statistically sound choice.

4. Numerical Evidence

The theoretical results were validated through experiments on nonconvex logistic regression (a1a dataset) and image classification (MNIST).

Figure 3: Iteration-wise convergence metrics across different batch sizes and learning rates. The plots confirm that the density of stationary points increases as the algorithm enters the tail phase across various hyperparameter settings.

The empirical results demonstrate that across various hyperparameters—including batch size and learning rate ($\gamma$)—the gradient norms consistently drop below the stationarity threshold as iterations increase. This behavior holds even for nonsmooth objectives like those found in ReLU-based neural networks, extending the theory's relevance to practical deep learning architectures.

5. Conclusion and Open Questions

This paper provides a rigorous bridge between the theory of nonconvex optimization and the practice of deep learning. By proving that stationary points cluster in the final stages of SGD, the authors justify the use of the last iterate. However, challenges remain. The theory focuses on stationary points rather than global minima, and a practical, budget-independent rule for detecting the "start" of the high-density tail remains an open question for future research.

Summary updated

BibTeX
@misc{dutta2023demystifying,
  author = {Aritra Dutta and El Houcine Bergou and Soumia Boucherouite and Nicklas Werge and Melih Kandemir and Xin Li},
  title = {{Demystifying the Myths and Legends of Nonconvex Convergence of SGD}},
  year = {2023},
  eprint = {2310.12969},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.12969},
}
Figure