Exponential weight averaging as damped harmonic motion