c17 · Section 2
Choosing a step size
What happens when the step is too small or too large?
L1Core
The idea, one concrete case and enough to use it. Every simplification is marked and linked to the precise statement.
One parameter, one objective f(x) = 2x², three step sizes. Start at x = 1 and apply the update of the previous section; the gradient of 2x² is 4x, so one step replaces x by x − η(4x) = (1 − 4η)x, and a single number predicts the entire trajectory. Each row of the table below evaluates that factor for a different step size, and the rows cover the three regimes a one-knob quadratic can show.
| step η | after 1 | after 2 | after 3 |
|---|---|---|---|
| 0.1 | 0.6 | 0.36 | 0.216 |
| 0.25 | 0 | 0 | 0 |
| 0.6 | −1.4 | 1.96 | −2.744 |
The first row progresses slowly: it still moves, but it removes only 40 per cent of the distance at each iteration. The second row reaches the minimum in one step and remains there. The third row overshoots, reverses sign, and amplifies: after three iterations it sits farther from zero than it began, and its objective is 15.06 against the initial 2. The objective and the starting point are the same in every row, so each difference between them comes from the multiplier alone.
The learning rate is the number η, the multiplier on the gradient, and it is the one setting every gradient procedure must select. An insufficient step produces slow progress; an excessive step fails to converge, or diverges outright [S:27:235-235]. The table demonstrates both extremes in one dimension: a modest step yields a modest improvement, while an excessive step yields a growing oscillation.
The boundary is determined by curvature. Write L for the largest curvature of the objective, the maximal rate at which the gradient can change. On a one-parameter quadratic the gradient at distance x from the minimum is exactly Lx, because the derivative of ½Lx² is Lx, so substituting it into the update gives
and the distance from the minimum is multiplied by the same factor at every iteration. A geometric sequence tends to zero exactly when its ratio has modulus below one, and that factor has absolute value below one precisely when η is below 2/L. For the table L = 4, the second derivative of 2x², so the interval is 0 < η < 0.5, the middle row sits at η = 1/L = 0.25, and the last row lies outside the interval. [F01]
Worked example: the table cannot show the fourth regime, a little inside the edge. At η = 0.49 the factor is 1 − 4(0.49) = −0.96. The distance from zero falls by 4 per cent at every iteration while its sign flips, so the run converges by zigzagging. Each entry in the table is a power of 1 − 4η: at η = 0.1 the factor is 0.6, and at η = 0.6 it is −1.4.
The verbal rule follows from the factor. A step below 1/L is cautious, a step at 1/L arrives at the minimum of a one-knob quadratic, and a step between 1/L and 2/L approaches while oscillating. At exactly 2/L the factor is −1 and the trajectory alternates between two points indefinitely. Above 2/L the distance grows without bound [S:63:314-314].
Stop and try
on the objective f(x) = x², the curvature is 2, the second derivative of x². Which constant steps converge? What happens at η = 1, and why does the set of converging steps have no largest member?
Key idea
The learning rate is the multiplier on the gradient. On a one-knob quadratic, steps below 2/L converge and the step 1/L reaches the bottom in one move. With several knobs, 1/L maximises the guaranteed fall but is not the fastest step: the step that minimises the worst-case factor is 2/(L + m), where m is the smallest curvature, and m then sets the pace, as section 17.4 shows. The stable interval is a property of the curvature, not of the direction.
The interval is exact only for a quadratic. On a curved objective the curvature changes along the trajectory, so a step that is safe at the commencement can be excessive later. A long thin valley is poorly conditioned, with curvatures spread over a wide range, and makes the procedure zigzag [S:63:316-316]. The boundary 2/L also requires L, which the machine rarely knows in advance [S:63:315-315]. The practical response is to measure the curvature or to search along the step, and the next section supplies the inequality that makes a search provable.
L2Deepen
The formal statement, the derivation and the edge cases. It refines L1 and never contradicts it.
The formal statement. Take one knob and the quadratic with , whose gradient is . Run from any start. Then at every step, and for every start exactly when . The hypotheses are a quadratic with positive curvature , a constant step , and exact arithmetic.
The derivation. Substitute the gradient into the update: . The factor does not depend on , so induction gives the power. A geometric sequence tends to zero exactly when its ratio has modulus below one, and is two inequalities. The right one, , holds for every positive . The left one, , gives . So the window has a finite top and no positive bottom, and its top comes from overshoot rather than from slowness. At the factor is , and the run alternates between and forever.
The edge case. With several knobs the factor stops being one number. On the error obeys , so along the eigenvector with curvature the error is multiplied by . A step of sets the factor for the largest curvature to zero and leaves every other factor alone. The rule that lands on the bottom is therefore a one-knob fact: it holds because in one dimension there is only one curvature to match. In dimensions, with the smallest curvature, the slowest factor is , and Bach states the consequence plainly: the smallest eigenvalue sets the rate for all of them [S:77:131-131].
Bach also computes the constant step that is best in the worst case over the whole spectrum, and the factor for is slightly larger than the best one [S:77:130-130]. The core's choice is the right first answer and not the best one. The difference is visible only when the curvatures are spread, which the one-knob table cannot show.
What the core hid. The core used the table to display three regimes and then stated the window as a property of the curvature. It hid the fact that the top of the window is a stability boundary, not a performance boundary. Below every run converges, and how fast it converges depends on the smallest curvature. The one-knob example cannot show that, because there the smallest and largest curvatures are the same number. The core also hid where comes from: the window is exact only if you know the curvature, and section 17.3 replaces that knowledge with a bound.
L3Research
Full rigour, the original sources and the open questions. This is the research frontier.
Original sources. Murphy states the quadratic boundary as an if-and-only-if for steepest descent, with the largest eigenvalue in the denominator, and then gives the general smooth condition [S:63:314-315]. Bach derives the same conclusion in the form that every step below gives exponential convergence [S:77:130-130]. The line-search alternative has its own account: Murphy gives the exact step for a quadratic and the Armijo test for everything else [S:63:315-316], and Boyd and Vandenberghe prove that backtracking terminates [S:44:478-479].
An open question. The window needs , and a training run rarely has it. The field has not settled how to pick a step when the curvature is unknown and a line search is too expensive. The heuristics in the corpus are local: undo a step that raised the loss and shrink it, or raise it when the loss fell [S:27:235-235]. Deisenroth and coauthors prove that the undo rule gives monotonic convergence [S:27:236-236], which is a guarantee about not getting worse rather than about speed. Evidence that would settle a proposal: a sweep over problems with different spectra, an online estimate of with its cost counted, and a measured step count that matches the count.
A frontier result. AdaGrad removes the single step and gives each coordinate its own. It accumulates squared gradients and divides by their square root [S:69:561-562], so the effective rate falls like and no global is needed [S:69:562-562]. That rate is the one section 17.6 rejects: a per-coordinate step whose size decays like has a divergent sum of squares, so AdaGrad is not an instance of the schedule class that section proves. Its guarantee comes from its own analysis, not from the Robbins–Monro series, which are sufficient for that proof and not necessary [S:46:28-28]. The method is still the reason a sparse feature can take a large step while a dense one takes a small step.
What to read next. Read Murphy section 8.2.2 for the boundary and the Armijo test [S:63:314-316]. Read Boyd and Vandenberghe section 9.2 for backtracking and its termination proof [S:44:478-479]. Read Bach section 5.2.1 for the best constant step over a known spectrum [S:77:130-130]. Then read the AdaGrad section of Dive into Deep Learning for the per-coordinate step [S:69:561-562].