Saved in:
Bibliographic Details
Main Authors: Morales-Brotons, Daniel, Vogels, Thijs, Hendrikx, Hadrien
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2411.18704
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913589971910656
author Morales-Brotons, Daniel
Vogels, Thijs
Hendrikx, Hadrien
author_facet Morales-Brotons, Daniel
Vogels, Thijs
Hendrikx, Hadrien
contents Weight averaging of Stochastic Gradient Descent (SGD) iterates is a popular method for training deep learning models. While it is often used as part of complex training pipelines to improve generalization or serve as a `teacher' model, weight averaging lacks proper evaluation on its own. In this work, we present a systematic study of the Exponential Moving Average (EMA) of weights. We first explore the training dynamics of EMA, give guidelines for hyperparameter tuning, and highlight its good early performance, partly explaining its success as a teacher. We also observe that EMA requires less learning rate decay compared to SGD since averaging naturally reduces noise, introducing a form of implicit regularization. Through extensive experiments, we show that EMA solutions differ from last-iterate solutions. EMA models not only generalize better but also exhibit improved i) robustness to noisy labels, ii) prediction consistency, iii) calibration and iv) transfer learning. Therefore, we suggest that an EMA of weights is a simple yet effective plug-in to improve the performance of deep learning models.
format Preprint
id arxiv_https___arxiv_org_abs_2411_18704
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Exponential Moving Average of Weights in Deep Learning: Dynamics and Benefits
Morales-Brotons, Daniel
Vogels, Thijs
Hendrikx, Hadrien
Machine Learning
Weight averaging of Stochastic Gradient Descent (SGD) iterates is a popular method for training deep learning models. While it is often used as part of complex training pipelines to improve generalization or serve as a `teacher' model, weight averaging lacks proper evaluation on its own. In this work, we present a systematic study of the Exponential Moving Average (EMA) of weights. We first explore the training dynamics of EMA, give guidelines for hyperparameter tuning, and highlight its good early performance, partly explaining its success as a teacher. We also observe that EMA requires less learning rate decay compared to SGD since averaging naturally reduces noise, introducing a form of implicit regularization. Through extensive experiments, we show that EMA solutions differ from last-iterate solutions. EMA models not only generalize better but also exhibit improved i) robustness to noisy labels, ii) prediction consistency, iii) calibration and iv) transfer learning. Therefore, we suggest that an EMA of weights is a simple yet effective plug-in to improve the performance of deep learning models.
title Exponential Moving Average of Weights in Deep Learning: Dynamics and Benefits
topic Machine Learning
url https://arxiv.org/abs/2411.18704