{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/parametric-contrastive-learning","title":"Parametric Contrastive Learning","arxiv_id":"2107.12028","date":"2021-07-26","proceeding":"ICCV 2021 10","authors":["Jiequan Cui","Zhisheng Zhong","Shu Liu","Bei Yu","Jiaya Jia"],"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.","url_abs":"https://arxiv.org/abs/2107.12028v2","url_pdf":"https://arxiv.org/pdf/2107.12028v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"parametric-contrastive-learning","repo_url":"https://github.com/dvlab-research/parametric-contrastive-learning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"parametric-contrastive-learning","repo_url":"https://github.com/jiequancui/Parametric-Contrastive-Learning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"parametric-contrastive-learning","repo_url":"https://github.com/dvlab-research/imbalanced-learning","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"parametric-contrastive-learning","repo_url":"https://github.com/dvlab-research/rescom","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"parametric-contrastive-learning","repo_url":"https://github.com/silicx/dlsa","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"long-tail-learning","task_name":"Long-tail Learning"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"supervised-contrastive-loss","method_name":"Supervised Contrastive Loss"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"ResNet-200","rank_in_archive_order":605,"of":1060,"metrics":{"Top 1 Accuracy":"81.8%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"ResNet-152","rank_in_archive_order":649,"of":1060,"metrics":{"Top 1 Accuracy":"81.3%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-imagenet","task":"Image Classification","dataset":"ImageNet","model":"ResNet-101","rank_in_archive_order":673,"of":1060,"metrics":{"Top 1 Accuracy":"80.9%"},"uses_additional_data":false},{"leaderboard":"/sota/image-classification-on-inaturalist-2018","task":"Image Classification","dataset":"iNaturalist 2018","model":"PaCo(ResNet-152)","rank_in_archive_order":28,"of":60,"metrics":{"Top-1 Accuracy":"75.2%"},"uses_additional_data":false},{"leaderboard":"/sota/long-tail-learning-on-cifar-10-lt-r-10","task":"Long-tail Learning","dataset":"CIFAR-10-LT (ρ=10)","model":"PCL","rank_in_archive_order":14,"of":50,"metrics":{"Error Rate":"9.14"},"uses_additional_data":false},{"leaderboard":"/sota/long-tail-learning-on-cifar-100-lt-r-100","task":"Long-tail Learning","dataset":"CIFAR-100-LT (ρ=100)","model":"PCL","rank_in_archive_order":26,"of":66,"metrics":{"Error Rate":"49.10"},"uses_additional_data":false},{"leaderboard":"/sota/long-tail-learning-on-imagenet-lt","task":"Long-tail Learning","dataset":"ImageNet-LT","model":"PaCo(ResNeXt101-32x4d)","rank_in_archive_order":15,"of":69,"metrics":{"Top-1 Accuracy":"60.0"},"uses_additional_data":false},{"leaderboard":"/sota/long-tail-learning-on-imagenet-lt","task":"Long-tail Learning","dataset":"ImageNet-LT","model":"PaCo(ResNeXt-50)","rank_in_archive_order":22,"of":69,"metrics":{"Top-1 Accuracy":"58.2"},"uses_additional_data":false},{"leaderboard":"/sota/long-tail-learning-on-places-lt","task":"Long-tail Learning","dataset":"Places-LT","model":"PaCo","rank_in_archive_order":16,"of":29,"metrics":{"Top-1 Accuracy":"41.2"},"uses_additional_data":false},{"leaderboard":"/sota/long-tail-learning-on-inaturalist-2018","task":"Long-tail Learning","dataset":"iNaturalist 2018","model":"PaCo(ResNet-152)","rank_in_archive_order":14,"of":43,"metrics":{"Top-1 Accuracy":"75.2%"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2107.12028","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2107.12028"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dvlab-research/imbalanced-learning","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/silicx/dlsa","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dvlab-research/rescom","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dvlab-research/parametric-contrastive-learning","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jiequancui/Parametric-Contrastive-Learning","reach":null}],"summary":{"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":2,"ran":0,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"0e220d6ffd020ea0","entry":"PaCoLoss","repo":"jiequancui/Parametric-Contrastive-Learning","repo_kind":"official","path":"GPaCo/LT/losses.py","file_url":"https://github.com/jiequancui/Parametric-Contrastive-Learning/blob/HEAD/GPaCo/LT/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0e220d6ffd020ea0"}},{"code_sha256_prefix":"3eaa045101420da2","entry":"GmmContrastLoss","repo":"silicx/dlsa","repo_kind":"listed","path":"models/losses.py","file_url":"https://github.com/silicx/dlsa/blob/HEAD/models/losses.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3eaa045101420da2"}},{"code_sha256_prefix":"67c48f79aac74f2d","entry":"SiamBS_SPM","repo":"dvlab-research/rescom","repo_kind":"listed","path":"ResCom/losses.py","file_url":"https://github.com/dvlab-research/rescom/blob/HEAD/ResCom/losses.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"67c48f79aac74f2d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}