SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2205.12454 · NeurIPS · 2022

Recipe for a General, Powerful, Scalable Graph Transformer

Dominique Beaini, Anh Luu, Mikhail Galkin, Ladislav Rampášek, Vijay Dwivedi, Guy Mila

arXiv · PDF · Open in the Atlas

Code that ran

3 of 21 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; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 2 failures of our instrument; 18 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/2205.12454.json · badge: /api/ran/2205.12454.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
graphcore/ogb-lsc-pcqm4mv2 community
Papers with Code archive
3 ran · 18 no recorded run
FunctionStatusWhere it lives
_scatter_min Ran
ran; our contract draft was wrong, not the code
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("23d181463d883ce2")
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 EagerTensor, ndim 2, dtype family float, shape (2, 3) 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 tensorflow as tf
import types as _types

# Create a minimal xpu namespace with a grouped_scatter_max function
def dummy_grouped_scatter_max(data, indices, table_size=None, backwards_mode='sum'):
    # Simulate scatter_max operation
    batch_size = data.shape[0]
    result = []
    for i in range(batch_size):
        segmented = tf.math.unsorted_segment_max(data[i], indices[i], num_segments=table_size)
        result.append(segmented)
    return tf.stack(result)

xpu = _types.SimpleNamespace(
    grouped_scatter_max=dummy_grouped_scatter_max,
    DummyScope=None,
    DummyStrategy=None,
    call_outlined_function=None,
    configure_and_get_strategy=None
)

# Build test data
batch_size = 2
data_dim = 4
num_segments = 3

# Create data tensor: shape [batch_size, data_dim]
data = tf.constant([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=tf.float32)

# Create indices tensor: shape [batch_size, data_dim]
# indices should be in range [0, num_segments)
indices = tf.constant([
    [0, 1, 2, 0],
    [1, 2, 0, 1]
], dtype=tf.int32)

ARGS = {
    'data': data,
    'indices': indices,
    'num_segments': num_segments,
    'gather_scatter_method': 'debug',
    'backwards_mode': 'sum'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
_scatter_sum Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("734d560a1dc6e70b")
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 EagerTensor, ndim 3, dtype family float, shape (2, 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 tensorflow as tf
import types as _types

# Create a minimal xpu namespace with grouped_scatter_sum
class DummyXPU:
    @staticmethod
    def grouped_scatter_sum(data, indices, table_size):
        # Simple implementation: for each segment, sum the corresponding data rows
        batch_size = tf.shape(data)[0]
        output_shape = [batch_size, table_size, tf.shape(data)[-1]]
        result = tf.zeros(output_shape, dtype=data.dtype)
        
        for b in range(data.shape[0]):
            for i in range(tf.shape(indices[b])[0]):
                seg_idx = indices[b][i]
                result = tf.tensor_scatter_nd_add(
                    result,
                    [[b, seg_idx]],
                    [data[b][i]]
                )
        return result

xpu = DummyXPU()

# Create small test tensors
# batch_size=2, num_elements=3, feature_dim=4
data = tf.constant([
    [[1.0, 2.0, 3.0, 4.0],
     [5.0, 6.0, 7.0, 8.0],
     [9.0, 10.0, 11.0, 12.0]],
    [[2.0, 3.0, 4.0, 5.0],
     [6.0, 7.0, 8.0, 9.0],
     [10.0, 11.0, 12.0, 13.0]]
], dtype=tf.float32)

# indices: batch_size=2, num_elements=3 (each pointing to segment 0, 1, or 2)
indices = tf.constant([
    [0, 1, 2],
    [1, 2, 0]
], dtype=tf.int32)

num_segments = 3

ARGS = {
    'data': data,
    'indices': indices,
    'num_segments': num_segments,
    'gather_scatter_method': 'debug',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 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
generate_dropout_seed Ran
ran on a synthesized input
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("b9465ab1ad9e2278")
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 EagerTensor, ndim 1, dtype family int; 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 tensorflow as tf

def generate_dropout_seed():
    return tf.random.uniform([2], minval=0, maxval=tf.int32.max, dtype=tf.int32)

ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 1, dtype family int — no output shape is stated: observe_signature.py could not observe it (import:TypeError)
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
BiasedSelfAttentionLayer Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("e2ab63adef0914be")
How it ran

no invocation recorded.

FFNLayer Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("c84df930a004726a")
How it ran

no invocation recorded.

GPSLayer Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("6d03ea56f29b99a2")
How it ran

no invocation recorded.

GenericAggregator Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("154587abcabb598b")
How it ran

no invocation recorded.

GraphDropout Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("1fd88eabe2bf5a70")
How it ran

no invocation recorded.

InteractionNetworkLayer Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("971b7db74f2673f3")
How it ran

no invocation recorded.

ResnetMultiplier Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("52b6ed371f4e7c09")
How it ran

no invocation recorded.

_gather Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("401bcf859fc41772")
How it ran

no invocation recorded.

_scatter_count Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("5dda6b2e7b928bd7")
How it ran

no invocation recorded.

_scatter_max Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("14e69fb09fcdefa4")
How it ran

no invocation recorded.

_scatter_mean Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("13e732c6b1e941a0")
How it ran

no invocation recorded.

_scatter_mean_and_var Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("1dbf2926681fecd6")
How it ran

no invocation recorded.

_scatter_softmax Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("8cdb18106afd6290")
How it ran

no invocation recorded.

_scatter_sqrtN Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("7f92923b18f2f819")
How it ran

no invocation recorded.

_scatter_std Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("1e17cdf620f5b2c6")
How it ran

no invocation recorded.

_scatter_var Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("eba3c0cda10371e3")
How it ran

no invocation recorded.

call_outlined_function Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("8584b125423d1de0")
How it ran

no invocation recorded.

gather Not yet run
unverified (harvested, no recorded run)
graphcore/ogb-lsc-pcqm4mv2/model/hybrid/layers.py
code served (permissive licence) · get_code("df3a80c6ac89079c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 21 samples lifted from this paper's linked repositories, 21 carry a function identity and 0 do not. Of the 21 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 21 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.

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

We propose a recipe on how to build a general, powerful, scalable (GPS) graph Transformer with linear complexity and state-of-the-art results on a diverse set of benchmarks. Graph Transformers (GTs) have gained popularity in the field of graph representation learning with a variety of recent publications but they lack a common foundation about what constitutes a good positional or structural encoding, and what differentiates them. In this paper, we summarize the different types of encodings with a clearer definition and categorize them as being local, global or relative. The prior GTs are constrained to small graphs with a few hundred nodes, here we propose the first architecture with a complexity linear in the number of nodes and edges O(N + E) by decoupling the local real-edge aggregation from the fully-connected Transformer. We argue that this decoupling does not negatively affect the expressivity, with our architecture being a universal function approximator on graphs. Our GPS recipe consists of choosing 3 main ingredients: (i) positional/structural encoding, (ii) local message-passing mechanism, and (iii) global attention mechanism. We provide a modular framework GRAPHGPS 1 that supports multiple types of encodings and that provides efficiency and scalability both in small and large graphs. We test our architecture on 16 benchmarks and show highly competitive results in all of them, show-casing the empirical benefits gained by the modularity and the combination of different strategies.

For agents

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

get_harvested_code_for_paper("2205.12454")
get_code_for_paper("2205.12454")
have("2205.12454")

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

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

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

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

Connect an agent — have() is free.