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

On the different regimes of stochastic gradient descent

Antonio Sclocchi, Matthieu Wyart

TL;DR

This paper maps out a comprehensive phase diagram for Stochastic Gradient Descent (SGD) across the learning rate ($\eta$) and batch size ($B$) space, identifying three distinct dynamical regimes: noise-dominated, first-step-dominated, and standard gradient descent. Crucially, the authors discover that the critical batch size ($B^*$) separating these regimes scales as a power law with the training set size ($P$), directly tied to the geometric difficulty of the classification task.

What Problem Does This Paper Address?

Stochastic Gradient Descent (SGD) is the undisputed workhorse of modern deep learning. Its behavior is primarily tuned via two hyperparameters: the learning rate ($\eta$) and the batch size ($B$). For small batch sizes, SGD behaves like a noisy version of Gradient Descent (GD), where the noise level is governed by an effective "temperature" $T = \eta/B$.

However, this simple temperature description breaks down in practice. If you make the batch size too large ($B \ge B^*$), the benefits of SGD noise disappear, or the dynamics transition abruptly into standard deterministic GD. Understanding exactly where these cross-overs happen—and how they depend on the size of your training dataset ($P$)—has remained a major theoretical gap. For practitioners, knowing the critical batch size $B^*$ is highly valuable because it dictates how much they can parallelize training (by increasing batch size) without destroying the generalization benefits brought by SGD's implicit noise.

Methods

To tackle this problem, the authors combine rigorous mathematical analysis with deep learning experiments:

  1. The Toy Model: They first solve the problem analytically using a teacher-student perceptron classification model trained with a hinge loss. The data distribution is parameterized by a variable $\chi$, which controls the density of data points near the decision boundary (smaller $\chi$ means a harder problem with more points close to the boundary).
  2. Stochastic Differential Equations (SDEs): In the limit of small batches ($B \ll P$), they model SGD as an SDE to track two key order parameters: $w_1$ (how well the student aligns with the teacher) and $\|w_\perp\|$ (the orthogonal noise components).
  3. Finite-Size Breakdown: They calculate exactly when the finite size of the training set ($P$) causes this continuous SDE description to fail, which marks the end of training and defines the boundaries of the phase diagram.
  4. Empirical Validation: They test whether these perceptron-derived boundaries hold true in deep networks by training a 5-layer Fully Connected Network (FCN) and a MobileNet Convolutional Neural Network (CNN).
Dynamical trajectories of SGD in the weight plane, showing how small and large batch regimes diverge.

Datasets

The authors evaluate their framework on three distinct setups:

  • Synthetic Perceptron Data: Radially symmetric data generated to strictly control the task difficulty parameter $\chi$.
  • MNIST: Transformed into a binary parity classification task (even vs. odd digits).
  • CIFAR-10: Transformed into a binary classification task (animals vs. non-animals).

Key Insights and Ideas

  • The Three Phases of SGD: The authors successfully prove that the $\eta$-$B$ hyperparameter space is divided into three distinct dynamical regimes:
  • Noise-dominated SGD: The dynamics and final generalization error depend strictly on the temperature ratio $T = \eta/B$.
  • First-step-dominated SGD: The very first gradient step is so massive that it overshoots the noise-dominated trajectory, determining the final weights before noise can even accumulate.
  • Gradient Descent (GD): Noise becomes entirely irrelevant, and the model behaves deterministically.
SGD phase diagrams showing alignment and test error across the three regimes for Perceptron, FCN, and CNN architectures.
  • Data-Dependent Scaling: The critical batch size $B^*$ isn't a fixed constant. It scales as a power law with the dataset size: $B^* \sim P^\gamma$, where $\gamma = 1/(1+\chi)$. This means harder classification tasks (smaller $\chi$) cause the critical batch size to scale much faster with dataset size.
  • The Mechanism of Implicit Bias: In the noise-dominated regime, SGD noise inflates the non-informative weights. To overcome this noise and fit the training data perfectly, the network is forced to grow its weights much larger in the correct direction, implicitly maximizing its alignment with the true target function.

Key Results

  • Phase Diagram Universality: The three phases derived mathematically for the simple perceptron were empirically observed in both the FCN (on MNIST) and the CNN (on CIFAR-10), demonstrating that this framework captures fundamental deep learning dynamics.
  • Power-Law Verification: The predicted power-law scaling of $B^*$ with $P$ was confirmed experimentally. For the MNIST parity task, the authors found $B^* \sim P^{0.2}$ (implying a task hardness of $\chi \approx 4$). For CIFAR-10, they found $B^* \sim P^{0.4}$.
  • Temporal Dynamics: In the first-step-dominated regime, target alignment builds up almost instantly within the first few steps. In contrast, in the noise-dominated regime, alignment emerges slowly and progressively over the course of training.

Limitations and Future Work

  • Loss Function Constraints: The analytical proofs rely heavily on the hinge loss. While the empirical results show similar trends for cross-entropy loss with early stopping, a rigorous mathematical extension to cross-entropy remains open.
  • Optimization Variations: The core theory does not explicitly account for common practical add-ons like adaptive learning rates (e.g., Adam) or complex weight decay schedules, though the authors provide preliminary evidence that momentum simply acts as a rescale factor for the effective learning rate.
  • Architectural Nuances: For the CNN on CIFAR-10, the authors noted that using early stopping eliminated much of the performance dependence on $\eta$ and $B$, suggesting that in some architectures, SGD acts primarily as a regularizer against overfitting rather than a driver of structural alignment. Further work is needed to untangle when each effect dominates.

Summary updated

BibTeX
@inproceedings{sclocchi2024different,
  author = {Antonio Sclocchi and Matthieu Wyart},
  title = {{On the different regimes of stochastic gradient descent}},
  booktitle = {Proceedings of the National Academy of Sciences},
  year = {2024},
  doi = {10.1073/pnas.2316301121},
}
Figure