Structure-Aware Transformer for Graph Representation Learning
Dexiong Chen, Leslie O'Bray, Karsten M. Borgwardt
Abstract
The Transformer architecture has gained growing attention in graph representation learning recently, as it naturally overcomes several limitations of graph neural networks (GNNs) by avoiding their strict structural inductive biases and instead only encoding the graph structure via positional encoding. Here, we show that the node representations generated by the Transformer with positional encoding do not necessarily capture structural similarity between them. To address this issue, we propose the Structure-Aware Transformer, a class of simple and flexible graph Transformers built upon a new self-attention mechanism. This new self-attention incorporates structural information into the original self-attention by extracting a subgraph representation rooted at each node before computing the attention. We propose several methods for automatically generating the subgraph representation and show theoretically that the resulting representations are at least as expressive as the subgraph representations. Empirically, our method achieves state-of-the-art performance on five graph prediction benchmarks. Our structure-aware framework can leverage any existing GNN to extract the subgraph representation, and we show that it systematically improves performance relative to the base GNN model, successfully combining the advantages of GNNs and Transformers. Our code is available at https: //github.com/BorgwardtLab/SAT .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 8cc9ca00-014c-4b6d-83aa-b332e4eba66aCited by top-tier papers111
- Recipe for a General, Powerful, Scalable Graph TransformerLadislav Rampásek, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu et al.NeurIPS 2022 · 1,216 citations
- Simplifying and Empowering Transformers for Large-Graph RepresentationsQitian Wu, Wentao Zhao, Chenxiao Yang, Hengrui Zhang et al.NeurIPS 2023 · 318 citations
- Exphormer: Sparse Transformers for GraphsHamed Shirzad, Ameya Velingker, Balaji Venkatachalam, Danica J. Sutherland et al.ICML 2023 · 219 citations
- Graph Inductive Biases in Transformers without Message PassingLiheng Ma, Chen Lin, Derek Lim, Adriana Romero-Soriano et al.ICML 2023 · 185 citations
- A Generalization of ViT/MLP-Mixer to GraphsXiaoxin He, Bryan Hooi, Thomas Laurent, Adam Perold et al.ICML 2023 · 135 citations
Builds on22
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Strategies for Pre-training Graph Neural NetworksWeihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik et al.ICLR 2020 · 1,744 citations
- Do Transformers Really Perform Badly for Graph Representation?Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng et al.NeurIPS 2021 · 1,632 citations
- DeepGCNs: Can GCNs Go As Deep As CNNs?Guohao Li, Matthias Müller, Ali K. Thabet, Bernard GhanemICCV 2019 · 1,586 citations
Related papers
- Are More Layers Beneficial to Graph Transformers?Haiteng Zhao, Shuming Ma, Dongdong Zhang, Zhi-Hong Deng et al.ICLR 2023 · 5 citations
- Graph Positional and Structural EncoderSemih Cantürk, Renming Liu, Olivier Lapointe-Gagné, Vincent Létourneau et al.ICML 2024 · 33 citations
- Graph External Attention Enhanced TransformerJianqing Liang, Min Chen, Jiye LiangICML 2024 · 11 citations
- Subgraphormer: Unifying Subgraph GNNs and Graph Transformers via Graph ProductsGuy Bar-Shalom, Beatrice Bevilacqua, Haggai MaronICML 2024 · 13 citations
- Transformers over Directed Acyclic GraphsYuankai Luo, Veronika Thost, Lei ShiNeurIPS 2023 · 43 citations
