Gradient Descent Visualiser
Drag the learning rate and watch a real optimiser walk a loss surface down, converge, crawl or diverge.
The learning rate is above the stability limit of 0.1250 for this surface, so every step overshoots by more than it corrects.
- Steps taken
- 5
- Starting loss
- 16.7600
- Final loss
- diverged
- Stability limit on the learning rate
- 0.1250
- Your learning rate as a share of it
- 120%
- Steps to a loss below 0.001
- not reached
Two knobs, one lesson: the largest learning rate you can use is set by the steepest direction, and the speed you actually get is set by the shallowest one. Stretch the bowl to 30 and the picture becomes unmistakable — the path bounces across the narrow valley, making almost no progress along its floor, because a rate small enough not to diverge in y is far too small to move in x. That single geometry is behind most of what optimiser design has been doing for a decade.
Momentum is the cheapest fix on this surface. It averages the oscillation in the steep direction, where consecutive gradients point opposite ways and cancel, while accumulating in the shallow direction, where they agree. Set momentum to 0.9 with a stretch of 20 and watch the bounce collapse into a curve. Per-parameter methods like Adam attack the same problem from the other side, by rescaling each direction so the bowl is closer to round.
What this leaves out is everything that makes real training hard: stochastic gradients, non-convexity, saddle points, batch-size effects and learning-rate schedules. It also has two parameters rather than a few billion. What survives the jump in scale is the relationship — if your loss diverges, the rate is above the limit set by the sharpest curvature in the model; if it plateaus, you are crawling along a flat direction and no amount of patience fixes the geometry.