{"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/towards-calibrated-model-for-long-tailed","title":"Towards Calibrated Model for Long-Tailed Visual Recognition from Prior Perspective","arxiv_id":"2111.03874","date":"2021-11-06","proceeding":"NeurIPS 2021 12","authors":["Zhengzhuo Xu","Zenghao Chai","Chun Yuan"],"abstract":"Real-world data universally confronts a severe class-imbalance problem and exhibits a long-tailed distribution, i.e., most labels are associated with limited instances. The na\\\"ive models supervised by such datasets would prefer dominant labels, encounter a serious generalization challenge and become poorly calibrated. We propose two novel methods from the prior perspective to alleviate this dilemma. First, we deduce a balance-oriented data augmentation named Uniform Mixup (UniMix) to promote mixup in long-tailed scenarios, which adopts advanced mixing factor and sampler in favor of the minority. Second, motivated by the Bayesian theory, we figure out the Bayes Bias (Bayias), an inherent bias caused by the inconsistency of prior, and compensate it as a modification on standard cross-entropy loss. We further prove that both the proposed methods ensure the classification calibration theoretically and empirically. Extensive experiments verify that our strategies contribute to a better-calibrated model, and their combination achieves state-of-the-art performance on CIFAR-LT, ImageNet-LT, and iNaturalist 2018.","url_abs":"https://arxiv.org/abs/2111.03874v1","url_pdf":"https://arxiv.org/pdf/2111.03874v1.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":"towards-calibrated-model-for-long-tailed","repo_url":"https://github.com/XuZhengzhuo/Prior-LT","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"long-tail-learning","task_name":"Long-tail Learning"}],"methods":[{"method_slug":"mixup","method_name":"Mixup"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/long-tail-learning-on-cifar-10-lt-r-10","task":"Long-tail Learning","dataset":"CIFAR-10-LT (ρ=10)","model":"UniMix+Bayias","rank_in_archive_order":26,"of":50,"metrics":{"Error Rate":"10.34"},"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":"Prior-LT","rank_in_archive_order":42,"of":50,"metrics":{"Error Rate":"12.20"},"uses_additional_data":false},{"leaderboard":"/sota/long-tail-learning-on-cifar-100-lt-r-10","task":"Long-tail Learning","dataset":"CIFAR-100-LT (ρ=10)","model":"UniMix+Bayias (ResNet-32)","rank_in_archive_order":24,"of":31,"metrics":{"Error Rate":"38.75"},"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":"Prior-LT","rank_in_archive_order":43,"of":66,"metrics":{"Error Rate":"53.59"},"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":"UniMix+Bayias (ResNet-32)","rank_in_archive_order":47,"of":66,"metrics":{"Error Rate":"54.55"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2111.03874","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2111.03874"}},"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/XuZhengzhuo/Prior-LT","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"ran":0,"repositories":1}},"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":0,"samples":[{"code_sha256_prefix":"654d94efeb48a502","entry":"accuracy","repo":"XuZhengzhuo/Prior-LT","repo_kind":"official","path":"utils.py","file_url":"https://github.com/XuZhengzhuo/Prior-LT/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"654d94efeb48a502"}},{"code_sha256_prefix":"8d1edfc879be5d6f","entry":"calibration","repo":"XuZhengzhuo/Prior-LT","repo_kind":"official","path":"utils.py","file_url":"https://github.com/XuZhengzhuo/Prior-LT/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d1edfc879be5d6f"}},{"code_sha256_prefix":"46490b0cfc522d35","entry":"plot_confusion_matrix","repo":"XuZhengzhuo/Prior-LT","repo_kind":"official","path":"utils.py","file_url":"https://github.com/XuZhengzhuo/Prior-LT/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"46490b0cfc522d35"}},{"code_sha256_prefix":"11d038f53d77a8d2","entry":"resnet32","repo":"XuZhengzhuo/Prior-LT","repo_kind":"official","path":"models/resnet_cifar.py","file_url":"https://github.com/XuZhengzhuo/Prior-LT/blob/HEAD/models/resnet_cifar.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"11d038f53d77a8d2"}},{"code_sha256_prefix":"f55a4c23f8b712ea","entry":"unimix","repo":"XuZhengzhuo/Prior-LT","repo_kind":"official","path":"core.py","file_url":"https://github.com/XuZhengzhuo/Prior-LT/blob/HEAD/core.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f55a4c23f8b712ea"}},{"code_sha256_prefix":"09a850cb0450e158","entry":"unimix_factor","repo":"XuZhengzhuo/Prior-LT","repo_kind":"official","path":"core.py","file_url":"https://github.com/XuZhengzhuo/Prior-LT/blob/HEAD/core.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"09a850cb0450e158"}},{"code_sha256_prefix":"bba89af97cc42385","entry":"unimix_sampler","repo":"XuZhengzhuo/Prior-LT","repo_kind":"official","path":"core.py","file_url":"https://github.com/XuZhengzhuo/Prior-LT/blob/HEAD/core.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bba89af97cc42385"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}