Revisiting the noise Model of SGD

Barak Battash, Lior Wolf, Ofir LindenbaumHeavyTails @ NeurIPS 2023

TL;DR

This paper argues that the noise in Stochastic Gradient Descent (SGD) is better modeled by a heavy-tailed Lévy distribution (specifically, the SαS distribution) rather than the traditional Gaussian assumption. They introduce a novel framework using Lévy-driven Stochastic Differential Equations (SDEs) to model individual DNN parameters, leading to a more accurate understanding of SGD's behavior, particularly its ability to escape local minima.

What Problem Does This Paper Address?

Stochastic Gradient Descent (SGD) is the workhorse optimization algorithm for training deep neural networks (DNNs). Its effectiveness is heavily influenced by the noise introduced by mini-batch sampling. While traditionally modeled as Gaussian, recent work suggests this might be an oversimplification. The authors aim to provide a more accurate characterization of this noise, specifically investigating its heavy-tailed nature and how it varies across different parameters within a DNN. Understanding this noise is crucial for comprehending SGD's ability to escape sharp local minima and generalize well.

Methods

The core of the paper is the development of a novel framework that models the dynamics of SGD using a system of N-dimensional Lévy-driven Stochastic Differential Equations (SDEs). Each of the N parameters in the DNN is treated as a separate one-dimensional Lévy process. This approach allows for the modeling of anisotropic noise, meaning each parameter can have its own distinct noise characteristics (specifically, its own SαS stability parameter, α). They leverage theoretical tools from SDEs and Lévy processes to analyze the escape time from local minima and the probability of escaping through specific parameters.

Datasets

The authors used several datasets for their experiments:

  • CINIC-10: Used for training ResNet models.
  • CIFAR-100: Used for training ResNet and Mobilenet models.
  • CoLA: Used for fine-tuning the BERT base model.
  • ImageNet: Used for evaluating various architectures like EfficientNet and Vision Transformers.
  • BreastW, Cardio, Satellite: Used for analyzing the mean escape time of SGD.

Key Insights and Ideas

  • SαS Distribution is Key: The paper provides strong empirical evidence that the Stochastic Gradient Noise (SGN) is better characterized by the SαS Lévy distribution, which inherently captures heavy tails, rather than a Gaussian distribution.
  • Parameter-Specific Noise: Crucially, different parameters within the same DNN exhibit distinct SGN properties, meaning a single α value for the entire network is insufficient. This anisotropy is a key finding.
  • Lévy-Driven SDEs for DNN Dynamics: The proposed framework of N-dimensional Lévy-driven SDEs offers a more nuanced and accurate way to model the complex dynamics of SGD, especially near local minima.
  • Escape from Local Minima: The heavy-tailed nature of SGN, particularly through large jumps in Lévy processes, is shown to be instrumental in allowing SGD to escape local minima. The paper provides theoretical tools to quantify this escape probability and time.

Key Results

  • Empirical Validation: Table 1 and Tables 2-3 show that the SαS distribution consistently provides a better fit to the empirical SGN than the Gaussian distribution across various architectures and datasets, with "SaS Wins" often exceeding 96%.
  • Escape Time Prediction: Figure 1 and Figure 6 demonstrate that the authors' theoretical predictions for the mean escape time from local minima align better with empirical results than previous models, especially with larger batch sizes.
  • Parameter Variability: Figure 7 and Figure 8 illustrate that the SαS stability parameter (α) varies significantly across different parameters and layers within a DNN, confirming the anisotropic noise hypothesis. Layers closer to the output tend to have heavier tails (lower α), suggesting they are more prone to escaping local minima.

Limitations and Future Work

  • Near Local Minima: The current framework is primarily valid for analyzing SGD dynamics near local minima. The authors acknowledge that the dynamics and noise characteristics of SGD in the early stages of training are not addressed.
  • Evolution of α: The paper does not fully explore how the SαS parameter α evolves over time during training, suggesting this as an area for future research.
  • Generalization of Schedulers: While the theorems are presented for exponential schedulers, the authors note that the framework can be expanded to other learning rate decay schemes.

Summary updated

BibTeX
@inproceedings{battash2023revisiting,
  author = {Barak Battash and Lior Wolf and Ofir Lindenbaum},
  title = {{Revisiting the noise Model of SGD}},
  booktitle = {HeavyTails @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=01eUekTYvE},
}
Figure