NP-Match: Towards a New Probabilistic Model for Semi-Supervised Learning

Jianfeng Wang, Xiaolin Hu, Thomas LukasiewiczarXiv 2023 · DOI

Abstract

Semi-supervised learning (SSL) typically relies on deterministic models that lack reliable uncertainty estimation, often leading to the propagation of noisy pseudo-labels. While Monte-Carlo (MC) dropout offers a probabilistic alternative, its high computational cost limits scalability. This paper introduces NP-Match, a novel SSL framework that integrates Neural Processes (NPs) to provide efficient, single-pass uncertainty estimates. By treating labeled data as context points and unlabeled data as target points, NP-Match learns an implicit kernel for context-aware predictions. We further propose a skew-geometric Jensen-Shannon divergence to stabilize training against early-stage noise. Experimental results across standard, imbalanced, and multi-label SSL benchmarks demonstrate that NP-Match achieves state-of-the-art accuracy while significantly outperforming MC-dropout in computational efficiency.

Introduction

The success of semi-supervised learning (SSL) is often hindered by the deterministic nature of state-of-the-art models. Methods like FixMatch and FlexMatch produce point estimates that fail to quantify predictive uncertainty. Consequently, when faced with ambiguous unlabeled samples, these models generate overconfident but incorrect pseudo-labels, which degrade performance during training. Existing probabilistic approaches, primarily based on Monte-Carlo (MC) dropout, require multiple forward passes per sample, making them prohibitively expensive for large-scale datasets. NP-Match addresses these challenges by leveraging Neural Processes to provide fast, reliable uncertainty quantification within a unified SSL pipeline.

Methodology

NP-Match replaces the standard linear classifier head with a Neural Process (NP) module. NPs approximate Gaussian Processes by learning to map context sets (labeled data) to a distribution over functions.

1. Architecture

The model uses a CNN backbone to extract feature vectors. In the NP module, labeled samples serve as context points, while unlabeled samples are target points. This allows the model to make predictions by implicitly comparing unlabeled features to known labeled examples.

Overview of the NP-Match architecture in training and inference modes.

2. Uncertainty Estimation

Unlike MC-dropout, NP-Match estimates uncertainty through a single forward pass by sampling from a latent distribution. This "confidence score" acts as a filter, ensuring only high-certainty pseudo-labels contribute to the loss.

3. Divergence Measure: $JS^{G_{\alpha_u}}$

To mitigate the impact of noisy representations in early training stages, we replace standard KL divergence with a novel uncertainty-guided skew-geometric Jensen-Shannon ($JS^{G_{\alpha_u}}$) divergence. This allows for more robust optimization by dynamically weighting the influence of the prior distribution based on predictive certainty.

Results

NP-Match was evaluated on CIFAR-10/100, STL-10, ImageNet, and the Chest X-Ray14 dataset.

  • Accuracy: On CIFAR-10 with 40 labels, NP-Match achieved a 4.91% error rate, outperforming FixMatch (7.47%). On ImageNet, it achieved a 41.78% Top-1 error, surpassing SOTA deterministic methods like FlexMatch.
  • Efficiency: A key advantage of NP-Match is its computational efficiency compared to MC-dropout-based methods like UPS. As shown in Figure 4, the time cost for NP-Match remains nearly constant regardless of the number of samples used for uncertainty estimation, whereas UPS scales linearly and becomes significantly slower.
Computational efficiency comparison between NP-Match and MC-dropout (UPS).
  • Medical Application: In multi-label classification on Chest X-Ray14, NP-Match achieved a mean AUC of 80.95, demonstrating its utility in safety-critical domains where uncertainty quantification is paramount.

Conclusion

NP-Match represents a significant step toward robust and efficient probabilistic SSL. By integrating Neural Processes, the framework provides high-quality uncertainty estimates without the overhead of traditional Bayesian methods. Future work includes exploring Attentive Neural Processes and extending the framework to complex tasks such as object detection and segmentation.

Summary updated

Abstract

Semi-supervised learning (SSL) has been widely explored in recent years, and it is an effective way of leveraging unlabeled data to reduce the reliance on labeled data. In this work, we adjust neural processes (NPs) to the semi-supervised image classification task, resulting in a new method named NP-Match. NP-Match is suited to this task for two reasons. Firstly, NP-Match implicitly compares data points when making predictions, and as a result, the prediction of each unlabeled data point is affected by the labeled data points that are similar to it, which improves the quality of pseudo-labels. Secondly, NP-Match is able to estimate uncertainty that can be used as a tool for selecting unlabeled samples with reliable pseudo-labels. Compared with uncertainty-based SSL methods implemented with Monte-Carlo (MC) dropout, NP-Match estimates uncertainty with much less computational overhead, which can save time at both the training and the testing phases. We conducted extensive experiments on five public datasets under three semi-supervised image classification settings, namely, the standard semi-supervised image classification, the imbalanced semi-supervised image classification, and the multi-label semi-supervised image classification, and NP-Match outperforms state-of-the-art (SOTA) approaches or achieves competitive results on them, which shows the effectiveness of NP-Match and its potential for SSL. The codes are at https://github.com/Jianf-Wang/NP-Match
BibTeX
@misc{wang2023np,
  author = {Jianfeng Wang and Xiaolin Hu and Thomas Lukasiewicz},
  title = {{NP-Match: Towards a New Probabilistic Model for Semi-Supervised Learning}},
  year = {2023},
  eprint = {2301.13569},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2301.13569},
}
Figure