Why does averaging weights over training, as in EMA or stochastic weight averaging, often improve the final model?

Quick Overview

Asks why averaging weights along a training run, through EMA or stochastic weight averaging, tends to give a better final model than the last iterate. Tests understanding of SGD noise, loss-surface geometry, mode connectivity and practical details such as BatchNorm statistics.

Why does averaging weights over training, as in EMA or stochastic weight averaging, often improve the final model?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

Why does averaging model weights over training, as in EMA or stochastic weight averaging, often improve the final model? Compare the averaged weights with the last iterate of the same training run. ```hint Model the late iterates Treat late-training iterates as noisy samples scattered around a minimum. What happens to the expected loss when you average samples instead of keeping one? ``` ```hint Why the average is still a good point The average of several low-loss points is not automatically a low-loss point. Ask what has to be true about where those points sit, and when it fails. ``` ### What a Strong Answer Covers - The noise picture of late-training SGD and how averaging reduces variance around the minimum - The link between averaging and flatter regions of the loss surface, and why that may lower test error - How EMA and SWA differ in the way they collect and weight snapshots - Why averaging works within one basin and usually fails across independently trained models - Practical caveats such as BatchNorm statistics and the choice of decay rate or averaging window ### Follow-up Questions - How do you choose $\beta$ for EMA, and what is its effective averaging window? - Why does averaging independently trained networks usually fail, while averaging models fine-tuned from one pre-trained checkpoint often works? - Is the flat-minima explanation settled? What is the main argument against it? - How does SWA compare with decaying the learning rate to zero at the end of training?

Overview: Asks why averaging weights along a training run, through EMA or stochastic weight averaging, tends to give a better final model than the last iterate. Tests understanding of SGD noise, loss-surface geometry, mode connectivity and practical details such as BatchNorm statistics.

Nov 24, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

Why does averaging model weights over training, as in EMA or stochastic weight averaging, often improve the final model?

Compare the averaged weights with the last iterate of the same training run.

What a Strong Answer Covers Guidance

  • The noise picture of late-training SGD and how averaging reduces variance around the minimum
  • The link between averaging and flatter regions of the loss surface, and why that may lower test error
  • How EMA and SWA differ in the way they collect and weight snapshots
  • Why averaging works within one basin and usually fails across independently trained models
  • Practical caveats such as BatchNorm statistics and the choice of decay rate or averaging window

Follow-up Questions Guidance

  • How do you choose β\beta for EMA, and what is its effective averaging window?
  • Why does averaging independently trained networks usually fail, while averaging models fine-tuned from one pre-trained checkpoint often works?
  • Is the flat-minima explanation settled? What is the main argument against it?
  • How does SWA compare with decaying the learning rate to zero at the end of training?