{"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/long-tailed-classification-by-keeping-the-1","title":"Long-Tailed Classification by Keeping the Good and Removing the Bad Momentum Causal Effect","arxiv_id":"2009.12991","date":"2020-09-28","proceeding":"NeurIPS 2020 12","authors":["Kaihua Tang","Jianqiang Huang","Hanwang Zhang"],"abstract":"As the class size grows, maintaining a balanced dataset across many classes is challenging because the data are long-tailed in nature; it is even impossible when the sample-of-interest co-exists with each other in one collectable unit, e.g., multiple visual instances in one image. Therefore, long-tailed classification is the key to deep learning at scale. However, existing methods are mainly based on re-weighting/re-sampling heuristics that lack a fundamental theory. In this paper, we establish a causal inference framework, which not only unravels the whys of previous methods, but also derives a new principled solution. Specifically, our theory shows that the SGD momentum is essentially a confounder in long-tailed classification. On one hand, it has a harmful causal effect that misleads the tail prediction biased towards the head. On the other hand, its induced mediation also benefits the representation learning and head prediction. Our framework elegantly disentangles the paradoxical effects of the momentum, by pursuing the direct causal effect caused by an input sample. In particular, we use causal intervention in training, and counterfactual reasoning in inference, to remove the \"bad\" while keep the \"good\". We achieve new state-of-the-arts on three long-tailed visual recognition benchmarks: Long-tailed CIFAR-10/-100, ImageNet-LT for image classification and LVIS for instance segmentation.","url_abs":"https://arxiv.org/abs/2009.12991v4","url_pdf":"https://arxiv.org/pdf/2009.12991v4.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":"long-tailed-classification-by-keeping-the-1","repo_url":"https://github.com/KaihuaTang/Long-Tailed-Recognition.pytorch","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"long-tailed-classification-by-keeping-the-1","repo_url":"https://github.com/beierzhu/xerm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"causal-inference","task_name":"Causal Inference"},{"task_slug":"counterfactual-reasoning","task_name":"Counterfactual Reasoning"},{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"instance-segmentation","task_name":"Instance Segmentation"},{"task_slug":"long-tail-learning","task_name":"Long-tail Learning"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":null,"task_name":"counterfactual"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"causal-inference","method_name":"Causal inference"},{"method_slug":"sgd","method_name":"SGD"}],"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":"Causal Norm","rank_in_archive_order":36,"of":50,"metrics":{"Error Rate":"11.5"},"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":"DecTDE","rank_in_archive_order":44,"of":50,"metrics":{"Error Rate":"12.63"},"uses_additional_data":false},{"leaderboard":"/sota/long-tail-learning-on-imagenet-lt","task":"Long-tail Learning","dataset":"ImageNet-LT","model":"De-confound-TDE","rank_in_archive_order":51,"of":69,"metrics":{"Top-1 Accuracy":"51.8"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2009.12991","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2009.12991"}},"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/KaihuaTang/Long-Tailed-Recognition.pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/beierzhu/xerm","reach":null}],"summary":{"ran":2},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":1,"ran":1,"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":2,"samples":[{"code_sha256_prefix":"72a660a92b58b644","entry":"Causal_Norm_Classifier","repo":"beierzhu/xerm","repo_kind":"listed","path":"xERM.PC.public/models/CausalNormClassifier.py","file_url":"https://github.com/beierzhu/xerm/blob/HEAD/xERM.PC.public/models/CausalNormClassifier.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"72a660a92b58b644"}},{"code_sha256_prefix":"d42e6af8c098f680","entry":"Causal_Norm_Classifier","repo":"KaihuaTang/Long-Tailed-Recognition.pytorch","repo_kind":"official","path":"classification/models/CausalNormClassifier.py","file_url":"https://github.com/KaihuaTang/Long-Tailed-Recognition.pytorch/blob/HEAD/classification/models/CausalNormClassifier.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"d42e6af8c098f680"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}