On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima

Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, Ping Tak Peter Tang
9/15/2016
cs.LGmath.OC

Official code: keskarnitish/large-batch-training (147 stars, MIT, TensorFlow, last commit 2017-04-24).

Abstract

The stochastic gradient descent (SGD) method and its variants are algorithms of choice for many Deep Learning tasks. These methods operate in a small-batch regime wherein a fraction of the training data, say $32$-$512$ data points, is sampled to compute an approximation to the gradient. It has been observed in practice that when using a larger batch there is a degradation in the quality of the model, as measured by its ability to generalize. We investigate the cause for this generalization drop in the large-batch regime and present numerical evidence that supports the view that large-batch methods tend to converge to sharp minimizers of the training and testing functions - and as is well known, sharp minima lead to poorer generalization. In contrast, small-batch methods consistently converge to flat minimizers, and our experiments support a commonly held view that this is due to the inherent noise in the gradient estimation. We discuss several strategies to attempt to help large-batch methods eliminate this generalization gap.

View on arXivView PDF

Code Implementations(1)

TensorFlowMIT

Code to reproduce some of the figures in the paper "On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima"

14723PythonSep 13, 20169 years agoMIT
batch-trainingdeep-learningkerasminimatheano

Similar Papers

Cite this paper

@article{keskar2016largebatch,
  title  = {On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima},
  author = {Nitish Shirish Keskar and Dheevatsa Mudigere and Jorge Nocedal and Mikhail Smelyanskiy and Ping Tak Peter Tang},
  year   = {2016},
  eprint = {1609.04836},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1609.04836}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1609.04836.svg)](https://codeofpaper.com/paper/1609.04836)

Discussion