TL;DR
Contrastive learning often fails on imbalanced data because it focuses on maximizing mutual information between features and raw inputs, ignoring class labels. This paper re-frames long-tailed recognition as maximizing mutual information between features and ground-truth labels, providing a theoretical bridge that seamlessly integrates contrastive learning with logit adjustment through a novel "Gaussian Mixture Likelihood" (GML) loss.
What Problem Does This Paper Address?
In the real world, data is rarely balanced. Most datasets exhibit a "long-tailed" distribution where a few "head" classes have thousands of samples, while many "tail" classes have only a handful. Standard deep learning models—and especially contrastive learning (CL) methods—struggle here.
While CL is excellent at learning general representations by comparing samples, it typically aims to maximize the Mutual Information (MI) between a latent feature and the input data. Because this process is label-agnostic, it cannot account for class imbalances. Researchers previously tried to fix this by combining CL with "logit adjustment" (shifting prediction scores based on class frequency), but these combinations were largely empirical "hacks" without a solid theoretical foundation. This paper seeks to provide that missing theory and a more principled algorithm.
Methods
The authors propose a shift in perspective: instead of maximizing $I(\text{Features}; \text{Inputs})$, we should maximize $I(\text{Features}; \text{Labels})$.
- GML Loss: By applying the InfoNCE framework (a common lower bound for MI) to the relationship between features and labels, the authors derive the Gaussian Mixture Likelihood (GML) loss. They model the likelihood of a feature belonging to a class as a Gaussian Mixture, where the "centers" of the mixture are contrastive samples from that class.
- Seamless Logit Adjustment: The derivation naturally produces a term ($\eta_y = \log p(y)$) that corresponds exactly to the class prior. This proves that logit adjustment isn't just a trick—it's a mathematical requirement for maximizing MI between features and labels.
- Class-wise Queues & Teacher-Student Strategy: To handle tail classes that have very few samples, the authors maintain separate queues for each class. To prevent these queues from becoming "stale" (containing features from old versions of the model), they use a stable, pre-trained teacher network to generate the contrastive features used as Gaussian kernels.
- Trainable Temperature: Unlike most contrastive methods that use a fixed temperature hyperparameter ($\tau$), this method allows the temperature for the GML loss to be learned during training, reducing the need for manual tuning.
Datasets
The authors evaluated their approach on several standard long-tailed benchmarks:
- ImageNet-LT: A long-tailed version of the massive ImageNet dataset.
- iNaturalist 2018: A large-scale, naturally imbalanced dataset of plant and animal species.
- CIFAR-10-LT & CIFAR-100-LT: Artificially imbalanced versions of the CIFAR datasets.
- ADE20K: A semantic segmentation dataset used to demonstrate the method's versatility beyond simple image classification.
Key Insights and Ideas
- The "Aha" Moment on Failure: The fundamental reason contrastive learning fails on long-tails is its objective function. If you only care about the relationship between a feature and its input image, you are blind to the fact that some classes are rarer than others.
- Theoretical Unity: The paper shows that many existing methods (like Softmax cross-entropy and Supervised Contrastive Loss) are actually special cases of their general MI maximization template, differing only in how they model the likelihood and the prior.
- GMM vs. Prototypes: Instead of representing a class with a single "prototype" vector, the GML loss uses a mixture of many samples. This allows the model to capture the complex, multi-modal distribution of features within a single class more effectively.
Key Results
The proposed method achieved state-of-the-art (SOTA) performance across multiple benchmarks:
- ImageNet-LT: Reached 58.8% accuracy (ResNeXt-50), outperforming the previous best (PaCo) at 58.2%. Notably, it showed a significant boost in "few-shot" (tail) class accuracy.
- iNaturalist 2018: Achieved 74.5% accuracy, a clear improvement over the 73.2% of previous SOTA methods.
- Versatility: In semantic segmentation (ADE20K), simply replacing the standard cross-entropy loss with the proposed GML-based framework improved the Mean Accuracy (mAcc) from 45.4% to 59.8%.
Limitations and Future Work
- Two-Stage Training: The method currently relies on a teacher-student strategy, which requires pre-training a teacher network. This adds a step to the pipeline compared to end-to-end methods.
- Memory Overhead: Maintaining class-wise queues for thousands of classes (as in iNaturalist) can increase memory consumption, though the authors mitigate this by scaling queue lengths based on class frequency.
- Beyond Vision: While the theory is general, the experiments are focused on computer vision. Exploring this MI-based approach in long-tailed Natural Language Processing (NLP) or graph-based tasks remains an open area for future research.
Summary updated