Skip to content
AI.info

Advanced techniques

Semi-Supervised Learning: Pseudo-Labels, Consistency, and Confirmation Bias

Study modern semi-supervised learning through self-training, consistency regularization, teacher–student methods, and failure-aware validation.

By the end you can

Unlabeled data is abundant; reliable supervision is not

A semi-supervised system pairs a small labeled set with a much larger pool that carries no task labels. The unlabeled examples reveal structure in the input. They do not say which distinctions the product should make. The central risk is circularity. The model predicts labels for data it does not understand, then trains on those predictions as though they were evidence. If early mistakes are accepted confidently, the learner reinforces its own blind spots.

That failure is not a worry someone raised. It is the subject of a peer-reviewed paper, published in 2020, whose abstract states the result and the remedy in one sentence: “We show that a naive pseudo-labeling overfits to incorrect pseudo-labels due to the so-called confirmation bias and demonstrate that mixup augmentation and setting a minimum number of labeled samples per mini-batch are effective regularization techniques for reducing it.”

Two things follow. First, the circularity is measurable. It shows up as overfitting to the model's own wrong labels, not as a vague drift. Second, the countermeasures that worked were structural rather than a better score cut-off: mixup, and a floor on how many genuinely labeled samples appear in every mini-batch, so the trusted signal never vanishes from the gradient. Semi-supervised learning is not supervised learning with more rows. It is a mechanism for deciding when model-generated targets are trustworthy enough to influence training.

Unlabeled data adds coverage only when the method controls the errors in its generated supervision.

Comparison

Three ways to create an unlabeled-data signal

The methods differ in what target they generate and what assumptions make that target useful.

FixMatch combines the first two families. A pseudo-label is kept only when a weakly augmented view is predicted confidently. The model then trains to predict that label from a strongly augmented copy. Kihyuk Sohn and colleagues report “94.93% accuracy on CIFAR-10 with 250 labels”. With 40 labels, four per class, it still reached 88.61%.

The third family has a canonical member, and it comes with numbers rather than adjectives. Mean Teacher, published by Antti Tarvainen and Harri Valpola in 2017, averages model weights rather than label predictions. The teacher is a running average of the student's own parameters, not an ensemble of its outputs. Their abstract reports that “Without changing the network architecture, Mean Teacher achieves an error rate of 4.35% on SVHN with 250 labels, outperforming Temporal Ensembling trained with 1000 labels.” The same method took CIFAR-10 with 4000 labels from 10.55% to 6.28% error. It took ImageNet 2012 with 10% of the labels from 35.24% to 9.11%.

Read that last pair slowly, because it is what the third column is claiming. Change only how the target is generated — average the weights instead of trusting the fast-moving student — and ImageNet 2012 error moves from 35.24% to 9.11% at a fixed 10% label budget. Stabilising the target generator is worth a large fraction of the labels nobody collected. It is also still the same model's bias, averaged. A smoother teacher makes systematic errors more consistent, not less systematic. That is why the column ends where it does, at independent labeled evaluation.

FigureComparison · 3 columns

Pseudo-labeling

Use the model’s predicted class or distribution as a temporary target.

  • Simple and widely applicable
  • Depends on confidence quality
  • Can amplify majority-class errors
  • Needs threshold and coverage analysis

Consistency regularization

Require compatible predictions under perturbations that should preserve meaning.

  • Encodes invariance assumptions
  • Relies on realistic augmentations
  • Can regularize decision boundaries
  • Fails when perturbations change the label

Teacher–student targets

Use a slowly updated or stronger teacher to guide a student.

  • Can stabilize noisy targets
  • Separates target generation from rapid updates
  • Still inherits teacher bias
  • Requires independent labeled evaluation

Visual

The confidence-gated training loop

A robust loop tracks both target quality and the amount of unlabeled data admitted.

The loop below is not a whiteboard exercise. It has been run at a scale that makes every step visible. Noisy Student Training, which Google published in 2020, describes the first two steps exactly as the diagram does: “On ImageNet, we first train an EfficientNet model on labeled images and use it as a teacher to generate pseudo labels for 300M unlabeled images.” The student trained on those 300 million generated targets reached 88.4% top-1 on ImageNet. That is 2.0% above a model trained on 3.5 billion weakly labeled Instagram images.

The refresh step is where the design differs from a naive loop. The student is promoted to teacher and the cycle repeats, and noise is injected into the student rather than into the target generator. Targets are made as clean as possible, and learning from them as hard as possible. The gains that matter for this lesson are not the headline. ImageNet-A top-1 rose from 61.0% to 83.7%. ImageNet-C mean corruption error fell from 45.7 to 28.3. Those are the robustness slices, measured on labels the loop never touched. They are the last step of the diagram, and the only step that can tell you whether the previous five did anything real.

FigureProcess · 6 steps
  1. 1

    Fit a labeled baseline

    Train and calibrate using only trusted labels.

  2. 2

    Generate candidate targets

    Predict classes or distributions for unlabeled examples.

  3. 3

    Apply quality gates

    Filter by confidence, class, domain, and augmentation agreement.

  4. 4

    Train with weighted objectives

    Balance labeled and generated targets without letting volume dominate trust.

  5. 5

    Refresh cautiously

    Regenerate targets after a controlled update rather than after every noisy step.

  6. 6

    Evaluate on untouched labels

    Measure gains, regressions, calibration, and slice coverage.

Key idea

Confidence is not the same as correctness

A model can be confidently wrong on rare classes, new domains, or systematically mislabeled regions. A single global confidence threshold often admits easy majority examples while excluding the cases that motivated semi-supervision in the first place.

The first half of that is a documented property of the models in question. An ICML paper opened with it in 2017: “We discover that modern neural networks, unlike those from a decade ago, are poorly calibrated.” The same paper showed that temperature scaling, a single-parameter method, largely fixes the problem. Miscalibration is a defect of the score, not of the ranking. But the finding does not transfer automatically to whatever architecture is in front of you. A re-examination by Matthias Minderer and colleagues at NeurIPS 2021 found “the most recent models, notably those not using convolutions, are among the best calibrated”. So calibration has to be measured on the model in hand, in both directions. Assuming it is broken is as unfounded as assuming it is fine.

The global threshold itself has been beaten in public, against the very method this lesson quotes. FixMatch “uses a pre-defined constant threshold for all classes”, which ignores that classes are not learned at the same rate. Bowen Zhang and colleagues replaced it with per-class Curriculum Pseudo Labeling, and their NeurIPS 2021 abstract gives the size of the effect: “FlexMatch achieves 13.96% and 18.96% error rate reduction over FixMatch on CIFAR-100 and STL-10 datasets respectively, when there are only 4 labels per class.” FlexMatch also reached better performance in 1/5 of FixMatch's training time. The gate policy, not the score, was carrying the loss — on the same 4-labels-per-class budget that produces the headline numbers in the previous section.

Measure precision and coverage of pseudo-labels by class and domain on a labeled audit set. Consider class-specific thresholds, distribution alignment, or abstention. If confidence is poorly calibrated, threshold tuning alone cannot create trustworthy targets.

A pseudo-label gate must be evaluated as a decision policy, not chosen from score magnitude alone.

Analogy

The apprentice who grades unfinished homework

An apprentice who has seen only a few corrected examples works through a large stack of exercises. Easy answers may be graded reliably. Unfamiliar formats invite confident mistakes. A senior reviewer can sample the uncertain or high-impact cases and revise the grading rules.

The apprentice's grades never become the textbook. A model's do. Training on its own labels changes the evidence distribution the model will be judged against. That is the mechanism the 2020 confirmation-bias paper measured as overfitting to incorrect pseudo-labels. It is also why its two countermeasures act on the training mixture — mixup, and a minimum number of labeled samples per mini-batch — rather than on the grading standard. Human review samples do not automatically prevent feedback loops. Target refresh, weighting, and held-out evaluation remain necessary.

Generated labels are provisional judgments whose error process must be measured.

Example

Five failure slices worth inspecting

Aggregate accuracy can hide the exact places where generated supervision becomes unsafe.

The first slice is the best documented of the five. Train under an imbalanced class distribution and the accepted pseudo-labels tilt toward the majority classes. Jaehyung Kim and colleagues reported at NeurIPS 2020 that “these SSL algorithms trained under imbalanced class distributions can severely suffer when generalizing to a balanced testing criterion, since they utilize biased pseudo-labels of unlabeled data toward majority classes”. Their remedy, DARP, refines the pseudo-labels by solving a convex optimisation problem. It does not move a threshold. Register that next to the previous section. When the bias sits in the class distribution of the accepted targets, the fix acts on the distribution, and threshold sweeps are working on the wrong object.

  • Rare class: Pseudo-label precision collapses toward the majority classes — the imbalanced-SSL failure documented at NeurIPS 2020 and answered with distribution alignment rather than a threshold.
  • New device or site: High confidence may reflect familiar artifacts rather than transferable evidence. That is why Noisy Student's ImageNet-A and ImageNet-C numbers, not its 88.4%, are the informative ones.
  • Borderline examples: Weak and strong augmentations can cross the true class boundary, so the invariance assumption fails exactly where the pseudo-label is being generated.
  • Duplicate families: Near-duplicates can make unlabeled gains look larger than genuine generalization.
  • Delayed concept shift: Old labeled data may certify targets that no longer match the current task definition.

Steps

A fair semi-supervised ablation

The experiment should isolate the value of unlabeled data from extra compute and tuning.

Put the main methods in one codebase and the picture changes. Avital Oliver and colleagues did exactly that, and found “the performance of simple baselines which do not use unlabeled data is often underreported”, and that methods differ in sensitivity to the amount of labeled and unlabeled data. That is what a matched ablation exists to expose. The baseline is the experiment.

Step 2 is where the ablation usually dies, and the reason has a price tag. The Unified SSL Benchmark, published in 2022, covers 15 classification tasks across vision, NLP and audio, and its authors reported what the older way of doing this cost: “on a single NVIDIA V100, only 39 GPU days are required to evaluate FixMatch on 15 tasks in USB while 335 GPU days (279 GPU days on 4 CV datasets except for ImageNet) are needed on 5 CV tasks with TorchSSL.” Three hundred and thirty-five GPU days to evaluate one method on five vision tasks explains, without excusing, why the matched-compute supervised baseline is the run that gets dropped. Starting from pretrained models brought that to 39 GPU days across all 15 tasks. The ablation this section prescribes now has a named, public suite to run in, spanning three modalities rather than the single benchmark domain most headline results come from.

FigureProcess · 6 steps
  1. 1. Lock the labeled protocol

    Freeze labels, splits, metrics, and preprocessing before using unlabeled data.

  2. 2. Match the compute budget

    Give the supervised baseline comparable training time and augmentation strength.

  3. 3. Add one mechanism

    Test pseudo-labeling, consistency, or teacher targets separately.

  4. 4. Sweep trust and coverage

    Report how thresholds change target precision, class mix, and admitted volume.

  5. 5. Audit generated labels

    Manually or programmatically inspect accepted and rejected examples.

  6. 6. Test less favorable domains

    Confirm that gains survive shift, imbalance, and smaller labeled sets.

When the unlabeled pool should be left unused

Unlabeled data is not automatically an asset. It may come from a different task, contain duplicated users, violate consent, or encode a changed label policy. In those cases, adding it can worsen both performance and governance.

The task-mismatch case has been quantified, and then contested, which is the more useful thing to know. Lan-Zhe Guo and colleagues reported at ICML 2020 that existing deep SSL methods drop below plain supervised learning once a large share of the pool comes from classes the task never had: “In the experiment of benchmark data, unlike the existing deep SSL methods which are no longer as good as supervised learning in 40% of unseen-class unlabeled data, the new method can still achieve performance gain in more than 60% of unseen-class unlabeled data.” A 40% contamination rate is not exotic in a pool assembled from whatever logs were available.

Then the measurement itself was challenged. Rundong He and colleagues re-examined it at ICLR 2025 and argued that the standard protocol violates the control-of-variables principle, concluding that “unseen classes in unlabeled data do not necessarily impair the performance of SSL models; in fact, under certain conditions, unseen classes may even enhance them”. Two competent groups, opposite readings, one experimental design between them. This lesson's own claim — that the protocol decides the answer — is being demonstrated on the question of whether the pool helps at all.

A strong negative result is valuable. If a supervised baseline matches the semi-supervised method after fair tuning, keep the simpler system. The extra loop is justified only when it improves target evidence without creating an unmanageable feedback process.

The decision is not whether unlabeled data exists, but whether it supplies valid information for the intended decision.

Position

Four labels per class is a benchmark result, and the baseline is the missing number

A pseudo-label costs nothing to produce, so the number attached to it travels further than its conditions do. The number here is 88.61% on CIFAR-10 from 40 labels, four per class. It is a real result under a specific mechanism. The pseudo-label is kept only when a weakly augmented view is predicted confidently, and the model then trains to predict it from a strongly augmented copy. Nothing about it is inflated. It is also close to the least representative situation a team will ever work in.

Four labels per class is a balanced labeled set with every class present, drawn from a single clean benchmark domain. Several of this lesson's failure slices exist because production data is none of those things. The rare-class slice is there because pseudo-labels drift toward majority classes under imbalance, which Jaehyung Kim and colleagues showed at NeurIPS 2020 and repaired by aligning the distribution rather than by moving a threshold. The new-device slice is there because high confidence may reflect familiar artifacts rather than transferable evidence. The duplicate-family slice is there because near-duplicates can make unlabeled gains look larger than genuine generalization. Even the gate that produced the 88.61% did not survive contact with a harder benchmark. At the same four labels per class, FlexMatch's per-class thresholds cut FixMatch's error by 13.96% on CIFAR-100 and 18.96% on STL-10. None of that is visible in a headline accuracy, and none of it is unusual in production data.

The number that belongs beside the headline is usually absent. Avital Oliver and colleagues found that “the performance of simple baselines which do not use unlabeled data is often underreported,” with methods differing in how sensitive they are to the amount of labeled and unlabeled data. That is a finding about the literature's reporting habits, not a verdict on any single paper. It converts into a way of reading every semi-supervised headline, this one included. The quantity that decides anything was never the accuracy reached with 40 labels. It is the distance between that and a supervised model given the same 40 labels, the same compute and the same augmentations. That baseline is expensive — 335 GPU days bought five vision tasks under the older tooling — and it is the run that gets cut. Where the distance is not reported, nothing has been reported that a team can act on.

A semi-supervised number means little until the supervised number is measured on the same budget.

Key takeaways