Skip to main content
QUICK REVIEW

[Paper Review] Strength of Minibatch Noise in SGD

Liu Ziyin, Kangqiao Liu|arXiv (Cornell University)|Feb 10, 2021
Stochastic Gradient Optimization TechniquesComputer Science42 references8 citations
TL;DR

This paper provides the first systematic analysis of minibatch noise in stochastic gradient descent (SGD) for deep learning, deriving exact analytical formulas for noise strength and parameter fluctuations in discrete-time SGD with arbitrary learning rates. It reveals that minibatch noise varies significantly across different types of minima and shows that large learning rates induce implicit regularization, explaining generalization improvements and the failure of linear learning rate-batch size scaling at extreme settings.

ABSTRACT

The noise in stochastic gradient descent (SGD), caused by minibatch sampling, is poorly understood despite its practical importance in deep learning. This work presents the first systematic study of the SGD noise and fluctuations close to a local minimum. We first analyze the SGD noise in linear regression in detail and then derive a general formula for approximating SGD noise in different types of minima. For application, our results (1) provide insight into the stability of training a neural network, (2) suggest that a large learning rate can help generalization by introducing an implicit regularization, (3) explain why the linear learning rate-batchsize scaling law fails at a large learning rate or at a small batchsize and (4) can provide an understanding of how discrete-time nature of SGD affects the recently discovered power-law phenomenon of SGD.

Motivation & Objective

  • To address the lack of theoretical understanding of minibatch noise in discrete-time SGD with finite learning rates.
  • To derive exact analytical expressions for the strength and shape of SGD noise near local minima.
  • To explain why large learning rates improve generalization and why linear learning rate-batch size scaling fails under extreme conditions.
  • To clarify how the discrete-time nature of SGD influences the power-law behavior observed in training dynamics.

Proposed method

  • Derives exact analytical solutions for SGD noise and parameter fluctuations in linear regression, a solvable case.
  • Proposes a general formula for approximating minibatch noise covariance in different types of minima using matrix decompositions and trace-based approximations.
  • Uses the continuous-time limit and Hessian approximation as benchmarks to validate the new discrete-time framework.
  • Applies the derived noise model to analyze training/test loss, parameter fluctuations, and convergence conditions in 1D and higher-dimensional settings.
  • Introduces a trace-based approximation for the asymptotic noise covariance and parameter fluctuation, incorporating learning rate and batch size effects.
  • Validates results through theoretical analysis and numerical verification in both 1D and higher-dimensional cases with commuting matrices.

Experimental results

Research questions

  • RQ1How does the strength and shape of minibatch noise in SGD vary across different types of local minima?
  • RQ2What is the exact analytical form of parameter fluctuations in discrete-time SGD with arbitrary learning rates?
  • RQ3Why does the linear scaling law between learning rate and batch size break down at large learning rates or small batch sizes?
  • RQ4How does the discrete-time nature of SGD affect the observed power-law behavior in training dynamics?
  • RQ5What role does the learning rate play in inducing implicit regularization through minibatch noise?

Key findings

  • The minibatch noise in SGD is not universally approximated by the Hessian, and its form depends on the type of local minimum, invalidating the common Hessian approximation in some regimes.
  • Large learning rates introduce implicit regularization by altering the noise structure, which explains improved generalization performance in practice.
  • The linear learning rate-batch size scaling law fails when the learning rate is too large or the batch size too small, due to non-linear effects in the noise covariance not captured by standard approximations.
  • The discrete-time nature of SGD leads to a power-law-like behavior in parameter fluctuations, which is not explained by continuous-time approximations.
  • A necessary condition for a negative optimal regularization parameter γ in 1D SGD is that the batch size S ≠ 2, and the learning rate must satisfy a non-trivial bound involving S and the model parameters.
  • The derived analytical formula for parameter fluctuation Σ accounts for learning rate, batch size, and curvature, providing a more accurate description than continuous-time or Hessian-based approximations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.