{"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/causally-motivated-shortcut-removal-using","title":"Causally motivated Shortcut Removal Using Auxiliary Labels","arxiv_id":"2105.06422","date":"2021-05-13","proceeding":null,"authors":["Maggie Makar","Ben Packer","Dan Moldovan","Davis Blalock","Yoni Halpern","Alexander D'Amour"],"abstract":"Shortcut learning, in which models make use of easy-to-represent but unstable associations, is a major failure mode for robust machine learning. We study a flexible, causally-motivated approach to training robust predictors by discouraging the use of specific shortcuts, focusing on a common setting where a robust predictor could achieve optimal \\emph{iid} generalization in principle, but is overshadowed by a shortcut predictor in practice. Our approach uses auxiliary labels, typically available at training time, to enforce conditional independences implied by the causal graph. We show both theoretically and empirically that causally-motivated regularization schemes (a) lead to more robust estimators that generalize well under distribution shift, and (b) have better finite sample efficiency compared to usual regularization schemes, even when no shortcut is present. Our analysis highlights important theoretical properties of training techniques commonly used in the causal inference, fairness, and disentanglement literatures. Our code is available at https://github.com/mymakar/causally_motivated_shortcut_removal","url_abs":"https://arxiv.org/abs/2105.06422v3","url_pdf":"https://arxiv.org/pdf/2105.06422v3.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":"causally-motivated-shortcut-removal-using","repo_url":"https://github.com/mymakar/causally_motivated_shortcut_removal","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"causal-inference","task_name":"Causal Inference"},{"task_slug":"disentanglement","task_name":"Disentanglement"},{"task_slug":"fairness","task_name":"Fairness"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2105.06422","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2105.06422"}},"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/mymakar/causally_motivated_shortcut_removal","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":11},"by_repo_kind":{"official":{"samples":11,"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":"f5d713c3ef15f625","entry":"compute_pred_loss","repo":"mymakar/causally_motivated_shortcut_removal","repo_kind":"official","path":"shared/evaluation_metrics.py","file_url":"https://github.com/mymakar/causally_motivated_shortcut_removal/blob/HEAD/shared/evaluation_metrics.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":"f5d713c3ef15f625"}},{"code_sha256_prefix":"ef3ba340df457610","entry":"create_architecture","repo":"mymakar/causally_motivated_shortcut_removal","repo_kind":"official","path":"shared/architectures.py","file_url":"https://github.com/mymakar/causally_motivated_shortcut_removal/blob/HEAD/shared/architectures.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":"ef3ba340df457610"}},{"code_sha256_prefix":"bccc96ebed03600f","entry":"decode_number","repo":"mymakar/causally_motivated_shortcut_removal","repo_kind":"official","path":"chexpert/data_builder.py","file_url":"https://github.com/mymakar/causally_motivated_shortcut_removal/blob/HEAD/chexpert/data_builder.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":"bccc96ebed03600f"}},{"code_sha256_prefix":"30b2e469555255e7","entry":"extract_weights","repo":"mymakar/causally_motivated_shortcut_removal","repo_kind":"official","path":"shared/train_utils.py","file_url":"https://github.com/mymakar/causally_motivated_shortcut_removal/blob/HEAD/shared/train_utils.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":"30b2e469555255e7"}},{"code_sha256_prefix":"3e2e16445f6f92e6","entry":"flatten_dict","repo":"mymakar/causally_motivated_shortcut_removal","repo_kind":"official","path":"shared/train_utils.py","file_url":"https://github.com/mymakar/causally_motivated_shortcut_removal/blob/HEAD/shared/train_utils.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":"3e2e16445f6f92e6"}},{"code_sha256_prefix":"36df5a80dc755620","entry":"get_last_saved_model","repo":"mymakar/causally_motivated_shortcut_removal","repo_kind":"official","path":"shared/get_sigma.py","file_url":"https://github.com/mymakar/causally_motivated_shortcut_removal/blob/HEAD/shared/get_sigma.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":"36df5a80dc755620"}},{"code_sha256_prefix":"031fc88b30375099","entry":"get_optimal_model_classic","repo":"mymakar/causally_motivated_shortcut_removal","repo_kind":"official","path":"shared/cross_validation.py","file_url":"https://github.com/mymakar/causally_motivated_shortcut_removal/blob/HEAD/shared/cross_validation.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":"031fc88b30375099"}},{"code_sha256_prefix":"12b5a06366dc915e","entry":"map_to_image_label","repo":"mymakar/causally_motivated_shortcut_removal","repo_kind":"official","path":"chexpert/data_builder.py","file_url":"https://github.com/mymakar/causally_motivated_shortcut_removal/blob/HEAD/chexpert/data_builder.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":"12b5a06366dc915e"}},{"code_sha256_prefix":"1406483012c2b867","entry":"read_decode_jpg","repo":"mymakar/causally_motivated_shortcut_removal","repo_kind":"official","path":"chexpert/data_builder.py","file_url":"https://github.com/mymakar/causally_motivated_shortcut_removal/blob/HEAD/chexpert/data_builder.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":"1406483012c2b867"}},{"code_sha256_prefix":"570c66778860579a","entry":"read_decode_png","repo":"mymakar/causally_motivated_shortcut_removal","repo_kind":"official","path":"waterbirds/data_builder.py","file_url":"https://github.com/mymakar/causally_motivated_shortcut_removal/blob/HEAD/waterbirds/data_builder.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":"570c66778860579a"}},{"code_sha256_prefix":"3715e0dc12e4f657","entry":"reshape_results","repo":"mymakar/causally_motivated_shortcut_removal","repo_kind":"official","path":"shared/cross_validation.py","file_url":"https://github.com/mymakar/causally_motivated_shortcut_removal/blob/HEAD/shared/cross_validation.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":"3715e0dc12e4f657"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}