Why gradient clipping accelerates training: A theoretical justification for adaptivity

Jingzhao Zhang, Tianxing He, Suvrit Sra, Ali Jadbabaie
5/28/2019
math.OCcs.LG

Official code: JingzhaoZhang/why-clipping-accelerates (49 stars, Python, BSD-3-Clause, last commit 2020-02-07).

Abstract

We provide a theoretical explanation for the effectiveness of gradient clipping in training deep neural networks. The key ingredient is a new smoothness condition derived from practical neural network training examples.

Show full abstract

We observe that gradient smoothness, a concept central to the analysis of first-order optimization algorithms that is often assumed to be a constant, demonstrates significant variability along the training trajectory of deep neural networks. Further, this smoothness positively correlates with the gradient norm, and contrary to standard assumptions in the literature, it can grow with the norm of the gradient. These empirical observations limit the applicability of existing theoretical analyses of algorithms that rely on a fixed bound on smoothness. These observations motivate us to introduce a novel relaxation of gradient smoothness that is weaker than the commonly used Lipschitz smoothness assumption. Under the new condition, we prove that two popular methods, namely, \emph{gradient clipping} and \emph{normalized gradient}, converge arbitrarily faster than gradient descent with fixed stepsize. We further explain why such adaptively scaled gradient methods can accelerate empirical convergence and verify our results empirically in popular neural network training settings.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause

A pytorch implementation for the LSTM experiments in the paper: Why Gradient Clipping Accelerates Training: A Theoretical Justification for Adaptivity

497Python, ShellFeb 7, 20206 years agoBSD-3-Clause

Similar Papers

Cite this paper

@article{zhang2019gradient,
  title  = {Why gradient clipping accelerates training: A theoretical justification for adaptivity},
  author = {Jingzhao Zhang and Tianxing He and Suvrit Sra and Ali Jadbabaie},
  year   = {2019},
  eprint = {1905.11881},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1905.11881}
}

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

Discussion