)
Series 1 · Machine Learning Fundamentals

The Three Flavors of Machine Learning

Machine learning can be traced back to three broad families — supervised, unsupervised, and reinforcement learning — set apart by what the training data looks like: labeled, unlabeled, or replaced by rewards.

← All topics
Table comparing supervised, unsupervised, and reinforcement learning with their definitions and examples.

Machine learning is usually divided into three paradigms, and the difference between them is simply what the model learns from.

Supervised learning learns from labeled data — input/output pairs where the right answer is provided. The model’s job is to learn the mapping from input to output well enough to predict new cases, never seen during training. The examples from earlier chapters, such as predicting average income from age, are classic supervised learning: every record in the training set contains the answer observed in the real world (a real person’s age, their income). More generally, tasks like image classification, spam detection, house-price prediction, and machine translation are all supervised.

Unsupervised learning learns from unlabeled data — no answers provided. The model has to find structure on its own: grouping similar things, reducing complexity, spotting anomalies. Clustering customers by purchasing behavior, dimensionality reduction, anomaly detection, and topic modeling all live here. Nobody tells the model what’s “right”; it discovers the patterns and the connections between the records in the training set.

Reinforcement learning learns from interaction. An agent takes actions in an environment and receives rewards or penalties, and over time it learns a policy — a way of acting — that maximizes the reward it collects. This is how AIs learn to play chess or Go, how robots learn to navigate, and how recommendation systems tune themselves to your feedback.

The three training phases of an LLM in sequence — self-supervised pre-training, supervised fine-tuning, and reinforcement-based alignment — with an example at the bottom of how raw text becomes input/output pairs.
The three paradigms as three phases in sequence: self-supervised pre-training produces the base model; supervised fine-tuning and reinforcement alignment turn it into an instruct model. At the bottom, the self-supervised trick: raw text turns itself into input→output pairs.

Here’s the part that surprised me, and that ties the whole of Series 1 to what follows: a modern large language model is trained with all three paradigms, in sequence. And as research advances, training schemes are becoming ever more elaborate and opaque, often covered by trade secrecy. In broad terms, the “traditional” training scheme runs as follows.

So the three paradigms aren’t rival camps; they’re stages. The same model passes through unsupervised, then supervised, then reinforcement learning on its way from raw text to something you can actually talk to. With that, the fundamentals are in place — and the series turns to the architecture that makes it all work: the neural network.