Learning Efficient Positional Encodings with Graph Neural Networks
Abstract
Positional encodings (PEs) are essential for effective graph representation learning because they provide position awareness in inherently position-agnostic transformer architectures and increase the expressive capacity of Graph Neural Networks (GNNs). However, designing powerful and efficient PEs for graphs poses significant challenges due to the absence of canonical node ordering and the scale of the graph. {In this work, we identify four key properties that graph PEs should satisfy}: stability, expressive power, scalability, and genericness. We find that existing eigenvector-based PE methods often fall short of jointly satisfying these criteria. To address this gap, we introduce PEARL, a novel framework of learnable PEs for graphs. Our primary insight is that message-passing GNNs function as nonlinear mappings of eigenvectors, enabling the design of GNN architectures for generating powerful and efficient PEs. A crucial challenge lies in initializing node attributes in a manner that is both expressive and permutation equivariant. We tackle this by initializing GNNs with random node inputs or standard basis vectors, thereby unlocking the expressive power of message-passing operations, while employing statistical pooling functions to maintain permutation equivariance. Our analysis demonstrates that PEARL approximates equivariant functions of eigenvectors with linear complexity, while rigorously establishing its stability and high expressive power. Experimental evaluations show that PEARL outperforms lightweight versions of eigenvector-based PEs and achieves comparable performance to full eigenvector-based PEs, but with one or two orders of magnitude lower complexity. Our code is available at https://github.com/ehejin/Pearl-PE.
Benchmark Results
Tested on 2 datasets 1 baseline value reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
LRGB
| # | Model | MAE ↓ | Paper |
|---|---|---|---|
| 1 | GCN | 0.2421
±0.0016 | |
| 2 | IPR-MPNN | 0.2422
±0.0007 | |
| 3 | TANGO-GPS | 0.2422
±0.0014 | |
| 5 | GIN | 0.2429
±0.0019 | |
| 19 | Graph ViT | 0.2449
±0.0016 best reported | best at pub: Probabilistic Graph Rewiring via Virtual Nodes (NeurIPS 2024) best today: Molecular fingerprints are strong models for peptide function prediction (2025) Difference within reported uncertainty; not counted as underperformance. |
| 44 | R-method | 0.2470
±0.0010 | This paper |
| 64 | B-method | 0.2480
±0.0010 | This paper |
| 85 | GPS | 0.2500
±0.0005 best reported | best at pub: Recurrent Distance Filtering for Graph Representation Learning (ICML 2023) best today: Bridging Input Feature Spaces Towards Graph Foundation Models (ICLR 2026) |
| 86 | SUN | 0.2500
±0.0010 | This paper |
| 123 | SAN+RWSE | 0.2545
±0.0012 best reported | best at pub: LRGB (NeurIPS 2022) best today: Understanding Virtual Nodes: Oversquashing and Node Heterogeneity (ICLR 2024) Difference within reported uncertainty; not counted as underperformance. |
| 155 | SAN+LapPE | 0.2680
±0.0040 | prev best: LRGB (NeurIPS 2022) Improvement within reported uncertainty; not highlighted. |
| 164 | GNN-AK+ | 0.2740 | This paper |
| 201 | MLP | 0.4351
±0.0008 |
GNNBenchmark
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 28 | B-PEARL | 1.0000 | This paper |
| 29 | R-PEARL | 1.0000 | This paper |
| 1 | PPGN | 1.0000 | |
| 2 | RW-AgentNet | 1.0000 | |
| 3 | AgentNet | 1.0000 | |
| 8 | GCN | 1.0000 | |
| 86 | Message-passing GNNs | 0.1000 | This paper |
