A Study of Gradient Variance in Deep Learning

Fartash Faghri, David Duvenaud, David J. Fleet, Jimmy Ba
7/9/2020
cs.LGstat.ML

Official code: fartashf/gvar_code (6 stars, Jupyter Notebook, last commit 2020-12-07).

Abstract

The impact of gradient noise on training deep models is widely acknowledged but not well understood. In this context, we study the distribution of gradients during training.

Show full abstract

We introduce a method, Gradient Clustering, to minimize the variance of average mini-batch gradient with stratified sampling. We prove that the variance of average mini-batch gradient is minimized if the elements are sampled from a weighted clustering in the gradient space. We measure the gradient variance on common deep learning benchmarks and observe that, contrary to common assumptions, gradient variance increases during training, and smaller learning rates coincide with higher variance. In addition, we introduce normalized gradient variance as a statistic that better correlates with the speed of convergence compared to gradient variance.

View on arXivView PDF

Code Implementations(1)

fartashf/gvar_codeOfficial100%

Code for the paper "A Study of Gradient Variance in Deep Learning" and a number of other ideas.

60Jupyter Notebook, PythonOct 22, 20185 years ago

Similar Papers

Cite this paper

@article{faghri2020study,
  title  = {A Study of Gradient Variance in Deep Learning},
  author = {Fartash Faghri and David Duvenaud and David J. Fleet and Jimmy Ba},
  year   = {2020},
  eprint = {2007.04532},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2007.04532}
}

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/2007.04532.svg)](https://codeofpaper.com/paper/2007.04532)

Discussion