On the Relation Between the Sharpest Directions of DNN Loss and the SGD Step Length

Stanisław Jastrzębski, Zachary Kenton, Nicolas Ballas, Asja Fischer, Yoshua Bengio +1 more
7/13/2018
stat.MLcs.LG

Official code: kudkudak/dnn_sharpest_directions (11 stars, Python, last commit 2022-12-08).

Abstract

Stochastic Gradient Descent (SGD) based training of neural networks with a large learning rate or a small batch-size typically ends in well-generalizing, flat regions of the weight space, as indicated by small eigenvalues of the Hessian of the training loss. However, the curvature along the SGD trajectory is poorly understood.

Show full abstract

An empirical investigation shows that initially SGD visits increasingly sharp regions, reaching a maximum sharpness determined by both the learning rate and the batch-size of SGD. When studying the SGD dynamics in relation to the sharpest directions in this initial phase, we find that the SGD step is large compared to the curvature and commonly fails to minimize the loss along the sharpest directions. Furthermore, using a reduced learning rate along these directions can improve training speed while leading to both sharper and better generalizing solutions compared to vanilla SGD. In summary, our analysis of the dynamics of SGD in the subspace of the sharpest directions shows that they influence the regions that SGD steers to (where larger learning rate or smaller batch size result in wider regions visited), the overall training speed, and the generalization ability of the final model.

View on arXivView PDF

Code Implementations(1)

Code for "On the Relation Between the Sharpest Directions of DNN Loss and the SGD Step Length", ICLR 2019

112Python, ShellFeb 21, 20193 years ago

Similar Papers

Cite this paper

@article{jastrzbski2018relation,
  title  = {On the Relation Between the Sharpest Directions of DNN Loss and the SGD Step Length},
  author = {Stanisław Jastrzębski and Zachary Kenton and Nicolas Ballas and Asja Fischer and Yoshua Bengio and Amos Storkey},
  year   = {2018},
  eprint = {1807.05031},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1807.05031}
}

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

Discussion