Noise Balance and Stationary Distribution of Stochastic Gradient Descent

Liu Ziyin, Hongchao Li, Masahito Ueda · Submission to NeurIPS 2024 · Rejected

Abstract

How the stochastic gradient descent (SGD) navigates the loss landscape of a neural network remains poorly understood. This work shows that the minibatch noise of SGD regularizes the solution towards a noise-balanced solution whenever the loss function contains a rescaling symmetry. We prove that when the rescaling symmetry exists, the SGD dynamics is limited to only a low-dimensional subspace and prefers a special set of solutions in an infinitely large degenerate manifold, which offers a partial explanation of the effectiveness of SGD in training neural networks. We then apply this result to derive the stationary distribution of stochastic gradient flow for a diagonal linear network with arbitrary depth and width, which is the first analytical expression of the stationary distribution of SGD in a high-dimensional non-quadratic potential. The stationary distribution exhibits complicated nonlinear phenomena such as phase transitions, loss of ergodicity, memory effects, and fluctuation inversion. These phenomena are shown to exist uniquely in deep networks, highlighting a fundamental difference between deep and shallow models. Lastly, we discuss the implication of the proposed theory for the practical problem of variational Bayesian inference.
BibTeX
@misc{ziyin2023noise,
  author = {Liu Ziyin and Hongchao Li and Masahito Ueda},
  title = {{Noise Balance and Stationary Distribution of Stochastic Gradient Descent}},
  year = {2023},
  eprint = {2308.06671},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.06671},
}
Figure