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

When does SGD favor flat minima? A quantitative characterization via linear stability

Lei Wu, Mingze Wang, Weijie Su · OpenReview

Introduction

In the era of over-parameterization, deep learning models often possess far more parameters than training examples. This leads to a landscape with infinitely many global minima. Empirically, Stochastic Gradient Descent (SGD) consistently finds "flat" minima—regions where the loss function varies slowly—which are known to generalize better. This paper provides a rigorous mathematical framework to explain this phenomenon through linear stability analysis, moving beyond traditional diffusion-based approximations.

The Alignment Property: Geometry-Aware Noise

A central contribution of this work is the formalization of the alignment property. Unlike simple white noise, the noise inherent in SGD is "geometry-aware." Its magnitude is proportional to the current loss, and its covariance structure aligns with the local geometry of the loss landscape, specifically the Fisher Information Matrix and the Hessian.

Alignment parameters $\mu(\theta_t)$, $\alpha(\theta_t)$, and $\beta(\theta_t)$ remain stable across training steps (top) and model sizes (bottom) for various architectures.

As shown in Figure 1, the stability parameters $\mu, \alpha,$ and $\beta$ remain remarkably consistent across different architectures (RFM, Linear networks, FCN, and CNN) and varying model sizes. This "smart noise" acts as a targeted mechanism: it is most intense in directions where the landscape is steepest, effectively "kicking" the optimizer out of sharp valleys while allowing it to settle in flat basins.

Linear Stability and the Frobenius Norm Bound

By treating global minima as fixed points in a dynamical system, the authors derive exact conditions for SGD's stability. They prove that for a minimum to be stable under SGD, the Frobenius norm of its Hessian must satisfy a specific bound:

$$\|H(\theta^*)\|_F \lesssim \frac{\sqrt{B}}{\eta}$$

where $B$ is the batch size and $\eta$ is the learning rate.

Crucially, this bound is independent of the model size ($p$). While Gradient Descent (GD) only requires the largest eigenvalue of the Hessian to be bounded, SGD's stability depends on the sum of squares of all eigenvalues. This explains why SGD finds significantly flatter regions than GD and why it escapes sharp minima exponentially fast.

Empirical Evidence: Size-Independent Flatness

The authors validated their theoretical predictions across several datasets and architectures. A key finding is that as models become wider (increasing the number of parameters), the trace of the Hessian—which measures average sharpness—tends to increase. However, the Frobenius norm remains nearly constant.

Empirical validation on a Fully Connected Network (FCN) showing that while the trace of the Hessian grows with model size, the Frobenius norm remains nearly constant, aligning with the theoretical stability bound.

This observation, illustrated in Figure 4 for an FCN, confirms that SGD's selection pressure is specifically tuned to the Frobenius norm. This explains why even massive models do not necessarily converge to sharper, less generalizable minima.

Conclusion

This research provides a quantitative bridge between the dynamics of SGD and the geometry of the loss landscape. By identifying the alignment property and deriving a size-independent stability bound based on the Frobenius norm, the authors offer a compelling explanation for why SGD favors flat minima. While the current analysis is primarily local and focused on square loss, it sets a rigorous foundation for future work on global trajectories and direct links to generalization error.

Summary updated

BibTeX
@inproceedings{wu2022when,
  author = {Lei Wu and Mingze Wang and Weijie Su},
  title = {{When does SGD favor flat minima? A quantitative characterization via linear stability}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=TyJbHknaC5},
}
Figure