This page is your self-test for Learning Rate Scheduling. Every problem states its difficulty level (L1 → L5). Try each one first, then open the collapsible solution. After every level there is one trap callout — the exact mistake most people make there.
Notation reminder (every symbol used on this page, defined here so you never need the parent open):
η = learning rate, the size of each parameter step.
η0 = starting learning rate; η(t) = the learning rate at training step or epoch t.
ηmax = peak learning rate a schedule reaches; ηmin = floor value a schedule decays down to.
γ = step-decay multiplier, the factor (0<γ<1) by which η is multiplied at each drop.
s = drop interval for step decay: the number of epochs between drops.
λ = decay rate for exponential (e−λt) and inverse (1/(1+λt)) schedules; bigger λ = faster decay.
T = period (total length) of a cosine cycle; Tw = warmup length in steps.
Linear warmup schedule: for the first Tw steps the learning rate ramps up straight from 0 to ηmax: η(t)=ηmax⋅Twt for t≤Tw. Why: at step 0 the weights are random and Adam's variance estimate is unreliable, so tiny early steps prevent blow-up.
⌊x⌋ = the floor: the biggest whole number ≤x (e.g. ⌊2.7⌋=2).
V = the steady-state variance of the parameter around a minimum (how much it "buzzes"); σ2 = gradient-noise variance; a = curvature of the local quadratic loss.
(a) Step decay → 3 (the floor ⌊t/s⌋ counts how many drops happened).
(b) Exponential decay → 1 (smooth e−λt curve).
(c) 1/t decay → 4 (denominator grows linearly in t).
(d) Cosine annealing → 2 (the cos term).
Why the floor gives a staircase:⌊t/s⌋ jumps up by 1 only when t crosses a multiple of s, so η is flat between drops and then multiplies by γ — a staircase.
Figure s01 — the step-decay staircase. Below, the red curve is η(t)=η0γ⌊t/s⌋ with η0=0.2, γ=0.5, s=20. Notice three things: (1) between the dotted vertical lines the red curve is perfectly flat — η does not change mid-block; (2) at each multiple of s=20 epochs it drops by a factor γ=0.5 (each arrow marks a halving); (3) the drops get smaller in absolute size because they multiply an ever-smaller number. This is the "train at a plateau, then suddenly drop to a lower basin" behaviour.
Recall Solution 1.2
At t=0: cos0=1, so η=ηmin+21(ηmax−ηmin)(1+1)=ηmin+(ηmax−ηmin)=ηmax.
At t=T: cosπ=−1, so η=ηmin+21(ηmax−ηmin)(1−1)=ηmin.
Why memorise the endpoints: they are the two anchor points — everything else is a smooth ride between them.
Recall Solution 1.3
The inverse / 1/t decay, η(t)=η0/(1+λt).
Why: it behaves like η0/t for large t; the harmonic series ∑1/t=∞ (you can still travel arbitrarily far) while ∑1/t2<∞ (the noise dies out).
Halve η to 0.01: V=80.01⋅2=0.0025 — exactly half.
WHY it halves cleanly: in the small-η approximation V∝η linearly, so scaling η by a factor scales V by the same factor. See Robbins-Monro Stochastic Approximation for the full derivation the parent note gives.
Recall Solution 3.2
ηa=0.02⋅4=0.08, so 2−ηa=1.92.
V=4⋅1.920.02⋅2=7.680.04=0.005208….
The exact value is slightly larger than the approximation 0.005.
WHY: the approximation drops the −ηa term, replacing 2−ηa=1.92 by 2. Dividing by a bigger number (2) gives a smallerV. So the approximation always underestimates V (for 0<ηa<2). The gap grows as ηa grows.
Recall Solution 3.3
The formula expects a drop every 30 epochs=30×500=15000 steps.
Feeding raw steps means it drops every 30 steps instead.
Ratio =15000/30=500×faster decay.
WHY this matters: after just 30 steps η has already halved; after 300 steps it is 0.510≈0.001 of η0 — training effectively freezes almost immediately. Always confirm the time unit t.
(b) Step 7000 — past warmup, so we are in the cosine phase. The cosine "clock" must be reset to start at the end of warmup. Define local time τ=t−Tw and a local cosine horizonTcos=Ttotal−Tw. (Here Tcos plays the role of the period T from the notation reminder, but measured only over the post-warmup portion — we rename it to avoid confusing it with the total run length.) So Tcos=12000−2000=10000.
τ=7000−2000=5000. That is exactly halfway (Tcos/2=5000).
WHY reset the cosine clock: if you used raw t in cos(πt/Ttotal), then at handoff (step 2000) the LR would jump down discontinuously instead of starting smoothly at ηmax. Shifting by Tw makes the two pieces meet cleanly at ηmax. Look at Figure s02 — the red curve is continuous at the join.
Recall Solution 4.2
Linear scaling rule: scale η by the same factor as the batch size. New η=1×10−3⋅4=4×10−3.
WHY: a 4× bigger batch averages over 4× more samples, so the gradient noise variance drops by ≈4×; you can afford a 4× larger step to keep the same effective progress per example. See Batch Size and Learning Rate scaling.
Add: a warmup. The now-larger 4×10−3 can destabilise early training, so ramp up over the first few thousand steps before applying it fully.
For η0/t: ∑t=1∞tη0=η0∑t=1∞t1 — the harmonic series, which diverges to ∞. ✔
For η0rt: ∑t=1∞η0rt=η0⋅1−rr — a finite geometric sum (since 0<r<1). ✘ The geometric schedule fails Condition 1: its total step budget is bounded.
Condition 2 (∑tη(t)2<∞, "noise dies out"):
For η0/t: ∑t=1∞t2η02=η02∑t=1∞t21 — a p-series with p=2>1, which converges (to η02π2/6). ✔ So 1/t decay satisfies both conditions.
(The geometric schedule is already disqualified by Condition 1, so its Condition-2 status is moot — though for completeness ∑r2t also converges, that cannot rescue it.)
Conclusion:1/t decay passes both Robbins–Monro conditions; the geometric schedule fails the first.
Practical consequence (one sentence): because a geometric/exponential schedule can only move the parameters a bounded total distance, if the minimum lies farther than that finite budget the training stalls short of it, whereas 1/t decay can always reach any distance while still driving the residual noise to zero.
Design: linear warmup over Tw=1000 steps (10% of budget) to a peak ηmax=1×10−3, then cosine anneal to ηmin=0 over the remaining 9000 steps.
Warmup length 10%: long enough for Adam's second-moment estimate v^ to stabilise, short enough not to waste budget. Why warmup at all: at step 0, v^≈0 so effective step η/v^ can explode.
Cosine, not step: smooth, spends most time high (fast travel) then flattens near the end (gentle settling) — see the parent note's endpoint check.
ηmin=0: we have a fixed budget and want the tightest final fit; the noise-floor result V∝η says driving η→0 minimises residual jitter.
Values (local cosine time τ=t−Tw, horizon Tcos=Ttotal−Tw=9000):
Step 500 (warmup, since 500<1000): η=ηmax⋅1000500=1×10−3⋅0.5=5×10−4.
Step 5500 (cosine, τ=5500−1000=4500=Tcos/2): cos(π⋅4500/9000)=cos(π/2)=0, so η=21(1×10−3)(1+0)=5×10−4.
Step 10000 (cosine end, τ=10000−1000=9000=Tcos): cos(π⋅9000/9000)=cosπ=−1, so η=21(1×10−3)(1−1)=0.
Sanity: the schedule starts at 0, climbs to ηmax at step 1000, and decays smoothly to 0 at step 10000 — continuous at every seam.
Restart 2 (start of cycle 2) at step T0+T1=100+200=300.
Restart 3 (start of cycle 3) at step T0+T1+T2=100+200+400=700.
WHY restarts help: each jump back to ηmax lets the ball hop out of a narrow basin and possibly find a wider, flatter minimum that generalises better. See Warm Restarts (SGDR).