1.2.13 · D4Calculus & Optimization Basics

Exercises — Learning rate effects on convergence

2,316 words11 min readBack to topic

Figure — Learning rate effects on convergence
Figure s01: a bowl . A blue arrow (good ) steps from partway down toward the minimum; a pink arrow (too-big ) jumps clean across the minimum to the far wall — that jump-across is "overshoot".


Level 1 — Recognition

Exercise 1.1

State the gradient descent update rule and name each symbol in it.

Recall Solution

  • ::: the parameters (weights) at step — the position on the loss surface.
  • ::: the learning rate, a positive scalar that sets how far we move.
  • ::: the gradient, the arrow pointing uphill (steepest increase).
  • the minus sign ::: flips uphill into downhill, so loss goes down.

Exercise 1.2

For , write the gradient , then compute at .

Recall Solution

Differentiate : the slope of is , so At : . The arrow has length and points in the direction (uphill, away from the minimum at ).

Exercise 1.3

Given , , gradient , do one update. Which direction did move — toward or away from the minimum at ?

Recall Solution

We moved from to toward the minimum at . The minus sign did its job: positive uphill arrow, so we stepped in the negative direction.


Level 2 — Application

Exercise 2.1

, start , . Compute .

Recall Solution

Gradient .

Why a clean formula exists. Substitute the gradient into the update: . With this is — a linear recurrence, each term is times the one before. Unrolling from : , , and in general (a one-line induction: if then ). That is clean geometric decay toward .

Exercise 2.2

Same bowl , , but . Compute and describe what happens.

Recall Solution

Multiplier per step is .

: the value flips sign each step and doubles in magnitude. This is divergence — the step is so big we land farther out on the opposite wall each time. Figure s02 (below) plots these iterates climbing outward along the parabola.

Figure — Learning rate effects on convergence
Figure s02: the same bowl with . Pink arrows connect ; each landing point sits higher and farther out on the parabola, so the loss grows without bound.

Exercise 2.3

Linear regression: with , so the minimum is . Start , . Compute and .

Recall Solution

Gradient: (since ).

  • , so
  • , so

Moving up toward . The multiplier here is acting on the distance to : distance .


Level 3 — Analysis

Exercise 3.1

For (Hessian eigenvalue ), find the exact largest for which iterates do not blow up, and the that reaches the minimum in a single step.

Recall Solution

One step multiplies by . Repeated multiplication stays bounded exactly when , i.e. when lies between and : Solve the two halves separately.

  • Left inequality : subtract from both sides ; divide by (flip the sign because we divide by a negative) .
  • Right inequality : subtract ; divide by (flip again) .

Combining: . So the stability ceiling is (at exactly , , so it oscillates forever without shrinking). The one-step rate needs : . This is Newton's step .

Exercise 3.2

A general smooth loss has Lipschitz-gradient constant . Using the convergence condition from the parent note, state the maximum safe and the recommended "safety" .

Recall Solution

The condition is (see Lipschitz Continuity).

  • Ceiling: .
  • Recommended safe rate: — half the ceiling, a comfortable margin.

Exercise 3.3

An anisotropic bowl has Hessian eigenvalues (along ) and (along ). (a) What ceiling does stability impose? (b) What is the condition number , and why does it force slow progress on one axis?

Recall Solution

(a) Every axis must stay stable, so the tightest one wins: (b) . With capped by the steep axis, the shrink factor on the shallow axis is only per step — painfully slow. The valley is long and narrow: the steep direction limits , the shallow direction limits speed. This is exactly the pain the Hessian Matrix warns about and what Momentum and the Adam Optimizer were built to relieve. Figure s03 (below) shows the zig-zag path this forces.

Figure — Learning rate effects on convergence
Figure s03: elliptical contours of the narrow valley (steep along , shallow along ). The pink path takes tiny cautious steps along the shallow axis because is capped by the steep axis — visible slow crawl toward the yellow minimum.


Level 4 — Synthesis

Exercise 4.1

You measure that on quadratic with , the ratio holds every step. Recover the curvature constant .

Recall Solution

Gradient , so the multiplier is . Check: , ceiling , and — consistent with the clean decay we observed.

Exercise 4.2

Design a two-phase constant schedule for the bowl of Ex 3.3 (, ). You want (i) stability throughout and (ii) the axis reduced to of its start in as few steps as possible. Give and the number of steps on the axis.

Recall Solution

Stability: pick (the ceiling from Ex 3.3). Along , multiplier — that oscillates forever, no shrink. Too aggressive. Back off to the safe : But then the axis shrink factor is — very slow. Two-phase idea: Phase 1 use (kills immediately); Phase 2, once , raise to (the one-step rate for ) to finish fast. Why Phase 2 may ignore the axis — the assumption made explicit. Because these axes are decoupled (the loss splits as , no cross-term), the update only depends on . Once is exactly , its gradient , so every later step leaves at regardless of . That is the implicit assumption: Phase 2 is safe on the steep axis only because is already exactly zero, so the large curvature is never activated. In real (coupled, noisy) problems is only approximately , so a large could re-excite it — which is why practitioners decay smoothly instead of jumping. If instead we insist on a single : the axis needs . Solve: This is the whole reason Learning Rate Schedules and Adam Optimizer exist — one global cannot serve two curvatures at once.


Level 5 — Mastery

Exercise 5.1

Prove the parent note's descent inequality in 1D: for an -smooth loss, one step (with ) satisfies then derive the exact that maximises guaranteed decrease.

Recall Solution

Setup. -smoothness means the slope changes by at most per unit of ; the standard consequence (the "descent lemma") is Plug in the step (and ): Guaranteed decrease is . Maximise: set . The best drop is . And decrease is positive only while , i.e. — recovering the stability ceiling. This is why the parent note recommends : it is provably the best worst-case step.

Exercise 5.2

For , do the iterates converge for a fixed starting from any ? Analyse the curvature and explain why a constant is fragile here (link to why schedules help).

Recall Solution

Gradient ; second derivative (curvature) . The curvature is not constant — it grows like . Far out (large ) curvature is huge, so any fixed eventually violates the local ceiling and overshoots. Concretely with : , . Note the sign flipped (we jumped across the minimum at to the negative side) even though the magnitude did shrink from to . That sign-flip is the warning sign of overshoot: the step was large enough to cross the minimum. Push or a little higher and the flipped point lands farther out than it started — genuine divergence. Try : , now — magnitude actually grows. Near the curvature , so the same becomes far too timid and progress stalls (steps shrink like ). Moral: no single constant fits a surface whose curvature changes by orders of magnitude — early steps need small , late steps need larger effective . This is precisely what Learning Rate Schedules (warm-up then decay) and per-parameter methods like Adam Optimizer adapt to automatically.