NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Expectation Maximization Pseudo Labels

Moucheng Xu, Yukun Zhou, Chen Jin, Marius de Groot, Daniel C. Alexander, Neil P. Oxtoby, Yipeng Hu, Joseph Jacob

TL;DR

This paper provides a rigorous theoretical foundation for pseudo-labeling by framing it as an Expectation-Maximization (EM) algorithm, explaining its empirical success and guaranteeing mathematical convergence. Building on this insight, the authors introduce Bayesian Pseudo Labels (SegPL-VI), which uses variational inference to dynamically learn an optimal confidence threshold, significantly mitigating confirmation bias in semi-supervised medical image segmentation.

What Problem Does This Paper Address?

Deep learning models excel at medical image segmentation but typically require massive amounts of expert-annotated data, which is exceptionally expensive and time-consuming to acquire. Semi-supervised learning (SSL) offers a solution by leveraging abundant unlabelled data alongside a small labeled dataset. A popular and computationally efficient SSL technique is pseudo-labeling, where a model's own predictions on unlabelled data are treated as ground-truth labels for subsequent training cycles.

However, pseudo-labeling suffers from two major drawbacks:

  1. Lack of Theory: It is largely heuristic, lacking a rigorous theoretical explanation for why it works or under what conditions it converges.
  2. Confirmation Bias: If the model generates incorrect pseudo-labels, it reinforces its own errors over time. Typically, researchers use a fixed, arbitrary threshold (like 0.5) to filter pseudo-labels, which fails to adapt as the model's confidence and representation quality change during training.

Methods

The authors bridge the gap between heuristic pseudo-labeling and statistical theory by proving that pseudo-labeling is a direct implementation of the classical Expectation-Maximization (EM) algorithm:

  • E-step: The model estimates the latent variables (pixel-wise pseudo-labels) on unlabelled data based on its current parameters.
  • M-step: The model updates its parameters by optimizing a joint loss function (combining supervised Dice loss on labeled data and unsupervised Dice loss on pseudo-labels).

To solve the confirmation bias problem, they introduce Bayesian Pseudo Labels (SegPL-VI). Instead of treating dense, pixel-wise labels directly as latent variables—which is computationally intractable—they simplify the graphical model by treating the confidence threshold $T$ itself as the latent variable.

They use Variational Inference to approximate the true posterior distribution of $T$ as a dynamic Gaussian distribution $\mathcal{N}(\mu, \sigma)$, parameterized by a small neural network module conditioned on image features. Using the standard reparameterization trick, the model dynamically learns to adjust this threshold during training, automatically selecting high-quality pseudo-labels and filtering out noisy ones.

The pseudo-labelling process framed as an EM algorithm, showing the simplification of treating the threshold $T$ as a latent variable.

Datasets

The proposed methods were evaluated across four distinct medical image segmentation benchmarks:

  1. CARVE: 3D binary segmentation of lung vessels from thoracic CT scans.
  2. BRATS 2018: 2D multi-class segmentation of brain tumors (gliomas) from MRI volumes.
  3. Task01 Brain Tumour (Medical Segmentation Decathlon): 3D binary segmentation of whole brain tumors from MRI volumes.
  4. Task05 Prostate (Medical Segmentation Decathlon): 3D binary segmentation of the prostate from MRI volumes.

Key Insights and Ideas

  • Guaranteed Convergence: By proving that pseudo-labeling maps to the EM algorithm, the authors show that the training process is mathematically guaranteed to converge to a local minimum, providing a solid theoretical justification for its empirical success.
  • Thresholding as a Latent Variable: Shifting the latent variable from dense, pixel-wise pseudo-labels to a single scalar threshold $T$ makes variational inference computationally feasible for complex 3D image segmentation tasks.
  • Frugal but Effective: Unlike state-of-the-art consistency regularization methods (e.g., Cross Pseudo Supervision) that require multiple forward passes or complex multi-decoder architectures, SegPL adds virtually zero computational overhead during training and inference, making it highly scalable for large datasets.
  • Inherent Robustness: Models trained with SegPL demonstrated significantly better resilience against out-of-distribution (OOD) noise (like contrast changes) and adversarial attacks (FGSM) compared to fully supervised baselines, showing that pseudo-labeling acts as a strong regularizer.

Key Results

  • Segmentation Performance: On the CARVE dataset (with only 2 labeled volumes), the basic SegPL achieved an Intersection over Union (IoU) of $69.44\%$, and SegPL-VI reached $70.65\%$, significantly outperforming the supervised baseline ($56.79\%$) and beating the top semi-supervised baseline, Cross Pseudo Supervision (CPS) ($66.67\%$).
  • Multi-Class Advantage: For multi-class segmentation on BRATS 2018 (with 50 labeled slices), SegPL-VI achieved $71.20\%$ IoU compared to $54.08\%$ for the supervised baseline and $63.89\%$ for CPS.
  • Computational Efficiency: SegPL required roughly half the training time ($1601$ seconds vs. $2730$ seconds) and half the floating-point operations (FLOPs) of CPS, while using half the parameters.

Limitations and Future Work

  • Overfitting and Overconfidence: If the model begins to overfit, it can become highly overconfident in its incorrect predictions. If the prior mean for the threshold is set too low, the learned threshold might fail to filter out these confident but incorrect pseudo-labels. Incorporating model calibration techniques is a suggested future direction.
  • Simplistic Prior: The authors used a simple Gaussian prior for the threshold due to its ease of implementation, but note that other distributions (like Beta or Categorical distributions) might be more optimal.
  • Coarse Thresholding: Currently, the model learns a single threshold for an entire batch. Developing more adaptive implementations—such as learning a unique threshold per image or even per pixel while accounting for spatial correlations—could further boost performance.

Summary updated

BibTeX
@misc{xu2023expectation,
  author = {Moucheng Xu and Yukun Zhou and Chen Jin and Marius de Groot and Daniel C. Alexander and Neil P. Oxtoby and Yipeng Hu and Joseph Jacob},
  title = {{Expectation Maximization Pseudo Labels}},
  year = {2023},
  eprint = {2305.01747},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.01747},
}
Figure