Exponential weight averaging as damped harmonic motion

Jonathan Patsenker, Henry Li, Yuval Kluger
10/20/2023
cs.LGmath.OC

No confident code implementation found for this paper.

Abstract

The exponential moving average (EMA) is a commonly used statistic for providing stable estimates of stochastic quantities in deep learning optimization. Recently, EMA has seen considerable use in generative models, where it is computed with respect to the model weights, and significantly improves the stability of the inference model during and after training. While the practice of weight averaging at the end of training is well-studied and known to improve estimates of local optima, the benefits of EMA over the course of training is less understood. In this paper, we derive an explicit connection between EMA and a damped harmonic system between two particles, where one particle (the EMA weights) is drawn to the other (the model weights) via an idealized zero-length spring. We then leverage this physical analogy to analyze the effectiveness of EMA, and propose an improved training algorithm, which we call BELAY. Finally, we demonstrate theoretically and empirically several advantages enjoyed by BELAY over standard EMA.

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{patsenker2023exponential,
  title  = {Exponential weight averaging as damped harmonic motion},
  author = {Jonathan Patsenker and Henry Li and Yuval Kluger},
  year   = {2023},
  eprint = {2310.13854},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.13854v1}
}

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

Discussion