Targeted Supervised Contrastive Learning for Long-Tailed Recognition

Tianhong Li, Peng Cao, Yuan Yuan, Lijie Fan, Yuzhe Yang +3 more
11/27/2021
cs.CV
contrastive-ssl

Official code: LTH14/targeted-supcon (103 stars, Python, MIT, last commit 2023-08-14).

Abstract

Real-world data often exhibits long tail distributions with heavy class imbalance, where the majority classes can dominate the training process and alter the decision boundaries of the minority classes. Recently, researchers have investigated the potential of supervised contrastive learning for long-tailed recognition, and demonstrated that it provides a strong performance gain.

Show full abstract

In this paper, we show that while supervised contrastive learning can help improve performance, past baselines suffer from poor uniformity brought in by imbalanced data distribution. This poor uniformity manifests in samples from the minority class having poor separability in the feature space. To address this problem, we propose targeted supervised contrastive learning (TSC), which improves the uniformity of the feature distribution on the hypersphere. TSC first generates a set of targets uniformly distributed on a hypersphere. It then makes the features of different classes converge to these distinct and uniformly distributed targets during training. This forces all classes, including minority classes, to maintain a uniform distribution in the feature space, improves class boundaries, and provides better generalization even in the presence of long-tail data. Experiments on multiple datasets show that TSC achieves state-of-the-art performance on long-tailed recognition tasks.

View on arXivView PDF

Code Implementations(1)

MIT

A PyTorch implementation of the paper Targeted Supervised Contrastive Learning for Long-tailed Recognition

10312PythonMay 2, 20223 years agoMIT

Similar Papers

Cite this paper

@article{li2021targeted,
  title  = {Targeted Supervised Contrastive Learning for Long-Tailed Recognition},
  author = {Tianhong Li and Peng Cao and Yuan Yuan and Lijie Fan and Yuzhe Yang and Rogerio Feris and Piotr Indyk and Dina Katabi},
  year   = {2021},
  eprint = {2111.13998},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2111.13998}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2111.13998.svg)](https://codeofpaper.com/paper/2111.13998)

Discussion