Why Warmup the Learning Rate? Underlying Mechanisms and Improvements

Dayal Singh Kalra, Maissam Barkeshli
6/13/2024
cs.LGcond-mat.dis-nnstat.ML

No confident code implementation found for this paper.

Abstract

It is common in deep learning to warm up the learning rate $η$, often by a linear schedule between $η_{\text{init}} = 0$ and a predetermined target $η_{\text{trgt}}$. In this paper, we show through systematic experiments using SGD and Adam that the overwhelming benefit of warmup arises from allowing the network to tolerate larger $η_{\text{trgt}}$ {by forcing the network to more well-conditioned areas of the loss landscape}. The ability to handle larger $η_{\text{trgt}}$ makes hyperparameter tuning more robust while improving the final performance. We uncover different regimes of operation during the warmup period, depending on whether training starts off in a progressive sharpening or sharpness reduction phase, which in turn depends on the initialization and parameterization. Using these insights, we show how $η_{\text{init}}$ can be properly chosen by utilizing the loss catapult mechanism, which saves on the number of warmup steps, in some cases completely eliminating the need for warmup. We also suggest an initialization for the variance in Adam which provides benefits similar to warmup.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{kalra2024warmup,
  title  = {Why Warmup the Learning Rate? Underlying Mechanisms and Improvements},
  author = {Dayal Singh Kalra and Maissam Barkeshli},
  year   = {2024},
  eprint = {2406.09405},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2406.09405},
  url    = {http://arxiv.org/abs/2406.09405v2},
  journal = {NEURIPS 2024 2024}
}

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

Discussion