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 ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

The archive's official repository (tech-srl/how_attentive_are_gats) was not harvested; the 16 samples below come from 5 community repositories.

Syntology 16 code samples harvested from 5 repositories linked to this paper: 11 ran (of which 1 constructed an object rather than computing a result; 10 with no instrument failure: 2 honoured, 0 violated, 8 with no contract checked; 1 where Syntology's instrument failed) · 5 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 16 samples from 5 repositories, 11 ran (10 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

tech-srl/how_attentive_are_gats officialmentioned in papermentioned on GitHubpytorchSyntology: not harvested report
briangodwinlim/sir-gcn mentioned on GitHubpytorchCC-BY-4.0Syntology: not harvested report
machadoprx/GATv2-TensorFlow2 mentioned on GitHubtfSyntology: 1 sample, 0 ran · 1 unverified report
dmlc/dgl pytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to node2vec: Scalable Feature Learning for Networks (arXiv:1607.00653; that paper's own run record: 15 ran (of which 2 constructed an object rather than computing a result; 12 with no instrument failure: 2 honoured, 0 violated, 10 with no contract checked; 3 where Syntology's instrument failed) · 10 unverified), Interaction Networks for Learning about Objects, Relations and Physics (arXiv:1612.00222; that paper's own run record: 6 ran (of which 6 constructed an object rather than computing a result; 6 with no instrument failure: 0 honoured, 0 violated, 6 with no contract checked; 0 where Syntology's instrument failed) · 2 unverified; every one of the 6 samples that ran constructed an object rather than computing a result), Junction Tree Variational Autoencoder for Molecular Graph Generation (arXiv:1802.04364; that paper's own run record: 1 ran (of which 1 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified; the one sample that ran constructed an object rather than computing a result) and 3 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
labmlai/annotated_deep_learning_paper_implementations pytorchSyntology: 2 samples, 2 ran (0 instrument-failed) · 0 unverified report
mahequn001/graphlearning mindsporeSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
rusty1s/pytorch_geometric pytorchSyntology: 8 samples, 4 ran (1 instrument-failed) · 4 unverified report
tensorflow/gnn tfApache-2.0Syntology: 4 samples, 4 ran (0 instrument-failed) · 0 unverified 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

16 samples harvested: 11 ran (of which 1 constructed an object rather than computing a result; 10 with no instrument failure: 2 honoured, 0 violated, 8 with no contract checked; 1 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · honoured contract
1ran · our draft was wrong
8ran
5unverified

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; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

machadoprx/GATv2-TensorFlow2 community (archive-listed) 1 sample, 0 ran · 1 unverified
GATv2SelfAttention gatv2_layer.py unverified no licence file found · pointer only · 56cb5f68019f62a7 · report
labmlai/annotated_deep_learning_paper_implementations community (archive-listed) 2 samples, 2 ran (0 instrument-failed) · 0 unverified
GATv2 labml_nn/graphs/gatv2/experiment.py ran · metamorphic tier: deterministic MIT (permissive) · 365d918744e8f7d5 · report fixture: returned GATv2 · level recorded 2026-09-22
GraphAttentionV2Layer labml_nn/graphs/gatv2/experiment.py ran MIT (permissive) · d6b15de3f7df93c6 · report fixture: signature h:Tensor/2/float, adj_mat:Tensor/3/bool · returned Tensor · level recorded 2026-09-24
mahequn001/graphlearning community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
get_auc_score model_zoo/gae/util.py ran Apache-2.0 (permissive) · 49bec40bd43ba73d · report fixture: signature adj_rec:ndarray/2/float, edges_pos:ndarray/2/int, edges_neg:ndarray/2/int · returned tuple · level recorded 2026-09-24
rusty1s/pytorch_geometric community (archive-listed) 8 samples, 4 ran (1 instrument-failed) · 4 unverified
get_num_clusters torch_geometric/datasets/hydro_net.py ran · honoured contract MIT (permissive) · 7080188a5f04e65f · report fixture: signature filepath:str/0/str · returned int · level recorded 2026-09-24
map_annotation torch_geometric/config_store.py ran · our draft was wrong MIT (permissive) · 0a76eaa4d06d2d91 · report fixture: signature annotation:callable/0/?, mapping:dict/0/? · returned _UnionGenericAlias · level recorded 2026-09-24
read_energy torch_geometric/datasets/hydro_net.py ran · honoured contract MIT (permissive) · 37b2364ea0f56557 · report fixture: signature file:str/0/str, chunk_size:int/0/int · returned ndarray · level recorded 2026-09-24
use_segment_matmul_heuristic torch_geometric/backend.py ran MIT (permissive) · c19c99d92c84e9b8 · report fixture: signature num_segments:int/0/int, max_segment_size:int/0/int, in_channels:int/0/int, out_channels:int/0/int · returned bool · level recorded 2026-09-24
compile in 5 papers torch_geometric/_compile.py unverified MIT (permissive) · a56e8eaabb61634b · report
read_atoms torch_geometric/datasets/hydro_net.py unverified MIT (permissive) · 8349c934df099399 · report
safe_onnx_export torch_geometric/_onnx.py unverified MIT (permissive) · 51ea4acdfd945732 · report
to_dataclass torch_geometric/config_store.py unverified MIT (permissive) · 977c76c93dace67a · report
tensorflow/gnn community (archive-listed) 4 samples, 4 ran (0 instrument-failed) · 0 unverified
pop_by_prefix tensorflow_gnn/graph/dict_utils.py ran Apache-2.0 (permissive) · 1ede5ca46a7df870 · report fixture: signature d:dict/0/?, key_prefix:str/0/str · returned dict · level recorded 2026-09-24
to_edge_list tensorflow_gnn/converters/networkx_io.py ran Apache-2.0 (permissive) · 1457b037fb82f82e · report fixture: signature tf_gnn_graph:MockGraphTensor/0/? · returned tuple · level recorded 2026-09-24
to_networkx_graph tensorflow_gnn/converters/networkx_io.py ran Apache-2.0 (permissive) · abf6cd02b673f7f8 · report fixture: signature tf_gnn_graph:MockGraphTensor/0/? · returned MultiDiGraph · level recorded 2026-09-24
with_key_prefix tensorflow_gnn/graph/dict_utils.py ran Apache-2.0 (permissive) · 36972132fe777084 · report fixture: signature d:dict/0/?, key_prefix:str/0/str · returned dict · level recorded 2026-09-24

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.

2 assemblies on this paper: 2 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).

2 sibling assemblies for GATv2 (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for GATv2 (graph method: GATv2). 2 bricks; individually on a fixture: 2 ran (of which 1 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified. The assembly has not been run end-to-end.

one of 2 siblings

  1. GATv2 entry · level 1 · ran · 365d918744e8f7d5
  2. GraphAttentionV2Layer helper · level 1 · ran · d6b15de3f7df93c6

harvested Assembly for GATv2 (graph method: GATv2). 1 brick; individually on a fixture: 0 ran · 1 unverified. The assembly has not been run end-to-end.

one of 2 siblings

  1. GATv2SelfAttention entry · level 0 · unverified · 56cb5f68019f62a7

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2105.14491") returns these assemblies with each brick's role and wiring (how to connect).

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