{"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/graph-neural-networks-with-learnable-1","title":"Graph Neural Networks with Learnable Structural and Positional Representations","arxiv_id":"2110.07875","date":"2021-10-15","proceeding":"ICLR 2022 4","authors":["Vijay Prakash Dwivedi","Anh Tuan Luu","Thomas Laurent","Yoshua Bengio","Xavier Bresson"],"abstract":"Graph neural networks (GNNs) have become the standard learning architectures for graphs. GNNs have been applied to numerous domains ranging from quantum chemistry, recommender systems to knowledge graphs and natural language processing. A major issue with arbitrary graphs is the absence of canonical positional information of nodes, which decreases the representation power of GNNs to distinguish e.g. isomorphic nodes and other graph symmetries. An approach to tackle this issue is to introduce Positional Encoding (PE) of nodes, and inject it into the input layer, like in Transformers. Possible graph PE are Laplacian eigenvectors. In this work, we propose to decouple structural and positional representations to make easy for the network to learn these two essential properties. We introduce a novel generic architecture which we call LSPE (Learnable Structural and Positional Encodings). We investigate several sparse and fully-connected (Transformer-like) GNNs, and observe a performance increase for molecular datasets, from 1.79% up to 64.14% when considering learnable PE for both GNN classes.","url_abs":"https://arxiv.org/abs/2110.07875v2","url_pdf":"https://arxiv.org/pdf/2110.07875v2.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":"graph-neural-networks-with-learnable-1","repo_url":"https://github.com/vijaydwivedi75/gnn-lspe","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"graph-regression","task_name":"Graph Regression"},{"task_slug":"knowledge-graphs","task_name":"Knowledge Graphs"},{"task_slug":"recommendation-systems","task_name":"Recommendation Systems"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/graph-regression-on-zinc-500k","task":"Graph Regression","dataset":"ZINC-500k","model":"GatedGCN-LSPE","rank_in_archive_order":18,"of":36,"metrics":{"MAE":"0.090"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-zinc-500k","task":"Graph Regression","dataset":"ZINC-500k","model":"PNA-LSPE","rank_in_archive_order":20,"of":36,"metrics":{"MAE":"0.095"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-zinc-500k","task":"Graph Regression","dataset":"ZINC-500k","model":"SAN-LSPE","rank_in_archive_order":23,"of":36,"metrics":{"MAE":"0.104"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.07875","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.07875"}},"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/vijaydwivedi75/gnn-lspe","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":4,"ran":2,"unverified":1},"by_repo_kind":{"official":{"samples":7,"ran":6,"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":"0cb93154c335108f","entry":"aggregate_max","repo":"vijaydwivedi75/gnn-lspe","repo_kind":"official","path":"layers/pna_utils.py","file_url":"https://github.com/vijaydwivedi75/gnn-lspe/blob/HEAD/layers/pna_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0cb93154c335108f"}},{"code_sha256_prefix":"b19d1fdc25bad3bd","entry":"aggregate_mean","repo":"vijaydwivedi75/gnn-lspe","repo_kind":"official","path":"layers/pna_utils.py","file_url":"https://github.com/vijaydwivedi75/gnn-lspe/blob/HEAD/layers/pna_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b19d1fdc25bad3bd"}},{"code_sha256_prefix":"ff879af48e34176e","entry":"aggregate_min","repo":"vijaydwivedi75/gnn-lspe","repo_kind":"official","path":"layers/pna_utils.py","file_url":"https://github.com/vijaydwivedi75/gnn-lspe/blob/HEAD/layers/pna_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ff879af48e34176e"}},{"code_sha256_prefix":"f72434c0dcd5d11b","entry":"gpu_setup","repo":"vijaydwivedi75/gnn-lspe","repo_kind":"official","path":"main_OGBMOL_graph_classification.py","file_url":"https://github.com/vijaydwivedi75/gnn-lspe/blob/HEAD/main_OGBMOL_graph_classification.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f72434c0dcd5d11b"}},{"code_sha256_prefix":"700de849477f93ce","entry":"imp_exp_attn","repo":"vijaydwivedi75/gnn-lspe","repo_kind":"official","path":"layers/graphit_gt_lspe_layer.py","file_url":"https://github.com/vijaydwivedi75/gnn-lspe/blob/HEAD/layers/graphit_gt_lspe_layer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"700de849477f93ce"}},{"code_sha256_prefix":"a3fb87a259b15eae","entry":"scaling","repo":"vijaydwivedi75/gnn-lspe","repo_kind":"official","path":"layers/graphit_gt_lspe_layer.py","file_url":"https://github.com/vijaydwivedi75/gnn-lspe/blob/HEAD/layers/graphit_gt_lspe_layer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a3fb87a259b15eae"}},{"code_sha256_prefix":"9408c2ca6e799410","entry":"src_dot_dst","repo":"vijaydwivedi75/gnn-lspe","repo_kind":"official","path":"layers/graphit_gt_lspe_layer.py","file_url":"https://github.com/vijaydwivedi75/gnn-lspe/blob/HEAD/layers/graphit_gt_lspe_layer.py","link_basis":"harvester_set","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":"9408c2ca6e799410"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}