Course · eight worked examples
Neural Networks by Hand
Eight small networks, each solving a concrete problem. The first two can be checked with pencil and paper. The last is the transformer inside today's language models, at pencil-and-paper size.
Every stage shows the formula, the same formula with the real numbers in it, and the result.
- Forward pass
- Backpropagation
- Overfitting
- Images
- Text
- Attention
1958Perceptron
1Fruit Stand NeuronOne neuron, the idea behind the 1950s perceptron, works out prices from receipts.
1969XOR problem
2Hallway Light NetworkWhy a hidden layer is needed.
1986Backpropagation
3Will It Rain Tomorrow?A probability out, and how to score it.
1989Universal approximation
4Rain Tomorrow, Two Hidden LayersThe shape of a real network, checked on held-out days.
1991Weight decay
5When the Network MemorizesOverfitting on real patient data, and four cures.
1998LeNet reads digits
6Reading Handwritten DigitsA convolutional network on real digits.
2011RNNs write text
7One Letter at a TimeA recurrent network reads text and writes some.
2017Transformer
8Every Letter Looks BackThe transformer: the foundation of modern LLMs.
TodayLLMs
Large language modelsThe same design, many layers deep, with billions of parameters instead of 855.

