Papers › How Attentive are Graph Attention Networks?

How Attentive are Graph Attention Networks?

30 May 2021ICLR 2022 4arXiv:2105.14491archive 2025-07-28

Shaked Brody, Uri Alon, Eran Yahav

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 11 OGB and other benchmarks while we match their parametric costs. Our code is available at https://github.com/tech-srl/how_attentive_are_gats . GATv2 is available as part of the PyTorch Geometric library, the Deep Graph Library, and the TensorFlow GNN library.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2105.14491")

Code

Syntology Ran 6 of 16 code samples harvested from 5 repositories linked to this paper; 10 have no recorded run. Of those that ran: 6 ran with no contract checked.

By repository: community (archive-listed): 16 samples from 5 repositories, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

tech-srl/how_attentive_are_gats officialmentioned in papermentioned on GitHubpytorch report
briangodwinlim/sir-gcn mentioned on GitHubpytorchCC-BY-4.0 report
machadoprx/GATv2-TensorFlow2 mentioned on GitHubtf report
dmlc/dgl pytorch report
tensorflow/gnn tfApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 6 ran; 0 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

6ran
10unverified

Licence: 1 of the 16 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 5 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

GATv2 labmlai/annotated_deep_learning_paper_implementations/labml_nn/graphs/gatv2/experiment.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · 365d918744e8f7d5 · report
GraphAttentionV2Layer labmlai/annotated_deep_learning_paper_implementations/labml_nn/graphs/gatv2/experiment.py community (archive-listed) ran MIT (permissive) · d6b15de3f7df93c6 · report
get_num_clusters rusty1s/pytorch_geometric/torch_geometric/datasets/hydro_net.py community (archive-listed) ran MIT (permissive) · 7080188a5f04e65f · report
map_annotation rusty1s/pytorch_geometric/torch_geometric/config_store.py community (archive-listed) ran MIT (permissive) · 0a76eaa4d06d2d91 · report
read_energy rusty1s/pytorch_geometric/torch_geometric/datasets/hydro_net.py community (archive-listed) ran MIT (permissive) · 37b2364ea0f56557 · report
use_segment_matmul_heuristic rusty1s/pytorch_geometric/torch_geometric/backend.py community (archive-listed) ran MIT (permissive) · c19c99d92c84e9b8 · report
GATv2SelfAttention machadoprx/GATv2-TensorFlow2/gatv2_layer.py community (archive-listed) unverified no licence file found · pointer only · 56cb5f68019f62a7 · report
compile rusty1s/pytorch_geometric/torch_geometric/_compile.py community (archive-listed) unverified MIT (permissive) · a56e8eaabb61634b · report
get_auc_score mahequn001/graphlearning/model_zoo/gae/util.py community (archive-listed) unverified Apache-2.0 (permissive) · 49bec40bd43ba73d · report
pop_by_prefix tensorflow/gnn/tensorflow_gnn/graph/dict_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 1ede5ca46a7df870 · report
read_atoms rusty1s/pytorch_geometric/torch_geometric/datasets/hydro_net.py community (archive-listed) unverified MIT (permissive) · 8349c934df099399 · report
safe_onnx_export rusty1s/pytorch_geometric/torch_geometric/_onnx.py community (archive-listed) unverified MIT (permissive) · 51ea4acdfd945732 · report
to_dataclass rusty1s/pytorch_geometric/torch_geometric/config_store.py community (archive-listed) unverified MIT (permissive) · 977c76c93dace67a · report
to_edge_list tensorflow/gnn/tensorflow_gnn/converters/networkx_io.py community (archive-listed) unverified Apache-2.0 (permissive) · 1457b037fb82f82e · report
to_networkx_graph tensorflow/gnn/tensorflow_gnn/converters/networkx_io.py community (archive-listed) unverified Apache-2.0 (permissive) · abf6cd02b673f7f8 · report
with_key_prefix tensorflow/gnn/tensorflow_gnn/graph/dict_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 36972132fe777084 · report

Tasks

Graph AttentionGraph ClassificationGraph Property PredictionGraph RegressionLink PredictionMolecular Property PredictionNode Property PredictionRepresentation Learning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Graph Classification D&D GATv2 Accuracy 75.966±2.191 #42 of 53 Archive leaderboard report
Graph Classification ENZYMES GATv2 Accuracy 77.987±2.112 #5 of 54 Archive leaderboard report
Graph Classification IMDb-B GATv2 Accuracy 80.000±2.739 #7 of 51 Archive leaderboard report
Graph Classification NCI1 GATv2 Accuracy 82.384±1.700 #31 of 69 Archive leaderboard report
Graph Classification NCI109 GATv2 Accuracy 83.092±0.764 #14 of 38 Archive leaderboard report
Graph Classification PROTEINS GATv2 Accuracy 77.679±2.187 #28 of 103 Archive leaderboard report
Graph Regression ESR2 GATv2 R2 0.655±0.000 #6 of 9 Archive leaderboard report
Graph Regression ESR2 GATv2 RMSE 0.518±0.655 #6 of 9 Archive leaderboard report
Graph Regression F2 GATv2 R2 0.885±0.000 #6 of 9 Archive leaderboard report
Graph Regression F2 GATv2 RMSE 0.344±0.885 #6 of 9 Archive leaderboard report
Graph Regression KIT GATv2 R2 0.826±0.000 #6 of 9 Archive leaderboard report
Graph Regression KIT GATv2 RMSE 0.453±0.826 #6 of 9 Archive leaderboard report
Graph Regression Lipophilicity GATv2 R2 0.821±0.009 #2 of 23 Archive leaderboard report
Graph Regression Lipophilicity GATv2 RMSE 0.534±0.014 #2 of 23 Archive leaderboard report
Graph Regression PARP1 GATv2 R2 0.919±0.000 #6 of 9 Archive leaderboard report
Graph Regression PARP1 GATv2 RMSE 0.356±0.919 #6 of 9 Archive leaderboard report
Graph Regression PGR GATv2 R2 0.666±0.000 #7 of 9 Archive leaderboard report
Graph Regression PGR GATv2 RMSE 0.558±0.666 #7 of 9 Archive leaderboard report
Graph Regression ZINC-full GATv2 Test MAE 0.079±0.004 #17 of 19 Archive leaderboard report
Molecular Property Prediction ESOL GATv2 R2 0.928±0.005 #7 of 20 Archive leaderboard report
Molecular Property Prediction ESOL GATv2 RMSE 0.549±0.020 #7 of 20 Archive leaderboard report
Molecular Property Prediction FreeSolv GATv2 R2 0.970±0.007 #3 of 22 Archive leaderboard report
Molecular Property Prediction FreeSolv GATv2 RMSE 0.676±0.081 #3 of 22 Archive leaderboard report
Node Property Prediction ogbn-arxiv GIANT+XRT+GATv2 Ext. data Yes #26 of 86 Archive leaderboard report
Node Property Prediction ogbn-arxiv GIANT+XRT+GATv2 Number of params 207520 #26 of 86 Archive leaderboard report
Node Property Prediction ogbn-arxiv GIANT+XRT+GATv2 Test Accuracy 0.7415 ± 0.0005 #26 of 86 Archive leaderboard report
Node Property Prediction ogbn-arxiv GIANT+XRT+GATv2 Validation Accuracy 0.7527 ± 0.0008 #26 of 86 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: GATv2

GATv2

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections