Understanding Truncated Positional Encodings for Graph Neural Networks
James Flora, Mitchell Black, Weng-Keen Wong, Amir Nayyeri
Abstract
Positional encodings (PEs) enhance the power of graph neural networks (GNNs), both theoretically and empirically. Two of the most popular families of PEs---spectral (e.g., Laplacian eigenspaces, effective resistance) and random walk (polynomials of the adjacency matrix)---are theoretically equivalent in expressive power, and both are known to lie between the 1-WL and 3-WL tests in terms of expressivity. However, this equivalence assumes the GNN uses the "complete'' version of these PEs, which requires time and space complexity. Practitioners therefore commonly use truncated variants of these encodings (e.g., the first eigenspaces or powers of adjacency matrix). However, the theoretical properties of these truncated PEs are unknown. In this work, we initiate the study of these truncated PEs. Theoretically, we show that, under truncation, several families of PEs are fundamentally different in expressive power. As a corollary, we show that truncated spectral PEs are no longer stronger than the 1-WL test. We also study a family of spectral PEs, the -harmonic distances, to highlight the differences in expressive power of even closely related truncated PEs. Finally, we experimentally show that a mix of truncated PEs is preferable to any single family on real-world datasets.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2dd2b4b8-5529-4cda-9d09-b5ab79d9cd9fBuilds on19
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Do Transformers Really Perform Badly for Graph Representation?Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng et al.NeurIPS 2021 · 1,632 citations
- Recipe for a General, Powerful, Scalable Graph TransformerLadislav Rampásek, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu et al.NeurIPS 2022 · 1,216 citations
- Graph Neural Networks Exponentially Lose Expressive Power for Node ClassificationKenta Oono, Taiji SuzukiICLR 2020 · 864 citations
- Rethinking Graph Transformers with Spectral AttentionDevin Kreuzer, Dominique Beaini, William L. Hamilton, Vincent Létourneau et al.NeurIPS 2021 · 854 citations
Related papers
- What functions can Graph Neural Networks compute on random graphs? The role of Positional EncodingNicolas Keriven, Samuel VaiterNeurIPS 2023 · 24 citations
- Aligning Transformers with Weisfeiler-LemanLuis Müller, Christopher MorrisICML 2024 · 7 citations
- How Powerful are K-hop Message Passing Graph Neural NetworksJiarui Feng, Yixin Chen, Fuhai Li, Anindya Sarkar et al.NeurIPS 2022 · 188 citations
- Spectral Graph Neural Networks are Incomplete on Graphs with a Simple SpectrumSnir Hordan, Maya Bechler-Speicher, Gur Lifshitz, Nadav DymNeurIPS 2025 · 5 citations
- Comparing Graph Transformers via Positional EncodingsMitchell Black, Zhengchao Wan, Gal Mishne, Amir Nayyeri et al.ICML 2024 · 27 citations
