CLAF: Contrastive Learning with Augmented Features for Imbalanced Semi-Supervised Learning

Bowen Tao, Lan Li, Xin-Chun Li, De-Chuan Zhan

TL;DR

This paper introduces CLAF, a novel approach to semi-supervised learning (SSL) that tackles the challenge of imbalanced datasets. By employing class-dependent feature augmentation and strategically using labeled data for contrastive learning, CLAF significantly improves representation learning for minority classes, outperforming existing methods on imbalanced image classification tasks.

What Problem Does This Paper Address?

Semi-supervised learning (SSL) aims to leverage large amounts of unlabeled data to improve model performance, especially when labeled data is scarce. A popular technique in SSL is contrastive learning, which learns robust representations by pulling similar samples together and pushing dissimilar ones apart. A common strategy is to first generate "pseudo-labels" for unlabeled data and then use these pseudo-labels to guide contrastive learning. However, this approach struggles with imbalanced datasets, where one or a few classes have significantly more samples than others. In such scenarios, pseudo-labels tend to be biased towards the majority classes, leading to inaccurate representations for minority classes and ultimately hindering the overall effectiveness of contrastive learning. This paper addresses this critical gap by proposing a method that specifically handles imbalanced data within the SSL and contrastive learning framework.

Methods

The proposed method, Contrastive Learning with Augmented Features (CLAF), introduces two key innovations to combat the challenges of imbalanced SSL:

  1. Class-Dependent Feature Augmentation (FA): To address the scarcity of minority class samples, CLAF employs a feature augmentation strategy. This augmentation is class-dependent, meaning it's applied with a probability that is inversely proportional to the number of labeled samples for a given class. Minority classes receive more augmentation, effectively increasing their representation in the training batch and providing more diverse features for contrastive learning. The augmented features are generated by blending raw features with features from weakly augmented unlabeled data.
  2. Labeled Data for Contrastive Loss: Unlike conventional pseudo-label-based contrastive learning (PCL) that primarily uses unlabeled samples for contrastive loss computation, CLAF strategically selects both positive and negative samples from the labeled data. This is done for each pseudo-labeled sample. This approach aims to reduce the negative impact of potentially biased pseudo-labels from majority classes, ensuring that the contrastive signals are more reliable and less influenced by mislabeled majority class samples.

CLAF integrates these components with a base SSL learner (like FixMatch) and a semantic alignment loss (from DASO), optimizing a combined objective function.

Datasets

The paper evaluates CLAF on the following imbalanced image classification datasets:

  • CIFAR10-LT: A version of CIFAR10 with imbalanced class distributions, created by exponentially decreasing the number of samples from head classes to tail classes.
  • CIFAR100-LT: Similar to CIFAR10-LT, but based on the CIFAR100 dataset, also with imbalanced class distributions.

The authors specifically mention creating these benchmarks to mimic real-world imbalanced scenarios and compare their method against existing approaches on these challenging settings.

Key Insights and Ideas

  • Pseudo-label bias is a critical bottleneck: The paper clearly demonstrates that the confirmation bias inherent in pseudo-labeling becomes a major problem in imbalanced SSL, disproportionately affecting minority classes.
  • Augmentation needs to be class-aware: Simply augmenting data isn't enough; CLAF's class-dependent augmentation is crucial for boosting the representation of under-represented classes. This insight highlights the importance of tailoring data augmentation strategies to dataset characteristics.
  • Leveraging labeled data for contrastive learning is key: Shifting the focus of contrastive loss computation from solely unlabeled to a mix that includes labeled data provides a more robust signal, especially when pseudo-labels are unreliable. This suggests a more nuanced approach to combining pseudo-labeling and contrastive learning.
  • CLAF offers superior minority class representation: The t-SNE visualizations and accuracy metrics for tail classes strongly suggest that CLAF effectively learns better decision boundaries for minority classes compared to prior methods.

Key Results

  • CLAF consistently outperforms baseline methods (including DASO, FixMatch, DARP, and CREST+) on CIFAR10-LT and CIFAR100-LT across various imbalance ratios (γ).
  • For example, on CIFAR10-LT with γ=100 and N₁=500, M₁=4000, CLAF achieves 76.4±0.46% accuracy, outperforming DASO (76.0±0.37%) and other methods.
  • Ablation studies show that the feature augmentation component (FA) is indeed beneficial, with CLAF achieving higher accuracy than CLAF without FA. For instance, on CIFAR10-LT with γ=100 and N₁=500, M₁=4000, CLAF (76.4±0.46%) is better than CLAF w/o FA (76.1±0.25%).
  • Qualitative analysis (t-SNE visualization) shows CLAF creates clearer decision boundaries for tail classes compared to DASO, which exhibits more overlap. CLAF achieved 65.3% accuracy for the 3-least common classes, compared to DASO's 60.8%.

Limitations and Future Work

  • Computational Cost: While not explicitly detailed as a limitation, the use of feature augmentation and contrastive learning inherently increases computational demands compared to simpler SSL methods.
  • Hyperparameter Sensitivity: The effectiveness of FA and the contrastive loss relies on careful tuning of hyperparameters like the mixture coefficient (λ) and temperature (t), which might require extensive experimentation.
  • Future Work: The paper implicitly suggests that further exploration of class-dependent augmentation strategies and more sophisticated ways to leverage labeled data within contrastive learning for imbalanced SSL could be fruitful. The success of CLAF also opens avenues for applying similar principles to other domains beyond image classification.

Summary updated

BibTeX
@inproceedings{tao2024claf,
  author = {Bowen Tao and Lan Li and Xin-Chun Li and De-Chuan Zhan},
  title = {{CLAF: Contrastive Learning with Augmented Features for Imbalanced Semi-Supervised Learning}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  doi = {10.1109/icassp48485.2024.10446881},
}
Figure