Improving realistic semi-supervised learning with doubly robust estimation

Khiem Pham, Charles Herrmann, Ramin Zabih

TL;DR

This paper introduces a two-stage framework for long-tailed semi-supervised learning that explicitly estimates the unlabeled class distribution using a "doubly robust" estimator. By decoupling distribution estimation from final classifier training, the authors significantly reduce bias and achieve state-of-the-art accuracy across various real-world data imbalance scenarios.

What Problem Does This Paper Address?

Semi-supervised learning (SSL) thrives on the idea that a small set of labeled data can be augmented by a massive pool of unlabeled data. However, in "realistic" settings, we often face Label Shift: the class distribution of the labeled data (which might be balanced or curated) does not match the unlabeled data (which is often "long-tailed," meaning a few classes have many samples while most have very few).

Standard SSL methods like FixMatch rely on "pseudo-labeling"—using the model's own predictions to label the unlabeled data. When distributions are mismatched, these models develop confirmation bias, over-predicting the "head" classes they saw in the labeled set and performing poorly on the "tail." Existing solutions either assume the unlabeled distribution is known (unrealistic) or try to estimate it on-the-fly during training, which often leads to inaccurate, biased estimates.

Methods

The authors propose a 2-stage algorithm for Realistic Long-Tailed SSL (RTSSL).

Figure 2. Overview of our 2-stage method (Section 3.3). In stage 1, we use Expectation-Maximization (EM, Section 3.1) to estimate the missingness mechanism and classifier from observable data. These quantities are used as nuisance components for the doubly-robust estimator of the class distribution Equation (13). In stage 2, we can use EM or other existing methods that also use logit-adjustment with the (unlabeled) class distribution to estimate the final classifier. We use SimPro as our implementation of EM (Section 3.2). The network in stage 1 can be of equal or smaller size than the network in stage 2 (Section 4.1).
  1. Stage 1: Distribution Estimation. Instead of training the final classifier immediately, the authors first focus on estimating the unlabeled class distribution $P(Y|A=0)$. They use an Expectation-Maximization (EM) framework to learn two "nuisance" components: a classifier $P(Y|X)$ and a missingness mechanism $P(A|Y)$ (which encodes how likely a sample of a certain class is to be labeled vs. unlabeled).
  2. Doubly Robust (DR) Estimator. The core innovation is applying a DR estimator from causal inference to combine these components. The DR estimator is "doubly robust" because it remains unbiased if either the classifier or the missingness mechanism is correctly specified. This provides a much more stable and accurate estimate of the global class distribution than previous methods.
  3. Stage 2: Final Training. The accurate distribution estimate from Stage 1 is "plugged into" existing state-of-the-art SSL algorithms (like SimPro or BOAT). These algorithms then use this fixed estimate to perform logit-adjustment, effectively "de-biasing" the pseudo-labels during the final training phase.

Datasets

The authors evaluated their method on four standard benchmarks, modified to simulate realistic long-tailed imbalances:

  • CIFAR-10-LT & CIFAR-100-LT: Classic datasets modified with various imbalance ratios and distribution types (consistent, uniform, reversed, middle, and head-tail).
  • STL-10: A dataset where unlabeled data naturally lacks ground-truth labels.
  • ImageNet-127: A naturally long-tailed, large-scale dataset used to test the scalability of the approach.

Key Insights and Ideas

  • Decoupling is Key: Estimating the class distribution as a separate, explicit first step is more effective than trying to learn it "on-the-fly" while simultaneously learning features.
  • Efficiency of DR Estimators: The paper leverages semi-parametric efficiency theory to show that their DR estimator is the "most efficient regular estimator," meaning it reaches the best possible accuracy for a given amount of data.
  • Small Models Work for Stage 1: Interestingly, the authors found that a smaller, less complex neural network (like Wide ResNet-28-2) is often sufficient in Stage 1 to get an accurate distribution estimate, even if the final Stage 2 model is much larger (like ResNet-50).
  • Fixing the "Overshoot": As shown in Figure 1, previous methods like SimPro tend to significantly overestimate head classes. The DR estimator corrects this "overshoot," leading to a much closer match to the ground truth.
Figure 1. The labeled class distribution and 5 possible unlabeled class distributions studied in (Du et al., 2024). SimPro significantly overestimates the head classes in consistent, reverse and head-tail settings. Our doubly-robust estimate is more accurate at the head classes as well as the overall distribution in all but the middle setting, as measured in total variation distance in Table 1. Our proposed 2-stage SimPro+ outperforms SimPro in classification accuracy in the middle setting as well.

Key Results

The 2-stage approach, dubbed SimPro+ and BOAT+, consistently outperformed the base versions of these algorithms:

  • Distribution Accuracy: On CIFAR-10-LT, the DR estimator achieved significantly lower Total Variation Distance (a measure of how much two distributions differ) compared to standard MLE or EM approaches (see Figure 4).
  • Classification Accuracy: In CIFAR-10-LT experiments, SimPro+ improved over the original SimPro in 9 out of 10 tested settings. For example, in the "consistent" imbalance setting, SimPro+ reached 77.8% accuracy compared to SimPro's 74.4% (see Figure 5).
  • Scalability: On the challenging ImageNet-127 benchmark, the 2-stage approach improved top-1 accuracy for both SimPro and BOAT across different image resolutions.

Limitations and Future Work

  • Direct DR Risk Instability: The authors experimented with using the "doubly-robust risk" directly as a training loss (rather than a 2-stage plug-in). However, they found this was often unstable due to the "inverse probability weighting" involved, which can create very large gradients if some classes are extremely rare in the labeled set.
  • CIFAR-100 Challenges: While still competitive, the gains on CIFAR-100 were smaller. The authors attribute this to the extreme scarcity of data (only 50 labeled samples for 100 classes), making any statistical estimation difficult.
  • Future Directions: The authors suggest that exploring more stable ways to integrate the DR risk directly into training, perhaps through better regularization of the missingness mechanism, could be a fruitful area for future research.

Summary updated

BibTeX
@misc{pham2025improving,
  author = {Khiem Pham and Charles Herrmann and Ramin Zabih},
  title = {{Improving realistic semi-supervised learning with doubly robust estimation}},
  year = {2025},
  eprint = {2502.00279},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.00279},
}
Figure