liveBook · Manning

Supervised learning

As explained in The AI Pocket Book

A machine-learning approach where the model learns from labeled examples showing the desired task behavior.

Supervised learning teaches a model from examples that pair an input with the desired output, or label. The model learns the task by seeing many such pairs, then aims to produce useful outputs for inputs it has not seen before. section 1.27

Predicting the next token

An LLM can train on pairs such as “Better safe than” → “sorry” and “The Eiffel” → “Tower.” Image categorization uses the same pattern: each sample image is paired with a category such as “strawberry,” “plane,” or “dog.” section 1.27

The basic pattern has a few practical consequences:

  • Training data consists of input–label pairs that demonstrate the exact task the model should perform. section 1.27
  • Labels may require people to classify tens of thousands of examples, making data preparation expensive and slow; some labels can instead be generated automatically. section 1.27
  • Generalization means working well on new inputs, while overfitting means memorizing training examples and failing on unseen data. section 1.27
  • Conditional diffusion models use supervision to learn image repair from corrupted images, captions, and their uncorrupted versions. section 1.32
Figure 1.10 Training examples are generated by subdividing existing sentences and turning the last token in each into the desired autocomplete label.

Shows how existing sentences can be subdivided into training examples by turning each final token into the desired autocomplete label. section 1.27

Supervision is not the only way to create training examples. Self-supervised learning generates examples automatically by scanning data; popular LLMs use that approach first and may later be refined with manually generated data. section 1.34

How The AI Pocket Book covers it

How deep it goes
Defines input-label training pairs and discusses generalization, overfitting, and labeling costs, without descending into optimization or model internals.
Examples
Uses next-token pairs, labeled images, and corrupted-image reconstruction with captions as concrete training examples.
What it assumes
Assumes only the distinction between inputs and desired outputs, while introducing labels, training data, generalization, and overfitting.
What you can do after
Evaluate whether a model learns general task behavior or merely memorizes labeled training examples.
How it connects
Connects supervised learning with self-supervised learning, unsupervised learning, large language models, and diffusion models.

Also explained in

Compare how 19 books explain supervised learning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The AI Pocket Book. The section links point to the parts of the book it draws on.