{"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/a-topological-perspective-on-demystifying-gnn","title":"A Topological Perspective on Demystifying GNN-Based Link Prediction Performance","arxiv_id":"2310.04612","date":"2023-10-06","proceeding":null,"authors":["Yu Wang","Tong Zhao","Yuying Zhao","Yunchao Liu","Xueqi Cheng","Neil Shah","Tyler Derr"],"abstract":"Graph Neural Networks (GNNs) have shown great promise in learning node embeddings for link prediction (LP). While numerous studies aim to improve the overall LP performance of GNNs, none have explored its varying performance across different nodes and its underlying reasons. To this end, we aim to demystify which nodes will perform better from the perspective of their local topology. Despite the widespread belief that low-degree nodes exhibit poorer LP performance, our empirical findings provide nuances to this viewpoint and prompt us to propose a better metric, Topological Concentration (TC), based on the intersection of the local subgraph of each node with the ones of its neighbors. We empirically demonstrate that TC has a higher correlation with LP performance than other node-level topological metrics like degree and subgraph density, offering a better way to identify low-performing nodes than using cold-start. With TC, we discover a novel topological distribution shift issue in which newly joined neighbors of a node tend to become less interactive with that node's existing neighbors, compromising the generalizability of node embeddings for LP at testing time. To make the computation of TC scalable, We further propose Approximated Topological Concentration (ATC) and theoretically/empirically justify its efficacy in approximating TC and reducing the computation complexity. Given the positive correlation between node TC and its LP performance, we explore the potential of boosting LP performance via enhancing TC by re-weighting edges in the message-passing and discuss its effectiveness with limitations. Our code is publicly available at https://github.com/YuWVandy/Topo_LP_GNN.","url_abs":"https://arxiv.org/abs/2310.04612v1","url_pdf":"https://arxiv.org/pdf/2310.04612v1.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":"a-topological-perspective-on-demystifying-gnn","repo_url":"https://github.com/yuwvandy/topo_lp_gnn","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"link-prediction","task_name":"Link Prediction"}],"methods":[{"method_slug":null,"method_name":"None"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.04612","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.04612"}},"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/yuwvandy/topo_lp_gnn","reach":{"status":"ok"}}],"summary":{"ran":4},"by_repo_kind":{"official":{"samples":4,"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":4,"samples":[{"code_sha256_prefix":"963a4c6218a18b79","entry":"batch_to_gpu","repo":"yuwvandy/topo_lp_gnn","repo_kind":"official","path":"TC-expr-collab/utils.py","file_url":"https://github.com/yuwvandy/topo_lp_gnn/blob/HEAD/TC-expr-collab/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":"963a4c6218a18b79"}},{"code_sha256_prefix":"f9923d89f0094d54","entry":"normalize_edge","repo":"yuwvandy/topo_lp_gnn","repo_kind":"official","path":"TC-expr-collab/dataprocess.py","file_url":"https://github.com/yuwvandy/topo_lp_gnn/blob/HEAD/TC-expr-collab/dataprocess.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":"f9923d89f0094d54"}},{"code_sha256_prefix":"964a63ebc976c5a7","entry":"randomsplit","repo":"yuwvandy/topo_lp_gnn","repo_kind":"official","path":"TC-expr-collab/dataprocess.py","file_url":"https://github.com/yuwvandy/topo_lp_gnn/blob/HEAD/TC-expr-collab/dataprocess.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":"964a63ebc976c5a7"}},{"code_sha256_prefix":"e1e952bdeef4cbe1","entry":"randomsplit","repo":"yuwvandy/topo_lp_gnn","repo_kind":"official","path":"TC-expr-small/dataprocess.py","file_url":"https://github.com/yuwvandy/topo_lp_gnn/blob/HEAD/TC-expr-small/dataprocess.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":"e1e952bdeef4cbe1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}