{"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/counterfactual-graph-learning-for-link","title":"Learning from Counterfactual Links for Link Prediction","arxiv_id":"2106.02172","date":"2021-06-03","proceeding":"NeurIPS 2021 12","authors":["Tong Zhao","Gang Liu","Daheng Wang","Wenhao Yu","Meng Jiang"],"abstract":"Learning to predict missing links is important for many graph-based applications. Existing methods were designed to learn the association between observed graph structure and existence of link between a pair of nodes. However, the causal relationship between the two variables was largely ignored for learning to predict links on a graph. In this work, we visit this factor by asking a counterfactual question: \"would the link still exist if the graph structure became different from observation?\" Its answer, counterfactual links, will be able to augment the graph data for representation learning. To create these links, we employ causal models that consider the information (i.e., learned representations) of node pairs as context, global graph structural properties as treatment, and link existence as outcome. We propose a novel data augmentation-based link prediction method that creates counterfactual links and learns representations from both the observed and counterfactual links. Experiments on benchmark data show that our graph learning method achieves state-of-the-art performance on the task of link prediction.","url_abs":"https://arxiv.org/abs/2106.02172v2","url_pdf":"https://arxiv.org/pdf/2106.02172v2.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":"counterfactual-graph-learning-for-link","repo_url":"https://github.com/DM2-ND/CFLP","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"causal-inference","task_name":"Causal Inference"},{"task_slug":"counterfactual-inference","task_name":"Counterfactual Inference"},{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"graph-learning","task_name":"Graph Learning"},{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":"prediction","task_name":"Prediction"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":null,"task_name":"counterfactual"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/link-property-prediction-on-ogbl-ddi","task":"Link Property Prediction","dataset":"ogbl-ddi","model":"CFLP (w/ JKNet)","rank_in_archive_order":11,"of":31,"metrics":{"Ext. data":"No","Number of params":"837635","Test Hits@20":"0.8608 ± 0.0198","Validation Hits@20":"0.8405 ± 0.0284"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2106.02172","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.02172"}},"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/DM2-ND/CFLP","reach":null}],"summary":{"ran":3},"by_repo_kind":{"official":{"samples":3,"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":"8998798cdcc4de8d","entry":"CFLP","repo":"DM2-ND/CFLP","repo_kind":"official","path":"models.py","file_url":"https://github.com/DM2-ND/CFLP/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8998798cdcc4de8d"}},{"code_sha256_prefix":"70bbd05e3696b199","entry":"Decoder","repo":"DM2-ND/CFLP","repo_kind":"official","path":"models.py","file_url":"https://github.com/DM2-ND/CFLP/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"70bbd05e3696b199"}},{"code_sha256_prefix":"012be499f262ee24","entry":"GNN","repo":"DM2-ND/CFLP","repo_kind":"official","path":"models.py","file_url":"https://github.com/DM2-ND/CFLP/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"012be499f262ee24"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}