Lune

ICLR2022Top-tier venue

How Attentive are Graph Attention Networks?

Shaked Brody, Uri Alon, Eran Yahav

Abstract

Graph Attention Networks (GATs) are one of the most popular GNN architectures and are considered as the state-of-the-art architecture for representation learning with graphs. In GAT, every node attends to its neighbors given its own representation as the query. However, in this paper we show that GAT computes a very limited kind of attention: the ranking of the attention scores is unconditioned on the query node. We formally define this restricted kind of attention as static attention and distinguish it from a strictly more expressive dynamic attention. Because GATs use a static attention mechanism, there are simple graph problems that GAT cannot express: in a controlled problem, we show that static attention hinders GAT from even fitting the training data. To remove this limitation, we introduce a simple fix by modifying the order of operations and propose GATv2: a dynamic graph attention variant that is strictly more expressive than GAT. We perform an extensive evaluation and show that GATv2 outperforms GAT across 12 OGB and other benchmarks while we match their parametric costs. Our code is available at https://github.com/tech-srl/how_attentive_are_ gats . 1 GATv2 is available as part of the PyTorch Geometric library, 2 the Deep Graph Library, 3 and the TensorFlow GNN library. 4 1 An annotated implementation of GATv2 is available at https://nn.labml.ai/graphs/gatv2/ 2 from torch_geometric.nn.conv.gatv2_conv import GATv2Conv 3 from dgl.nn.pytorch import GATv2Conv 4 from tensorflow_gnn.graph.keras.layers.gat_v2 import GATv2Convolution

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

246 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Open Graph Benchmark: Datasets for Machine Learning on Graphs cites DeepGCNs: Can GCNs Go As Deep As CNNs?
  • Open Graph Benchmark: Datasets for Machine Learning on Graphs cites DropEdge: Towards Deep Graph Convolutional Networks on Node Classification
  • Open Graph Benchmark: Datasets for Machine Learning on Graphs cites GraphSAINT: Graph Sampling Based Inductive Learning Method
  • DropEdge: Towards Deep Graph Convolutional Networks on Node Classification cites DeepGCNs: Can GCNs Go As Deep As CNNs?
  • Pure Transformers are Powerful Graph Learners cites Self-Supervised Graph Transformer on Large-Scale Molecular Data
  • Graph Inductive Biases in Transformers without Message Passing cites Pure Transformers are Powerful Graph Learners
  • Self-Supervised Graph Transformer on Large-Scale Molecular Data cites DropEdge: Towards Deep Graph Convolutional Networks on Node Classification
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers246

  1. Pure Transformers are Powerful Graph LearnersJinwoo Kim, Dat Nguyen, Seonwoo Min, Sungjun Cho et al.NeurIPS 2022 · 311 citations
  2. Learning Dynamic Graph Representation of Brain Connectome with Spatio-Temporal AttentionByung-Hoon Kim, Jong Chul Ye, Jae-Jin KimNeurIPS 2021 · 224 citations
  3. Graph Inductive Biases in Transformers without Message PassingLiheng Ma, Chen Lin, Derek Lim, Adriana Romero-Soriano et al.ICML 2023 · 185 citations
  4. Periodic Graph Transformers for Crystal Material Property PredictionKeqiang Yan, Yi Liu, Yuchao Lin, Shuiwang JiNeurIPS 2022 · 167 citations
  5. Causal Attention for Interpretable and Generalizable Graph ClassificationYongduo Sui, Xiang Wang, Jiancan Wu, Min Lin et al.KDD 2022 · 166 citations

Builds on13

  1. Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
  2. DropEdge: Towards Deep Graph Convolutional Networks on Node ClassificationYu Rong, Wenbing Huang, Tingyang Xu, Junzhou HuangICLR 2020 · 1,599 citations
  3. DeepGCNs: Can GCNs Go As Deep As CNNs?Guohao Li, Matthias Müller, Ali K. Thabet, Bernard GhanemICCV 2019 · 1,586 citations
  4. GraphSAINT: Graph Sampling Based Inductive Learning MethodHanqing Zeng, Hongkuan Zhou, Ajitesh Srivastava, Rajgopal Kannan et al.ICLR 2020 · 1,155 citations
  5. Self-Supervised Graph Transformer on Large-Scale Molecular DataYu Rong, Yatao Bian, Tingyang Xu, Weiyang Xie et al.NeurIPS 2020 · 1,113 citations

Related papers

  1. HONGAT: Graph Attention Networks in the Presence of High-Order NeighborsHeng-Kai Zhang, Yi-Ge Zhang, Zhi Zhou, Yufeng LiAAAI 2024 · 15 citations
  2. Learnable Graph Convolutional Attention NetworksAdrián Javaloy, Pablo Sánchez-Martín, Amit Levi, Isabel ValeraICLR 2023 · 6 citations
  3. GATE: How to Keep Out Intrusive NeighborsNimrah Mustafa, Rebekka BurkholzICML 2024 · 3 citations
  4. A Dynamical Systems-Inspired Pruning Strategy for Addressing Oversmoothing in Graph Attention NetworksBiswadeep Chakraborty, Harshit Kumar, Saibal MukhopadhyayICML 2025
  5. Graph External Attention Enhanced TransformerJianqing Liang, Min Chen, Jiye LiangICML 2024 · 11 citations
Dusk over the sea between two cliffs drawn in fine vertical lines