TL;DR
This paper introduces Interpolative Centroid Contrastive Learning (ICCL), a novel method to improve the representation learning of "tail classes" (classes with few samples) in long-tailed datasets. By interpolating images and contrasting their embeddings with class centroids, ICCL significantly boosts accuracy on tail classes, achieving state-of-the-art results on several benchmarks.
What Problem Does This Paper Address?
Many real-world datasets, like those for image recognition, exhibit a "long-tailed" distribution. This means a few classes (head classes) have abundant data, while many classes (tail classes) have very few samples. This imbalance makes it difficult for deep learning models to learn good representations for tail classes, leading to poor performance on them. While existing methods often focus on re-sampling data or re-weighting losses, they can sometimes hinder effective representation learning. This paper aims to directly improve the quality of representations learned for these under-represented tail classes.
Methods
The core of ICCL lies in its interpolative branch, which works alongside a standard uniform branch (trained with cross-entropy loss). The interpolative branch generates "virtual" training samples by linearly combining an image from a class-agnostic sampler (which favors head classes) and an image from a class-aware sampler (which oversamples tail classes).
The key innovation is the interpolative centroid contrastive loss. This loss encourages the embedding of the interpolative sample to be similar to the centroids of its constituent classes, while being dissimilar to centroids of other classes. Class centroids are maintained as moving averages of low-dimensional embeddings. This contrastive approach helps to:
- Reduce intra-class variance: Pulling embeddings of samples from the same class closer to their centroid.
- Increase inter-class variance: Pushing embeddings away from centroids of different classes.
This process effectively injects "class-balanced knowledge" into the representation learning stage, helping tail classes learn more discriminative features. The model is trained with a combined loss from both branches. After representation learning, a standard classifier rebalancing stage is applied.
Datasets
The proposed method is evaluated on several standard long-tailed benchmarks:
- CIFAR-LT: CIFAR-10 and CIFAR-100 datasets with varying imbalance ratios (10, 50, 100).
- ImageNet-LT: A subset of ImageNet with 1000 classes and a Pareto distribution, featuring an imbalance ratio of 256.
- iNaturalist 2018: A real-world, fine-grained classification dataset with a significant long-tailed distribution.
Key Insights and Ideas
- Centroids as anchors: Using class centroids as targets for contrastive learning provides a stable, class-balanced signal that can guide the learning of tail classes, even with limited data.
- Interpolation for knowledge transfer: Creating interpolative samples by combining head and tail class data allows the model to learn how to represent tail classes by leveraging the abundant information from head classes.
- Decoupling is good, but representation learning needs more: While decoupling representation learning from classifier balancing is beneficial, ICCL shows that further improving the representation learning itself, even before classifier rebalancing, yields significant gains.
- Tailored sampling is crucial: The class-aware sampler's ability to focus on tail classes is vital, but an extreme focus (e.g., only tail classes) can be detrimental, highlighting the need for a balanced approach.
Key Results
ICCL demonstrates strong performance across all tested benchmarks:
- CIFAR-LT: Achieves competitive results, outperforming existing methods by 2.5% on CIFAR100-LT with an imbalance ratio of 100 after classifier balancing.
- ImageNet-LT: Achieves the best overall accuracy of 54.0%, with noticeable gains on medium and few classes.
- iNaturalist 2018: Shows substantial improvements, surpassing BBN by 4.1% (at 90 epochs) and 2.8% (at 200 epochs). The method achieves an overall accuracy of 70.5% at 90 epochs, which is better than BBN's result at 180 epochs.
- Ablation studies confirm that both the interpolative centroid contrastive loss and the interpolative cross-entropy loss contribute to accuracy improvements, and that a warm-up phase further boosts performance.
Limitations and Future Work
- Sampler balance: The paper notes that an interpolative branch sampler that focuses too much on tail classes (γ=1) or head classes (uniform sampler) leads to worse performance. This suggests that finding the optimal balance between head and tail class focus in the sampler is important.
- Hyperparameter sensitivity: While the overall accuracy is shown to be relatively insensitive to the distillation temperature ($T_a$), other hyperparameters like the interpolation weight ($\lambda$) and sampler adjustment ($\gamma$) require careful tuning.
- Future work: The authors suggest that the interpolative centroid contrastive learning framework can be extended to other domains and tasks where long-tailed distributions are prevalent. Further exploration into optimal sampler strategies and centroid update mechanisms could also be beneficial.
Summary updated