Abstract
Semi-supervised learning (SSL) aims to leverage large amounts of unlabeled data alongside a small set of labeled samples. However, in low-label regimes, models often overfit to the labeled set, leading to a "feature distribution misalignment" where labeled and unlabeled data occupy different regions of the feature space. We present Adversarial Feature Distribution Alignment (AFDA), which employs an adversarial discriminator to force the feature distributions of labeled and unlabeled data to overlap. Combined with consistency regularization, AFDA ensures both marginal and conditional alignment. Our method achieves significant performance gains on standard benchmarks, particularly when labels are extremely scarce.
Introduction
In deep learning, labeled data is often a bottleneck. Semi-supervised learning (SSL) addresses this by training models on a mix of limited labeled data and abundant unlabeled data. A common assumption in SSL is that data points of the same class cluster together, separated by low-density regions. However, when labels are scarce, models tend to overfit, creating a "hallucination" where the feature representations of labeled and unlabeled data drift apart, even if they belong to the same class. This phenomenon, termed feature distribution misalignment, treats the labeled and unlabeled sets as if they come from different domains.
Adversarial Feature Distribution Alignment (AFDA)
To bridge this gap, we propose AFDA, a two-pronged strategy that integrates adversarial training with consistency regularization.
1. Adversarial Distribution Alignment
Inspired by Unsupervised Domain Adaptation (UDA), we introduce a binary discriminator $d$. Its objective is to distinguish whether a feature vector $\mathbf{f}$ originates from a labeled sample $x_l$ or an unlabeled sample $x_{ul}$. Simultaneously, the feature extractor $f$ is trained to "fool" the discriminator, forcing the marginal distributions of the two sets to overlap in the feature space. Minimizing this distance directly minimizes the risk of poor generalization.
2. Consistency Regularization
Alignment alone does not guarantee correct classification; it could inadvertently align a sample with the wrong class cluster. To prevent this, we employ consistency regularization. This ensures that the model produces stable predictions for an unlabeled image even under small perturbations (e.g., noise $\epsilon$). While the adversarial loss handles global marginal alignment, consistency regularization maintains local conditional boundaries.
Experimental Evaluation
We evaluated AFDA on the SVHN and CIFAR-10 benchmarks using standard architectures like ConvLarge and ResNet with shake-shake regularization.
Impact of Alignment and Consistency
The synergy between adversarial alignment and consistency is crucial. As shown in the t-SNE visualizations below, supervised-only training leads to significant misalignment. Removing either the alignment or consistency component degrades the quality of the learned clusters and increases the test error. The full AFDA model successfully "fills in" the clusters defined by the labeled samples, creating much denser and more accurate class representations.
Key Results
AFDA excels in "ultra-low label" settings:
- SVHN: With only 250 labels, AFDA achieves a test error of 3.88%, significantly outperforming previous state-of-the-art methods. With 1000 labels, the error drops to 3.39%, remarkably close to the fully supervised performance of 2.89%.
- CIFAR-10: AFDA achieves a 6.05% error rate with 4000 labels, outperforming several contemporary hybrid methods like Mean-Teacher and HybridNet.
Conclusion
Feature distribution misalignment is a critical yet often overlooked challenge in semi-supervised learning. By treating the labeled/unlabeled split as a domain adaptation problem, AFDA provides a robust framework for ensuring that knowledge from a few labels generalizes effectively to the entire dataset. The combination of adversarial alignment and consistency regularization offers a powerful tool for training high-performance models in data-constrained environments.
Summary updated