A problem no learning rate solves
counterexample▲▲▲Six decimal places on multipliers; step counts exact.
STATEMENT
Exhibit a quadratic on which every learning rate fails — not one badly chosen rate, but the whole stable range — and identify what is responsible. Then show that remembering the previous step fixes it, and by how much.
GIVEN
, so . Start at ; the target is an error norm below .
FIND
The stability limit; the step count for every across the stable range; the count at the optimal ; and the same for heavy-ball momentum at its own optimum, with the speed-up.
STRATEGY
The two directions decouple, as in I.7.B02, so the difficulty can be stated before anything is run: the steep direction demands , and at any such the flat direction’s multiplier is . One rate cannot serve both. Sweeping confirms there is no exception rather than merely no obvious one.
SOLUTION
Step 1 — the bind, stated in advance. Stability requires . At the largest permissible rate the flat direction is multiplied by
so it loses at most two parts in ten thousand per step, however is chosen. That is the counterexample in one line; the sweep is the demonstration.
Step 2 — the sweep.
| steep multiplier | flat multiplier | steps to | |
|---|---|---|---|
| diverges | |||
| diverges | |||
| diverges |
Nothing in the stable range does better than about steps for a thousandfold reduction on a two-dimensional problem with an exactly known Hessian.
Step 3 — the most instructive row. At the steep multiplier is exactly zero: . That direction is solved perfectly, in one step, and the run still takes steps — twice as many as the rates that solve it imperfectly. Perfect handling of the direction that constrains stability buys nothing, because the cost is entirely in the other direction. This is why “tune the learning rate” is not a complete answer to slow training.
Step 4 — the optimum, and its transient. gives and steps — slightly worse than at . As in I.7.B01, minimises the asymptotic rate while the run is measured over a finite budget. The gap is small here because is large enough that the asymptote arrives early.
Step 5 — momentum. Heavy ball keeps a running average of gradients, so the recurrence is second-order and its rate depends on . At the classical optimum
with and 708 steps, against : a speed-up of .
Step 6 — why it works. Momentum does not make the steep direction stable at a larger rate; note that is above the plain-descent threshold of . It works because the steep direction’s gradient alternates in sign when overshooting, so consecutive contributions to the moving average partly cancel, while the flat direction’s gradient keeps the same sign and accumulates. The average suppresses oscillation and amplifies drift, which is exactly the asymmetry the problem needs.
Answer
Stability requires , and every rate in that range needs at least about steps; takes . The obstruction is itself, not the choice of rate.
Heavy-ball momentum at , reaches the same target in 708 steps, a speed-up.
Check — sanity
The measured momentum rate matches the theory. for , exactly. And it equals the plain-descent rate for a problem of condition number 100 — momentum turns into an effective , which is what “the square root” means concretely.
The speed-up is , not the the rates suggest. Both methods are measured to a fixed target from a fixed start, so both pay a transient the asymptotic rates ignore, and momentum’s is proportionally larger because it needs several steps before its average carries information. Quoting as the speed-up would be quoting a limit as a measurement.
Divergence appears immediately above . gives a steep multiplier of and diverges; gives and converges. Five parts in ten thousand separate them, which is the sharp edge of I.7.B01 in a stiffer problem.
Where this breaks
The momentum parameters here were computed from and , which nobody has for a real network. In practice is set to and left there, which is optimal for and merely serviceable elsewhere — the tuned value above is , and using on this problem gives up much of the advantage. The theory says what is available; it does not hand over the setting.
Momentum also does not help with the part of the difficulty that is noise. Averaging gradients reduces variance, but the accelerated rate of I.7.T2 assumes exact gradients, and with minibatch noise the improvement degrades towards the noise floor. On a stochastic problem momentum is worth having and the factor is smaller than .
Finally, this is a fixed quadratic and a neural network is not. Its curvature changes as training proceeds, so the tuned for step 1 is wrong by step 10 000 — which is one honest reading of why schedules exist, and why adaptive methods that estimate curvature per coordinate as they go, rather than being told it once, are the ones that ended up in use.
Variation
Set — the default nobody tunes — and keep at its value above. Predict whether the run gets faster or slower before measuring, then find the for which is optimal. That number explains where the default came from.