Parametric Contrastive Learning

Jiequan Cui, Zhisheng Zhong, Shu Liu, Bei Yu, Jiaya Jia
7/26/2021
cs.CV

Official code: JIA-Lab-research/Parametric-Contrastive-Learning (259 stars, MIT, PyTorch, last commit 2025-07-21).

Abstract

In this paper, we propose Parametric Contrastive Learning (PaCo) to tackle long-tailed recognition. Based on theoretical analysis, we observe supervised contrastive loss tends to bias on high-frequency classes and thus increases the difficulty of imbalanced learning. We introduce a set of parametric class-wise learnable centers to rebalance from an optimization perspective. Further, we analyze our PaCo loss under a balanced setting. Our analysis demonstrates that PaCo can adaptively enhance the intensity of pushing samples of the same class close as more samples are pulled together with their corresponding centers and benefit hard example learning. Experiments on long-tailed CIFAR, ImageNet, Places, and iNaturalist 2018 manifest the new state-of-the-art for long-tailed recognition. On full ImageNet, models trained with PaCo loss surpass supervised contrastive learning across various ResNet backbones, e.g., our ResNet-200 achieves 81.8% top-1 accuracy. Our code is available at https://github.com/dvlab-research/Parametric-Contrastive-Learning.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Parametric Contrastive Learning (ICCV2021) & GPaCo (TPAMI 2023)

25932CSS, ShellJun 3, 20211 years agoMIT
class-imbalancecontrastive-learningiccv2021image-classificationimagenet+8 more

Cite this paper

@article{cui2021parametric,
  title  = {Parametric Contrastive Learning},
  author = {Jiequan Cui and Zhisheng Zhong and Shu Liu and Bei Yu and Jiaya Jia},
  year   = {2021},
  eprint = {2107.12028},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2107.12028}
}

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/2107.12028.svg)](https://codeofpaper.com/paper/2107.12028)

Discussion