Library · CC BY-SA 4.0

Alice's Adventures in aDifferentiable Wonderland

Alice's Adventures in a Differentiable Wonderland, Volume I: A Tour of the Land

Cover illustration of the book

Choose your version

The same text, told at every level, in every language and look shown here. Pick, then listen or download.

Listen and watch

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. The first three chapters lay the ground: what the book is about, the linear algebra and calculus a network runs on, gradient descent, and what a dataset and a loss function are.

This is a sample: 3 of 13 chapters.

From the lectures

A single radio tuning knob is nudged left and right while a needle on a dial moves towards a station mark; then the single knob becomes a whole panel of many small knobs all turned together.
A Few Pieces, Endlessly Scaled

Nudge the Knob, Listen

Take a radio with a single tuning knob and an unfamiliar station you want to find. Turn the knob a little and listen: is the music clearer or noisier than a moment ago?

Two arrows of length one share a starting point; as the second turns from the same direction through a right angle to the opposite direction, a readout shows the cosine going from 1 to 0 to minus 1.
Arrows That Point the Same Way

Cosine Similarity

The most important vector operation in the whole book is the dot product, also called the inner product. You multiply the two vectors entry by entry and add up everything you got, so the result is a single number, not a vector.

A valley-shaped curve y = (x − 2)² / 2 with two touching lines: at x = 1 the line slopes down with slope −1, at x = 3.5 it slopes up with slope 1.5.
A Recipe in Letters, and the Slope of a Curve

The Slope of a Touching Line

Draw a smooth curve that dips down and then climbs again, like a shallow valley, and choose a point on its slope. Lay a ruler so that it just touches the curve at that point without cutting through it.

Contour rings of a bowl seen from above; from a random start, a zigzag of arrows, each a step of some length in some direction, leads down to the centre, the minimum.
Walking Downhill in the Fog

Step by Step to the Bottom

Now the main event: finding the lowest point of a function, its minimum. The book assumes the function gives a single number and that the input may wander anywhere.

An inner space with two clusters of points, cars and bikes; a new photo lands as a point near the cars, and its nearest neighbours are circled.
From Practice Code to Real Data

Similar Things Sit Close

The chapter's figure adds a picture worth keeping. A trained model transforms its input step by step, and the inner versions of the data it produces often have a meaningful geometry: images with similar meaning land at nearby points in an inner space.

A pie chart splits one input's answer over three classes as 0.6, 0.3 and 0.1; beside it a bell curve centred on a best guess shows the spread around it.
Memorising Is Not Learning

Answers as Distributions

Predicting one single answer makes sense when, for each input, almost all of the probability sits on one value. The book relaxes that: instead of one answer, the model's outputs set the knobs of a whole probability distribution over the possible answers.

How it was made

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 source

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

Your own hard book, the same way

Upload a textbook or any difficult book. The first five minutes are free.

Upload a book