TL;DR
Semi-supervised learning trains one model on two kinds of data: a small set of inputs with labels, and a much larger set of inputs without them. Plain supervised learning throws the unlabelled inputs away. Semi-supervised methods use them anyway, under an assumption about how the data is shaped, such as nearby inputs tending to share a label. When the assumption holds, the unlabelled data sharpens the decision boundary and the model needs fewer labels.
Where you'll see it: in medical imaging, where a radiologist labels a few hundred scans but the hospital holds hundreds of thousands, and in web-scale classification, where labels are expensive but raw inputs are free.
Intuition
Labels are the expensive part
Labelling data costs money and time. Someone has to listen to each recording, read each document, or check each scan. Raw inputs are often cheap: sensors log them, users generate them, archives hold them. A team may have 500 labelled photos and 500,000 unlabelled ones. Supervised learning sees only the 500. The question semi-supervised learning asks is whether the 500,000 can help, even though they carry no answers.
They can, but only if they carry some information about the answers. Imagine two classes of points scattered on a table, and you are shown a few labelled points. The unlabelled points are not useless: they show where the points cluster. If there are two dense blobs of unlabelled points separated by an empty gap, the natural place to draw the boundary is in the gap. The unlabelled data told you something about the shape of the problem.
flowchart LR L["Few labelled examples"] --> S["Supervised loss"] U["Many unlabelled inputs"] --> A["Assumption about data shape"] A --> R["Unlabelled loss or penalty"] S --> T["Train one model on both"] R --> T T --> M["Better model from fewer labels"]
The assumption does the work
Every semi-supervised method rests on an assumption of this kind. The main ones are:
- Smoothness. If two inputs are close, their labels are probably the same. The decision function should not change quickly in regions where data is dense.
- Cluster. Data forms clusters, and points in one cluster share a label. The decision boundary should fall in low-density gaps between clusters.
- Manifold. High-dimensional inputs lie near a low-dimensional curved surface. Closeness should be measured along that surface, not through empty space.
When the assumption is true, unlabelled data is a free source of constraints. When it is false, the unlabelled data can push the model the wrong way, which is the most important practical risk and comes back in the failure section.
The math
Setting
Let be the labelled data and the unlabelled inputs, with . A model outputs a predicted distribution over labels for each input. Write for the probability it assigns to label given input . The standard supervised objective is the average cross-entropy over labelled pairs:
Semi-supervised methods minimise this plus a term that depends only on the unlabelled inputs, weighted by a hyperparameter :
Everything that distinguishes the methods is the choice of . Three choices cover most of the field.
Consistency regularisation
Under the smoothness assumption, a small change to an input should not change the prediction much. Pick a random transformation that keeps the label, such as a small shift or flip of an image, and penalise disagreement:
where is a divergence between two label distributions, often the squared error or the KL divergence. The penalty uses no labels at all. It only asks the model to agree with itself under a transformation that should not matter. This is the reason Data Augmentation and semi-supervised learning are so closely linked.
Pseudo-labelling
The simplest method is to let the model label its own confident predictions. For each unlabelled input, take the most likely class . If the confidence exceeds a threshold , such as , add the pair to the labelled set for training. The unlabelled term is then an ordinary cross-entropy on these self-generated labels, with weight and only the confident points included.
The threshold is what keeps this from being a machine for amplifying errors. Without it, every prediction becomes a training label, including the wrong ones.
Entropy minimisation
A related penalty asks each unlabelled prediction to be sharp, meaning close to one class rather than spread across several:
This is the entropy of each prediction, averaged. It pushes the decision boundary away from dense unlabelled regions, which is the cluster assumption written as a loss. Like pseudo-labelling, it can lock in mistakes, so it is usually combined with the other penalties.
Label propagation
A different family works on a graph. Connect each input to its nearest neighbours with edge weights , and let hold a score for each input, where labelled inputs have their true scores fixed. A simple iterative rule replaces each unlabelled score by the weighted average of its neighbours:
while labelled entries are reset to their true values after each sweep. The fixed point is the harmonic function: the score at each unlabelled node is the average of its neighbours. The graph Laplacian gives the same solution in closed form, but the averaging rule is enough to see what the method does: information spreads from labelled nodes along the graph.
Worked examples
Five points lie on a line, at positions 1 to 5. Each point is connected to its immediate neighbours with weight 1. Point 1 has label A, which we score as 1. Point 5 has label B, scored as 0. Points 2, 3 and 4 are unlabelled and start at 0.5.
- Update all three points from the same starting scores (a simultaneous sweep). Point 2: its neighbours are point 1 (score 1) and point 3 (score 0.5). The average is .
- Point 3: its neighbours are point 2 (0.5) and point 4 (0.5). The average is .
- Point 4: its neighbours are point 3 (0.5) and point 5 (0). The average is .
- Points 1 and 5 keep their fixed values. The scores are now .
- Another sweep changes nothing, so this is the fixed point. It is exactly the straight line from 1 down to 0.
Interpretation: the label spreads smoothly from A toward B. The midpoint 0.5 is the most uncertain point, and the boundary sits there. With a dense cluster of points between 2 and 4 and a gap elsewhere, the same rule would keep the scores flat inside the cluster and drop them sharply across the gap. That shape is the cluster assumption at work.
Suppose a classifier has been trained on a small labelled set. It is applied to 10,000 unlabelled images with a confidence threshold of 0.9. These numbers are illustrative, not from a real run.
- Assume 6,200 of the 10,000 images pass the threshold. The other 3,800 are discarded for now.
- Among the 6,200 kept pseudo-labelled images, assume 97 percent have the correct label. That is correct and wrong.
- Without the threshold, all 10,000 would be used, and the number of wrong labels would be whatever the model gets wrong on the 3,800 low-confidence images. That is typically a much larger share, since these are the hard cases.
- The kept set is 6,014 good examples plus 186 bad ones. The 186 bad labels are a 3 percent error rate on the new training data, which the model will partly learn.
- Retraining on the kept set usually improves accuracy if the original model was better than chance on those confident images, and the errors do not all point the same way.
Interpretation: the threshold trades quantity for quality. A higher threshold keeps fewer, cleaner examples. A lower one keeps more examples and more noise. Choosing it is a tuning decision, and the right value depends on how well calibrated the model's confidence is.
Tradeoffs and failure modes
Semi-supervised methods pay off when labels are scarce and the assumptions hold. They can hurt when they do not.
| Situation | What goes wrong | Better choice |
|---|---|---|
| Labelled and unlabelled data come from the same source, with a clear cluster structure | Works well; the unlabelled data sharpens boundaries | Use entropy minimisation or pseudo-labelling with a threshold |
| Unlabelled data comes from a different distribution | The model learns the wrong structure, a form of [[covariate-shift | distribution shift]] |
| The model is confidently wrong on a subgroup | Pseudo-labels reinforce the error: confirmation bias | Balance the classes and add augmentation so errors do not concentrate |
| Very few labels, say a handful per class | The initial model is too poor to label anything reliably | Use self-supervised pretraining first, then fine-tune on the labels |
| Inputs have a meaningful graph structure, such as citation or social networks | Plain input similarity misses the structure | Use label propagation or a graph neural network such as the [[graph-convolutional-network |
| Labelled and unlabelled sets are both large | The gain shrinks, and the extra cost is not worth it | Train supervised on all labels |
Two failure modes need the most care. First, confirmation bias: the model trains on its own predictions, so an early mistake becomes a label and then a stronger belief. Second, the penalty weight is a hyperparameter that is hard to tune without labels. Many papers choose it using a held-out labelled validation set, which quietly uses more labels than the method is supposed to need. Evaluate on a validation set that is as scarce as the training set, or the reported gains will be too optimistic.
Modern methods such as FixMatch combine consistency with confident pseudo-labels, and they are the usual baseline now. Their gains are real but depend on careful augmentation and the threshold, which is why a careful comparison, like the one by Oliver and colleagues, found that reported improvements often shrink under a fair evaluation.
History
The idea is older than the name. In the 1960s, H. J. Scudder studied adaptive pattern recognisers that train on their own outputs, an early form of self-training, the idea behind pseudo-labelling. In 1977, Dempster, Laird and Rubin published the expectation-maximisation algorithm, which fits a mixture model using labelled and unlabelled data together and gave the field a principled tool. The term "semi-supervised" became common in the following decades, as data collection grew faster than labelling.
Label propagation on graphs was developed by Xiaojin Zhu and Zoubin Ghahramani in the early 2000s, and the book by Olivier Chapelle, Bernhard Schölkopf and Alexander Zien in 2006 gathered the main assumptions into one framework. Pseudo-labelling was revived for deep networks by Dong-Hyun Lee in 2013, and consistency methods such as the temporal ensembling of Samuli Laine and Timo Aila followed in 2016. The field's current baselines come from around 2019 to 2020, when FixMatch and related methods made strong results on image benchmarks routine. The exact years for the early work vary by source, so treat the dates above as approximate.
Check yourself
QuestionRecall: what does a semi-supervised method use the unlabelled inputs for, if they have no labels?Show answer
It uses them through an assumption about the data's shape, such as smoothness or cluster structure. The unlabelled term in the loss penalises predictions that break the assumption, for example predictions that change sharply between nearby inputs or that sit in dense regions. The labels are not needed for that term, only the inputs and the assumption.
QuestionComputation: a model is 0.96 confident on an unlabelled image and the threshold is 0.9. Is the image kept as a pseudo-label? If 200 images had confidence above 0.9 and 4 percent of them are wrong, how many wrong pseudo-labels are added?Show answer
Yes, the image is kept, because 0.96 is above 0.9. The number of wrong pseudo-labels is . This is the price of the threshold: even confident predictions err at the stated rate, so the threshold should be set by how calibrated the model is, not by a round number alone.
QuestionWhy: why does pseudo-labelling need a confidence threshold, while consistency regularisation does not?Show answer
Pseudo-labelling turns each prediction into a hard training label, so a wrong prediction becomes a wrong target that the model is then pushed toward. The threshold keeps the least reliable predictions out. Consistency regularisation never creates a hard label: it only asks the model to agree with its own prediction under a transformation. A wrong prediction is still penalised for disagreeing across transformations, but it is not turned into a target, so it does not self-reinforce in the same way.
QuestionApplied: a hospital has 300 labelled scans and 80,000 unlabelled scans from a different scanner model than the labelled ones. A colleague proposes entropy minimisation on all 80,000. What is your concern and what would you do?Show answer
The cluster assumption holds only if the unlabelled scans come from the same distribution as the labelled ones. A different scanner shifts intensities and textures, so the unlabelled data may form clusters that have nothing to do with the diagnosis. Entropy minimisation would sharpen boundaries along those artefact clusters. I would first check whether the shift is real by comparing feature distributions, then either select unlabelled scans from the labelled scanner, or use consistency regularisation with scanner-specific augmentation so the model learns invariance to the shift. I would keep a validation set from the new scanner to measure whether the unlabelled data helps at all.
Sources
- Semi-supervised learning (Wikipedia)
- FixMatch: Simplifying Semi-Supervised Learning with Consistency and Confidence (Sohn et al., 2020)
- Realistic Evaluation of Deep Semi-Supervised Learning Algorithms (Oliver et al., 2018)
- Semi-Supervised Classification with Graph Convolutional Networks (Kipf and Welling, 2017)