
AI
How a diffusion model draws pictures out of noise, and how a network memorises the answers before it learns the rule.
35 plates
Plates 35
- Plate 43 More Features Than Neurons AIGoing further A single neuron in a neural network often stands for several unrelated things. A model with just two neurons can arrange five features into a pentagon and keep them all. Open →
- Plate 44 Pictures Out of Noise AIGoing further Many AI image generators start from random static and remove it, one step at a time. A small network does the same in your browser, and a cloud of dots slowly condenses into a knot. Open →
- Plate 46 Learning by Heart, Then Learning the Rule AIGoing further A small neural network learns to add hours on a 24-hour clock. It gets its practice questions right almost at once, by memorising them, and only long afterwards answers questions it has never seen. Inside, it has built clocks. Open →
- Plate F13 Attention in Transformers AIGoing further A two-layer, eight-head Transformer reads a sentence in your browser, one character at a time, and guesses the next. Each thread is one act of attention; its brightness is the weight. Open →
- Plate F18 How a Neural Network Learns AIGoing further An aluminium relief milled to a network’s real error, a steel ball that steps down it by the real gradient, and a small network in glass and brass: light runs forward with the numbers and back with each weight’s share of the blame. Open →
- Plate F19 AlphaFold: A Protein’s Shape from Its Sequence AIGoing further A bronze ribbon model of a barley protein: 84 amino acids folded as AlphaFold predicts them, beside an enamel plate with its distance map, and the crystal structure that can be set inside it. Open →
- Plate F20 AlphaGo: Search Plus Intuition AIGoing further A kaya Go board set with the position after move 37 of game 2, AlphaGo against Lee Sedol in 2016, beside a 7 × 7 study board on which a real tree search grows as a tree of brass. Open →
- Plate F22 Embeddings: The Geometry of Meaning AIGoing further A black-lacquered, gilt-lined globe set with tiny pictures and brass name tags. Each is a direction from a small model: a picture and its caption point almost the same way. Open →
- Plate F25 The Mixture of Experts AIGoing further A model can hold hundreds of billions of parameters and use only a small share of them on each word: a router picks a few “experts” for it and the rest stay idle. Here is a small trained one, with 16 experts and 2 per letter. Open →
- Plate F26 Tokens and Scaling Laws AIGoing further Language models read tokens, not letters. Make a model bigger and give it more tokens, and its error falls along a power law. Here: byte-pair encoding running in your browser, and a family of small models that were really trained. Open →
- Plate F29 Learning from Human Feedback AIGoing further After pretraining, a chat model is tuned again on people’s preferences: people compare two answers, a reward model learns to score them, and the model trains against the score. Here: all three steps in a small model, computed in your browser. Open →
- Plate F31 Sparse Autoencoders AIGoing further One layer of a large model is thought to hold far more things than it has numbers. A sparse autoencoder splits them into lines that can be named and tested. Here, at small scale: a model that squeezes six things into two numbers, and an eight-line dictionary that reads it, all computed in your browser. Open →
- Plate F33 Speculative Decoding AIGoing further A large model writes one token at a time, and for each one it reads all its weights out of memory: the time goes on reading, not on arithmetic. In speculative decoding a small model guesses a few tokens ahead and the large model checks them all in one read, and the text comes out with exactly the distribution the large model would give on its own. Both models and every number on the bench are computed in your browser. Open →
- Plate F35 Reasoning Models AIGoing further A reasoning model writes out long steps before it answers; allowed to think longer, it tends to get more right, up to a point. Models like DeepSeek-R1 are trained with reinforcement learning, and on reasoning tasks the reward comes from a rule: 1 if the answer is right, 0 if it is not. On the bench, a small toy: eight writers do the same sum, a checker stamps each strip, and the group’s average decides how hard each strip pushes on the stops. All of it is computed in your browser. Open →
- Plate F37 Gaussian Splatting AIGoing further 3D Gaussian splatting turns a set of photographs into a 3D scene you can turn around in real time: the scene is millions of semi-transparent coloured 3D Gaussians, trained against the photos, and drawing it means projecting them, sorting them and stacking them up. On the bench, a capture stand and a bonsai drawn in Gaussians, and a small toy that trains in your browser. Open →
- Plate F39 Designing a Protein from Scratch AIGoing further A designed binder on the plinth: three helices in machined brass, docked in a groove on its target. A diffusion model denoises a backbone out of noise; a second network writes a sequence for that backbone. The lever runs the denoising backwards, and the bench redoes it on another target. Open →
- Plate F41 Video Diffusion AIGoing further A clip of video is a block with time in it. A model that makes video first compresses the block and cuts it into small pieces, then starts from noise and clears it step by step, every frame at once. Open →
- Plate F43 LLM Quantization AIGoing further A language model’s weights are stored with 16 bits each. Quantizing rounds them onto a coarser grid: 8 bits, 4, or only −1, 0 and +1. The model gets several times smaller and faster to read, at a cost in accuracy. Open →
- Plate F44 Vision-Language-Action Models AIGoing further A vision-language-action model looks at a camera image, reads an instruction and writes out how a robot arm should move next. These models start from large models trained on images and text from the web, then learn from a hundred thousand to over a million robot demonstrations. Open →
- Plate F47 Computer-Use Agents AIGoing further A computer-use agent works a computer the way a person does: it looks at a screenshot, then clicks with the mouse and types on the keyboard. Each step it takes a screenshot, thinks, and does one thing; the hardest part is landing on the right button, to the pixel. Open →
- Plate F49 AI Weather Forecasting AIGoing further AI weather forecasting uses models learned from decades of records of the atmosphere: from the atmosphere now and six hours ago they compute it six hours on, then step on to 10 or 15 days. They are far faster than physics models and better on many scores, but the records they learn from and the start of every forecast come from analyses that a physics model makes with observations. Open →
- Plate F51 FlashAttention and GPU Memory AIGoing further Done the standard way, attention in a Transformer is slow on a GPU less because of its arithmetic than because an N × N matrix of scores is written to memory and read back. FlashAttention cuts the work into blocks, finishes each in the chip’s shared memory and keeps a running softmax, so it gets the same result while that matrix never goes to memory. Open →
- Plate F53 The TPU and Its Systolic Array AIGoing further Google’s TPU hands the slowest part of a neural network, its matrix multiplies, to a systolic array: the weights sit still in its cells, the inputs flow in from the left one clock at a time and the partial sums move down. A number read once from the buffer is used many times inside the array. Open →
- Plate F55 The KV Cache and PagedAttention AIGoing further A language model writes one token at a time, and each new token needs the keys and values of every token before it; kept instead of recomputed, they are the KV cache. It grows with every token and every request. Earlier systems claimed one contiguous stretch of GPU memory for the longest a text might become, and most of it sat empty. PagedAttention (vLLM) cuts the cache into equal blocks, like an operating system’s pages: a block table records where each request’s blocks are, a new block is taken only when the last is full, and requests can share blocks. Open →
- Plate F56 Mamba and State Space Models AIGoing further A language model carries what it has read as it goes on. Attention keeps every token’s key and value, and they pile up; a state space model folds what it has read into a state of fixed size, updated once per token. Mamba makes that update depend on the token, which it calls selection: what matters goes in, the rest passes by. It runs the recurrence as a scan in fast on-chip memory. Mamba-2 then writes the same layer as a kind of attention, with decay and without softmax. Open →
- Plate F59 Speech Neuroprosthesis MedicineGoing further In people with ALS or a brainstem stroke who can no longer speak, the motor cortex still carries the signals of speech. Implanted microelectrode arrays read them; a neural network gives the probabilities of speech sounds every 80 ms, and a language model turns them into words, shown on a screen or spoken in a synthesised voice. These systems are all still in clinical trials. Open →
- Plate F62 AlphaEvolve: Fewer Multiplications AIGoing further Multiplying two 2 × 2 matrices by the definition takes 8 multiplications; in 1969 Strassen found a way with 7, which, nested, multiplies 4 × 4 matrices with 49. Since then, the ways that can be nested have stayed at 49 over the real and complex numbers. In 2025 AlphaEvolve found a way with 48 and complex coefficients. It is a loop: language models propose changes to a program, evaluators run every candidate and score it, and the best are kept and changed again. A product can be written as a block of cells, and a way to multiply is a split of that block into pieces, one piece per multiplication. The loop works only where a program can score the answer, and fewer multiplications are not always faster. Open →
- Plate F64 Diffusion Language Models AIGoing further Most chat models write left to right: one forward pass, one token. A diffusion language model lays out the whole answer as blanks, guesses every blank in each round, keeps the surest guesses and blanks the rest again, and is done in a few rounds. Fewer rounds are faster, but words set in the same round cannot see each other and fit together less often; and every round reads the whole page again. On the stone, two ferry handbills are set in wood type: the iron chase in front fills round by round, the diffusion way; the brass galley behind is set in order, one sort at a time. Open →
- Plate F65 Tracing a Model’s Steps AIGoing further Ask a language model for “the capital of the state containing Dallas” and it says Austin. In 2025, researchers drew what happens inside on that one sentence as an “attribution graph”: they rewrote the model’s computation in a stand-in made of readable “features”, drew the direct effects between them, then went back to the real model and turned groups of features down or swapped them to check. The graph shows two steps, Dallas → Texas → Austin, beside a shortcut; swap Texas for California and the answer becomes Sacramento. The same method found the end of a rhyming line chosen at the line break, and an addition the model explains another way than it computes. The authors say they get a satisfying explanation for about a quarter of the prompts they try. On the stand is a manual telephone switchboard: the prompt’s words on the left, features in the middle, the next word on the right; lit lamps are active nodes, patch cords the graph’s connections. Open →
- Plate F68 16,384 GPUs, One Model AIGoing further To train the largest Llama 3 model (405 billion parameters), Meta used up to 16,384 H100 GPUs at once. One GPU could neither hold the model nor finish it in under about 3,000 years, so the work is split three ways at once: each layer’s matrices are shared among the eight GPUs of a server (tensor parallelism), the 126 layers are cut into 16 stages that pass work along like an assembly line (pipeline parallelism), and the copy of the model spread over these 128 GPUs is repeated 128 times, each copy reading different data and averaging gradients at every step (data parallelism). The GPUs ran at about two-fifths of their peak; in 54 days the job was interrupted 466 times and carried on from checkpoints. Open →
- Plate F70 A Watermark in the Word Choice AIGoing further Since May 2024, text written by Gemini has carried a watermark no one can see: not in the letters, but in the word choice. At each step, candidate words are drawn by the model’s own odds and meet in a knockout whose scores come from a secret key and the last four words; the winner is written. The paper’s runs hold 30 rounds a word. Averaged over every possible key, the chance of writing each word is the model’s own; with the key, the scores can be worked out again, and watermarked text averages above 0.5. In tests it caught about seven in ten texts at 200 tokens and nearly nine in ten at 400, with false alarms held at 1%; across about 20 million Gemini answers, users’ thumbs up and down barely differed. Text with one right answer, short text, and text thoroughly rewritten or translated show it weakly or not at all, and finding no watermark does not mean a person wrote it. On the desk is this page’s metaphor machine: a type case, a knockout board, cams and a key, a composing rail and a gauge. Open →
- Plate F72 LoRA: Low-Rank Adaptation AIGoing further To teach a large trained model a new task, you can train every one of its numbers again, or leave them all alone. LoRA freezes each weight matrix W and trains only two thin matrices beside it: B with d rows and r columns, A with r rows and k columns, r small. Their product ΔW = BA is the change. On GPT-3 175B the 2021 paper trained about 10,000 times fewer numbers, cut training memory from 1.2 TB to 350 GB, and matched full fine-tuning. Afterwards BA can be added into W, so answers cost no extra time; or it can stay beside it, so one base carries many tasks. In 2023 QLoRA also stored the frozen base in 4 bits and fine-tuned a 65-billion-parameter model on one 48 GB GPU. Open →
- Plate F73 Rotary Position Embedding AIGoing further Attention alone cannot tell word order: put the same words in another order and every pairwise score stays the same. Rotary position embedding (RoPE, 2021) takes each word’s query and key two numbers at a time and turns pair i of a word at position m by the angle m·θᵢ, with θᵢ = 10000^(−2i/d): some pairs turn fast, some slowly. Because rotations add up, the score between a query at m and a key at n depends on the positions only through m − n. LLaMA and many open models use it; position interpolation, NTK scaling and YaRN stretch the context by changing those angles, each needing fine-tuning or reaching only a limited stretch. Open →
- Plate F75 Knowledge Distillation AIGoing further Shown a handwritten 2, a large trained model gives more than “2”: it gives a probability for each of the ten digits. A little for 3, a little for 7, almost nothing for 4. Which wrong answers are close is written in those small numbers. In 2015 Hinton, Vinyals and Dean trained a small model to match the large one’s whole spread, softened by a temperature T in the softmax, together with a little of the true labels. On handwritten digits a small network trained alone made 146 errors; trained to match a large one it made 74, against the large one’s 67. DistilBERT in 2019 had 40% fewer parameters and kept 97% of BERT’s score on GLUE. Many small models today are taught by large ones this way. Open →
- Plate F78 Retrieval-Augmented Generation AIGoing further What a language model knows sits in its parameters, stopped on the day its training ended; it cannot say where it read a thing, and it can state wrong things fluently. Retrieval-augmented generation has it look things up first: the question becomes a list of numbers, a vector; the passages nearest to it are found in an index of tens of millions of passage vectors, and they go to the model with the question, which answers from them. A 2020 paper named it; its index was 21 million passages of Wikipedia. The passages found can be the wrong ones, and the right ones can go unused: with the answer in the middle of 20 documents, GPT-3.5-Turbo got 53.8% right, less than with no documents at all. Open →