Chapter 7 I.7
Optimisation
The gradient supplies a direction and never a distance, and every optimiser is a different answer to how far to go.
Descent is a local decision made repeatedly; optimisers differ in how much of the past they remember.
How this chapter is built
M3Load-bearing
The content is mathematics. Understanding is demonstrated by computation, not recall.
Five strands, not one. Mathematics is the spine; the other four are the body. A chapter cannot pay its way out of teaching with problems, nor out of problems with teaching.
Before you start
The problem
A gradient is not a training procedure. Step size, curvature, noise from minibatching and the schedule over time each decide whether the same gradients converge, oscillate, or diverge.
Apparatus
The mathematics this chapter leans on, held in Book 0 so it can be assumed here without being taught here. Not a gate — follow a link when a step stops making sense.
Convexity 0.OP.01 · Gradient descent 0.OP.02 · Momentum 0.OP.03 · Variance and covariance 0.PR.03 · Estimators, bias and variance 0.ST.01
Notation
- ηLearning rate
- βA momentum coefficient in an optimiser; the KL weight in a preference objective
- BBatch size
- θAll parameters of a model, taken together
- ∇Gradient operator
- VarVariance
- ℒThe loss
Propositions
- Prop. 1The gradient supplies the direction and never the distance.Descent knows which way is downhill locally and nothing about how far downhill continues. The learning rate is the missing half, and no optimiser removes the need to choose it.
- Prop. 2The batch size is a statement about gradient noise, not only about speed.A batch gradient is an estimate of the true one, with variance falling as one over the batch size. Choosing a batch is choosing how noisy each step is, and the noise is not purely a defect.
- Prop. 3A schedule is tuned to a step count, and does not survive being copied.The learning rate rises because the optimiser starts with no statistics and falls because a large step near the end discards what the earlier ones found. Both parts depend on the total budget.
Worked problems
0/5 problems0/4 variants0/10 exercisesowes 15 more
Not yet written. At M3 this chapter owes 5 worked problems across 4 distinct variants, and 10 exercises, every one with a published solution. The build enforces that from the day the chapter is marked published.