{"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/on-the-stability-of-expressive-positional","title":"On the Stability of Expressive Positional Encodings for Graphs","arxiv_id":"2310.02579","date":"2023-10-04","proceeding":null,"authors":["Yinan Huang","William Lu","Joshua Robinson","Yu Yang","Muhan Zhang","Stefanie Jegelka","Pan Li"],"abstract":"Designing effective positional encodings for graphs is key to building powerful graph transformers and enhancing message-passing graph neural networks. Although widespread, using Laplacian eigenvectors as positional encodings faces two fundamental challenges: (1) \\emph{Non-uniqueness}: there are many different eigendecompositions of the same Laplacian, and (2) \\emph{Instability}: small perturbations to the Laplacian could result in completely different eigenspaces, leading to unpredictable changes in positional encoding. Despite many attempts to address non-uniqueness, most methods overlook stability, leading to poor generalization on unseen graph structures. We identify the cause of instability to be a ``hard partition'' of eigenspaces. Hence, we introduce Stable and Expressive Positional Encodings (SPE), an architecture for processing eigenvectors that uses eigenvalues to ``softly partition'' eigenspaces. SPE is the first architecture that is (1) provably stable, and (2) universally expressive for basis invariant functions whilst respecting all symmetries of eigenvectors. Besides guaranteed stability, we prove that SPE is at least as expressive as existing methods, and highly capable of counting graph structures. Finally, we evaluate the effectiveness of our method on molecular property prediction, and out-of-distribution generalization tasks, finding improved generalization compared to existing positional encoding methods. Our code is available at \\url{https://github.com/Graph-COM/SPE}.","url_abs":"https://arxiv.org/abs/2310.02579v3","url_pdf":"https://arxiv.org/pdf/2310.02579v3.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":"on-the-stability-of-expressive-positional","repo_url":"https://github.com/Graph-COM/SPE","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"on-the-stability-of-expressive-positional","repo_url":"https://github.com/luis-mueller/wl-transformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"molecular-property-prediction","task_name":"Molecular Property Prediction"},{"task_slug":"out-of-distribution-generalization","task_name":"Out-of-Distribution Generalization"},{"task_slug":"property-prediction","task_name":"Property Prediction"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.02579","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.02579"}},"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/cptq/SignNet-BasisNet","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/Graph-COM/SPE","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/luis-mueller/wl-transformers","reach":null}],"summary":{"ran_draft_wrong":1,"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":1,"ran":0,"repositories":1},"listed":{"samples":1,"ran":1,"repositories":1},"found_in_text":{"samples":2,"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":1,"samples":[{"code_sha256_prefix":"b8db8117e87af370","entry":"compute_laplacian_eigen","repo":"luis-mueller/wl-transformers","repo_kind":"listed","path":"wl_transformers.py","file_url":"https://github.com/luis-mueller/wl-transformers/blob/HEAD/wl_transformers.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b8db8117e87af370"}},{"code_sha256_prefix":"181697b7b4df08e8","entry":"update_cfg","repo":"cptq/SignNet-BasisNet","repo_kind":"found_in_text","path":"GINESignNetPyG/core/config.py","file_url":"https://github.com/cptq/SignNet-BasisNet/blob/HEAD/GINESignNetPyG/core/config.py","link_basis":"first_harvest_node","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":"181697b7b4df08e8"}},{"code_sha256_prefix":"66201dd3ad52102b","entry":"StableExpressivePE","repo":"Graph-COM/SPE","repo_kind":"official","path":"src/stable_expressive_pe.py","file_url":"https://github.com/Graph-COM/SPE/blob/HEAD/src/stable_expressive_pe.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"66201dd3ad52102b"}},{"code_sha256_prefix":"cd645dde3a50c04c","entry":"config_logger","repo":"cptq/SignNet-BasisNet","repo_kind":"found_in_text","path":"GINESignNetPyG/core/log.py","file_url":"https://github.com/cptq/SignNet-BasisNet/blob/HEAD/GINESignNetPyG/core/log.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":"cd645dde3a50c04c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}