[Paper Review] SGFormer: Simplifying and Empowering Transformers for Large-Graph Representations
SGFormer uses a simple one-layer, linear-time global attention for large graphs, achieving competitive node representations and scaling to web-scale graphs (up to 0.1B nodes) with strong efficiency gains.
Learning representations on large-sized graphs is a long-standing challenge due to the inter-dependence nature involved in massive data points. Transformers, as an emerging class of foundation encoders for graph-structured data, have shown promising performance on small graphs due to its global attention capable of capturing all-pair influence beyond neighboring nodes. Even so, existing approaches tend to inherit the spirit of Transformers in language and vision tasks, and embrace complicated models by stacking deep multi-head attentions. In this paper, we critically demonstrate that even using a one-layer attention can bring up surprisingly competitive performance across node property prediction benchmarks where node numbers range from thousand-level to billion-level. This encourages us to rethink the design philosophy for Transformers on large graphs, where the global attention is a computation overhead hindering the scalability. We frame the proposed scheme as Simplified Graph Transformers (SGFormer), which is empowered by a simple attention model that can efficiently propagate information among arbitrary nodes in one layer. SGFormer requires none of positional encodings, feature/graph pre-processing or augmented loss. Empirically, SGFormer successfully scales to the web-scale graph ogbn-papers100M and yields up to 141x inference acceleration over SOTA Transformers on medium-sized graphs. Beyond current results, we believe the proposed methodology alone enlightens a new technical path of independent interest for building Transformers on large graphs.
Motivation & Objective
- Reassess the necessity of deep attention for large graphs and explore scalable Transformer design.
- Develop a simple yet expressive model that captures all-pair node interactions efficiently.
- Achieve scalable learning on graphs from thousands to billions of nodes without heavy pre-processing.
- Demonstrate empirical performance and efficiency advantages over state-of-the-art graph Transformers.
Proposed method
- Propose Simplified Graph Transformer (SGFormer) with a one-layer global attention that operates in O(N) time for N nodes.
- Use shallow input mappings f_I to obtain node embeddings Z^(0) for attention propagation.
- Define a linear attention mechanism with Q, K, V projections and a residual propagation step Z combining global attention and self-loop information (Eq. 2–3).
- Avoid positional encodings, edge embeddings, pre-processing, and extra losses; no stochastic approximations.
- Optionally incorporate graph structure by outputting Z_O = (1-α)Z + α GN(Z^(0), A) and predicting via a linear head (Eq. 4).
- Support large-scale training via mini-batch partitioning and compatibility with neighbor sampling, clustering, and historical embeddings.

Experimental results
Research questions
- RQ1Can a single-layer, linear-time global attention transformer match or exceed multi-layer Transformers on large graphs?
- RQ2How does SGFormer perform across medium and web-scale graphs compared to GNNs and graph Transformers?
- RQ3What is the impact of compact architecture on generalization under limited supervision?
- RQ4Is linear-time attention sufficient to capture all-pair interactions without approximation?
Key findings
- SGFormer yields competitive or superior performance on twelve node property benchmarks from thousands to billions of nodes, using a single-layer attention.
- On medium-sized graphs, SGFormer outperformed standard GNNs by up to 25.9% (e.g., in actor dataset) and remained highly competitive versus Graphormer and GraphTrans.
- On large graphs, SGFormer outperformed NodeFormer across five datasets, and on ogbn-papers100M achieved 66.0 accuracy with about 3.5 hours training and 23.0 GB memory on a single GPU.
- SGFormer scales to web-scale graphs (ogbn-papers100M with 0.1B nodes) with linear complexity and substantially reduced training/inference time (e.g., up to 141x faster inference over SOTA Transformers on medium graphs).
- Compared to quadratic-attention baselines, SGFormer achieves substantial efficiency gains (e.g., 38x training and 141x inference speedups over Graphormer on Cora).
- Deeper multi-layer attention does not consistently improve performance and can incur higher costs, highlighting the effectiveness of the one-layer design for large graphs.
- Theoretical analysis connects the one-layer attention to a denoising optimization view, showing it can match multi-layer effects under appropriate settings.

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.