SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2105.14491 · ICLR · 2022

How Attentive are Graph Attention Networks?

Uri Alon, Eran Yahav, Shaked Brody

arXiv · PDF · Open in the Atlas

Code that ran

11 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 7 have no contract verdict; 1 failure of our instrument; 5 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2105.14491.json · badge: /api/ran/2105.14491.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
rusty1s/pytorch_geometric canonical (classifier label)
classifier basis: census
4 ran · 4 no recorded run
tensorflow/gnn community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
labmlai/annotated_deep_learning_paper_implementations community
Papers with Code archive
2 ran · 0 no recorded run
mahequn001/graphlearning community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
machadoprx/GATv2-TensorFlow2 community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
GATv2 Ran
ran on a synthesized input · constructed an object; no result was computed
labmlai/annotated_deep_learning_paper_implementations/labml_nn/graphs/gatv2/experiment.py
code served (permissive licence) · get_code("365d918744e8f7d5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, GATv2: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Small parameters for the GATv2 model
in_features = 4
n_hidden = 6
n_classes = 3
n_heads = 2
dropout = 0.3
share_weights = True

ARGS = {
    'in_features': in_features,
    'n_hidden': n_hidden,
    'n_classes': n_classes,
    'n_heads': n_heads,
    'dropout': dropout,
    'share_weights': share_weights,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type GATv2 — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GATv2 output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
GraphAttentionV2Layer Ran
ran on a synthesized input
labmlai/annotated_deep_learning_paper_implementations/labml_nn/graphs/gatv2/experiment.py
code served (permissive licence) · get_code("d6b15de3f7df93c6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

class GraphAttentionV2Layer(nn.Module):
    """
    ## Graph attention v2 layer
    This is a single graph attention v2 layer.
    A GATv2 is made up of multiple such layers.
    It takes
    $$\\mathbf{h} = \\{ \\overrightarrow{h_1}, \\overrightarrow{h_2}, \\dots, \\overrightarrow{h_N} \\}$$,
    where $\\overrightarrow{h_i} \\in \\mathbb{R}^F$ as input
    and outputs
    $$\\mathbf{h'} = \\{ \\overrightarrow{h'_1}, \\overrightarrow{h'_2}, \\dots, \\overrightarrow{h'_N} \\}$$,
    where $\\overrightarrow{h'_i} \\in \\mathbb{R}^{F'}$.
    """

    def __init__(self, in_features: int, out_features: int, n_heads: int, is_concat: bool=True, dropout: float=0.6, leaky_relu_negative_slope: float=0.2, share_weights: bool=False):
        """
        * `in_features`, $F$, is the number of input features per node
        * `out_features`, $F'$, is the number of output features per node
        * `n_heads`, $K$, is the number of attention heads
        * `is_concat` whether the multi-head results should be concatenated or averaged
        * `dropout` is the dropout probability
        * `leaky_relu_negative_slope` is the negative slope for leaky relu activation
        * `share_weights` if set to `True`, the same matrix will be applied to the source and the target node of every edge
        """
        super().__init__()
        self.is_concat = is_concat
        self.n_heads = n_heads
        self.share_weights = share_weights
        if is_concat:
            assert out_features % n_heads == 0
            self.n_hidden = out_features // n_heads
        else:
            self.n_hidden = out_features
        self.linear_l = nn.Linear(in_features, self.n_hidden * n_heads, bias=False)
        if share_weights:
            self.linear_r = self.linear_l
        else:
            self.linear_r = nn.Linear(in_features, self.n_hidden * n_heads, bias=False)
        self.attn = nn.Linear(self.n_hidden, 1, bias=False)
        self.activation = nn.LeakyReLU(negative_slope=leaky_relu_negative_slope)
        self.softmax = nn.Softmax(dim=1)
        self.dropout = nn.Dropout(dropout)

    def forward(self, h: torch.Tensor, adj_mat: torch.Tensor):
        """
        * `h`, $\\mathbf{h}$ is the input node embeddings of shape `[n_nodes, in_features]`.
        * `adj_mat` is the adjacency matrix of shape `[n_nodes, n_nodes, n_heads]`.
        We use shape `[n_nodes, n_nodes, 1]` since the adjacency is the same for each head.
        Adjacency matrix represent the edges (or connections) among nodes.
        `adj_mat[i][j]` is `True` if there is an edge from node `i` to node `j`.
        """
        n_nodes = h.shape[0]
        g_l = self.linear_l(h).view(n_nodes, self.n_heads, self.n_hidden)
        g_r = self.linear_r(h).view(n_nodes, self.n_heads, self.n_hidden)
        g_l_repeat = g_l.repeat(n_nodes, 1, 1)
        g_r_repeat_interleave = g_r.repeat_interleave(n_nodes, dim=0)
        g_sum = g_l_repeat + g_r_repeat_interleave
        g_sum = g_sum.view(n_nodes, n_nodes, self.n_heads, self.n_hidden)
        e = self.attn(self.activation(g_sum))
        e = e.squeeze(-1)
        assert adj_mat.shape[0] == 1 or adj_mat.shape[0] == n_nodes
        assert adj_mat.shape[1] == 1 or adj_mat.shape[1] == n_nodes
        assert adj_mat.shape[2] == 1 or adj_mat.shape[2] == self.n_heads
        e = e.masked_fill(adj_mat == 0, float('-inf'))
        a = self.softmax(e)
        a = self.dropout(a)
        attn_res = torch.einsum('ijh,jhf->ihf', a, g_r)
        if self.is_concat:
            return attn_res.reshape(n_nodes, self.n_heads * self.n_hidden)
        else:
            return attn_res.mean(dim=1)


INIT_ARGS = {
    'in_features': 4,
    'out_features': 8,
    'n_heads': 2,
    'is_concat': True,
    'dropout': 0.1,
    'leaky_relu_negative_slope': 0.2,
    'share_weights': False,
}

ARGS = {
    'h': torch.randn(3, 4),
    'adj_mat': torch.ones(3, 3, 1, dtype=torch.bool),
}

if __name__ == '__main__':
    layer = GraphAttentionV2Layer(**INIT_ARGS)
    output = layer(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: [3, 8]")
    assert output.shape == (3, 8), f"Shape mismatch: got {output.shape}, expected (3, 8)"
    print("Success!")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
get_auc_score Ran
ran on a synthesized input
mahequn001/graphlearning/model_zoo/gae/util.py
code served (permissive licence) · get_code("49bec40bd43ba73d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small adjacency reconstruction matrix (node x node)
# This represents link prediction scores
np.random.seed(0)
num_nodes = 5
adj_rec = np.random.randn(num_nodes, num_nodes)

# Create positive edges (pairs of nodes)
edges_pos = np.array([
    [0, 1],
    [2, 3],
    [1, 4]
])

# Create negative edges (same number as positive)
edges_neg = np.array([
    [0, 2],
    [1, 3],
    [2, 4]
])

ARGS = {
    "adj_rec": adj_rec,
    "edges_pos": edges_pos,
    "edges_neg": edges_neg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_num_clusters Ran
ran, honoured the contract we drafted
rusty1s/pytorch_geometric/torch_geometric/datasets/hydro_net.py
code served (permissive licence) · get_code("7080188a5f04e65f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os.path as osp
import tempfile
import os

# Create a temporary directory and file with a name matching the expected pattern
temp_dir = tempfile.mkdtemp()
test_filepath = osp.join(temp_dir, "c42_clusters_data.txt")

# Create the file so it exists
with open(test_filepath, 'w') as f:
    f.write("test")

ARGS = {
    "filepath": test_filepath
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
map_annotation Ran
ran; our contract draft was wrong, not the code
rusty1s/pytorch_geometric/torch_geometric/config_store.py
code served (permissive licence) · get_code("0a76eaa4d06d2d91")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned _UnionGenericAlias. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
from dataclasses import dataclass, is_dataclass

torch.manual_seed(0)

# Mock the dataclass_from_class function that's referenced in the code
def dataclass_from_class(annotation):
    """Mock function - returns None for most inputs"""
    return None

# Test with various annotation types
@dataclass
class SampleDataclass:
    field1: int
    field2: str

# Create a simple generic annotation
test_annotation = List[int]

# Create a mapping dict
test_mapping = {
    int: str,
    float: bool,
}

ARGS = {
    "annotation": Union[int, str],
    "mapping": {int: str, float: bool, str: list}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _UnionGenericAlias — a _UnionGenericAlias output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _UnionGenericAlias output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pop_by_prefix Ran
ran on a synthesized input
tensorflow/gnn/tensorflow_gnn/graph/dict_utils.py
code served (permissive licence) · get_code("1ede5ca46a7df870")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

# Setup code for pop_by_prefix function

# The function takes:
# 1. d: MutableMapping[str, Any] - a mutable mapping (dict-like object)
# 2. key_prefix: str - a string prefix to filter keys

# Looking at the function body:
# - It iterates over d.keys()
# - It checks if each key starts with key_prefix using startswith()
# - It pops items from d and stores them in popped dict
# - The key in popped is the original key with the prefix removed

# Create a test dictionary with various keys
test_dict = {
    "model_weight": 0.5,
    "model_bias": 0.1,
    "model_lr": 0.001,
    "optimizer_momentum": 0.9,
    "optimizer_weight_decay": 1e-4,
    "other_param": 42,
}

# Create arguments for the function
ARGS = {
    "d": test_dict,
    "key_prefix": "model_",
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
read_energy Ran
ran, honoured the contract we drafted
rusty1s/pytorch_geometric/torch_geometric/datasets/hydro_net.py
code served (permissive licence) · get_code("37b2364ea0f56557")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import tempfile
import os

# Create a temporary file with test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_energy.txt")

# Write test data to the file
# For chunk_size=13 (since 13-2=11), we need data formatted appropriately
# The function checks if chunk_size - 2 == 11 * 3 = 33
# So chunk_size would need to be 35 for that condition
# Let's use chunk_size=13 to test the else branch

chunk_size = 13

# Write data that will be read with skiprows logic
# skipatoms returns True for rows to skip: (i-1) % chunk_size != 0
# So rows 1, 14, 27, etc. (i=1, 14, 27...) are kept (when (i-1) % chunk_size == 0)
with open(temp_file, 'w') as f:
    for i in range(1, 50):
        if (i - 1) % chunk_size == 0:
            # These rows are kept
            f.write(f"label_{i} 3.14\n")
        else:
            # These rows are skipped
            f.write(f"skip_{i} 1.0\n")

ARGS = {
    "file": temp_file,
    "chunk_size": chunk_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
to_edge_list Ran
ran on a synthesized input
tensorflow/gnn/tensorflow_gnn/converters/networkx_io.py
code served (permissive licence) · get_code("1457b037fb82f82e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import collections
import numpy as np

class MockNodeSet:
    def __init__(self, size, node_set_name):
        self.sizes = [size]
        self.features = {}
        self.node_set_name = node_set_name
    
    def __getitem__(self, key):
        if key == '#id':
            return self.features.get('#id', [])
        return None

class MockTensor:
    def __init__(self, value):
        self.value = value
    
    def numpy(self):
        return np.array([self.value])

class MockAdjacency:
    def __init__(self, source_name, target_name, sources, targets):
        self.source_name = source_name
        self.target_name = target_name
        self.source = MockSourceTarget(sources)
        self.target = MockSourceTarget(targets)

class MockSourceTarget:
    def __init__(self, values):
        self.values = values
    
    def numpy(self):
        return np.array(self.values)

class MockEdgeSet:
    def __init__(self, source_name, target_name, sources, targets):
        self.adjacency = MockAdjacency(source_name, target_name, sources, targets)

class MockGraphTensor:
    def __init__(self):
        self.node_sets = collections.OrderedDict()
        self.edge_sets = collections.OrderedDict()

tf_gnn_graph = MockGraphTensor()

node_set_1 = MockNodeSet(size=3, node_set_name='user')
node_set_2 = MockNodeSet(size=2, node_set_name='item')

tf_gnn_graph.node_sets['item'] = node_set_2
tf_gnn_graph.node_sets['user'] = node_set_1

edge_set = MockEdgeSet(
    source_name='user',
    target_name='item',
    sources=[0, 1, 2],
    targets=[0, 1, 0]
)
tf_gnn_graph.edge_sets['purchase'] = edge_set

ARGS = {
    'tf_gnn_graph': tf_gnn_graph
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
to_networkx_graph Ran
ran on a synthesized input
tensorflow/gnn/tensorflow_gnn/converters/networkx_io.py
code served (permissive licence) · get_code("abf6cd02b673f7f8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned MultiDiGraph. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import collections
import numpy as np

# Create a minimal mock GraphTensor that satisfies the function's interface
class MockNodeSet:
    def __init__(self, size, node_ids=None):
        self.sizes = [size]
        self.features = {}
        if node_ids is not None:
            self.features['#id'] = node_ids
    
    def __getitem__(self, key):
        return self.features.get(key, [])

class MockTensor:
    def __init__(self, value):
        self.value = value
    
    def numpy(self):
        return np.array([self.value])

class MockAdjacency:
    def __init__(self, source_name, target_name, sources, targets):
        self.source_name = source_name
        self.target_name = target_name
        self.source = MockSourceTarget(sources)
        self.target = MockSourceTarget(targets)

class MockSourceTarget:
    def __init__(self, values):
        self.values = values
    
    def numpy(self):
        return np.array(self.values)

class MockEdgeSet:
    def __init__(self, source_name, target_name, sources, targets):
        self.adjacency = MockAdjacency(source_name, target_name, sources, targets)

class MockGraphTensor:
    def __init__(self):
        # Create two node sets
        self.node_sets = {
            'user': MockNodeSet(2),
            'item': MockNodeSet(3)
        }
        
        # Create one edge set connecting users to items
        self.edge_sets = {
            'follows': MockEdgeSet('user', 'item', [0, 1, 0], [0, 1, 2])
        }

ARGS = {
    'tf_gnn_graph': MockGraphTensor()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
absl, networkx, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MultiDiGraph — a MultiDiGraph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MultiDiGraph output the recorded ndim 1 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
use_segment_matmul_heuristic Ran
ran, violated the contract we drafted
rusty1s/pytorch_geometric/torch_geometric/backend.py
code served (permissive licence) · get_code("c19c99d92c84e9b8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "num_segments": 100,
    "max_segment_size": 256,
    "in_channels": 64,
    "out_channels": 32,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
with_key_prefix Ran
ran on a synthesized input
tensorflow/gnn/tensorflow_gnn/graph/dict_utils.py
code served (permissive licence) · get_code("36972132fe777084")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from typing import Any, Dict, Mapping

torch.manual_seed(0)

# The function takes a Mapping[str, Any] and a str key_prefix
# It returns a dict with all keys prefixed by key_prefix

# Create a simple mapping with various value types
d = {
    "name": "test",
    "value": 42,
    "tensor": torch.randn(2, 4),
    "list": [1, 2, 3],
    "nested": {"a": 1, "b": 2}
}

key_prefix = "prefix_"

ARGS = {
    "d": d,
    "key_prefix": key_prefix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
GATv2SelfAttention Not yet run
unverified (harvested, no recorded run)
machadoprx/GATv2-TensorFlow2/gatv2_layer.py
pointer only (licence: NONE) · get_code("56cb5f68019f62a7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, machadoprx/GATv2-TensorFlow2 when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

compile Not yet run
unverified (harvested, no recorded run)
rusty1s/pytorch_geometric/torch_geometric/_compile.py
code served (permissive licence) · get_code("a56e8eaabb61634b")
How it ran

no invocation recorded.

read_atoms Not yet run
unverified (harvested, no recorded run)
rusty1s/pytorch_geometric/torch_geometric/datasets/hydro_net.py
code served (permissive licence) · get_code("8349c934df099399")
How it ran

no invocation recorded.

safe_onnx_export Not yet run
unverified (harvested, no recorded run)
rusty1s/pytorch_geometric/torch_geometric/_onnx.py
code served (permissive licence) · get_code("51ea4acdfd945732")
How it ran

no invocation recorded.

to_dataclass Not yet run
unverified (harvested, no recorded run)
rusty1s/pytorch_geometric/torch_geometric/config_store.py
code served (permissive licence) · get_code("977c76c93dace67a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 8 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 8 later) and 8 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
compile 1 other paper
1 later
2606.17022 (2026-06)
Learning the Geometry of Data: A Mathematical Review of Shape Space Analysis
get_num_clusters 1 other paper
1 later
2606.17022 (2026-06)
Learning the Geometry of Data: A Mathematical Review of Shape Space Analysis
map_annotation 1 other paper
1 later
2606.17022 (2026-06)
Learning the Geometry of Data: A Mathematical Review of Shape Space Analysis
read_atoms 1 other paper
1 later
2606.17022 (2026-06)
Learning the Geometry of Data: A Mathematical Review of Shape Space Analysis
read_energy 1 other paper
1 later
2606.17022 (2026-06)
Learning the Geometry of Data: A Mathematical Review of Shape Space Analysis
safe_onnx_export 1 other paper
1 later
2606.17022 (2026-06)
Learning the Geometry of Data: A Mathematical Review of Shape Space Analysis
to_dataclass 1 other paper
1 later
2606.17022 (2026-06)
Learning the Geometry of Data: A Mathematical Review of Shape Space Analysis
use_segment_matmul_heuristic 1 other paper
1 later
2606.17022 (2026-06)
Learning the Geometry of Data: A Mathematical Review of Shape Space Analysis

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2105.14491")
get_code_for_paper("2105.14491")
have("2105.14491")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2105.14491.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2105.14491.svg)](https://syntology.ai/paper/2105.14491)

Connect an agent — have() is free.