# SGD at the Edge of Stability: The Stochastic Sharpness Gap

*Fangshuo Liao, Afroditi Kolomvaki, Anastasios Kyrillidis*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/150405) · [Open on the map](../papers.html#p150405)

Category: [Interpretability & Model Adaptation](../pcat/15.md) › [Edge of Stability Dynamics](../pgroup/81.md) · Type: theory · Keywords: stochastic self-stabilization, SGD sharpness gap, edge of stability, gradient noise variance, neural network training dynamics

Areas: [Optimization & Algorithms](../areas/optimization.md) › Optimization Dynamics › Edge of Stability

## Summary
The paper introduces stochastic self-stabilization, extending the edge-of-stability phenomenon to SGD, and derives a closed-form sharpness gap that predicts flatter solutions for smaller batch sizes.

## Explained to a 5-year-old
When we teach a computer program to recognize patterns, we give it many examples to look at. One way to learn is to look at all the examples at once, which is called full-batch learning. Another way is to look at a small group of examples each time, which is called using a small batch. In full-batch learning, the program settles at a certain point where its answers are a bit sharp. In small-batch learning, the program settles at a softer, more relaxed point. The paper explains that the small-batch method has extra randomness because it only sees a few examples each step. This randomness acts like a gentle push that keeps the program from getting too sharp.

## Explained to a 5-year-old, longer
When we teach a computer program to recognize patterns, we give it many examples to look at. One way to learn is to look at all the examples at once, which is called full-batch learning. Another way is to look at a small group of examples each time, which is called using a small batch. In full-batch learning, the program settles at a certain point where its answers are a bit sharp. In small-batch learning, the program settles at a softer, more relaxed point. The paper explains that the small-batch method has extra randomness because it only sees a few examples each step. This randomness acts like a gentle push that keeps the program from getting too sharp. The authors call this extra push "stochastic self-stabilization." They show that this push becomes stronger when the batch is even smaller. They also prove that when the batch is as big as all the examples, the method works like the full-batch method. This new understanding helps us know why using smaller batches often gives better results. It also gives us a formula to predict how flat the final solution will be based on how noisy the data is.

## For a technical reader
The paper studies why stochastic gradient descent (SGD) often ends up at a flatter minimum than full-batch gradient descent (GD) during training of neural networks. It shows that the randomness inherent in using mini-batches injects extra variance into the dynamics along the most sensitive direction of the loss, which strengthens a sharpness-reducing force. By extending the known self-stabilization analysis to the stochastic setting, the authors define a predicted dynamics that tracks how SGD deviates from the projected gradient descent (PGD) trajectory. They prove a coupling theorem that relates the sharpness and loss of SGD to those of PGD and derive a closed-form expression for the equilibrium sharpness gap that depends on the gradient-noise variance. The result predicts that smaller batch sizes yield flatter solutions and recovers the full-batch GD behavior when the batch size equals the dataset size.

## Problem
Understanding why stochastic gradient descent (SGD) stabilizes at a sharpness lower than the edge-of-stability bound of full-batch gradient descent, and lacking a theoretical explanation for this suppression.

## Method
They extend the self-stabilization framework to SGD by modeling gradient noise as variance in the top Hessian eigenvector dynamics and define stochastic predicted dynamics to track SGD deviation from PGD, proving a stochastic coupling theorem that relates SGD sharpness to PGD. Using this predicted dynamic, they derive a closed-form equilibrium sharpness gap that scales with the variance of the gradient noise projected onto the top Hessian eigenvector.

## Results
The derived formula predicts that smaller batch sizes produce flatter solutions and reduces to the full-batch GD case when the batch size equals the dataset size.

## Contributions
The paper provides a theoretical explanation for the SGD sharpness gap by extending self-stabilization to stochastic settings, defines stochastic predicted dynamics and a coupling theorem, and yields a closed-form sharpness gap that captures the effect of gradient noise variance.

## Research questions this paper is counted under

- [What determines the stability and generalization of optimization algorithms at large learning rates?](../q/190.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/150405)
