NeurIPS 2025

Generalizable Insights for Graph Transformers in Theory and Practice

Timo Stoll, Luis Müller, Christopher Morris

Main figure for Generalizable Insights for Graph Transformers in Theory and Practice

Abstract

Graph Transformers (GTs) have shown strong empirical performance, yet current architectures vary widely in their use of attention mechanisms, positional embeddings (PEs), and expressivity. Existing expressivity results are often tied to specific design choices and lack comprehensive empirical validation on large-scale data. This leaves a gap between theory and practice, preventing generalizable insights that exceed particular application domains. Here, we propose the Generalized-Distance Transformer (GDT), a GT architecture using standard attention that incorporates many advancements for GTs from recent years, and develop a fine-grained understanding of the GDT's representation power in terms of attention and PEs. Through extensive experiments, we identify design choices that consistently perform well across various applications, tasks, and model scales, demonstrating strong performance in a few-shot transfer setting without fine-tuning. Our evaluation covers over eight million graphs with roughly 270M tokens across diverse domains, including image-based object detection, molecular property prediction, code summarization, and out-of-distribution algorithmic reasoning. We distill our theoretical and practical findings into several generalizable insights about effective GT design, training, and inference.

Benchmark Results

Tested on 2 datasets

Tables show presented results in global context (best 3 papers + GCN + MLP).

OGB

#ModelF1 ↑Paper
1
GMN
0.2060 ±0.0020
2
DirGraphSSM
0.2050 ±0.0023
3
Graph-Mamba
0.2030 ±0.0023
6
LPE
0.1948 ±0.0021
This paper
7
RRWP
0.1942 ±0.0010
This paper
9
RWSE
0.1939 ±0.0047
This paper
12
SPE
0.1935 ±0.0021
This paper
14
NoPE
0.1927 ±0.0020
This paper
35
GCN
0.1510 ±0.0020

GraphBench

#ModelMAE ↓Paper
1
RRWP
1.4500 ±0.0600
This paper
2
RWSE
1.4900 ±0.0200
This paper
3
NoPE
1.7300 ±0.0900
This paper
4
LPE
1.7500 ±0.1200
This paper
5
SPE
1.9800 ±0.1400
This paper
SOTA performance (not significantly different from the best) Baseline / comparison (this paper) Global context (other papers)