the.ai

Optimization / Training

verified

Momentum

Plain gradient descent forgets everything between steps, so it zig-zags across narrow valleys instead of running along them. Momentum keeps a running average of recent gradients and steps in that direction, cancelling the oscillation and accumulating speed where the direction is consistent.

Viz primitive · update-spectrumbeta = 0.9 · bars = 8

8 values. The left group decays steeply; the right group is 99% of the way to flat, and reads flatter than the left.

Raw gradient magnitudes against the momentum-smoothed ones. Drag beta down to watch the averaging fail and the raw noise come back through.

0.9

Reviewed by opendroid · 2026-08-04