
A Table Too Big to Keep
Some steps have a sharp corner where the slope is not defined, such as the popular ReLU, which lets positive numbers through and turns negative ones into zero.
Alice's Adventures in a Differentiable Wonderland, Volume I: A Tour of the Land

The same text, told at every level, in every language and look shown here. Pick, then listen or download.
The same player the product gives for your own book: the voice, the drawings as they are drawn, the text.
A modern textbook on how neural networks really work, from tensors and gradients to transformers. Chapter 6 shows how a program finds its own gradients: automatic differentiation, the reverse walk behind every trained model.
This is a sample: 1 of 13 chapters.

Some steps have a sharp corner where the slope is not defined, such as the popular ReLU, which lets positive numbers through and turns negative ones into zero.

So the book turns to the first genuine method, forward mode, and it rests on the chain rule. If one station feeds another, the reaction of the pair is the reaction of the second multiplied by the reaction of the first.

The book shows a way to trade some of that memory back for time, called gradient checkpointing. Picture four blocks in a row. On the forward pass, only the outputs of the first, second and fourth blocks are kept; these are the checkpoints.

Why is this so much better? Take the most common station of all, a layer that mixes its inputs with a grid of weights, as every layer of a chat model or a photo model does many times over.

Now back to the photocopier. Remember that when the backward walk passes an activation function, the travelling row is scaled by the function's slope. A deep model has many such stations, so the row is scaled again and again, and the factors multiply exactly like the copier's reductions.

The careful answer uses the idea of the ruler. For a function that curves upward like a bowl, any line that touches it at a point and stays below the whole function is a subgradient there, and its slope is a valid substitute for the missing slope.
Examples for: a curious adult with school maths who uses AI apps every day; add one modern instance per idea, such as how a chat assistant or a phone's photo app is trained
The lectures retell the English text of arXiv 2404.17625 (version 3, 2025) by Simone Scardapane, published under an open licence that allows retelling and translation. The retelling, the drawings and the voice are made by AI and checked against the book by a second model. How AI is used.
The lectures adapt the original and are released under the same licence, free to share and adapt with credit to the author and a link to this page: CC BY-SA 4.0
Upload a textbook or any difficult book. The first five minutes are free.
Upload a book