The short answer
Unsupervised learning is the main answer. It learns from the features of examples alone, with no labels to predict. Semi-supervised learning also uses unlabeled data, but mixes it with a small amount of labeled data. Self-supervised learning uses unlabeled data too, and builds its own training targets from it. Reinforcement learning is the usual exception, since it learns from rewards rather than from a dataset of examples.
Unsupervised learning
Unsupervised learning is trained on unlabeled examples. Its job is to find structure in the features: groups of similar examples, a smaller set of underlying factors, or examples that look unusual. Typical tasks include:
- Clustering, such as grouping shoppers by what they buy, without deciding the groups in advance.
- Dimensionality reduction, such as principal component analysis, which compresses many features into fewer ones.
- Anomaly detection, which flags rare or unusual examples, such as odd patterns in network traffic.
Nothing tells the method what the right answer is, so its results need interpretation. An algorithm can always return groups, but whether those groups are meaningful depends on the goal.
Semi-supervised learning
Semi-supervised learning uses a small set of labeled examples together with a large set of unlabeled ones. It’s useful when labels are costly to get but raw data is plentiful. Two common methods:
- Self-training: train on the labeled data, predict labels for the unlabeled examples, keep the confident predictions, and retrain.
- Pseudo-labeling: a similar idea, where the model’s own predictions serve as labels for unlabeled examples.
These methods depend on assumptions, such as the idea that nearby examples tend to share a label. If the assumptions don’t hold, the unlabeled data can make results worse rather than better.
Self-supervised learning
Self-supervised learning is trained on unlabeled data, but the target comes from the data itself. A common example is hiding part of a sentence and training a model to predict the missing words. Models trained this way learn representations that can be reused for other tasks. Many large language models are pretrained by predicting the next word in large amounts of text.
Reinforcement learning
Does reinforcement learning use unlabeled data? In the standard setup, not in the same way. A reinforcement learning agent learns by acting in an environment and receiving rewards. The reward is feedback on what happened, not a label that names the correct action for each example. So the labeled and unlabeled split doesn’t describe reinforcement learning well. Some research pairs it with unlabeled observations, but that is an added design choice.
Quick comparison
| Type | Training data | Typical use |
|---|---|---|
| Supervised | Labeled examples | Predicting a known label, such as spam or not spam |
| Unsupervised | Unlabeled examples | Grouping, compressing, or spotting unusual examples |
| Semi-supervised | A few labels plus many unlabeled examples | Learning when labels are scarce |
| Self-supervised | Unlabeled data with targets made from the data | Pretraining on large raw datasets |
| Reinforcement | Rewards from actions in an environment | Learning a strategy by trial and feedback |
How to tell which one applies
Start by looking at the data. If every example has a target you want to predict, the problem is supervised. If there are no targets, it falls under unsupervised or self-supervised learning, depending on whether the method builds its own targets. If there’s a small labeled set alongside many unlabeled examples, consider semi-supervised methods. If the system learns by acting and receiving rewards, it’s reinforcement learning.