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

Generalized Semi-Supervised Learning via Self-Supervised Feature Adaptation

Jiachen Liang, RuiBing Hou, Hong Chang, Bingpeng Ma, Shiguang Shan, Xilin Chen

TL;DR

Traditional Semi-Supervised Learning (SSL) struggles when unlabeled data comes from a different distribution than the labeled data. This paper introduces Self-Supervised Feature Adaptation (SSFA), a plug-and-play framework that uses an auxiliary self-supervised task to quickly adapt the model's feature extractor to unlabeled data before generating pseudo-labels. This simple adaptation significantly improves pseudo-label quality, reduces confirmation bias, and boosts performance across labeled, unlabeled, and even unseen data distributions.

What Problem Does This Paper Address?

Standard Semi-Supervised Learning (SSL) relies on a core assumption: labeled and unlabeled data are drawn from the exact same distribution. In the real world, this is rarely true. Labeled data is often carefully curated and clean, while unlabeled data scraped from the wild might contain corruptions (e.g., weather conditions in autonomous driving) or different styles (e.g., sketches vs. photos).

The authors formalize this as Feature Distribution Mismatch SSL (FDM-SSL). When traditional SSL models try to assign pseudo-labels to out-of-distribution unlabeled data, they make highly confident but incorrect guesses. The model then trains on its own bad guesses, leading to a destructive cycle known as "confirmation bias."

While Unsupervised Domain Adaptation (UDA) tackles similar domain shifts, UDA assumes you have abundant labeled source data. FDM-SSL tackles the much harder scenario where labeled data is scarce, and the unlabeled data might be a messy mixture of multiple unknown distributions.

Methods

To prevent the model from blindly trusting bad predictions on mismatched data, the authors propose Self-Supervised Feature Adaptation (SSFA). SSFA decouples the pseudo-labeling step from the main model state using a clever two-module approach:

SSFA Architecture
  1. Semi-Supervised Learning Module: The model is trained jointly on a standard SSL classification task (using cross-entropy and pseudo-labels) and an auxiliary self-supervised task (like predicting the rotation of an image).
  2. Feature Adaptation Module: This is the novel step. Before the model generates a pseudo-label for a batch of unlabeled data, SSFA performs a temporary, one-step gradient update on the shared feature extractor using only the self-supervised loss on that specific unlabeled batch.

By doing this, the feature extractor temporarily "adapts" to the specific quirks of the unlabeled data. The model then generates a much more accurate pseudo-label. Finally, the temporary weights are discarded, and the high-quality pseudo-label is used to train the main model normally.

Datasets

The authors evaluate FDM-SSL using two types of distribution mismatch:

  • Image Corruption: They use CIFAR-100 for the clean labeled domain and CIFAR-100-C (which contains various algorithmic corruptions like blur, noise, and weather) for the mixed unlabeled domain. They hold out 5 corruptions entirely to test performance on "unseen" distributions.
  • Style Change: They repurpose standard domain adaptation benchmarks OFFICE-31 and OFFICE-HOME. One domain (e.g., Amazon photos) is used as the scarce labeled set, while other domains (e.g., Web camera, Art) are used as the unlabeled set.

Key Insights and Ideas

  • Indirect Optimization Works: The authors provide theoretical and empirical evidence showing that optimizing a self-supervised task (like rotation prediction) on unlabeled data indirectly optimizes the main classification task. As long as the gradients of the two tasks align, adapting via self-supervision pushes the model in the right direction for classification.
  • Adapt Before You Guess: Generating pseudo-labels on shifted data is dangerous. By forcing the feature extractor to adapt to the unlabeled data's structure before guessing the class, SSFA drastically cuts down on noise accumulation.
  • Plug-and-Play Compatibility: SSFA is not a standalone algorithm; it is a generic wrapper. The authors successfully integrated it into several state-of-the-art SSL algorithms (FixMatch, ReMixMatch, FreeMatch, SoftMatch), proving its versatility.
  • Robustness to Thresholds: Traditional SSL methods like FixMatch are highly sensitive to the confidence threshold used for pseudo-labeling. Because SSFA generates inherently better pseudo-labels, it makes the underlying SSL algorithms much more robust to sub-optimal hyperparameter choices.

Key Results

SSFA yielded massive improvements, particularly on the mismatched unlabeled (UL) and unseen (US) distributions:

Feature Space Comparison (FixMatch vs. FM-SSFA)
  • CIFAR-100-C (Image Corruption): Using just 400 labeled examples, standard FixMatch scored a dismal 4.7% accuracy on the unlabeled distribution and 16.5% on unseen distributions. Upgrading it to FM-SSFA boosted accuracy to 23.2% (UL) and 25.8% (US), while also improving the labeled domain performance.
  • OFFICE-31 (Style Change): On the "Amazon to Webcam" task, FixMatch achieved only 9.5% accuracy on the unlabeled domain. FM-SSFA skyrocketed this to 56.5%.
  • Self-Supervised Task Ablation: While rotation prediction yielded the best results, using contrastive learning (SimCLR) or entropy minimization as the auxiliary task also provided solid gains over the baselines.

Limitations and Future Work

  • Architecture Sensitivity: The success of SSFA depends heavily on how many layers are shared between the main classification head and the auxiliary self-supervised head. The authors note that sharing all layers of a ResNet causes over-adaptation and degrades performance (sharing 2-3 layers works best).
  • Future Work: The authors suggest that future research should focus on exploring how different types of self-supervised tasks interact with feature adaptation, aiming to maximize effectiveness across an even broader range of distribution shifts.

Summary updated

BibTeX
@inproceedings{liang2023generalized,
  author = {Jiachen Liang and RuiBing Hou and Hong Chang and Bingpeng Ma and Shiguang Shan and Xilin CHEN},
  title = {{Generalized Semi-Supervised Learning via Self-Supervised Feature Adaptation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=A6PRwRjI8V},
}
Figure