Continuous Contrastive Learning for Long-Tailed Semi-Supervised Recognition

Zi-Hao Zhou, Siyuan Fang, Zi-Jing Zhou, Tong Wei, Yuanyu Wan, Min-Ling Zhang

Introduction

In real-world machine learning applications, data distributions are rarely balanced. Most datasets exhibit a "long-tailed" distribution where a few majority classes (the head) contain the bulk of the samples, while many minority classes (the tail) are represented by only a few examples. This challenge is compounded in semi-supervised learning (SSL) scenarios, where labeled data is scarce and models must rely on a large pool of unlabeled data.

Existing long-tailed semi-supervised learning (LTSSL) methods often struggle with "confirmation bias." Because models naturally become biased toward head classes, they generate inaccurate pseudo-labels for unlabeled data, creating a self-reinforcing loop of error. Furthermore, most current research assumes that the unlabeled data follows the same distribution as the labeled data—an assumption that rarely holds in practice. This paper introduces Continuous Contrastive Learning (CCL), a framework designed to learn robust representations and improve classification performance even when the unlabeled data distribution is unknown or mismatched.

Methodology

Theoretical Foundation: The Information Bottleneck

The authors provide a unifying theoretical perspective by showing that common long-tail learning techniques, such as logit adjustment, can be derived from the Information Bottleneck principle. By approximating class densities using Gaussian kernels, they derive a class-balanced contrastive loss. This insight bridges the gap between discriminative classifiers and representation learning, suggesting that the key to solving LTSSL lies in "straightening out" the feature space itself rather than just adjusting the final classification layer.

The CCL Framework

The CCL framework consists of three primary technical innovations:

  1. Dual-Branch Training: The architecture employs two distinct heads—a standard head and a balanced head. This dual-branch approach allows the model to maintain high-quality feature extraction while specifically mitigating the bias toward majority classes.
  2. Energy-Based Selection: Traditional SSL methods select unlabeled samples based on the model's confidence (softmax probability). However, in long-tailed scenarios, models are often "confident but wrong" about head classes. CCL replaces confidence with an energy score (derived from the denominator of the softmax function). This score serves as a more reliable indicator of sample reliability and helps keep the model calibrated.
  3. Continuous and Smoothed Pseudo-Labels: Instead of assigning noisy "hard" labels to unlabeled data, CCL utilizes continuous labels derived from model predictions. These are further refined through label propagation, where labels are "smoothed" based on the proximity of samples in the feature space. This allows the model to learn from the underlying structural relationships between data points.

Experimental Setup

The researchers evaluated CCL across several benchmark datasets modified for long-tailed scenarios:

  • CIFAR10-LT & CIFAR100-LT: Standard datasets with artificial imbalance ratios.
  • STL10-LT: A dataset where the unlabeled distribution is naturally unknown and potentially differs from the labeled set.
  • ImageNet-127: A large-scale, naturally long-tailed version of ImageNet.

To test the robustness of the method, the authors evaluated three unlabeled data scenarios: consistent (matching the labeled distribution), uniform (balanced), and reversed (where tail classes in the labeled set become head classes in the unlabeled set).

Key Results and Insights

CCL consistently outperformed state-of-the-art methods like ACR and DASO across all tested environments. Notable findings include:

  • Superior Performance on Large-Scale Data: On ImageNet-127, CCL achieved a 4.3% accuracy improvement over the previous best method, a significant margin for a complex, high-dimensional dataset.
  • Robustness to Distribution Mismatch: In the "reversed" distribution setting—the most difficult scenario for LTSSL—CCL maintained a lead of several percentage points. This demonstrates that the framework does not rely on the assumption of identical distributions between labeled and unlabeled data.
  • Enhanced Representation Learning: Qualitative analysis via t-SNE visualizations indicated that CCL produces much tighter and more distinct clusters for minority classes compared to previous methods, confirming that the focus on representation learning effectively addresses the bias at its source.

Limitations and Future Directions

While CCL demonstrates strong empirical success and is grounded in information theory, the authors note that a formal theoretical proof of convergence for the features (specifically regarding the "neural collapse" phenomenon) is still needed. Additionally, the label propagation step involves a matrix inversion with a computational complexity of $O(B^3)$, which may require further optimization for training with extremely large mini-batches. Future work will likely focus on these theoretical foundations and scaling optimizations.

Summary updated

BibTeX
@inproceedings{zhou2024continuous,
  author = {Zi-Hao Zhou and Siyuan Fang and Zi-Jing Zhou and Tong Wei and Yuanyu Wan and Min-Ling Zhang},
  title = {{Continuous Contrastive Learning for Long-Tailed Semi-Supervised Recognition}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=PaqJ71zf1M},
}
Figure