Skip to main content
QUICK REVIEW

[Paper Review] Balanced Contrastive Learning for Long-Tailed Visual Recognition

Jianggang Zhu, Zheng Wang|arXiv (Cornell University)|Jul 19, 2022
Domain Adaptation and Few-Shot LearningComputer Science14 citations
TL;DR

This paper proposes Balanced Contrastive Learning (BCL), a novel contrastive learning method that corrects the biased optimization of supervised contrastive learning on long-tailed data by enforcing a regular simplex configuration in representation space. By introducing class-complement and class-averaging, BCL ensures balanced gradient updates across all classes, significantly improving performance on tail classes while boosting head class accuracy, achieving state-of-the-art results on ImageNet-LT and iNaturalist2018 benchmarks.

ABSTRACT

Real-world data typically follow a long-tailed distribution, where a few majority categories occupy most of the data while most minority categories contain a limited number of samples. Classification models minimizing cross-entropy struggle to represent and classify the tail classes. Although the problem of learning unbiased classifiers has been well studied, methods for representing imbalanced data are under-explored. In this paper, we focus on representation learning for imbalanced data. Recently, supervised contrastive learning has shown promising performance on balanced data recently. However, through our theoretical analysis, we find that for long-tailed data, it fails to form a regular simplex which is an ideal geometric configuration for representation learning. To correct the optimization behavior of SCL and further improve the performance of long-tailed visual recognition, we propose a novel loss for balanced contrastive learning (BCL). Compared with SCL, we have two improvements in BCL: class-averaging, which balances the gradient contribution of negative classes; class-complement, which allows all classes to appear in every mini-batch. The proposed balanced contrastive learning (BCL) method satisfies the condition of forming a regular simplex and assists the optimization of cross-entropy. Equipped with BCL, the proposed two-branch framework can obtain a stronger feature representation and achieve competitive performance on long-tailed benchmark datasets such as CIFAR-10-LT, CIFAR-100-LT, ImageNet-LT, and iNaturalist2018. Our code is available at https://github.com/FlamieZhu/BCL .

Motivation & Objective

  • To address the poor representation learning of supervised contrastive learning (SCL) on long-tailed data due to class imbalance.
  • To analyze why SCL fails to form a regular simplex configuration in long-tailed settings, leading to suboptimal feature space geometry.
  • To design a contrastive loss that ensures balanced gradient contributions and equal class representation in every mini-batch.
  • To unify BCL with logit-compensated cross-entropy for a two-branch framework that improves both representation and classification on imbalanced data.
  • To achieve state-of-the-art performance on long-tailed benchmarks including ImageNet-LT and iNaturalist2018.

Proposed method

  • BCL introduces class-complement by including class-center prototypes as negative samples in every mini-batch, ensuring all classes appear during training.
  • BCL applies class-averaging, which normalizes the gradient contribution of each class’s negative samples across the mini-batch.
  • The combination of class-complement and class-averaging ensures the lower bound of the contrastive loss becomes class-independent, enabling formation of a regular simplex in the representation space.
  • The method uses a two-branch framework: one branch with BCL for balanced representation learning, and another with logit-compensated cross-entropy for balanced classification.
  • The model is trained end-to-end with a joint objective combining BCL and logit compensation, improving generalization across all class frequency groups.
  • The framework is evaluated on CIFAR-10-LT, CIFAR-100-LT, ImageNet-LT, and iNaturalist2018, using standard ResNet and ResNeXt backbones.

Experimental results

Research questions

  • RQ1Why does supervised contrastive learning fail to form a regular simplex configuration on long-tailed data?
  • RQ2How does class imbalance in data distribution affect the geometric configuration of learned representations in contrastive learning?
  • RQ3Can a modified contrastive loss enforce a balanced, regular simplex structure in the embedding space despite long-tailed data?
  • RQ4Does balancing gradient contributions and ensuring class presence in every mini-batch improve performance on both head and tail classes?
  • RQ5Can a unified framework combining balanced contrastive learning and logit compensation outperform existing state-of-the-art methods on long-tailed benchmarks?

Key findings

  • BCL achieves a Top-1 accuracy of 57.1% on ImageNet-LT with 180 epochs, outperforming prior methods including PaCo (56.0%) and DisAlign (52.9%).
  • On iNaturalist2018, BCL achieves 71.8% overall Top-1 accuracy after 100 epochs, surpassing RIDE (71.4%) and Hybrid-PSC (68.1%).
  • On ImageNet-LT, BCL improves few-shot accuracy to 36.5% (180 epochs), significantly outperforming Balanced Softmax (29.8%) and PaCo (33.7%).
  • BCL achieves 67.2% accuracy on the Many-shot group of ImageNet-LT after 90 epochs, exceeding RIDE (64.4%) and DisAlign (62.7%).
  • The method improves performance on all class groups—Many, Medium, and Few-shot—simultaneously, avoiding the trade-off between head and tail performance seen in prior approaches.
  • Theoretical analysis confirms that BCL ensures a class-independent lower bound, enabling formation of a regular simplex, which is optimal for representation learning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.