{"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/can-gnns-learn-link-heuristics-a-concise","title":"Can GNNs Learn Link Heuristics? A Concise Review and Evaluation of Link Prediction Methods","arxiv_id":"2411.14711","date":"2024-11-22","proceeding":null,"authors":["Shuming Liang","Yu Ding","Zhidong Li","Bin Liang","Siqi Zhang","Yang Wang","Fang Chen"],"abstract":"This paper explores the ability of Graph Neural Networks (GNNs) in learning various forms of information for link prediction, alongside a brief review of existing link prediction methods. Our analysis reveals that GNNs cannot effectively learn structural information related to the number of common neighbors between two nodes, primarily due to the nature of set-based pooling of the neighborhood aggregation scheme. Also, our extensive experiments indicate that trainable node embeddings can improve the performance of GNN-based link prediction models. Importantly, we observe that the denser the graph, the greater such the improvement. We attribute this to the characteristics of node embeddings, where the link state of each link sample could be encoded into the embeddings of nodes that are involved in the neighborhood aggregation of the two nodes in that link sample. In denser graphs, every node could have more opportunities to attend the neighborhood aggregation of other nodes and encode states of more link samples to its embedding, thus learning better node embeddings for link prediction. Lastly, we demonstrate that the insights gained from our research carry important implications in identifying the limitations of existing link prediction methods, which could guide the future development of more robust algorithms.","url_abs":"https://arxiv.org/abs/2411.14711v1","url_pdf":"https://arxiv.org/pdf/2411.14711v1.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":"can-gnns-learn-link-heuristics-a-concise","repo_url":"https://github.com/astroming/GNNHE","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":"prediction","task_name":"Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/link-property-prediction-on-ogbl-citation2","task":"Link Property Prediction","dataset":"ogbl-citation2","model":"GCN + Heuristic Encoding","rank_in_archive_order":6,"of":23,"metrics":{"Ext. data":"No","Number of params":"372674","Test MRR":"0.8891 ± 0.0005","Validation MRR":"0.8892 ± 0.0005"},"uses_additional_data":false},{"leaderboard":"/sota/link-property-prediction-on-ogbl-ddi","task":"Link Property Prediction","dataset":"ogbl-ddi","model":"GCN (node embedding)","rank_in_archive_order":3,"of":31,"metrics":{"Ext. data":"No","Number of params":"5125250","Test Hits@20":"0.9549 ± 0.0073","Validation Hits@20":"0.9098 ± 0.0294"},"uses_additional_data":false},{"leaderboard":"/sota/link-property-prediction-on-ogbl-ppa","task":"Link Property Prediction","dataset":"ogbl-ppa","model":"GCN (node embedding)","rank_in_archive_order":5,"of":26,"metrics":{"Ext. data":"No","Number of params":"148144898","Test Hits@100":"0.6354 ± 0.0121","Validation Hits@100":"0.6524 ± 0.0096"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2411.14711","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2411.14711"}},"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/astroming/GNNHE","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":3},"by_repo_kind":{"official":{"samples":3,"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":"3a770ee50f27e1b9","entry":"get_loggers","repo":"astroming/GNNHE","repo_kind":"official","path":"ogbl-citation2_88.91_10runs/utils.py","file_url":"https://github.com/astroming/GNNHE/blob/HEAD/ogbl-citation2_88.91_10runs/utils.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":"3a770ee50f27e1b9"}},{"code_sha256_prefix":"79fa2feaacf5673e","entry":"get_optimizer","repo":"astroming/GNNHE","repo_kind":"official","path":"ogbl-citation2_88.91_10runs/models.py","file_url":"https://github.com/astroming/GNNHE/blob/HEAD/ogbl-citation2_88.91_10runs/models.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":"79fa2feaacf5673e"}},{"code_sha256_prefix":"76ea6d8c225e28b7","entry":"maybe_num_nodes","repo":"astroming/GNNHE","repo_kind":"official","path":"ogbl-citation2_88.91_10runs/utils.py","file_url":"https://github.com/astroming/GNNHE/blob/HEAD/ogbl-citation2_88.91_10runs/utils.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":"76ea6d8c225e28b7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}