{"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/last-layer-re-training-is-sufficient-for","title":"Last Layer Re-Training is Sufficient for Robustness to Spurious Correlations","arxiv_id":"2204.02937","date":"2022-04-06","proceeding":null,"authors":["Polina Kirichenko","Pavel Izmailov","Andrew Gordon Wilson"],"abstract":"Neural network classifiers can largely rely on simple spurious features, such as backgrounds, to make predictions. However, even in these cases, we show that they still often learn core features associated with the desired attributes of the data, contrary to recent findings. Inspired by this insight, we demonstrate that simple last layer retraining can match or outperform state-of-the-art approaches on spurious correlation benchmarks, but with profoundly lower complexity and computational expenses. Moreover, we show that last layer retraining on large ImageNet-trained models can also significantly reduce reliance on background and texture information, improving robustness to covariate shift, after only minutes of training on a single GPU.","url_abs":"https://arxiv.org/abs/2204.02937v2","url_pdf":"https://arxiv.org/pdf/2204.02937v2.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":"last-layer-re-training-is-sufficient-for","repo_url":"https://github.com/polinakirichenko/deep_feature_reweighting","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-2-Clause"}},{"paper_slug":"last-layer-re-training-is-sufficient-for","repo_url":"https://github.com/facebookresearch/Whac-A-Mole","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"last-layer-re-training-is-sufficient-for","repo_url":"https://github.com/lfhase/feat","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"last-layer-re-training-is-sufficient-for","repo_url":"https://github.com/ywolfeee/freeze-then-train","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":null,"task_name":"GPU"},{"task_slug":"out-of-distribution-generalization","task_name":"Out-of-Distribution Generalization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2204.02937","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.02937"}},"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":"deterministic:regex_extraction","url":"https://github.com/kohpangwei/group_DRO","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/PolinaKirichenko/deep_feature_reweighting","reach":{"status":"ok","spdx":"BSD-2-Clause"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/lukemelas/PyTorch-Pretrained-ViT","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/jacobgil/pytorch-grad-cam","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lfhase/feat","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/Whac-A-Mole","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ywolfeee/freeze-then-train","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/polinakirichenko/deep_feature_reweighting","reach":{"status":"ok","spdx":"BSD-2-Clause"}}],"summary":{"ran":3,"unverified":5},"by_repo_kind":{"official":{"samples":8,"ran":3,"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":"e19d0c3f75393ec1","entry":"evaluate","repo":"PolinaKirichenko/deep_feature_reweighting","repo_kind":"official","path":"utils.py","file_url":"https://github.com/PolinaKirichenko/deep_feature_reweighting/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"e19d0c3f75393ec1"}},{"code_sha256_prefix":"58b9298579ed4235","entry":"get_results","repo":"PolinaKirichenko/deep_feature_reweighting","repo_kind":"official","path":"utils.py","file_url":"https://github.com/PolinaKirichenko/deep_feature_reweighting/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"58b9298579ed4235"}},{"code_sha256_prefix":"d2ae9d5fc68a3253","entry":"get_y_p","repo":"PolinaKirichenko/deep_feature_reweighting","repo_kind":"official","path":"utils.py","file_url":"https://github.com/PolinaKirichenko/deep_feature_reweighting/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"d2ae9d5fc68a3253"}},{"code_sha256_prefix":"ea17ef5c0ec08cfc","entry":"get_bg_challenge","repo":"PolinaKirichenko/deep_feature_reweighting","repo_kind":"official","path":"imagenet_datasets.py","file_url":"https://github.com/PolinaKirichenko/deep_feature_reweighting/blob/HEAD/imagenet_datasets.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"ea17ef5c0ec08cfc"}},{"code_sha256_prefix":"18de61dcc865b4d7","entry":"get_imagenet","repo":"PolinaKirichenko/deep_feature_reweighting","repo_kind":"official","path":"imagenet_datasets.py","file_url":"https://github.com/PolinaKirichenko/deep_feature_reweighting/blob/HEAD/imagenet_datasets.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"18de61dcc865b4d7"}},{"code_sha256_prefix":"c92b034c1b8d7617","entry":"get_imagenet_arc","repo":"PolinaKirichenko/deep_feature_reweighting","repo_kind":"official","path":"imagenet_datasets.py","file_url":"https://github.com/PolinaKirichenko/deep_feature_reweighting/blob/HEAD/imagenet_datasets.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c92b034c1b8d7617"}},{"code_sha256_prefix":"24cf9c3f2c0dee5f","entry":"get_loader","repo":"PolinaKirichenko/deep_feature_reweighting","repo_kind":"official","path":"wb_data.py","file_url":"https://github.com/PolinaKirichenko/deep_feature_reweighting/blob/HEAD/wb_data.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"24cf9c3f2c0dee5f"}},{"code_sha256_prefix":"465169d289f3e4fe","entry":"get_transform_cub","repo":"PolinaKirichenko/deep_feature_reweighting","repo_kind":"official","path":"wb_data.py","file_url":"https://github.com/PolinaKirichenko/deep_feature_reweighting/blob/HEAD/wb_data.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-2-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"465169d289f3e4fe"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}