Fast Equilibrium of SGD in Generic Situations

Zhiyuan Li, Yi Wang, Zhiren WangICLR 2024

Introduction

Normalization layers, such as Batch Normalization and LayerNorm, are fundamental to modern deep learning. By making the loss function scale-invariant—meaning $L(x) = L(cx)$—they greatly accelerate optimization. However, when training these normalized networks with Stochastic Gradient Descent (SGD) and weight decay ($\lambda$), a counterintuitive phenomenon occurs: the network rapidly reaches a "statistical equilibrium" where its parameters fluctuate within a specific region.

The Fast Equilibrium Conjecture, proposed by Li et al. in 2020, posits that this mixing happens in polynomial time—specifically $\tilde{O}(1/\eta\lambda)$ steps, where $\eta$ is the learning rate. This represents a massive speedup over classical stochastic mixing times, which are typically exponential ($e^{O(\eta^{-1})}$).

The Problem with Previous Proofs

While previous research successfully proved this conjecture for specific cases, those proofs relied on "non-generic" assumptions that fail to reflect the complex reality of deep learning loss landscapes. Specifically, they assumed:

  1. Isolated Minima: The bottom of the loss landscape consists of single, discrete points.
  2. Unique Basin: The entire landscape forms one giant, continuous bowl.
  3. Analyticity: The loss function is a perfectly smooth, analytic function.

This paper provides a rigorous, generalized proof of the Fast Equilibrium Conjecture by removing these restrictive assumptions. The authors demonstrate that the fast mixing phenomenon holds true in generic situations featuring multiple basins, complex continuous manifolds of minima, and standard $C^4$ smoothness.

Methodology: A Generalized Approach

The authors model SGD as a continuous-time Stochastic Differential Equation (SDE). Because the loss is scale-invariant, they analyze the dynamics using polar coordinates, splitting the weights into "direction" (on a unit sphere) and "scale." To overcome the limitations of previous proofs, they introduce two major technical shifts:

  • Large Deviation Principle (LDP): To address the reality of multiple basins, the authors utilize LDP to prove that an SGD trajectory will remain "trapped" in its initial attracting basin for an exponentially long time. This critical step justifies analyzing "local" equilibrium rather than waiting for an impossible global mixing.
  • Harris’s Recurrence & Regularity: To bypass the strict analyticity requirement, they apply tools from ergodic theory (Harris's condition). This proves that the weight distribution converges to a unique invariant measure on the manifold of minima, even if the loss function is only $C^4$ smooth rather than perfectly analytic.

Key Insights

The "Trapping" Phenomenon

A central takeaway is that while a global equilibrium technically exists, it is practically irrelevant for real-world training. Because the optimizer gets stuck in its starting basin with high probability for any timeframe we care about, the "Fast Equilibrium" effectively occurs locally.

Manifolds Over Points

In modern overparametrized networks, the set of global minima does not consist of isolated points; rather, it forms a continuous surface or "manifold." The paper proves that SGD successfully mixes along this curved surface.

The Geometry of SWAP Failure

This manifold geometry elegantly explains why Stochastic Weight Averaging in Parallel (SWAP)—averaging weights from independent training runs—can actually increase loss. Because the minima manifold is curved (non-convex), averaging two points on that surface often results in a midpoint that "falls off" the manifold and into a higher-loss region.

Empirical Validation

The theoretical claims were tested on small-scale, overparametrized versions of standard benchmarks (Small MNIST and Small CIFAR-10). These toy setups allowed the authors to run many independent trials to measure trajectory variance.

By tracking the variance of multiple independent SGD runs, the authors confirmed the existence of multiple equilibria: runs from the same starting point converged to the same local equilibrium (exhibiting low variance), while runs from different starting points remained far apart (exhibiting high cross-variance). Furthermore, experiments confirmed that while SWAP helps initially, it eventually fails to decrease loss as trajectories settle onto the curved minima manifold, perfectly aligning with the theoretical predictions.

Limitations and Future Directions

While this work significantly generalizes the Fast Equilibrium Conjecture, it still requires the loss function to be $C^4$ smooth. This accommodates smooth approximations like GeLU or Softplus, but technically excludes the ubiquitous ReLU activation. Additionally, the reliance on the continuous-time SDE approximation of SGD may occasionally miss behaviors inherent to discrete-step optimization. Future work may explore how mixing time depends on specific neural architectures or how batch size affects the exact shape of the equilibrium.

Summary updated

Abstract

Normalization layers are ubiquitous in deep learning, greatly accelerating optimization. However, they also introduce many unexpected phenomena during training, for example, the Fast Equilibrium conjecture proposed by (Li et al.,2020), which states that the scale-invariant normalized network, when trained by SGD with $\eta$ learning rate and $\lambda$ weight decay, mixes to an equilibrium in $\tilde{O}(1/\eta\lambda)$ steps, as opposed to classical $e^{O(\eta^{-1})}$ mixing time. Recent works by Wang & Wang (2022); Li et al. (2022c) proved this conjecture under different sets of assumptions. This paper aims to answer the fast equilibrium conjecture in full generality by removing the non-generic assumptions of Wang & Wang (2022); Li et al. (2022c) that the minima are isolated, that the region near minima forms a unique basin, and that the set of minima is an analytic set. Our main technical contribution is to show that with probability close to 1, in exponential time trajectories will not escape the attracting basin containing its initial position.
BibTeX
@inproceedings{li2024fast,
  author = {Zhiyuan Li and Yi Wang and Zhiren Wang},
  title = {{Fast Equilibrium of SGD in Generic Situations}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=qgWJkDiI5p},
}
Figure