Skip to main content
QUICK REVIEW

[Paper Review] Stochastic Training is Not Necessary for Generalization

Jonas Geiping, Micah Goldblum|arXiv (Cornell University)|Sep 29, 2021
Advanced Neural Network ApplicationsComputer Science91 references6 citations
TL;DR

This paper demonstrates that stochastic training is not necessary for generalization in deep neural networks, showing that full-batch gradient descent with explicit regularization can achieve state-of-the-art performance on CIFAR-10 (95.68% accuracy) comparable to SGD. The key insight is that implicit regularization from SGD's gradient noise can be replaced by explicit regularization, such as gradient-based regularization and aggressive clipping, enabling strong generalization without stochasticity.

ABSTRACT

It is widely believed that the implicit regularization of SGD is fundamental to the impressive generalization behavior we observe in neural networks. In this work, we demonstrate that non-stochastic full-batch training can achieve comparably strong performance to SGD on CIFAR-10 using modern architectures. To this end, we show that the implicit regularization of SGD can be completely replaced with explicit regularization even when comparing against a strong and well-researched baseline. Our observations indicate that the perceived difficulty of full-batch training may be the result of its optimization properties and the disproportionate time and effort spent by the ML community tuning optimizers and hyperparameters for small-batch training.

Motivation & Objective

  • To challenge the widely held belief that stochastic gradient descent (SGD) is essential for generalization in deep learning.
  • To isolate and replicate the generalization benefits of SGD without relying on stochastic mini-batching.
  • To demonstrate that explicit regularization can fully replace the implicit regularization of SGD in full-batch training.
  • To investigate whether full-batch training with proper hyperparameter tuning and regularization can match or exceed SGD performance on standard benchmarks.
  • To question the assumption that gradient noise from small batches is fundamental to generalization in over-parameterized models.

Proposed method

  • Training ResNet-18 on CIFAR-10 using full-batch gradient descent with batch size 50K (entire dataset).
  • Applying explicit regularization via gradient-based regularization (Smith et al., 2020b), which penalizes sharpness in the loss landscape.
  • Using aggressive gradient clipping to stabilize training and prevent divergence in full-batch settings.
  • Employing forward-difference approximation for Hessian-vector products to compute the regularizer efficiently.
  • Extending results to non-stochastic training without data augmentation by tuning learning rate, weight decay, and gradient clipping.
  • Validating results using loss landscape visualization to compare sharpness and generalization behavior between full-batch and SGD-trained models.

Experimental results

Research questions

  • RQ1Can full-batch gradient descent achieve generalization performance comparable to SGD on CIFAR-10 without data augmentation or stochasticity?
  • RQ2Is the implicit regularization of SGD truly necessary for generalization, or can it be replaced by explicit regularization?
  • RQ3What hyperparameter adjustments are required to stabilize full-batch training and achieve high accuracy?
  • RQ4How does the combination of gradient clipping and explicit regularization affect the sharpness of minima in full-batch training?
  • RQ5Can the benefits of sharpness-aware minimization (SAM) be replicated in a non-stochastic, full-batch setting?

Key findings

  • Full-batch training with explicit regularization achieved 95.68% ± 0.09 validation accuracy on CIFAR-10, matching a strong SGD baseline when both used data augmentation.
  • Without data augmentation, full-batch training still achieved over 95% accuracy using aggressive gradient clipping and explicit regularization.
  • The use of gradient-based regularization (Smith et al., 2020b) effectively mimicked the generalization benefits of SGD’s gradient noise.
  • Loss landscape analysis showed that full-batch training with proper regularization converges to flatter minima, similar to SGD.
  • The equivalence between gradient regularization and SAM was analytically established under specific hyperparameter settings, showing that both methods share a common mechanism.
  • The results indicate that the perceived difficulty of full-batch training stems from optimization instability and hyperparameter sensitivity, not an inherent limitation of the method.

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.