Semi-supervised learning

On this page 7

Semi-supervised learning is a machine learning approach that trains a model on a small set of labeled examples together with a much larger set of unlabeled examples, using the structure of the unlabeled data to learn a better decision function than the labeled data alone would allow. In artificial intelligence, it sits between supervised learning, which needs a label for every example, and unsupervised learning, which uses no labels at all.

The approach matters because labels are expensive and raw data is cheap. Annotating medical scans, legal documents or speech recordings requires expert time, while unlabeled examples often accumulate automatically. Semi-supervised methods aim to reach accuracy close to a fully labeled model while paying for only a fraction of the annotation.

Why unlabeled data can help a model

Unlabeled data helps only when its distribution carries information about the labels. Semi-supervised learning therefore rests on explicit assumptions about how the data is structured. When these assumptions hold, unlabeled points reveal where the classes lie; when they fail, the extra data can mislead the model.

The table below summarizes the three classic assumptions and what each implies for a model.

AssumptionStatementConsequence for the model
SmoothnessNearby points tend to share a labelPredictions should change gradually in input space
Cluster assumptionPoints in one cluster usually share a classDecision boundaries should pass through low-density regions
Manifold assumptionHigh-dimensional data lies near a lower-dimensional surfaceDistances along the surface matter more than raw distances
Core assumptions of semi-supervised learning

The low-density separation idea is the most practical consequence. If unlabeled points form dense groups separated by sparse gaps, a classifier should place its boundary in a gap rather than through a dense group, even when only a handful of labeled points are available.

Main families of semi-supervised methods

Semi-supervised learning is not a single algorithm but a family of techniques that inject unlabeled data into training in different ways. Most modern methods combine several of these ideas in one training objective.

Method familyHow it uses unlabeled dataTypical strength
Self-training and pseudo-labelingModel labels confident unlabeled examples and retrains on themSimple, works with any classifier
Consistency regularizationPenalizes different predictions for perturbed versions of one inputStrong results in image and audio tasks
Graph-based methodsPropagate labels along a similarity graphEffective when similarity is meaningful
Co-trainingTwo models trained on different feature views label data for each otherUseful with naturally split features
Generative approachesModel the joint distribution of inputs and labelsPrincipled, but harder to scale
Families of semi-supervised learning methods

Hybrid methods such as FixMatch combine pseudo-labeling with consistency regularization: the model predicts a label for a weakly augmented image, keeps it only when the confidence exceeds a threshold, commonly around 0.95, and then trains the model to predict the same label for a strongly augmented version of that image.

How it compares with other learning paradigms

Semi-supervised learning is defined by the mix of label availability during training. It is frequently confused with self-supervised learning, which also uses unlabeled data but for a different purpose.

ParadigmLabels usedMain goal
Supervised learningEvery training example labeledLearn a mapping from inputs to known labels
Semi-supervised learningFew labeled, many unlabeledImprove the same target task with unlabeled data
Unsupervised learningNo labelsDiscover structure such as clusters or densities
Self-supervised learningLabels generated from the data itselfLearn general representations for later tasks
Active learningLabels requested selectivelyChoose which examples a human should label
Semi-supervised learning among related paradigms

In practice these paradigms are often combined. A team might pretrain a foundation model with self-supervised objectives, fine-tune it on a small labeled set, and then apply pseudo-labeling to in-domain unlabeled data. Active learning complements this by directing the limited annotation budget to the most informative examples.

Practical setup and parameters

A semi-supervised project succeeds when the labeled and unlabeled data come from the same distribution and the evaluation set is labeled carefully and kept separate. Labeled fractions in practice range from well under 1 percent to roughly 20 percent of the available data, depending on the task and the annotation budget.

The following table lists parameters that most strongly influence results.

ParameterTypical rangeWhat it affects
Confidence threshold0.7 to 0.99Trade-off between pseudo-label quantity and quality
Unlabeled loss weight0.1 to 10, often ramped upInfluence of unlabeled data on gradients
Unlabeled to labeled batch ratio1:1 to 7:1How much unlabeled signal each step sees
Augmentation strengthWeak to strongRobustness learned through consistency
Key parameters in semi-supervised training

A useful rule is to compare against a strong supervised baseline trained with the same augmentation and tuning effort. Published gains sometimes shrink considerably once the baseline is properly tuned, so the comparison should be honest before the extra complexity is accepted.

Limitations and failure modes

Semi-supervised learning can reduce accuracy rather than improve it when its assumptions are violated. The most frequent causes are mismatched data, imbalanced classes and the model reinforcing its own early errors.

  • Confirmation bias: wrong pseudo-labels are learned as truth and repeated in later rounds.
  • Distribution mismatch: unlabeled data containing unseen classes or other domains pulls the boundary in the wrong direction.
  • Class imbalance: confident pseudo-labels favor majority classes and starve rare ones.
  • Overlapping classes: without low-density gaps, the cluster assumption gives little benefit.
  • Leaky evaluation: test examples mixed into the unlabeled pool inflate reported accuracy.

Mitigations include class-balanced thresholds, filtering out-of-distribution samples, resetting pseudo-labels periodically and monitoring accuracy on a held-out labeled validation set after every round.

A plain-language summary

Imagine learning to sort birds by species when an expert has named only twenty photos, but you also have a thousand unnamed photos. By looking at all of them, you notice natural groups of similar birds, and the few named photos tell you what each group is called.

Semi-supervised learning lets a computer do the same. A few labeled examples give the names, and many unlabeled examples show the groups. Together they produce a better result than the small labeled set alone.

An example from practice

A hospital imaging team wants to flag chest X-rays that show pneumonia. Radiologists can label about 2,000 images within the project budget, but the archive holds more than 100,000 unlabeled images from the same scanners and patient population.

The team first trains a supervised baseline on the labeled images, then adds pseudo-labeling with a 0.95 confidence threshold and consistency training on augmented copies. A separate set of 500 radiologist-labeled images is held back for evaluation and never enters the unlabeled pool. After three rounds, the semi-supervised model shows higher sensitivity at the same specificity than the baseline, and the team uses the remaining annotation budget to label the cases on which the model was least certain.