More momentum is not monotonically better
numeric▲▲△On the quadratic of I.7.B01 — , — compare plain descent with momentum at . Predict the ordering before looking, then explain the one that surprises you.
Hint
By I.7.X03 the buffer settles at for a steady gradient. What does that do to the effective step size, and what does an effective step size that is too large do?
Solution
The measurements. Steps to reach an error norm of :
| method | steps | ||
|---|---|---|---|
| plain descent | |||
| momentum, tuned | |||
| momentum, default | |||
| momentum, default | |||
| momentum, |
The tuned case behaves as advertised. steps against , a factor of , against the asymptotic prediction . The shortfall is the transient: momentum needs several steps before its average carries information, and 58 steps is not many multiples of that.
The surprise is the last row. At momentum takes steps — 3.3 times worse than using no momentum at all. More memory made it worse, decisively.
Why. By I.7.X03 a steady gradient drives the buffer to , so the effective step is . At that is a hundredfold amplification: an of behaves like , far past the stability threshold of . The iteration does not diverge only because the oscillation it induces is itself damped by the averaging — so instead of blowing up, it lurches around the valley, and the lurching is slower than walking.
The optimum is not near the default. For the tuned is , well below the everyone writes. The default is optimal for , and the further a problem is from that, the worse it serves — in both directions.
What to take from this. and are not independent knobs, and raising is a learning-rate increase wearing a different name. A configuration search that varies them separately is searching a space where the interesting direction is diagonal. It also explains a common experience: adding momentum to a run tuned without it makes things worse, and the fix is to lower at the same time rather than to conclude that momentum does not help.