Momentum: averaging out the noise

A smooth bowl with a high-frequency ripple riding on top, growing steeper the further out you go and vanishing at the optimum. Plain gradient descent (orange) gets stuck bouncing inside one ripple; momentum (blue) averages the alternating ripple gradient toward zero and keeps riding the bowl's gradient down.

A 1D loss curve made of a smooth bowl plus a high-frequency ripple, with two descent trajectories overlaid: plain gradient descent, which bounces inside one ripple, and momentum, which rides the bowl down.
A small time series of the raw gradient for plain gradient descent and the raw gradient and smoothed velocity for momentum, over recent steps.
ripple amp 0.08 ripple period 0.22 bowl steepness a 0.40
β 0.85 η 0.080
Orange dashed = smooth bowl alone. Solid curve = bowl + ripple, the actual loss. Momentum's m is an EMA of the gradient — a zero-mean alternating ripple gradient averages toward 0, leaving mostly the slow bowl gradient.