Adaptive Inertia: Disentangling the Effects of Adaptive Learning Rate and Momentum

Zeke Xie, Xinrui Wang, Huishuai Zhang, Issei Sato, Masashi Sugiyama
6/29/2020
cs.LGstat.ML

Official code: zeke-xie/adaptive-inertia-adai (148 stars, Python, MIT, PyTorch, last commit 2023-02-17).

Abstract

Adaptive Moment Estimation (Adam), which combines Adaptive Learning Rate and Momentum, would be the most popular stochastic optimizer for accelerating the training of deep neural networks. However, it is empirically known that Adam often generalizes worse than Stochastic Gradient Descent (SGD).

Show full abstract

The purpose of this paper is to unveil the mystery of this behavior in the diffusion theoretical framework. Specifically, we disentangle the effects of Adaptive Learning Rate and Momentum of the Adam dynamics on saddle-point escaping and flat minima selection. We prove that Adaptive Learning Rate can escape saddle points efficiently, but cannot select flat minima as SGD does. In contrast, Momentum provides a drift effect to help the training process pass through saddle points, and almost does not affect flat minima selection. This partly explains why SGD (with Momentum) generalizes better, while Adam generalizes worse but converges faster. Furthermore, motivated by the analysis, we design a novel adaptive optimization framework named Adaptive Inertia, which uses parameter-wise adaptive inertia to accelerate the training and provably favors flat minima as well as SGD. Our extensive experiments demonstrate that the proposed adaptive inertia method can generalize significantly better than SGD and conventional adaptive gradient methods.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

[ICML 2022, Oral] The PyTorch Implementation of Adaptive Inertia Methods. The algorithms are based on our paper: "Adaptive Inertia: Disentangling the Effects of Adaptive Learning Rate and Momentum".

14811Python, Jupyter NotebookJun 24, 20203 years agoMIT
aideep-learningmachine-learningoptimizationoptimizer+1 more

Similar Papers

Cite this paper

@article{xie2020adaptive,
  title  = {Adaptive Inertia: Disentangling the Effects of Adaptive Learning Rate and Momentum},
  author = {Zeke Xie and Xinrui Wang and Huishuai Zhang and Issei Sato and Masashi Sugiyama},
  year   = {2020},
  eprint = {2006.15815},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2006.15815}
}

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

Discussion