SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2511.08028 · NeurIPS · 2025

Generalizable Insights for Graph Transformers in Theory and Practice

Christopher Morris, Luis Müller, Timo Stoll

arXiv · PDF · Open in the Atlas

Code that ran

9 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 7 failures of our instrument; 1 no recorded run), measured 2026-11-21; 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/2511.08028.json · badge: /api/ran/2511.08028.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
GraphPKU/BREC canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
add_x Ran
ran; our contract draft was wrong, not the code
GraphPKU/BREC/SparseWL/neural_higher_order/BREC/BRECDataset_v3_3wl.py
code served (permissive licence) · get_code("1faf842417b2551e")
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 Data. 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

torch.manual_seed(0)

class Data:
    def __init__(self, num_nodes):
        self.num_nodes = num_nodes
        self.x = None

data = Data(num_nodes=2)

ARGS = {
    "data": data
}
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 Data — a Data output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Data 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
add_x Ran
ran; our contract draft was wrong, not the code
GraphPKU/BREC/GNNAsKernel/BRECDataset_v3.py
code served (permissive licence) · get_code("e9338dcfe790cb42")
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 MockData. 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

torch.manual_seed(0)

class MockData:
    def __init__(self, num_nodes):
        self.num_nodes = num_nodes
        self.x = None

data = MockData(num_nodes=2)

ARGS = {
    "data": data
}
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 MockData — a MockData output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockData 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
center_pool Ran
ran; our contract draft was wrong, not the code
GraphPKU/BREC/I2GNN/count_models.py
code served (permissive licence) · get_code("33d9138581ad51f0")
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 Tensor, ndim 2, dtype family float, shape (3, 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 torch
import numpy as np

torch.manual_seed(0)

# x should be a tensor that supports indexing with a numpy array
x = torch.randn(5, 4)

# node_to_subgraph should be a torch tensor that can be moved to CPU and converted to numpy
# It should contain subgraph indices for each node
node_to_subgraph = torch.tensor([0, 0, 1, 1, 2], dtype=torch.long)

ARGS = {
    "x": x,
    "node_to_subgraph": node_to_subgraph
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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, shape (3, 4) — shape (3, 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
choose_activation Ran
ran; our contract draft was wrong, not the code
GraphPKU/BREC/GSN/models_misc.py
code served (permissive licence) · get_code("8cece8d22b52bc54")
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) and returned ReLU. 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)

ARGS = {
    'activation': 'relu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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
get_node_idx Ran
ran, honoured the contract we drafted
GraphPKU/BREC/SUN/models.py
code served (permissive licence) · get_code("fd75ed3af6526291")
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 Tensor, ndim 1, dtype family int, shape (9,) 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)

class BatchedData:
    def __init__(self):
        # num_nodes_per_subgraph: tensor of counts per subgraph
        self.num_nodes_per_subgraph = torch.tensor([3, 2, 4], dtype=torch.long)
        
        # batch: tensor mapping each node to its subgraph index
        # Total nodes: 3 + 2 + 4 = 9 nodes
        self.batch = torch.tensor([0, 0, 0, 1, 1, 2, 2, 2, 2], dtype=torch.long)
        
        # subgraph_node_idx: local node indices within each subgraph
        self.subgraph_node_idx = torch.tensor([0, 1, 2, 0, 1, 0, 1, 2, 3], dtype=torch.long)

batched_data = BatchedData()

ARGS = {
    "batched_data": batched_data
}
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 Tensor, ndim 1, dtype family int, shape (9,) — shape (9,) 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
get_subgraph_idx Ran
ran, honoured the contract we drafted
GraphPKU/BREC/SUN/models.py
code served (permissive licence) · get_code("8cd80e01b2bc14dc")
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 Tensor, ndim 1, dtype family int, shape (5,) 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)

class BatchedData:
    def __init__(self):
        # num_subgraphs: tensor of counts per graph
        self.num_subgraphs = torch.tensor([2, 3], dtype=torch.long)
        
        # batch: indices mapping nodes to graphs
        # We need 5 nodes total (2+3 from num_subgraphs)
        self.batch = torch.tensor([0, 0, 1, 1, 1], dtype=torch.long)
        
        # subgraph_batch: indices within each subgraph
        # Same length as batch
        self.subgraph_batch = torch.tensor([0, 1, 0, 1, 2], dtype=torch.long)

batched_data = BatchedData()

ARGS = {
    "batched_data": batched_data
}
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 Tensor, ndim 1, dtype family int, shape (5,) — shape (5,) 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
graph6_to_pyg Ran
ran; our contract draft was wrong, not the code
GraphPKU/BREC/ProvablyPowerfulGraphNetworks_torch/BRECDataset_v3.py
code served (permissive licence) · get_code("513e5ba0da199b50")
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 Data. 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 networkx as nx
from torch_geometric.utils.convert import from_networkx, to_networkx

torch.manual_seed(0)

# Create a simple graph in graph6 format
# graph6 format is a compact representation of graphs
# We'll create a small graph and encode it to bytes
simple_graph = nx.Graph()
simple_graph.add_edges_from([(0, 1), (1, 2), (2, 0)])

# Convert to graph6 bytes format
graph6_bytes = nx.to_graph6_bytes(simple_graph, header=False)

ARGS = {
    "x": graph6_bytes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, torch, torch_geometric — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Data — a Data 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
graph6_to_pyg Ran
ran; our contract draft was wrong, not the code
GraphPKU/BREC/SparseWL/neural_higher_order/BREC/BRECDataset_v3_3wl.py
code served (permissive licence) · get_code("0d66a182b2d21b13")
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 Data. 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 networkx as nx
from torch_geometric.utils.convert import from_networkx

torch.manual_seed(0)

# Create a simple graph in graph6 format
# graph6 format is a compact representation of graphs
# We'll create a small graph and convert it to graph6 bytes

# Create a simple NetworkX graph
simple_graph = nx.Graph()
simple_graph.add_edges_from([(0, 1), (1, 2), (2, 0)])

# Convert to graph6 string, then to bytes
graph6_string = nx.to_graph6_bytes(simple_graph, header=False)

# This is our input: graph6 bytes representation
x = graph6_string

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx, torch, torch_geometric — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Data — a Data 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
update_cfg Ran
ran; our contract draft was wrong, not the code
GraphPKU/BREC/GNNAsKernel/core/config.py
code served (permissive licence) · get_code("ac9535cc854a350e")
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 CfgNode. 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.

from yacs.config import CfgNode as CN
import argparse
import os

# Create the initial config
cfg_init = CN()

# Define ARGS dictionary with all parameters for update_cfg
ARGS = {
    'cfg': cfg_init,
    'args_str': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yacs — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CfgNode — a CfgNode output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CfgNode 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
get_root_idx Not yet run
unverified (harvested, no recorded run)
GraphPKU/BREC/SUN/models.py
code served (permissive licence) · get_code("831d6722f61aac8f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 0 later) and 0 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
update_cfg 8 other papers
8 dated earlier
2110.03753 (2021-10)
From Stars to Subgraphs: Uplifting Any GNN with Local Structure Awareness
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness
2305.19523 (2023-05)
Harnessing Explanations: LLM-to-LM Interpreter for Enhanced Text-Attributed Graph Representation Learning
and 5 more not named here
choose_activation 3 other papers
3 dated earlier
2107.01952 (2021-07)
Partition and Code: learning how to compress graphs
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness
2402.08595 (2024-02)
Homomorphism Counts for Graph Neural Networks: All About That Basis
get_node_idx 2 other papers
2 dated earlier
2206.11140 (2022-06)
Understanding and Extending Subgraph GNNs by Rethinking Their Symmetries
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness
get_root_idx 2 other papers
2 dated earlier
2206.11140 (2022-06)
Understanding and Extending Subgraph GNNs by Rethinking Their Symmetries
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness
graph6_to_pyg 2 other papers
2 dated earlier
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness
2402.08595 (2024-02)
Homomorphism Counts for Graph Neural Networks: All About That Basis
add_x 1 other paper
1 dated earlier
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness
add_x 1 other paper
1 dated earlier
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness
center_pool 1 other paper
1 dated earlier
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness
get_subgraph_idx 1 other paper
1 dated earlier
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness

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-21.

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 transformers (GTs) have shown strong empirical performance, yet current architectures vary widely in their use of attention mechanisms, positional embeddings (PEs), and expressivity. Existing expressivity results are often tied to specific design choices and lack comprehensive empirical validation on large-scale data. This leaves a gap between theory and practice, preventing generalizable insights that exceed particular application domains. Here, we propose the Generalized-Distance Transformer (GDT), a GT architecture based on standard attention that incorporates many recent advancements for GTs, and we develop a fine-grained understanding of the GDT's representation power in terms of attention and PEs. Through extensive experiments, we identify design choices that consistently perform well across various applications, tasks, and model scales, demonstrating strong performance in a few-shot transfer setting without fine-tuning. Our evaluation covers over eight million graphs with roughly 270M tokens across diverse domains, including image-based object detection, molecular property prediction, code summarization, and out-of-distribution algorithmic reasoning. We distill our theoretical and practical findings into several generalizable insights about effective GT design, training, and inference.

For agents

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

get_harvested_code_for_paper("2511.08028")
get_code_for_paper("2511.08028")
have("2511.08028")

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

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

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

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

Connect an agent — have() is free.