ContentsThe library

The Mathematics of Gradient Descent

The Largest Step a Curvature Will Tolerate

Last timeWhere the Gradient Comes From

On a quadratic the learning rate has an exact ceiling, and the loss curve of a run that exceeds it looks nothing like a run that is merely slow.

The previous two lessons produced a direction. A direction is not a step: it

has no length. Choosing the length is the one decision in training that a

practitioner still makes by hand, and it is the one with the sharpest

mathematics behind it.

The only function worth analysing

Take the simplest function with a minimum and some curvature, in one variable:

f(x)=12Lx2,f′(x)=Lxf(x) = \tfrac{1}{2} L x^2, \qquad f'(x) = L x

This looks too simple to be informative. It is not, for a reason worth being

explicit about. Expand any smooth function around its minimum x∗x^*. The

constant term is irrelevant to the update, the linear term is zero because the

gradient vanishes at a minimum, and what is left is the quadratic term plus

something that shrinks faster than quadratically. So near the bottom, every

loss is this function, with LL standing for the second derivative there.

The question of how large a step to take only becomes urgent near a minimum, so

the quadratic is the case that matters.

The lesson stops here

10 more paragraphs to go

You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.

The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.

See the planThe contents

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

The rest of this course

  1. 01Why the Steepest Direction Is the Negative Gradient
  2. 02Why the Gradient Is Computed Backwardsopening only
  3. 03The Largest Step a Curvature Will Tolerateyou are here
  4. 04One Ratio Decides How Long Training Takesopening only
  5. 05What Momentum Multiplies Your Step Size Byopening only
  6. 06The Gradient You Use Is Always the Wrong Oneopening only
  7. 07Dividing by the Size of Your Own Gradientsopening only
  8. 08The Variance That Keeps a Deep Network Aliveopening only

Read alongside