Path Laplacian Encodings for Directed Graphs
Organizations: Université de Montréal · Mila – Quebec AI Institute · Boise State University · Université de Fribourg
Abstract
Directed graphs naturally model many real-world systems in which interactions are asymmetric, such as citation networks, web graphs, and information-flow networks. However, graph learning methods commonly rely on message passing with symmetrized graph representations or positional encodings that only partially exploit edge directionality. We introduce PathLapPE, a novel spectral positional encoding (PE) derived from the path Laplacian on directed graphs. PathLapPE provides node- and edge-level features that encode directional higher-order structure and can be incorporated into standard graph learning architectures. Empirical results on node- and graph-level benchmark tasks show that PathLapPE yields consistent improvements across several architectures, especially when combined with direction-aware message passing. Compared with magnetic Laplacian positional encodings, a widely studied spectral positional encoding for directed graphs, PathLapPE does not require additional fine-tuning of directionality hyperparameters while offering competitive runtime and performance.
Figures & tables
| Model | PE | Cornell | Wisconsin | Texas | Avg. Rank |
|---|---|---|---|---|---|
| GAT | No PE | 5.17 | |||
| RWPE | 3.17 | ||||
| LapPE | 4.67 | ||||
| Multi- -MagLapPE, | 2.67 | ||||
| PathLapPE (ours) | 4.00 | ||||
| PathLapPE (ours, w/ EdgeSPE) |
| PE | BiGINE | BiGINE-shared | GAT | BiGAT | BiGCNE |
|---|---|---|---|---|---|
| Base (No PE) | |||||
| LaplacianPE | |||||
| Multi- -MagLapPE, | |||||
| Multi- -MagLapPE, | |||||
| PathLapPE (ours) | |||||
| PathLapPE (ours, w/ EdgeSPE) |
| OCB (RMSE ) | HLS (MSE ) | Avg. | ||||||
|---|---|---|---|---|---|---|---|---|
| PE | Gain | BW | PM | DSP | LUT | CP | Rank | |
| BiGINE | No PE | |||||||
| LapPE | ||||||||
| Multi- -MagLapPE, | ||||||||
| Multi- -MagLapPE, | ||||||||
| PathLapPE (ours) | ||||||||
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Cornell | Wisconsin | Texas | Roman-Empire |
| # Nodes | 183 | 251 | 183 | 22,662 |
| # Edges | 295 | 499 | 325 | 44,363 |
| # Features | 1,703 | 1,703 | 1,703 | 300 |
| # Classes | 5 | 5 | 5 | 18 |
| License | CC-BY 4.0 | CC-BY 4.0 | CC-BY 4.0 | MIT |
| Dataset | FlowGraph2 | FlowGraph3 | FlowGraph6 | OCB | HLS |
|---|---|---|---|---|---|
| # Graphs | 2,000 | 3,000 | 6,000 | 8,026 a | 18,570 |
| Avg. # Nodes | 114.46 | 111.66 | 111.40 | 9.89 | 94.70 |
| Avg. # Edges | 150.30 | 150.70 | 149.93 | 15.02 | 122.12 |
| # Node Features | 0 | 0 | 0 | 3 | 7 |
| # Edge Features | 0 | 0 | 0 | 0 | 2 |
| Task | Binary class. | 3-way class. | 6-way class. | Regression | Regression |
| Encoder | PE Variant | Best | ||||
|---|---|---|---|---|---|---|
| BiGINE-shared | Base (No PE) | |||||
| LaplacianPE | ||||||
| Multi- -MagLapPE, | ||||||
| Multi- -MagLapPE, | ||||||
| PathLapPE (256 2) | {\color[rgb]{0.38,0.43,0.77}\mathbf{89.43\pm 0.42}} | |||||
| PathLapPE | {\color[rgb]{1,0.58,0}\mathbf{89.50\pm 0.36}} |
| FlowGraph | WebKB | Roman-Empire | |
| Data | |||
| Task | graph cls. | node cls. | node cls. |
| Graphs | 2,000 / 3,000 / 6,000 | 1 | 1 |
| Classes | 2 / 3 / 6 | 5 | 18 |
| Input feature dim. | 1 a | 1,703 | 300 |
| Batching | batch size 32 | full graph | full graph |
| Gain | BW | PM | |
| Data | |||
| Input node features | 3 | ||
| Input edge features | – | ||
| Graphs | 8,026 | 8,026 | 8,026 |
| Splits | % | % | % |
| Batch size | 128 | 64 | 64 |
| DSP | LUT | CP | ||||
| Uni-GNN | Bi-GNN | Uni-GNN | Bi-GNN | Uni-GNN | Bi-GNN | |
| Data | ||||||
| Categorical node features | 7 | |||||
| Categorical edge features | 2 | |||||
| Graphs (CDFG) | 18,570 | |||||
| Splits | 16,570 / 1,000 / 1,000 | |||||
| Roman-Empire | FlowGraph | OCB | ||||
|---|---|---|---|---|---|---|
| shift-invert, heap mem. | CPU dense, heap mem. | GPU dense, GPU mem. | ||||
| PE | Time (s) | Mem (MB) | Time (ms) | Mem (MB) | Time (ms) | Mem (MB) |
| LapPE | 0.154 0.007 | 4.49 | 3.00 0.23 | 0.24 | 2.20 0.13 | 0.56 |
| Multi- -MagLapPE, | 0.257 0.001 | 8.50 | 2.96 0.17 | 0.25 | 2.21 0.10 | 1.12 |
| Multi- -MagLapPE, | 0.704 0.001 | 11.3 | 6.59 0.44 | 0.27 | 4.23 0.24 | 1.12 |
| Multi- -MagLapPE, | 1.074 0.016 | 14.1 | 10.15 0.67 | 0.30 | 6.23 0.38 | 1.12 |