Worked examples — Learning rate effects on convergence
This page is the practice ground for Learning rate effects on convergence. The parent note showed you why the learning rate (the small number that scales each step of Gradient Descent) controls whether training crawls, cruises, or explodes. Here we hammer through every case that can happen, one worked example per case, so you never meet a situation you haven't already seen.
Before we start, one reminder of the only rule we use over and over — the update step:
For a bowl-shaped loss the slope is , so one step becomes The whole story of convergence lives in that one number in brackets. Call it the step multiplier: Every iteration multiplies your distance-from-the-minimum by . So . Keep this in your pocket — most examples below just compute and read off its meaning.
The scenario matrix
Here is every case class a single-variable learning-rate problem can throw at you. Each of the 8 examples below is tagged with the cell it fills.
| # | Case class | What makes it special | vs stability edge | Example |
|---|---|---|---|---|
| A | Tiny | near 1, glacial | Ex 1 | |
| B | "Sweet-spot" | small, fast | Ex 2 | |
| C | Perfect | , one-step | Ex 3 | |
| D | Overshoot but converging | , zig-zag inward | Ex 4 | |
| E | Exact boundary | , permanent oscillation | Ex 5 | |
| F | Divergence | , explosion | Ex 6 | |
| G | Degenerate / zero inputs | flat loss (), or start at minimum () | any | Ex 7 |
| H | Word problem + exam twist | pick from an ill-conditioned 2-D bowl (two s) | must satisfy the worst | Ex 8 |
The figure above plots the step multiplier against and colours the five behaviour zones. Every example is one dot on this line. Notice the two fences: (where , best possible) and (where , the cliff edge).
Example 1 — Case A: tiny learning rate (glacial)
- Find the step multiplier. . Why this step? tells us the whole trajectory: . No need to simulate one row at a time.
- Read off the sign and size. , and is very close to 1. Why this step? Close to 1 means each step barely shrinks the gap — the hallmark of "too small."
- Compute . . Why this step? We wanted a concrete number to see how little progress happened: after 10 steps we've only closed from to .
Verify: Started at gap , ended at — still of the way out. Monotonic (same sign, never overshoots), which matches . Symptom = slow but steady, exactly Case A. ✓
Example 2 — Case B: sweet-spot learning rate
- Step multiplier. . Why this step? Same trick: but comfortably below 1 → fast geometric decay.
- Three iterations. , , . Why this step? Each step multiplies by ; we list them so you can literally watch the gap shrink by each time.
- Compare. After only 3 steps we're at — far closer than Example 1 reached in 10. Why this step? This is the punchline: a bigger (but still safe) converges much faster.
Verify: . ✓ Same sign throughout (no overshoot), fast. This is the "just right" no-schedule-needed regime — Case B.
Example 3 — Case C: the perfect one-step rate
- Set the target. We want , and , so we need . Why this step? is the only thing multiplying ; the only way to kill the gap in one step is .
- Solve . . Why this step? This is exactly Newton's method here: stepping by (the inverse curvature) hits the bottom of a quadratic in one shot. See the curvature view.
- Take the step. , with , so . Why this step? Confirms the algebra with the raw update rule, not just the shortcut.
Verify: . ✓ Note is exactly half the stability edge . Case C.
Example 4 — Case D: overshoot that still converges
- Step multiplier. . Why this step? Now is negative but its size — the gap shrinks yet flips side each step.
- Iterate. , , . Why this step? We overshot past to the negative side (that's Case D), then overshot back, each time landing closer to .
- Interpret the picture. In the figure the point hops left-of-zero, right-of-zero, left again — a shrinking spiral toward the bottom. Why this step? Negative = geometry of crossing the valley; = still winning.
Verify: ; matches Example 2's magnitude but with alternating signs. Still converging because . ✓ Case D.
Example 5 — Case E: exactly on the boundary (endless oscillation)
- Find the edge. Stability edge is . Use . Why this step? This is the case — the exact frontier from the parent's condition .
- Compute and iterate. . So , , Why this step? means the gap never shrinks and never grows — it just flips sign: a perpetual bounce between and .
- Conclude. Loss at every step — flat forever, no progress. Why this step? Shows that "not diverging" is not the same as "converging." The edge is useless in practice.
Verify: , so for all . Loss constant at . ✓ Case E — the reason we use strictly, and in practice for margin.
Example 6 — Case F: divergence (explosion)
- Step multiplier. . Why this step? : every step doubles the gap while flipping its sign → runaway.
- Iterate. , , , . Why this step? Concrete explosion, matching the parent note's "large " example.
- Closed form. , so .
Why this step? Confirms exponential divergence; in real training this shows up as loss =
NaN.
Verify: , sign . ✓ , so divergence is guaranteed — Case F. The cure is a smaller , or Momentum/adaptive rates that damp this.
Example 7 — Case G: degenerate & zero inputs
- (a) gradient of a constant. everywhere. Why this step? The slope of a flat function is zero, so there's no downhill direction.
- (a) apply the update. . We never move, for any . Why this step? Shows the update is powered by the gradient — kill the gradient and learning stalls regardless of . (Equivalently : gap unchanged.)
- (b) start exactly at the bottom. , so . Why this step? We're already at the minimum; the gradient is zero, so we correctly stay put — a fixed point of the update.
Verify: (a) for all (no motion). (b) for all (already solved). ✓ Both are degenerate/zero-input cells — Case G. Lesson: a zero gradient (flat region, saddle, or exact optimum) freezes vanilla gradient descent; that's why Momentum exists to push through flat spots.
Example 8 — Case H: word problem + exam twist (one , two curvatures)
- Each coordinate updates independently. For coordinate : . Why this step? The loss splits into two separate 1-D bowls, so our -analysis applies to each with its own .
- Stability must hold for BOTH. Need for . The tightest is the largest : Why this step? If the steep direction () diverges, the whole run diverges — the big curvature sets the ceiling. This is smoothness in action ().
- Now the flat direction pays the price. Take (the limit). Its multiplier is Why this step? is painfully close to 1 → crawls (like Case A) even though we chose the biggest legal .
- Name the culprit (exam twist). The ratio is the condition number. Why this step? Big = one direction forces a small while another then converges slowly — the classic ill-conditioning bottleneck. Fixes: Momentum, Adam Optimizer, or preconditioning with the Hessian Matrix.
Verify: ; at that , (slow) and (edge — barely stable). . ✓ Case H — this is precisely why constant single- descent struggles and adaptive methods win.
Recall Quick self-test
The step multiplier for a 1-D bowl is r ::: r = 1 - η·λ
Gap after t steps ::: w_t = r^t · w_0
One-step-to-minimum happens when ::: η = 1/λ (so r = 0)
Permanent oscillation (never settles) happens at ::: η = 2/λ (r = -1)
Divergence happens when ::: η > 2/λ (|r| > 1)
In a multi-dimensional bowl, the safe η is capped by the ::: largest curvature λ_max, giving η < 2/λ_max
The number that predicts slow convergence despite a legal η is the ::: condition number κ = λ_max/λ_min