Abstract
Standard Transformer architectures, while dominant in language and vision, often struggle with graph-structured data due to a lack of appropriate inductive biases. Previous attempts to bridge this gap have resulted in complex hybrid architectures that integrate message-passing layers. This paper introduces the Powerful Plain Graph Transformer (PPGT), a minimalist approach that achieves state-of-the-art performance by refining standard Transformer components—specifically attention, normalization, and positional encoding—rather than adding graph-specific layers.
The Challenge: Complexity in Graph Transformers
Transformers have revolutionized deep learning, yet their application to graphs has been hindered by the non-Euclidean and permutation-invariant nature of graph data. To compensate, existing Graph Transformers (GTs) often employ "Frankenstein" architectures, merging global attention with Message-Passing Neural Networks (MPNNs) or intricate, non-standard attention mechanisms. While effective, these designs diverge significantly from the "plain" Transformers used in other domains, complicating the adoption of large-scale training optimizations and the development of unified multimodal backbones.
Methodology: Preserving Structural Information
The authors identify a core technical failure: standard Transformers lose token magnitude information. In graph learning, the "magnitude" of a node's representation often encodes vital structural information, such as its degree. PPGT addresses this through three key modifications:
1. Adaptive RMSNorm (AdaRMSN)
Standard normalization layers like LayerNorm or RMSNorm project tokens onto a hypersphere, effectively erasing magnitude information. AdaRMSN introduces a learnable scaling factor that allows the model to selectively preserve this magnitude information when it is structurally important.
2. Simplified $L_2$ Attention ($sL_2$)
Standard Scaled Dot-Product (SDP) attention primarily measures angular similarity and is biased toward high-magnitude tokens. The proposed $sL_2$ attention reformulates the mechanism based on Euclidean distance, ensuring a more balanced consideration of both vector angle and magnitude.
3. Sinusoidal PE Enhancement (SPE)
To capture fine-grained structural details, PPGT utilizes Random Walk Structural Probabilities (RRWP) as positional encodings. These are further processed through a sinusoidal encoding—a technique borrowed from coordinate-based neural networks like NeRF—to mitigate "spectral bias," where models tend to ignore high-frequency structural signals.
Experimental Results
PPGT was evaluated across a diverse range of benchmarks, demonstrating that a "plain" architecture can indeed outperform complex hybrids:
- State-of-the-Art on ZINC: Achieved a Mean Absolute Error (MAE) of 0.0566, surpassing models like GRIT and GraphGPS.
- Superior Long-Range Modeling: On the LRGB Peptides-struct task, PPGT reached the lowest MAE (0.2450) recorded to date, highlighting its ability to model distant dependencies.
- Scalability and Efficiency: On the massive PCQM4Mv2 dataset, PPGT delivered competitive performance while offering a ~29% improvement in training speed and ~14% lower GPU memory usage compared to the more complex GRIT model.
Conclusion
The success of PPGT suggests that the path to powerful graph learning does not necessarily require architectural hybridization. By ensuring that standard Transformer components are "magnitude-aware" and sensitive to high-frequency structural signals, plain Transformers can serve as efficient and highly effective backbones for graph-structured data. Future work will explore more efficient attention mechanisms to scale these benefits to even larger graphs.
Summary updated