{"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/graph-invariant-learning-with-subgraph-co","title":"Graph Invariant Learning with Subgraph Co-mixup for Out-Of-Distribution Generalization","arxiv_id":"2312.10988","date":"2023-12-18","proceeding":null,"authors":["Tianrui Jia","Haoyang Li","Cheng Yang","Tao Tao","Chuan Shi"],"abstract":"Graph neural networks (GNNs) have been demonstrated to perform well in graph representation learning, but always lacking in generalization capability when tackling out-of-distribution (OOD) data. Graph invariant learning methods, backed by the invariance principle among defined multiple environments, have shown effectiveness in dealing with this issue. However, existing methods heavily rely on well-predefined or accurately generated environment partitions, which are hard to be obtained in practice, leading to sub-optimal OOD generalization performances. In this paper, we propose a novel graph invariant learning method based on invariant and variant patterns co-mixup strategy, which is capable of jointly generating mixed multiple environments and capturing invariant patterns from the mixed graph data. Specifically, we first adopt a subgraph extractor to identify invariant subgraphs. Subsequently, we design one novel co-mixup strategy, i.e., jointly conducting environment Mixup and invariant Mixup. For the environment Mixup, we mix the variant environment-related subgraphs so as to generate sufficiently diverse multiple environments, which is important to guarantee the quality of the graph invariant learning. For the invariant Mixup, we mix the invariant subgraphs, further encouraging to capture invariant patterns behind graphs while getting rid of spurious correlations for OOD generalization. We demonstrate that the proposed environment Mixup and invariant Mixup can mutually promote each other. Extensive experiments on both synthetic and real-world datasets demonstrate that our method significantly outperforms state-of-the-art under various distribution shifts.","url_abs":"https://arxiv.org/abs/2312.10988v1","url_pdf":"https://arxiv.org/pdf/2312.10988v1.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":"graph-invariant-learning-with-subgraph-co","repo_url":"https://github.com/bupt-gamma/igm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"graph-representation-learning","task_name":"Graph Representation Learning"},{"task_slug":"out-of-distribution-generalization","task_name":"Out-of-Distribution Generalization"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"mixup","method_name":"Mixup"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2312.10988","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2312.10988"}},"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/bupt-gamma/igm","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"official":{"samples":9,"ran":5,"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":9,"samples":[{"code_sha256_prefix":"4483629bed482e7b","entry":"get_contrast_loss","repo":"bupt-gamma/igm","repo_kind":"official","path":"IGM_code/models/losses.py","file_url":"https://github.com/bupt-gamma/igm/blob/HEAD/IGM_code/models/losses.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":"4483629bed482e7b"}},{"code_sha256_prefix":"fc7bb9ff36d7b1f1","entry":"get_irm_loss","repo":"bupt-gamma/igm","repo_kind":"official","path":"IGM_code/models/losses.py","file_url":"https://github.com/bupt-gamma/igm/blob/HEAD/IGM_code/models/losses.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fc7bb9ff36d7b1f1"}},{"code_sha256_prefix":"9e838e040242f5eb","entry":"join_graph","repo":"bupt-gamma/igm","repo_kind":"official","path":"IGM_code/dataset_gen/BA3_loc.py","file_url":"https://github.com/bupt-gamma/igm/blob/HEAD/IGM_code/dataset_gen/BA3_loc.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":"9e838e040242f5eb"}},{"code_sha256_prefix":"f8f3e98bb18a3b30","entry":"overload","repo":"bupt-gamma/igm","repo_kind":"official","path":"IGM_code/models/overloader.py","file_url":"https://github.com/bupt-gamma/igm/blob/HEAD/IGM_code/models/overloader.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":"f8f3e98bb18a3b30"}},{"code_sha256_prefix":"425d3f16a4164e4c","entry":"perturb","repo":"bupt-gamma/igm","repo_kind":"official","path":"IGM_code/dataset_gen/BA3_loc.py","file_url":"https://github.com/bupt-gamma/igm/blob/HEAD/IGM_code/dataset_gen/BA3_loc.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":"425d3f16a4164e4c"}},{"code_sha256_prefix":"aae8504ffbad28bb","entry":"find_gd","repo":"bupt-gamma/igm","repo_kind":"official","path":"IGM_code/dataset_gen/BA3_loc.py","file_url":"https://github.com/bupt-gamma/igm/blob/HEAD/IGM_code/dataset_gen/BA3_loc.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"aae8504ffbad28bb"}},{"code_sha256_prefix":"521b7c5be47e87f4","entry":"pyg_dataset","repo":"bupt-gamma/igm","repo_kind":"official","path":"IGM_code/DataLoading.py","file_url":"https://github.com/bupt-gamma/igm/blob/HEAD/IGM_code/DataLoading.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"521b7c5be47e87f4"}},{"code_sha256_prefix":"f04b238a9e79e545","entry":"pyg_loader","repo":"bupt-gamma/igm","repo_kind":"official","path":"IGM_code/DataLoading.py","file_url":"https://github.com/bupt-gamma/igm/blob/HEAD/IGM_code/DataLoading.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f04b238a9e79e545"}},{"code_sha256_prefix":"1c898404a8643582","entry":"pyg_molloader","repo":"bupt-gamma/igm","repo_kind":"official","path":"IGM_code/DataLoading.py","file_url":"https://github.com/bupt-gamma/igm/blob/HEAD/IGM_code/DataLoading.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1c898404a8643582"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}