HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

Generalized Parametric Contrastive Learning

Jiequan Cui Zhisheng Zhong Zhuotao Tian Shu Liu Bei Yu Jiaya Jia

Generalized Parametric Contrastive Learning

Abstract

In this paper, we propose the Generalized Parametric Contrastive Learning (GPaCo/PaCo) which works well on both imbalanced and balanced data. Based on theoretical analysis, we observe that supervised contrastive loss tends to bias 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 GPaCo/PaCo loss under a balanced setting. Our analysis demonstrates that GPaCo/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 benchmarks manifest the new state-of-the-art for long-tailed recognition. On full ImageNet, models from CNNs to vision transformers trained with GPaCo loss show better generalization performance and stronger robustness compared with MAE models. Moreover, GPaCo can be applied to the semantic segmentation task and obvious improvements are observed on the 4 most popular benchmarks. Our code is available at https://github.com/dvlab-research/Parametric-Contrastive-Learning.

Code Repositories

dvlab-research/imbalanced-learning
pytorch
Mentioned in GitHub
dvlab-research/rescom
pytorch
Mentioned in GitHub
dvlab-research/parametric-contrastive-learning
Official
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
domain-generalization-on-imagenet-cGPaCo (ViT-L)
mean Corruption Error (mCE): 39.0
domain-generalization-on-imagenet-rGPaCo (ViT-L)
Top-1 Error Rate: 39.7
domain-generalization-on-imagenet-sketchGPaCo (ViT-L)
Top-1 accuracy: 48.3
image-classification-on-imagenetGPaCo (ViT-L)
Top 1 Accuracy: 86.01%
image-classification-on-imagenetGPaCo (Vit-B)
Top 1 Accuracy: 84.0%
image-classification-on-imagenetGPaCo (ResNet-50)
Top 1 Accuracy: 79.7%
image-classification-on-inaturalist-2018GPaCo (ResNet-152)
Top-1 Accuracy: 78.1%
image-classification-on-inaturalist-2018GPaCo (ResNet-50)
Top-1 Accuracy: 75.4%
long-tail-learning-on-imagenet-ltGPaCo (2-ResNeXt101-32x4d)
Top-1 Accuracy: 63.2
long-tail-learning-on-inaturalist-2018GPaCo (2-R152)
Top-1 Accuracy: 79.8%
long-tail-learning-on-inaturalist-2018GPaCo (ResNet-50)
Top-1 Accuracy: 75.4%
long-tail-learning-on-inaturalist-2018GPaCo (ResNet-152)
Top-1 Accuracy: 78.1%
long-tail-learning-on-places-ltGPaCo (ResNet-152)
Top-1 Accuracy: 41.7
semantic-segmentation-on-ade20kGPaCo (Swin-L)
Validation mIoU: 54.3
semantic-segmentation-on-pascal-contextGPaCo (ResNet101)
mIoU: 56.2

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
Generalized Parametric Contrastive Learning | Papers | HyperAI