Mitigating Confirmation Bias in Semi-supervised Learning via Efficient Bayesian Model Averaging

Charlotte Loh, Rumen Dangovski, Shivchander Sudalairaj, Seungwook Han, Ligong Han, Leonid Karlinsky, Marin Soljacic, Akash SrivastavaTMLR 2023

Abstract

State-of-the-art (SOTA) semi-supervised learning (SSL) methods have been highly successful in leveraging a mix of labeled and unlabeled data, often via self-training or pseudo-labeling. During pseudo-labeling, the model's predictions on unlabeled data are used for training and may result in confirmation bias where the model reinforces its own mistakes. In this work, we show that SOTA SSL methods often suffer from confirmation bias and demonstrate that this is often a result of using a poorly calibrated classifier for pseudo labeling. We introduce BaM-SSL, an efficient Bayesian Model averaging technique that improves uncertainty quantification in SSL methods with limited computational or memory overhead. We demonstrate that BaM-SSL mitigates confirmation bias in SOTA SSL methods across standard vision benchmarks of CIFAR-10, CIFAR-100, giving up to 16% improvement in test accuracy on the CIFAR-100 with 400 labels benchmark. Furthermore, we also demonstrate their effectiveness in additional realistic and challenging problems, such as class-imbalanced datasets and in photonics science.

Introduction

Semi-supervised learning (SSL) aims to leverage large amounts of unlabeled data alongside a small set of labeled samples. Most modern SSL frameworks rely on pseudo-labeling: the model generates labels for unlabeled data, which are then used as targets for subsequent training iterations. However, this process is prone to confirmation bias, where the model becomes overconfident in its own incorrect predictions, creating a self-reinforcing error loop.

The root cause identified in this research is poor model calibration. Standard deep neural networks tend to output high confidence scores even for incorrect predictions. Consequently, they "don't know what they don't know," leading to the inclusion of noisy pseudo-labels in the training set.

Methodology: BaM-SSL

To address this, the authors propose BaM-SSL (Bayesian Model averaging for SSL). The core idea is to replace the standard deterministic classification head with an efficient Bayesian layer.

The BaM-SSL pipeline: Unlabeled data is processed through weak and strong augmentations. A Bayesian last layer enables uncertainty quantification via variance-based selection of pseudo-labels.

The method introduces two primary innovations:

  1. Efficient Bayesian Last Layer: Instead of a full Bayesian neural network, only the final linear layer is made Bayesian. Weights are modeled as Gaussian distributions learned via Stochastic Variational Inference (SVI). This approach is computationally efficient, adding only 2–5% to training time.
  2. Variance-Based Selection: Unlike standard methods that select pseudo-labels based on maximum logit (confidence), BaM-SSL uses the variance across multiple Bayesian samples. High variance indicates model disagreement and uncertainty, allowing the system to reject potentially erroneous pseudo-labels.

Experimental Results

BaM-SSL was evaluated on standard vision benchmarks (CIFAR-10/100, ImageNet), extreme low-label regimes, class-imbalanced datasets, and a specialized Photonic Crystals (PhC) scientific dataset.

Performance comparison across iterations: (a) Test Accuracy, (b) Expected Calibration Error (ECE), (c) Selection Purity, and (d) Max Logit. BaM-based methods (green and red) consistently outperform standard baselines.

Key findings include:

  • Significant Accuracy Gains: On CIFAR-100 with 400 labels, BaM-UDA achieved a 16.2% improvement over the baseline. In extreme cases (100 labels), it reached 35.2% accuracy while the baseline collapsed to 8.2%.
  • Improved Calibration and Purity: As shown in the results above, BaM-SSL significantly reduces Expected Calibration Error (ECE) and increases "selection purity"—the percentage of correctly assigned pseudo-labels.
  • Scientific Utility: In the photonics science task, the method provided a ~2% accuracy boost and superior calibration, demonstrating its utility in high-stakes domains where labeled data is scarce.

Conclusion

BaM-SSL demonstrates that mitigating confirmation bias is largely a matter of improving model calibration. By using prediction variance as a filter rather than raw confidence, models can more effectively navigate the challenges of pseudo-labeling. While the current implementation focuses on the last layer and uses ECE as a primary metric, future work may explore deeper Bayesian integration and more robust uncertainty metrics.

Summary updated

BibTeX
@article{loh2023mitigating,
  author = {Charlotte Loh and Rumen Dangovski and Shivchander Sudalairaj and Seungwook Han and Ligong Han and Leonid Karlinsky and Marin Soljacic and Akash Srivastava},
  title = {{Mitigating Confirmation Bias in Semi-supervised Learning via Efficient Bayesian Model Averaging}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=PRrKOaDQtQ},
}
Figure