Guide

Before you pick a model, check what kind of feedback you actually have. Labels tell the model the right answer for each example. Without labels, a model can still find structure in the inputs. Given rewards for a sequence of actions, a model can learn a policy for choosing actions. Those are the main families, and the data you can get decides which one applies.

The big idea

  • Supervised learning. Every example comes with a label. If the label is a number, the task is regression. If the label is a category, the task is classification.
  • Unsupervised learning. Only inputs. The model finds clusters, principal components or anomalies.
  • Self-supervised learning. The labels come from the data itself. Predict the next token, or fill in a masked word. Large language models are trained this way.
  • Reinforcement learning (RL). A policy picks actions and receives rewards, sometimes many steps later. The goal is the highest total reward over time.

An analogy: supervised learning is a student with an answer key. Unsupervised learning is sorting a pile of photos into groups without anyone naming them. Reinforcement learning is training a dog with treats after a sequence of tricks. Self-supervised learning looks like supervised learning, but nobody wrote the answers. The text already contains them.

Walking through a decision

Start with the question "do I have labels?". Then ask whether the target is a number or a category. Only reach for RL when the problem is a sequence of actions with a reward signal.

ProblemFamilyWhy
Predict tomorrow's demandSupervised regressionPast demand gives the labels.
Flag spam emailSupervised classificationPast emails are labeled spam or not.
Group users by behaviorUnsupervisedNo labels exist.
Train a base language modelSelf-supervisedThe next token is the label.
Tune a chatbot from ratingsReinforcement learningReward arrives after whole responses.

Common mistakes

  • Treating self-supervised as unsupervised. It trains with a prediction loss against the data itself, and it is often the main training signal in large models.
  • Reaching for RL by default. RL needs a reward signal and a way to try actions. A classifier trained on logged outcomes is often enough.
  • Choosing the family before checking the labels. Labels that are delayed, noisy or missing change the plan.

Check yourself

  1. A spam filter is trained on emails marked spam or not spam. Answer: Supervised classification.
  2. A model learns to predict the next word of web text. Answer: Self-supervised. The next word is the label, so no human has to annotate anything.

Key takeaways

  • Supervised learning needs labels, and regression and classification differ by the target type.
  • Unsupervised learning finds structure in inputs without labels.
  • Self-supervised learning creates labels from the data, which is how large language models learn.
  • Reinforcement learning needs rewards for sequences of actions.

Further learning

The framing question comes next: framing a business problem.