Quasi-potential as an implicit regularizer for the loss function in the stochastic gradient descent

Wenqing Hu, Zhanxing Zhu, Haoyi Xiong, Jun HuanarXiv 2019

Introduction

One of the most enduring mysteries in deep learning is why Stochastic Gradient Descent (SGD) consistently finds solutions that generalize well to unseen data. Despite the existence of countless local minima with near-zero training loss, SGD appears to possess an "implicit bias" toward solutions that perform robustly in practice. This paper, "Quasi-potential as an implicit regularizer for the loss function in the stochastic gradient descent," provides a rigorous mathematical framework to explain this phenomenon. By leveraging Large Deviations Theory, the authors demonstrate that SGD does not simply minimize the original loss function; instead, it effectively minimizes a "quasi-potential" shaped by the specific structure of mini-batch noise.

The Problem: Understanding Implicit Regularization

In high-dimensional loss landscapes, many "bad" minima exist—points where training error is low but generalization error is high. Researchers have long suspected that the noise introduced by mini-batch sampling is the key to avoiding these traps. However, a formal analytical link between the covariance structure of this noise and the selection of specific minima has been largely missing. The authors aim to move beyond empirical observations, providing a quantitative explanation for how the shape of noise (its anisotropy) interacts with the loss landscape to favor "flatter" minima.

Theoretical Methodology

The authors bridge the gap between stochastic optimization and classical physics through several sophisticated mathematical techniques:

1. Continuous-time Approximation

The discrete steps of SGD are modeled as a continuous Stochastic Differential Equation (SDE). This allows the optimizer to be treated as a physical system moving through a landscape influenced by "heat" or noise.

2. Large Deviations Theory (LDT)

LDT is employed to study "rare events," specifically the probability of the optimizer "jumping" out of one local minimum and into another. This is critical for understanding how an optimizer escapes poor local solutions.

3. Hamilton-Jacobi Equations

The authors prove that the "quasi-potential"—the effective landscape that SGD actually perceives—satisfies a specific Hamilton-Jacobi partial differential equation (PDE). This equation explicitly links the original loss function and the noise covariance matrix to the long-term behavior of the optimizer.

4. Markov Chain Modeling

For non-convex landscapes with multiple basins of attraction, the authors model transitions between minima as a Markov chain. The transition probabilities in this chain are determined by the depth and shape of the quasi-potential.

Key Insights: The Role of Anisotropic Noise

The central finding of the research is that the quasi-potential is the real objective function. In the limit of small learning rates, SGD behaves as if it is minimizing this modified version of the loss.

  • Anisotropic Noise as a Feature: In deep learning, gradient noise is "anisotropic," meaning it has different strengths in different directions. The authors show that this directional noise warps the landscape. It effectively makes "sharp" minima shallower and "flat" minima deeper from the perspective of the optimizer.
  • Faster Escapes: The research demonstrates that anisotropic noise leads to significantly faster escapes from local minima compared to uniform (isotropic) noise. This mechanism prevents the optimizer from being trapped in sharp, poorly generalizing solutions.
  • Quantitative Regularization: By knowing the structure of mini-batch noise, one can theoretically predict which minima SGD will favor. This transforms implicit regularization from a mysterious byproduct into a calculable effect.

Results and Validation

The paper validates these theoretical claims using synthetic 2D landscapes, including specifically designed convex and non-convex (two-well) potentials. These simulations confirmed that:

  1. If noise is uniform (isotropic), the quasi-potential is merely a scaled version of the original loss.
  2. When noise is anisotropic (as is the case in real neural networks), the quasi-potential landscape changes entirely.
  3. Even when two minima have identical loss values, SGD consistently selects the one where the noise structure makes the quasi-potential deeper, typically the flatter minimum.

Limitations and Future Directions

While the framework provides a powerful new lens for viewing SGD, several challenges remain:

  • Learning Rate Assumptions: The theory relies on the learning rate asymptotically tending toward zero, whereas practical deep learning often uses moderate or decaying rates.
  • High-Dimensionality: Calculating the quasi-potential for models with millions or billions of parameters remains computationally intractable.
  • Noise Invertibility: The current proofs assume the noise covariance matrix is invertible, a condition that may not hold in highly over-parameterized models where the matrix might be singular.

Future work may involve applying this framework to specific architectures like ResNets or Transformers to determine if their unique "noise signatures" contribute to their superior generalization capabilities.

Summary updated

BibTeX
@misc{hu2019quasi,
  author = {Wenqing Hu and Zhanxing Zhu and Haoyi Xiong and Jun Huan},
  title = {{Quasi-potential as an implicit regularizer for the loss function in the stochastic gradient descent}},
  year = {2019},
  eprint = {1901.06054},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1901.06054},
}
Figure