Positive-Negative Momentum: Manipulating Stochastic Gradient Noise to Improve Generalization

Zeke Xie, Li Yuan, Zhanxing Zhu, Masashi Sugiyama
3/31/2021
cs.LG

Official code: zeke-xie/Positive-Negative-Momentum (28 stars, Python, MIT, PyTorch, last commit 2022-08-30).

Abstract

It is well-known that stochastic gradient noise (SGN) acts as implicit regularization for deep learning and is essentially important for both optimization and generalization of deep networks. Some works attempted to artificially simulate SGN by injecting random noise to improve deep learning.

Show full abstract

However, it turned out that the injected simple random noise cannot work as well as SGN, which is anisotropic and parameter-dependent. For simulating SGN at low computational costs and without changing the learning rate or batch size, we propose the Positive-Negative Momentum (PNM) approach that is a powerful alternative to conventional Momentum in classic optimizers. The introduced PNM method maintains two approximate independent momentum terms. Then, we can control the magnitude of SGN explicitly by adjusting the momentum difference. We theoretically prove the convergence guarantee and the generalization advantage of PNM over Stochastic Gradient Descent (SGD). By incorporating PNM into the two conventional optimizers, SGD with Momentum and Adam, our extensive experiments empirically verified the significant advantage of the PNM-based variants over the corresponding conventional Momentum-based optimizers.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

[ICML 2021] The official PyTorch Implementations of Positive-Negative Momentum Optimizers.

286Python, Jupyter NotebookNov 3, 20204 years agoMIT
deep-learningmachine-learningmomentum-optimization-algorithmoptimizerpytorch+1 more

Similar Papers

Cite this paper

@article{xie2021positivenegative,
  title  = {Positive-Negative Momentum: Manipulating Stochastic Gradient Noise to Improve Generalization},
  author = {Zeke Xie and Li Yuan and Zhanxing Zhu and Masashi Sugiyama},
  year   = {2021},
  eprint = {2103.17182},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2103.17182}
}

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

Discussion