Stochastic Gradient and Langevin Processes

Xiang Cheng, Dong Yin, Peter L. Bartlett, Michael I. Jordan

The Mystery of SGD's Success

While Stochastic Gradient Descent (SGD) is the undisputed workhorse of deep learning, its success in navigating non-convex optimization landscapes remains somewhat mysterious. Researchers often model SGD as a discrete version of a continuous Stochastic Differential Equation (SDE) known as Langevin diffusion. However, standard SDE theory typically assumes "nice" noise—specifically, isotropic Gaussian noise that remains constant regardless of the current state.

In reality, SGD noise is "messy": it is non-Gaussian and highly state-dependent. For instance, as the process approaches a local minimum, the variance of the gradient estimates often shrinks. This paper tackles the challenge of providing quantitative convergence rates for these realistic, state-dependent processes in non-convex settings, filling a major gap between theoretical SDE models and practical machine learning.

Modeling Realistic SGD

The authors analyze a discrete-time process that mimics SGD: $$w_{(k+1)\delta} = w_{k\delta} - \delta \nabla U(w_{k\delta}) + \sqrt{\delta}\xi(w_{k\delta}, \eta_k)$$ where $U$ is a potentially non-convex potential (the loss function) and $\xi$ is a noise function.

To bridge the gap, they compare this discrete process to a continuous SDE: $dx_t = -\nabla U(x_t)dt + M(x_t)dB_t$, where $M(x)$ represents the square root of the noise covariance. Using the Wasserstein-1 distance ($W_1$), they quantify how close the discrete iterates are to the SDE’s invariant distribution. Furthermore, they introduce a novel "large-noise SGD" algorithm to artificially inject noise into the training process. This allows precise control over the noise covariance, isolating its effects from higher-order moments.

Key Insights: Covariance and Landscape Smoothing

The most striking insight from the paper is that the stationary distribution of the iterates depends almost entirely on the noise covariance matrix, regardless of whether the noise itself is Gaussian or non-Gaussian.

Furthermore, state-dependent noise can effectively "reshape" the loss landscape.

1D toy problem demonstrating how state-dependent noise reshapes the effective potential landscape.

As shown in the 1D synthetic example above, noise with a higher magnitude in certain regions can "smooth over" shallow local minima. This biases the algorithm toward more stable, wider regions of the loss landscape.

This framework also provides a formal theoretical justification for the empirical observation that the ratio of learning rate ($\delta$) to batch size ($b$) dictates generalization. Because the noise covariance in SGD scales with $\delta/b$, this ratio directly determines which "smoothed" stationary distribution the model ultimately converges to.

Empirical Results and Convergence Rates

The authors establish rigorous convergence rates: $O(\sqrt{\delta})$ for discretization error under Gaussian noise, and $O(\delta^{1/8})$ for the more complex non-Gaussian, state-dependent case.

To validate these findings empirically, they tested their "large-noise SGD" on CIFAR-10 using CNN and VGG19 architectures.

Scatter plots showing a strong linear relationship between log(noise covariance) and test accuracy across different batch sizes.

The experiments revealed a strong linear relationship between the logarithm of the noise covariance and the final test accuracy. Notably, algorithms with vastly different noise distributions—but identical noise covariance—achieved nearly identical test performance. This confirms that higher-order moments of the noise are secondary to the covariance matrix in determining generalization.

Limitations and Future Directions

While a significant step forward, the current proofs require the noise term to be uniformly bounded. Although this can be satisfied in practice via gradient clipping, it doesn't strictly cover the "heavy-tailed" noise distributions some researchers believe are present in deep learning. Additionally, the $O(\delta^{1/8})$ rate for non-Gaussian noise is theoretically rigorous but likely much slower than observed in practice, presenting a clear path for future research to tighten these bounds. Finally, while the theory holds for high dimensions, the constants in the convergence rates can be very large, making the finite-time behavior in extremely high-dimensional neural networks an ongoing area of study.

Summary updated

BibTeX
@inproceedings{cheng2020stochastic,
  author = {Xiang Cheng and Dong Yin and Peter L. Bartlett and Michael I. Jordan},
  title = {{Stochastic Gradient and Langevin Processes}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=RYVk2YIcGnb},
}
Figure