{"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/learning-optimal-features-via-partial","title":"Learning Optimal Features via Partial Invariance","arxiv_id":"2301.12067","date":"2023-01-28","proceeding":null,"authors":["Moulik Choraria","Ibtihal Ferwana","Ankur Mani","Lav R. Varshney"],"abstract":"Learning models that are robust to distribution shifts is a key concern in the context of their real-life applicability. Invariant Risk Minimization (IRM) is a popular framework that aims to learn robust models from multiple environments. The success of IRM requires an important assumption: the underlying causal mechanisms/features remain invariant across environments. When not satisfied, we show that IRM can over-constrain the predictor and to remedy this, we propose a relaxation via $\\textit{partial invariance}$. In this work, we theoretically highlight the sub-optimality of IRM and then demonstrate how learning from a partition of training domains can help improve invariant models. Several experiments, conducted both in linear settings as well as with deep neural networks on tasks over both language and image data, allow us to verify our conclusions.","url_abs":"https://arxiv.org/abs/2301.12067v2","url_pdf":"https://arxiv.org/pdf/2301.12067v2.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":"learning-optimal-features-via-partial","repo_url":"https://github.com/ibtihalferwana/pirm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"domain-generalization","task_name":"Domain Generalization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2301.12067","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2301.12067"}},"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/IbtihalFerwana/pirm","reach":null}],"summary":{"unverified":4},"by_repo_kind":{"official":{"samples":4,"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":"5e42c3e6342733d8","entry":"ERM","repo":"IbtihalFerwana/pirm","repo_kind":"official","path":"metashift/experiments/distribution_shift/algorithms.py","file_url":"https://github.com/IbtihalFerwana/pirm/blob/HEAD/metashift/experiments/distribution_shift/algorithms.py","link_basis":"first_harvest_node","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":"5e42c3e6342733d8"}},{"code_sha256_prefix":"35b902a4c075efc3","entry":"Featurizer","repo":"IbtihalFerwana/pirm","repo_kind":"official","path":"metashift/experiments/distribution_shift/algorithms.py","file_url":"https://github.com/IbtihalFerwana/pirm/blob/HEAD/metashift/experiments/distribution_shift/algorithms.py","link_basis":"first_harvest_node","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":"35b902a4c075efc3"}},{"code_sha256_prefix":"8a1166084cddbb47","entry":"IB_IRM","repo":"IbtihalFerwana/pirm","repo_kind":"official","path":"metashift/experiments/distribution_shift/algorithms.py","file_url":"https://github.com/IbtihalFerwana/pirm/blob/HEAD/metashift/experiments/distribution_shift/algorithms.py","link_basis":"first_harvest_node","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":"8a1166084cddbb47"}},{"code_sha256_prefix":"39d9c3c54d390e73","entry":"ResNet","repo":"IbtihalFerwana/pirm","repo_kind":"official","path":"metashift/experiments/distribution_shift/algorithms.py","file_url":"https://github.com/IbtihalFerwana/pirm/blob/HEAD/metashift/experiments/distribution_shift/algorithms.py","link_basis":"first_harvest_node","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":"39d9c3c54d390e73"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}