{"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/cooperative-classification-and","title":"Cooperative Classification and Rationalization for Graph Generalization","arxiv_id":"2403.06239","date":"2024-03-10","proceeding":null,"authors":["Linan Yue","Qi Liu","Ye Liu","Weibo Gao","Fangzhou Yao","Wenfeng Li"],"abstract":"Graph Neural Networks (GNNs) have achieved impressive results in graph classification tasks, but they struggle to generalize effectively when faced with out-of-distribution (OOD) data. Several approaches have been proposed to address this problem. Among them, one solution is to diversify training distributions in vanilla classification by modifying the data environment, yet accessing the environment information is complex. Besides, another promising approach involves rationalization, extracting invariant rationales for predictions. However, extracting rationales is difficult due to limited learning signals, resulting in less accurate rationales and diminished predictions. To address these challenges, in this paper, we propose a Cooperative Classification and Rationalization (C2R) method, consisting of the classification and the rationalization module. Specifically, we first assume that multiple environments are available in the classification module. Then, we introduce diverse training distributions using an environment-conditional generative network, enabling robust graph representations. Meanwhile, the rationalization module employs a separator to identify relevant rationale subgraphs while the remaining non-rationale subgraphs are de-correlated with labels. Next, we align graph representations from the classification module with rationale subgraph representations using the knowledge distillation methods, enhancing the learning signal for rationales. Finally, we infer multiple environments by gathering non-rationale representations and incorporate them into the classification module for cooperative learning. Extensive experimental results on both benchmarks and synthetic datasets demonstrate the effectiveness of C2R. Code is available at https://github.com/yuelinan/Codes-of-C2R.","url_abs":"https://arxiv.org/abs/2403.06239v1","url_pdf":"https://arxiv.org/pdf/2403.06239v1.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":"cooperative-classification-and","repo_url":"https://github.com/yuelinan/codes-of-c2r","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"graph-classification","task_name":"Graph Classification"},{"task_slug":"knowledge-distillation","task_name":"Knowledge Distillation"}],"methods":[{"method_slug":"align","method_name":"ALIGN"},{"method_slug":"knowledge-distillation","method_name":"Knowledge Distillation"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.06239","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.06239"}},"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/yuelinan/codes-of-c2r","reach":{"status":"ok"}}],"summary":{"ran":4,"unverified":3},"by_repo_kind":{"official":{"samples":7,"ran":4,"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":7,"samples":[{"code_sha256_prefix":"f61cb17009c83363","entry":"compute_adjacency_matrix_images","repo":"yuelinan/codes-of-c2r","repo_kind":"official","path":"mnist_codes/mnistsp_dataset.py","file_url":"https://github.com/yuelinan/codes-of-c2r/blob/HEAD/mnist_codes/mnistsp_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f61cb17009c83363"}},{"code_sha256_prefix":"2aed626ee26d7689","entry":"eval_mnist","repo":"yuelinan/codes-of-c2r","repo_kind":"official","path":"mnist_codes/utils.py","file_url":"https://github.com/yuelinan/codes-of-c2r/blob/HEAD/mnist_codes/utils.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":"2aed626ee26d7689"}},{"code_sha256_prefix":"4ea2b643863ed02e","entry":"get_kmeans","repo":"yuelinan/codes-of-c2r","repo_kind":"official","path":"mnist_codes/utils.py","file_url":"https://github.com/yuelinan/codes-of-c2r/blob/HEAD/mnist_codes/utils.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":"4ea2b643863ed02e"}},{"code_sha256_prefix":"88a529db78fde884","entry":"list_to_torch","repo":"yuelinan/codes-of-c2r","repo_kind":"official","path":"mnist_codes/mnistsp_dataset.py","file_url":"https://github.com/yuelinan/codes-of-c2r/blob/HEAD/mnist_codes/mnistsp_dataset.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":"88a529db78fde884"}},{"code_sha256_prefix":"9683c4284cca6c37","entry":"eval_mnist_noise","repo":"yuelinan/codes-of-c2r","repo_kind":"official","path":"mnist_codes/utils.py","file_url":"https://github.com/yuelinan/codes-of-c2r/blob/HEAD/mnist_codes/utils.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":"9683c4284cca6c37"}},{"code_sha256_prefix":"41c3021e307719e4","entry":"eval_spmotif","repo":"yuelinan/codes-of-c2r","repo_kind":"official","path":"spmotif_codes/utils.py","file_url":"https://github.com/yuelinan/codes-of-c2r/blob/HEAD/spmotif_codes/utils.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":"41c3021e307719e4"}},{"code_sha256_prefix":"b2e0f932c14ff071","entry":"eval_spmotif_explain","repo":"yuelinan/codes-of-c2r","repo_kind":"official","path":"spmotif_codes/utils.py","file_url":"https://github.com/yuelinan/codes-of-c2r/blob/HEAD/spmotif_codes/utils.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":"b2e0f932c14ff071"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}