Visual walkthrough — Gradient descent and variants — convergence analysis
We build up in steps. Each step says WHAT we do, WHY we do it, and WHAT IT LOOKS LIKE (a picture). Read the pictures — they carry the argument.
Step 1 — The one symbol everything rests on: the gradient arrow
WHAT. We have a function that eats a point and returns a height (a number). Think of a landscape: each spot on the floor has a height . We want the lowest spot.
The gradient, written , is an arrow drawn on the floor at the point . It points in the direction where the height climbs fastest, and its length says how steeply.
WHY this arrow and not some other direction? Because "downhill-steepest" is exactly the direction that lowers our height the most per unit of walking. Among all directions of length 1, the amount the height changes as you step is the number — the dot product of the two arrows.
PICTURE.
Look at the red arrow (uphill) and its blue flip (downhill). The green dashed rings are level sets — spots of equal height, like contour lines on a map. Notice the arrow is always perpendicular to the ring it sits on: that is the visual signature of "steepest".
Step 2 — Bounding the wildness of : the two curvature walls
WHAT. To promise anything about progress, we must forbid from being arbitrarily wild. We pin its curvature (how fast the slope itself changes) between two numbers: a ceiling and a floor .
WHY two walls? The ceiling stops us from overshooting (if we don't know how sharply the floor can bend up, we can't pick a safe step). The floor stops the valley from being infinitely flat at the bottom (a flat bottom means the gradient dies and we crawl forever). One wall controls safety, the other controls speed.
PICTURE.
The dark blue curve is . The yellow parabola (curvature ) hugs it from above; the green parabola (curvature ) hugs it from below. is trapped in the sandwich. Their ratio
is the condition number — means the two walls coincide (a perfect bowl); large means a long thin trough.
Step 3 — The Descent Lemma: replacing the hill with a parabola we can minimize
WHAT. We turn the ceiling wall into a usable inequality. Starting from a point and looking at any other point :
WHY build this? Because we can't minimize the true foggy hill — but we can minimize a parabola exactly, in one shot. If we lower this over-estimating parabola, we've provably lowered too. That's the engine of every proof.
Where it comes from — the concrete two-line sketch. Let . The fundamental theorem of calculus says the total height change is the running sum of the slope along the segment from to :
Subtract the flat "linear guess" from both sides and use the ceiling wall (the gradient can drift at most over distance ):
The last integral is exactly where the factor is born.
PICTURE.
The blue curve is ; the yellow parabola is the Descent-Lemma bound anchored at the black dot . They touch at (the bound is exact there) and the parabola stays above everywhere else. Its lowest point (yellow star) is where the next step lands.
Step 4 — One step of GD: how far the parabola lets us drop
WHAT. Plug the actual GD move into the Descent Lemma. Write for the gradient arrow at this step.
WHY this reveals the magic step. The net drop is . As a function of this is an upside-down parabola: too small → tiny step; too big → the penalty eats the gain. Its peak is at , giving the clean guarantee
PICTURE.
The curve plots drop per step against step size . It's zero at , peaks at (yellow star), and crosses back to zero at (red dot) — past which the "drop" goes negative, meaning the bound no longer promises any decrease. This single picture is why the parent's mnemonic says "below two-over-L you're well; at one-over-L, monotone descent."
Step 5 — Every quadrant of step size: safe, best, and exploding
WHAT. We now cover all regimes of so no reader hits an unshown case. Use the cleanest test problem, the 1-D bowl , where the update is . The number is the multiplier applied each step.
WHY the multiplier is everything. After steps the error is . So:
- (i.e. ): shrinks, all same sign — a gentle glide to zero.
- (i.e. ): lands exactly at the bottom in one step.
- (i.e. ): shrinks but flips sign each step — converges while zig-zagging.
- (i.e. ): bounces forever at the same height, never converging.
- (i.e. ): grows and flips — explodes outward.
PICTURE.
Four trajectories on the same bowl. Green () slides in from one side. Yellow () drops straight to the minimum. Blue () overshoots and lands on alternating sides, still homing in. Red () leaps out and climbs the walls — divergence. Speed lives only in the interval .
Step 6 — The strong-convexity floor gives the linear rate for general
WHAT. For a general -strongly convex, -smooth we now show the error shrinks by a fixed factor each step — using the floor wall from Step 2, not just a quadratic. Strong convexity gives a lower-bound twin of the Descent Lemma:
WHY this closes the loop. Combine it with the Descent Lemma drop from Step 4 (using ). Let be the value-gap. Step 4 gave ; subtract and feed in the floor inequality :
So the gap contracts by the fixed factor every step — that is linear (geometric) convergence, and the floor is exactly what makes it possible.
PICTURE.
The blue curve is the true value-gap ; the yellow dashed line is the guaranteed envelope . The gap is pinned under a shrinking geometric curve — the visual meaning of "linear rate". Below, the log-scale inset turns that curve into a straight line whose slope is the rate.
Step 7 — Balancing two directions: where comes from
WHAT. Real problems have different curvatures in different directions. Take with . The eigenvalues of the curvature are exactly (gentle) and (steep). One step size must serve both multipliers:
WHY the optimum is — the balancing argument. As grows from : the gentle factor decreases (still positive), while the steep factor first decreases to at then increases (turns negative inside the absolute value). One is falling, the other eventually rising — so the max is smallest exactly where the two curves cross. Set them equal:
Plug back into either factor:
PICTURE.
Top: the two factors (green, falling) and (red, V-shaped) plotted against ; their crossing point is the yellow star at , the lowest achievable max. Bottom: the resulting path on the stretched valley zig-zags across the narrow -direction while creeping along the long -floor — the visual meaning of a large .
Step 8 — The degenerate walls: and
WHAT. The two extreme condition numbers explain the whole spectrum.
- (): round bowl. With the multiplier is everywhere — GD finishes in one step. Best case.
- (only convex, flat bottom): the floor wall vanishes. The rate and — no fixed shrink factor; we fall back to the slow rate. This is why the parent warns "convexity alone does not give linear convergence." Think : its bottom is spoon-flat, the slope dies faster than any straight-line shrink.
WHY show both. They are the two endpoints: round bowls are trivial, flat-bottomed valleys are stubborn, everything else lives between with rate .
PICTURE.
Left: round bowl, one yellow arrow straight to the centre (). Right: the flat-bottomed curve — steps (red) get tinier and tinier as the slope flattens, never contracting by a fixed factor ().
The one-picture summary
Everything on one canvas: the true hill trapped between the -ceiling and -floor (Steps 2–3), the drop-vs- curve peaking at and dying at (Steps 4–5), the strong-convexity contraction (Step 6), and the anisotropic zig-zag whose speed is set by (Step 7). Read left to right: bound the hill → pick the safe step → the floor gives the rate → the condition number caps the speed.
Recall Feynman retelling — the whole walk in plain words
You're on a foggy hill. At your feet you can feel one arrow: the way up. Flip it — that's the way down — and that's where you step (Step 1). But how big a step is safe? You don't know the hill, so you agree on two rules: it never bends up faster than a ceiling , and (if you're lucky) it always bends up at least a little, (Step 2). The ceiling lets you draw a bowl-shaped lid that sits on top of the real hill and touches under your feet; sliding to the bottom of that lid is guaranteed to lower the real hill too (Step 3). How far to slide? Step size drops you the most; past you fly across the valley and climb higher — you explode (Steps 4–5). The floor is what promises real speed: it guarantees the slope is always steep enough that each step shaves off a fixed fraction of the remaining gap (Step 6). In two dimensions one step size must please a steep direction and a gentle one at once; the best you can do is make their two shrink-factors equal, which lands you at and a zig-zag whose speed is (Step 7). The two extremes: a round bowl finishes in one step, a spoon-flat bottom () makes you crawl forever (Step 8). That's the whole theory — bound the hill, pick the safe step, let the floor set the rate, and blame the condition number for any slowness.
Recall Quick self-check
Best step size for a strongly convex quadratic? ::: Best per-step shrink factor with that ? ::: Per-step value-gap contraction with ? ::: Step size that finishes a round bowl () in one step? ::: (multiplier ) Range of where GD is guaranteed to make progress? ::: Why does a flat-bottomed convex function () lose linear convergence? ::: ; no fixed shrink factor, only .
See also: Nesterov Acceleration and momentum turn into (fixing the zig-zag of Step 7); Newton's Method (second-order methods) rescales each direction so effectively becomes ; Stochastic Approximation (Robbins–Monro) explains why noisy gradients force a shrinking step.