Section 02

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. What separates the four families of learning isn’t the machinery; it’s a single question: where does the training signal come from?

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 regression regression A 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 classification classification A 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 learning self-supervised learning Training 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 family drops the answer key entirely. In reinforcement learning, an agent takes actions in some environment and occasionally receives a reward — a scalar saying how well things are going. A chess bot isn’t told the best move for each board; it plays whole games and learns from the win or loss at the end. The hard part is that the reward is sparse and delayed: which of the forty moves deserves credit for the win? Game-playing agents and, increasingly, the fine-tuning of LLMs live here.

Which kind of learning is this?
Pick a task. The families differ mostly in one thing: where the training signal comes from, and whether a human had to label anything.
SupervisedLearn from input → known answer pairs a human provided.
what plays the "answer"
The correct tag "cat" or "dog" attached to each training photo.
where labels come from
A human labeled every photo by hand — expensive but explicit.
Different as they look, the same pattern keeps returning: produce something, score it against some signal, and change the parameters to do better. The source of that signal changes — a human label, the data’s own structure, a hidden piece of the input, or a reward.

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.