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

Two Facets of SDE Under an Information-Theoretic Lens: Generalization of SGD via Training Trajectories and via Terminal States

Ziqiao Wang, Yongyi Mao · DOI

Introduction

Deep learning's success is often attributed to the remarkable generalization capabilities of Stochastic Gradient Descent (SGD). Despite being heavily over-parameterized, neural networks trained with SGD tend to find solutions that perform well on unseen data rather than simply memorizing the training set. This paper, "Two Facets of SDE Under an Information-Theoretic Lens," investigates this phenomenon by modeling SGD as a continuous-time Stochastic Differential Equation (SDE). By doing so, the authors bridge the gap between algorithmic dynamics and information-theoretic (IT) generalization bounds.

The Generalization Puzzle

Traditional statistical learning theory often fails to explain why models with millions of parameters generalize. Information-theoretic bounds offer a promising alternative by quantifying the Mutual Information (MI) between the training data and the learned weights. Low MI suggests the model has not "over-memorized" the specific dataset. However, calculating MI for standard SGD is mathematically problematic because the noise is often degenerate, leading to infinite MI. While some researchers add artificial noise (e.g., SGLD) to make the math tractable, this changes the algorithm under study.

The authors solve this by using the SDE approximation of SGD. This approach treats the inherent gradient noise of SGD as a source of stochasticity, allowing for the application of IT tools to the actual training process without modification.

Methodology: Two Facets of SDE

The paper analyzes generalization through two distinct lenses, or "facets":

1. The Trajectory-Based Facet

This facet views the entire training path as a sequence of information gains. By decomposing SGD into a full-batch gradient descent component plus Gaussian noise, the authors derive generalization bounds that accumulate over every training step. This allows for tracking how a model's generalization ability evolves dynamically throughout the training process.

2. The Terminal-State Facet

Instead of the whole path, this facet focuses on the model's final "steady-state" after it has converged to a local minimum. By assuming the loss landscape is locally quadratic, the authors estimate the weight distribution at equilibrium. This leads to bounds that are independent of the number of training iterations, addressing a common theoretical issue where bounds grow to infinity with prolonged training.

A critical technical innovation is the use of anisotropic noise. Unlike simpler models that assume uniform noise, this framework accounts for the fact that gradient noise varies in strength across different directions, better capturing the complex geometry of neural network loss landscapes.

Empirical Validation

The authors validated their framework using standard image classification benchmarks, including SVHN, CIFAR-10, and CIFAR-100, paired with VGG-11 and ResNet-18 architectures.

Training and test accuracy of SGD vs. its SDE approximation across various datasets and architectures.

As shown in the figure above, the SDE approximation (green and red markers) tracks the actual SGD training performance (blue and orange markers) almost perfectly across different datasets and models, confirming that the SDE is a faithful proxy for the discrete algorithm.

Key Insights

  • Gradient Alignment: Generalization is significantly influenced by how mini-batch gradient noise aligns with the population gradient covariance. Effective noise pushes the model away from overfitting specific samples.
  • The Edge of Stability: The paper links its findings to the "edge of stability" phenomenon, where the learning rate and landscape sharpness reach a balance. If this balance breaks, IT bounds can diverge, explaining generalization failure.
  • Distance from Initialization: One derived bound suggests that generalization is partly a function of the distance the model moves from its starting weights, supporting the intuition that "nearby" solutions often generalize better.

Key Results

The proposed trajectory-based bound is shown to be tighter and more accurate than previous state-of-the-art methods. Furthermore, the terminal-state bound achieves a decay rate of $O(1/n)$, matching the performance of stability-based bounds without requiring complex constants like the Lipschitz constant.

Empirical alignment of gradient-related quantities between SGD and the SDE approximation during training.

The empirical consistency extends beyond simple accuracy. As illustrated in the plot above, internal quantities of the SDE—such as gradient norms and trace-log terms—align closely with those of the real SGD process, providing strong evidence for the theoretical model's validity.

Conclusion and Future Work

This work provides a robust theoretical foundation for understanding SGD's generalization through the lens of SDEs. While the current analysis assumes positive definite noise covariance and locally quadratic landscapes, it sets the stage for future research. Extending this framework to adaptive optimizers like Adam or Adagrad remains a key objective for further bridging the gap between deep learning theory and practice.

Summary updated

BibTeX
@inproceedings{wang2024two,
  author = {Ziqiao Wang and Yongyi Mao},
  title = {{Two Facets of SDE Under an Information-Theoretic Lens: Generalization of SGD via Training Trajectories and via Terminal States}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=ZhMkLTWRyh},
}
Figure