Bidirectional Adaptation for Robust Semi-Supervised Learning with Inconsistent Data Distributions

Lin-Han Jia, Lan-Zhe Guo, Zhi Zhou, Jie-Jing Shao, Yuke Xiang, Yu-Feng LiICML 2023

TL;DR: Standard Semi-Supervised Learning (SSL) often fails when labeled and unlabeled data come from different distributions. This paper introduces Bidirectional Adaptation, a framework that uses unsupervised domain adaptation to generate "debiased" pseudo-labels and a flexible weighting scheme to align the model with the target distribution, significantly outperforming existing robust SSL methods.

The Challenge of Inconsistent Distributions

Semi-supervised learning is built on a fundamental assumption: that your small pool of labeled data and your mountain of unlabeled data are drawn from the same distribution. In the real world, this is rarely true. You might have high-quality labeled photos from a studio but millions of unlabeled, grainy CCTV frames, or labeled "real" images and unlabeled synthetic ones.

Examples of inconsistent label and feature distributions between labeled and unlabeled data.

When these distributions are inconsistent—a phenomenon known as covariate shift—standard SSL algorithms like FixMatch or FlexMatch don't just plateau; they can actually perform worse than if you had ignored the unlabeled data entirely. The authors identify a lack of theoretical guidance for this scenario and aim to bridge the gap between SSL and Domain Adaptation (DA).

Identifying the Flaws in Standard SSL

The authors first derive a new theoretical generalization error bound that explicitly accounts for distribution discrepancies. From this theory, they identify three "fatal flaws" in current SSL approaches:

  1. Coupling: The model used to generate pseudo-labels is usually the same one being trained as the final predictor. When distributions shift, these two tasks have conflicting goals.
  2. Biased Pseudo-labels: A model trained on one distribution will naturally produce biased labels when applied to a different one.
  3. Restricted Weights: Most SSL uses "hard" 0/1 thresholding (only using samples above a certain confidence). This is too rigid to properly align mismatched distributions.

The Solution: Bidirectional Adaptation

To address these challenges, the authors propose Bidirectional Adaptation (Bi-Adaptation).

The Bidirectional Adaptation framework, decoupling the pseudo-label predictor from the target predictor.

The framework tackles the identified flaws through two main mechanisms:

  • Decoupling & Debiasing: They treat the pseudo-labeler as a separate entity. They use unsupervised Domain Adaptation (DA) techniques to train this labeler so it "understands" the unlabeled data's distribution, leading to much more accurate (debiased) pseudo-labels.
  • Unrestricted Sample Weighting: Instead of a simple threshold, they calculate a continuous weight for each unlabeled sample. This weight is based on two factors: intra-class confidence (how confident is this sample relative to others in its class?) and inter-class proportions (balancing the class distribution to match the target).

Key Insights

  • The Pareto Trade-off: The authors prove that in inconsistent SSL, there is a fundamental trade-off between being a good "labeler" for the unlabeled data and a good "predictor" for the target data. By decoupling these into two steps, they bypass this trade-off.
  • Relative Confidence Matters: Standard SSL uses absolute confidence thresholds (e.g., 0.95). Bi-Adaptation realizes that some classes are just harder to learn than others. By normalizing confidence against the class average, they can salvage useful information from "hard" classes that standard models would discard.
  • SSL is DA in Disguise: The paper effectively argues that robust SSL is a domain adaptation problem. The "bidirectional" part of the name refers to adapting to the unlabeled distribution to get labels, and then adapting back to the target distribution for the final model.

Experimental Results

The framework was evaluated on several benchmarks specifically chosen for their distribution shifts, including Office-Caltech, Image-CLEF, Office-31, and VisDA-2017. Bi-Adaptation consistently outperformed both standard SSL (FixMatch, FlexMatch) and specialized robust SSL methods (UASD, CAFA) across all tested shifts.

  • VisDA-2017 (Synthetic $\to$ Real): With only 150 labels, Bi-Adaptation achieved 85.92% accuracy, while the popular FixMatch trailed at 78.46%.
  • Office-31: On the "Amazon to DSLR" shift, Bi-Adaptation reached 73.54% accuracy, outperforming the supervised baseline and all other SSL competitors.
  • Robustness: The method proved particularly resilient in "Open-set" SSL, where the unlabeled data contains categories the model has never seen before—a scenario that usually "poisons" standard SSL models.

Limitations and Future Work

While powerful, Bi-Adaptation has a few limitations. Because it involves an initial Domain Adaptation step to train the pseudo-labeler, it is computationally more expensive than "single-pass" SSL algorithms. Furthermore, the underlying theory assumes that the relationship between features and labels remains constant across domains. If the actual meaning of the data changes (e.g., a "car" in one dataset is a "toy" in another), this framework might require further extension. Future directions include exploring more advanced DA techniques within the framework and automating hyperparameter tuning for the weighting functions.

Summary updated

BibTeX
@inproceedings{jia2023bidirectional,
  author = {Lin-Han Jia and Lan-Zhe Guo and Zhi Zhou and Jie-Jing Shao and Yuke Xiang and Yu-Feng Li},
  title = {{Bidirectional Adaptation for Robust Semi-Supervised Learning with Inconsistent Data Distributions}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=dZA7WtCULT},
}
Figure