Written June 2024 and the weakest thing on this blog: a listicle of definitions that ended by asking you to subscribe to a newsletter. Rewritten in 2026 as the explanation I would actually give someone.
Almost every introduction to AI starts with a taxonomy. Narrow AI, general AI, superintelligence; machine learning, deep learning, neural networks, arranged in nested circles. The old version of this post did exactly that.
Taxonomies are the wrong shape for this. You can hold all of those definitions and still have no idea what is happening inside, because the definitions describe categories rather than the mechanism. There is one mechanism, it is simpler than the vocabulary implies, and everything else is a consequence of it.
The whole idea
You want a function. Something that takes an input and returns an output: a photo to a label, a sentence to its next word, a position to a move.
You cannot write it. Nobody can write the function that separates cats from dogs in pixels; the rules bottom out in “you know it when you see it.”
So instead you write a function with a very large number of adjustable numbers in it, and you adjust them until it gets the right answer on examples where you know the answer.
- Start with the numbers set randomly. The function is useless.
- Feed in an example. Measure how wrong the output is; that number is the loss.
- Work out, for every one of the adjustable numbers, whether nudging it up or down would have made the loss smaller. This is what calculus is for, and doing it efficiently is called backpropagation.
- Nudge them all a little in the direction that reduces the loss.
- Repeat a few billion times.
That is it. That is deep learning. The adjustable numbers are the parameters, or weights, and when you read that a model “has 70 billion parameters” that is how many knobs got turned.
Nobody programmed the behaviour. Somebody specified a goal, supplied examples, and let an optimiser find the settings. This is why the people who build these systems cannot always tell you why one gave a particular answer: they did not write the answer, they wrote the search.
Where the vocabulary fits
Now the words are worth having, because each one is a variation on the loop above rather than a separate subject.
- Machine learning: the general idea of fitting a function to data instead of writing rules.
- Neural network: a particular way of building the adjustable function, out of layers of multiply-and-add followed by a simple non-linear step. The non-linearity is what stops the whole stack collapsing into a single multiplication.
- Deep learning: the same thing with many layers. “Deep” is literally a count.
- Training vs inference: adjusting the numbers versus using them. Training is expensive and happens once; inference is cheap and happens constantly.
- Supervised, self-supervised, reinforcement: three answers to “where does the right answer come from?” A human labelled it; the data supplied it by hiding part of itself; or the environment scored the outcome.
The three things that surprise people
It does not look anything up. A trained model does not contain its training data in a form you could browse. It contains numbers that were shaped by it, which is why models can be fluent and wrong at the same time: fluency and accuracy are separate properties of the same set of weights. Though the weights do retain more than people assume, which I went into in the post on memory.
The training goal is often trivially simple. A language model is trained to predict the next word. That is the entire objective. Everything else (translation, summarisation, writing code, holding an argument) falls out of doing that well enough on enough text, which nobody fully expected and which is still the most surprising empirical result in the field.
Scale changed the character, not just the quality. The loop above is essentially the one from the 1980s. What changed is how many knobs and how much data, and past certain sizes models started doing things smaller ones could not do at all rather than doing the same things slightly better.
If you want to actually understand it
Read one thing and build one thing. The reading is 3Blue1Brown’s neural network series, which gets the geometry across better than any text. The building is a model small enough to train on your laptop, so the loop above stops being a description and starts being something you have watched happen. There is one in the mini language model post that takes ten minutes and writes bad Shakespeare at the end of it.
The gap between reading that loss goes down and watching it go down is larger than it sounds.
Chris Zaharias
Thanks for creating this wonderful AI primer, Abhijoy. I’m a startup sales manager currently exploring GenAI/LLM technologies. I use ChatGPT and Perplexity, primarily, which now account for >70% of my daily search activity.