Kinds of learning
Supervised, unsupervised, self-supervised, reinforcement
The game from the last section (show an input, guess the answer, get told how wrong you were) is only one flavor of learning. It’s the most common one, and the rest of this explainer lives almost entirely inside it, but it helps to see it on a map first. Four common approaches differ largely in one way: where does the signal for learning come from? These categories are useful rather than perfectly separate: real systems often combine them.
Supervised: learning from an answer key
In supervised learning, every training example arrives with the correct answer attached. You show the model a house’s size and tell it the price; a photo and tell it “cat.” The model guesses, compares against the known answer, and adjusts. That paired data (input plus label) is the “supervision.”
Two shapes of answer live here. When the answer is a quantity (a price, a temperature) it’s regressionregressionA prediction task whose answer is a number (a price, a temperature), as opposed to a category. Usually scored with squared error.See in glossary →. When the answer is a category (spam or not, cat or dog) it’s classificationclassificationA prediction task whose answer is one of a fixed set of categories (spam / not spam, or which of 100,000 tokens comes next). The model outputs a probability per option and is scored with cross-entropy.See in glossary →. Both are supervised; they differ only in what the label looks like. Almost everything in the coming sections (the model, the way we score it, the way it learns) is developed in this setting because it’s the cleanest place to see the ideas.
Unsupervised: finding structure with no answers
Sometimes there are no labels at all: just a pile of data. Unsupervised learning asks the model to find structure on its own. Two classic jobs: clustering, which groups examples that resemble each other (say, sorting shoppers into natural segments no one defined in advance), and dimensionality reduction, which squeezes many correlated inputs down to a few underlying dimensions. Nobody hands over a “right answer”; the signal is the shape of the data itself.
Self-supervised: labels for free
The breakthrough behind large language models is a sly trick: manufacture the answer key out of the raw data. In self-supervised learningself-supervised learningTraining where the labels come from the data itself — e.g. hide part of an example and ask the model to predict it. No human annotation needed.See in glossary →, you hide part of the input and ask the model to predict the hidden part. Cover part of a sentence: the missing piece is right there in the text, so it doubles as the label. No human labeling required, yet every guess can still be scored against a known truth.
This is the core trick behind training many LLMs: turn raw text into billions of “predict what comes next” puzzles, each one supervised by the text that actually followed. It’s technically supervised learning, but the supervision comes from the data itself and can be produced at enormous scale. We’ll return to this idea near the end, when the whole method gets pointed at text.
Reinforcement: learning from reward
The fourth approach drops the per-example answer key. In reinforcement learningreinforcement learningLearning from trial and error: an agent takes actions and receives a single-number reward signal, with no labeled "right answer" for each step.See in glossary →, an agent takes actions in an environment and tries to collect as much rewardrewardA single-number feedback signal in reinforcement learning that says how good an outcome was. The agent tries to collect as much reward as possible over time.See in glossary → as possible over time. Actions affect what happens (and therefore what the agent sees and can do) next. Rewards may arrive at every step or only occasionally. Chess illustrates the difficult sparse, delayed case: a bot isn’t told the best move for each board; it may learn from only the win or loss at the end, leaving the algorithm to work out which of forty moves deserves credit. Game-playing agents and, increasingly, the fine-tuning of LLMs live here.
We’ll spend the rest of this explainer in the supervised setting, because it’s where every core idea shows up most clearly. But before a model can learn anything, it has to be able to read its input, and a model only understands numbers. Next we’ll see how the messy world of sizes, colors, and categories gets turned into the columns of numbers a model can actually consume.