Real loss surfaces are badly scaled: some directions are steep, others nearly flat, often by factors of thousands. This bowl compresses that fact into one slider. The condition number is the ratio between the steepest and flattest curvature, and every pathology on this page comes from it.
Watch SGD first. The learning rate that is safe for the steep axis is timid for the flat one, so the trajectory zigzags violently across the valley while creeping along it. The stability boundary is not vague: on this bowl SGD converges if and only if the learning rate is below 2 divided by the condition number, and the readout tracks that limit live. Nudge the rate across it and the zigzag flips from shrinking to growing mid-flight.
Momentum helps for an averaging reason. The across-valley component of the gradient alternates sign once the rate is large enough to overshoot, so a running average cancels it, while the along-valley component always points the same way, so the average reinforces it. Same information, better spent.
Adam does something more radical: it divides each coordinate's step by the root-mean-square of that coordinate's own gradient history. Steep directions get shrunk, flat ones get boosted, and the valley becomes approximately round from the optimiser's point of view. That is why the green trail heads almost straight for the minimum, and why its behaviour barely changes as you drag the condition number from 1 to 40.
The honest caveat: this bowl is axis-aligned, and Adam's normalisation is per-coordinate, so this is its best case. Rotate the valley 45 degrees and Adam's advantage shrinks, because the ill-conditioning no longer lines up with the coordinates it normalises. Real transformers sit somewhere between, which is why Adam variants dominate but do not make conditioning irrelevant.
The maths
- The bowl and its condition number
Kappa is the slider. The contours are exact ellipses squashed by root kappa, which is why the drawing narrows as you drag it.
- SGD stability, exactly
Along the steep axis each step multiplies the coordinate by (1 - eta kappa). Past 2/kappa that factor is below -1: the sign alternates and the magnitude grows, which is the widening zigzag you can trigger with the slider.
- Adam, per coordinate
Each coordinate is divided by its own RMS gradient, so on a coordinate with gradients kappa times larger it takes a step roughly kappa times smaller than SGD would, cancelling the conditioning. The step size becomes about eta everywhere, which is why Adam tolerates rates that destroy SGD here.
Related terms
- TrainingTraining is the process that produces a model: showing it enormous amounts of text and adjusting its parameters until it gets good at predicting what comes next. It happens once, before you ever use the model.
- ParametersParameters are the learned numbers (weights) inside a model that hold everything it appears to know. The count of them is what people mean by model size, and they are fixed once training ends.
- ModelA model is the trained artifact at the centre of every AI coding tool: a large file of numbers (parameters) that, given some text, produces the most likely continuation. When people say "which model are you using," this is the thing they mean.