A real neural network lives on this page — the same mathematics that powers frontier AI, shrunk to a size you can watch, poke and break. No jargon left unexplained, from the 1958 perceptron to today's trillion-parameter models.
Strip away the mystique and a neural network is built from one absurdly simple part, repeated millions of times. Meet it here — and meet the vocabulary that describes it.
An artificial does three things: it takes some numbers in, multiplies each by a , adds a , and passes the total through an to produce one number out. That's it. That is the atom of all deep learning.
Try it. This neuron decides whether to take an umbrella. Its inputs are how cloudy it is and how humid it feels. The weights are how much the neuron cares about each input; the bias is its baseline reluctance or eagerness before it has seen anything at all.
Notice what the activation function is for. Without it, a neuron is pure arithmetic — its output is always a flat, straight-line function of its inputs. The activation bends that line. This is the entire reason networks can learn curves, spirals and language rather than just straight lines. Flip between the options above and watch the curve change shape.
The step function is where it all began: Frank Rosenblatt's fired 1 or 0, nothing in between, like a biological neuron either spiking or staying silent. The smooth sigmoid and tanh ruled the 1980s–2000s because learning needs slopes (you'll see why in section 03). The brutally simple ReLU — "if negative, output zero; otherwise pass it through" — took over around 2011–2012 and remains the default family in frontier models. Sometimes progress looks like less sophistication.
One neuron draws one straight line. The trick that changed everything: feed neurons into other neurons.
Arrange neurons in . The first layer receives the raw data — the . The last produces the answer — the . Everything in between is a : "hidden" only in the sense that you never directly see its inputs or outputs. Each hidden neuron learns to detect some intermediate pattern, and later neurons combine those patterns into more abstract ones. When a network has many hidden layers we call it deep — that is the entire origin of the phrase .
Watch data flow through this network, left to right. That flow — multiply, add, activate, layer by layer — is called the . When you use a trained model (every time you ask a chatbot something), you are running forward passes. That's also called .
Every connection has its own weight; every neuron its own bias. Together these adjustable numbers are the network's — its entire memory and personality. Count them for the network above:
Hold that number. The playground network below has around 50–200. GPT-3 2020 had 175,000,000,000. Frontier models are estimated around a trillion. Same atom, same arithmetic — just unimaginably more of it. The overall shape you choose — how many layers, how wide, how they connect — is called the .
A fresh network is born with random weights — it knows nothing. "Training" is the process of nudging those weights, millions of times, until the outputs stop being wrong. Here is the whole loop.
Step 1 — measure the error. Show the network an example where you know the right answer (that's ), compare its output to the truth, and boil the difference down to a single number: the . High loss = badly wrong. Zero loss = perfect. Training has exactly one goal: make this number go down.
Step 2 — find which way is downhill. Imagine a landscape where every possible setting of the weights is a location, and the altitude at each location is the loss. Learning is finding a low point in that landscape. The is the local slope — it tells you, for every single weight, which direction makes the loss worse. So you step the other way. Do this over and over and you are performing , the algorithm at the heart of essentially all modern AI.
Step 3 — take a step of the right size. How big a step? That's the — the single most temperamental dial in the field. Try it yourself:
Step 4 — assign the blame. One puzzle remains, and it stalled the field for decades: in a deep network, how do you know how much each individual weight — including ones buried in hidden layers — contributed to the final error? The answer is : after the forward pass, walk the error backwards through the network, layer by layer, using calculus's chain rule to split the blame at every connection. It's an accounting trick, really — a supremely efficient way to compute the gradient for every parameter at once. Popularized in 1986, it is still how every frontier model learns today.
Two last pieces of vocabulary and the loop is complete. In practice you don't compute the error on one example at a time but on a small of them (this page uses 16). One full pass through the entire training set is an . Training a model means running this loop — forward pass, loss, backpropagation, weight update — for thousands or, at frontier scale, trillions of steps. Because each batch is a random sample, the method is properly called .
Paul Werbos worked out backpropagation in his 1974 Harvard PhD thesis — and it was largely ignored. Only when Rumelhart, Hinton and Williams published their 1986 paper showing hidden layers learning useful internal representations did the field wake up. The lesson recurs constantly in AI history: the ideas often arrive long before the moment is ready for them.
Everything from sections 01–03, live. The network below is genuinely training in your browser — real forward passes, real backpropagation, dozens of times a second. Your job: get the coloured background to match the dots.
Each dot is a training example with two input numbers (its x and y position) and a (red or blue). The network's task is : predict the label from the position. The painted background shows its current opinion about every point in the plane — the is where the colour flips. Hollow dots are : examples the network never trains on, kept aside to check it has genuinely rather than memorized.
So far the datasets were manufactured. This time you are the dataset. Draw examples of two shapes, train a network on your drawings, and test whether it truly learned — or merely memorized.
To a network, your drawing is just numbers: the 8×8 pad below becomes 64 inputs, each 0 (empty) or 1 (inked). Those 64 numbers are the . A [64 → 12 → 1] network — 64 inputs, 12 hidden neurons, 1 output — will learn to map them to a class. That is, at miniature scale, exactly how early neural networks read handwritten ZIP codes for the US postal service in the 1990s.
How to play: draw a shape (say, an ✕) on the pad, add it to CLASS A. Draw an ○, add to CLASS B. Give each class at least 3–4 varied examples, hit TRAIN, then draw fresh shapes on the test pad and watch the network's live verdict.
Here is the honest, slightly unsettling truth: the gap between the toy network you just trained and a frontier model is less about new magic than about staggering scale — plus three big ideas.
What is identical. Frontier models are made of the same neurons computing weights-times-inputs-plus-bias. They learn by the same loop: forward pass, loss, backpropagation, gradient descent (with a smarter step-size scheme called , from 2014). If you followed sections 01–04, you understand the core mechanism of a trillion-dollar industry. Genuinely.
What is different. Three things, mainly:
To feel the scale, count parameters — every bar below is on a logarithmic axis, where each gridline is 10× the last. On a linear chart, every bar except the final two would be invisibly thin.
Scale changed what these systems can do, not what they are. When you read that a model "has 1 trillion parameters", you now know exactly what that sentence means: one trillion adjustable weights and biases, every single one nudged downhill by the same gradient descent you ran on a pixel ball in section 03.
This page taught the universal machinery: neurons, layers, gradient descent. Language models add two mechanisms of their own — how text becomes numbers, and how words decide which other words matter. Each now has its own live laboratory, built with the same rules: real math, no libraries, view source.
A real tokenizer learns its vocabulary in front of you — merge by merge — then reads your own words. Explains token pricing, context windows, and why models miscount the r's in "strawberry".
OPEN THE TOKEN LAB → CHAPTER IIIA real trained transformer — small enough to see through — runs inside the page. Watch genuine attention resolve "it" onto "mat", and meet the induction heads later found inside frontier models.
OPEN THE MICROSCOPE →Eighty years from a paper about idealized brain cells to machines that write and reason. Round markers are the era-defining moments. Where history can be re-enacted on this page, hit TRY IT — it loads the exact experiment into the playground.
Every dotted-underline term from this page, in one place. The year notes when the idea entered the field.