[Paper Review] Recipe for a General, Powerful, Scalable Graph Transformer
Proposes GPS, a modular graph Transformer blueprint with linear complexity that combines local MPNN message passing and global linear-attention, achieving competitive to state-of-the-art results across 16 benchmarks.
We propose a recipe on how to build a general, powerful, scalable (GPS) graph Transformer with linear complexity and state-of-the-art results on a diverse set of benchmarks. Graph Transformers (GTs) have gained popularity in the field of graph representation learning with a variety of recent publications but they lack a common foundation about what constitutes a good positional or structural encoding, and what differentiates them. In this paper, we summarize the different types of encodings with a clearer definition and categorize them as being $ extit{local}$, $ extit{global}$ or $ extit{relative}$. The prior GTs are constrained to small graphs with a few hundred nodes, here we propose the first architecture with a complexity linear in the number of nodes and edges $O(N+E)$ by decoupling the local real-edge aggregation from the fully-connected Transformer. We argue that this decoupling does not negatively affect the expressivity, with our architecture being a universal function approximator on graphs. Our GPS recipe consists of choosing 3 main ingredients: (i) positional/structural encoding, (ii) local message-passing mechanism, and (iii) global attention mechanism. We provide a modular framework $ extit{GraphGPS}$ that supports multiple types of encodings and that provides efficiency and scalability both in small and large graphs. We test our architecture on 16 benchmarks and show highly competitive results in all of them, show-casing the empirical benefits gained by the modularity and the combination of different strategies.
Motivation & Objective
- Clarify and categorize positional and structural encodings (PE/SE) for graph Transformers into local, global, and relative categories.
- Propose a GPS blueprint that blends local message passing with global attention to achieve linear complexity in graphs.
- Demonstrate scalability to large graphs while maintaining competitive performance across diverse benchmarks.
- Provide an extensive ablation study to understand contributions of PE/SE, MPNN, and global attention components.
- Deliver an open-source GraphGPS implementation to enable modular experimentation across datasets.
Proposed method
- Define a three-part GPS recipe: (i) embedding modules for aggregating positional/structural encodings with node/edge/graph features, (ii) processing modules combining local MPNN channels with global attention, (iii) a modular framework enabling various PE/SE, MPNN, and attention choices.
- Use linear-time attention mechanisms (Performer or BigBird) in the global attention component to achieve O(N+E) complexity, avoiding full O(N^2) attention.
- Interleave one local MPNN pass with a global attention step per GPS layer and then fuse via an MLP.
- Argue that the edge information can be propagated through node features within the MPNN+Transformer hybrid, preserving expressivity.
- Provide theoretical justification that GPS is a universal function approximator on graphs by enabling edge information propagation and leveraging Laplacian eigenvectors.
- Implement GPS in the GraphGPS package built on PyG and GraphGym for modular experimentation.
Experimental results
Research questions
- RQ1Can modular PE/SE encodings organized into local/global/relative categories improve graph Transformer expressivity and generalization?
- RQ2Does decoupling local MPNN aggregation from global linear attention enable scalable, competitive graph Transformer performance on large graphs?
- RQ3What is the contribution of each GPS component (PE/SE, MPNN, global attention) to performance across diverse benchmarks?
- RQ4Can GPS achieve universality in function approximation on graphs with linear-time attention?
Key findings
- GPS achieves competitive to state-of-the-art results across 16 benchmarks, including ZINC, MNIST, CIFAR10, PATTERN, CLUSTER, and OGB tasks.
- Ablations show the necessity of the MPNN module and the benefit of Transformer-style global attention for most datasets.
- RWSE and SignNet-based encodings provide consistent gains, with dataset-dependent best encodings observed.
- Linear-scale global attention (Performer) enables scaling to graphs with thousands of nodes while maintaining strong performance.
- GPS demonstrates strong results on large-scale PCQM4Mv2 and MalNet-Tiny, showcasing scalability and competitive accuracy with fewer parameters.
- The approach maintains edge information through node representations, supporting its claim of universal function approximation on graphs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.