{"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/position-aware-graph-neural-networks","title":"Position-aware Graph Neural Networks","arxiv_id":"1906.04817","date":"2019-06-11","proceeding":null,"authors":["Jiaxuan You","Rex Ying","Jure Leskovec"],"abstract":"Learning node embeddings that capture a node's position within the broader graph structure is crucial for many prediction tasks on graphs. However, existing Graph Neural Network (GNN) architectures have limited power in capturing the position/location of a given node with respect to all other nodes of the graph. Here we propose Position-aware Graph Neural Networks (P-GNNs), a new class of GNNs for computing position-aware node embeddings. P-GNN first samples sets of anchor nodes, computes the distance of a given target node to each anchor-set,and then learns a non-linear distance-weighted aggregation scheme over the anchor-sets. This way P-GNNs can capture positions/locations of nodes with respect to the anchor nodes. P-GNNs have several advantages: they are inductive, scalable,and can incorporate node feature information. We apply P-GNNs to multiple prediction tasks including link prediction and community detection. We show that P-GNNs consistently outperform state of the art GNNs, with up to 66% improvement in terms of the ROC AUC score.","url_abs":"https://arxiv.org/abs/1906.04817v2","url_pdf":"https://arxiv.org/pdf/1906.04817v2.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":"position-aware-graph-neural-networks","repo_url":"https://github.com/JiaxuanYou/P-GNN","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"position-aware-graph-neural-networks","repo_url":"https://github.com/dmlc/dgl/tree/master/examples/pytorch/P-GNN","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"community-detection","task_name":"Community Detection"},{"task_slug":"graph-neural-network","task_name":"Graph Neural Network"},{"task_slug":"link-prediction","task_name":"Link Prediction"},{"task_slug":null,"task_name":"Position"},{"task_slug":"prediction","task_name":"Prediction"}],"methods":[{"method_slug":"graph-neural-network","method_name":"Graph Neural Network"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1906.04817","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1906.04817"}},"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/JiaxuanYou/P-GNN","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dmlc/dgl/tree/master/examples/pytorch/P-GNN","reach":null}],"summary":{"ran_honours":1,"unverified":4},"by_repo_kind":{"official":{"samples":5,"ran":1,"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":"5c3fa9402a9405bc","entry":"parse_index_file","repo":"JiaxuanYou/P-GNN","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/JiaxuanYou/P-GNN/blob/HEAD/dataset.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5c3fa9402a9405bc"}},{"code_sha256_prefix":"eeb00e22f5eb5986","entry":"deduplicate_edges","repo":"JiaxuanYou/P-GNN","repo_kind":"official","path":"utils.py","file_url":"https://github.com/JiaxuanYou/P-GNN/blob/HEAD/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":"eeb00e22f5eb5986"}},{"code_sha256_prefix":"b9088189f8b9f4cc","entry":"get_edge_mask_link_negative","repo":"JiaxuanYou/P-GNN","repo_kind":"official","path":"utils.py","file_url":"https://github.com/JiaxuanYou/P-GNN/blob/HEAD/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":"b9088189f8b9f4cc"}},{"code_sha256_prefix":"b19b80eefcbace7b","entry":"get_edge_mask_link_negative_approximate","repo":"JiaxuanYou/P-GNN","repo_kind":"official","path":"utils.py","file_url":"https://github.com/JiaxuanYou/P-GNN/blob/HEAD/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":"b19b80eefcbace7b"}},{"code_sha256_prefix":"6a0acc5ffe5b37c0","entry":"nx_to_tg_data","repo":"JiaxuanYou/P-GNN","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/JiaxuanYou/P-GNN/blob/HEAD/dataset.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":"6a0acc5ffe5b37c0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}