SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.15480 · 2024

SpikeGraphormer: A High-Performance Graph Transformer with Spiking Graph Attention

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 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 0 have no contract verdict; 6 failures of our instrument; 0 no recorded run), measured 2026-11-22; 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/2403.15480.json · badge: /api/ran/2403.15480.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
phd-lanyu/spikegraphormer canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
class_rand_splits Ran
ran; our contract draft was wrong, not the code
phd-lanyu/spikegraphormer/large/data_utils.py
code served (permissive licence) · get_code("de5bdf76ff672322")
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 torch

torch.manual_seed(0)

# Create a label tensor with class indices
# We need multiple samples per class to allow for train/valid/test splits
# Create 20 samples with 4 classes (5 samples per class)
label = torch.tensor([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3]).unsqueeze(1)

# Number of samples per class to use for training
label_num_per_class = 2

# Number of validation samples
valid_num = 5

# Number of test samples
test_num = 5

ARGS = {
    "label": label,
    "label_num_per_class": label_num_per_class,
    "valid_num": valid_num,
    "test_num": test_num,
}
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 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
class_rand_splits Ran
ran; our contract draft was wrong, not the code
phd-lanyu/spikegraphormer/medium/data_utils.py
code served (permissive licence) · get_code("e0d4c1372efb5382")
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

torch.manual_seed(0)

# Create a label tensor with multiple classes
# We need enough samples per class to allow splitting
# Let's create 3 classes with 10 samples each (30 total)
label = torch.tensor([
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2
])

# Reshape to column vector as the function uses .squeeze()
label = label.unsqueeze(1)

# label_num_per_class: number of samples per class for training
label_num_per_class = 3

# valid_num: number of validation samples
valid_num = 5

# test_num: number of test samples (noted as unused in docstring)
test_num = 10

ARGS = {
    'label': label,
    'label_num_per_class': label_num_per_class,
    'valid_num': valid_num,
    'test_num': test_num
}
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
load_fixed_splits Ran
ran; our contract draft was wrong, not the code
phd-lanyu/spikegraphormer/large/data_utils.py
code served (permissive licence) · get_code("ef6b5e211f3c0418")
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 list, 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 torch
import numpy as np
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory structure for the splits files
temp_dir = tempfile.mkdtemp()
splits_dir = os.path.join(temp_dir, 'geom-gcn', 'splits')
os.makedirs(splits_dir, exist_ok=True)

# Create dummy split files for 'cora' dataset
for i in range(10):
    split_file_path = os.path.join(splits_dir, f'cora_split_0.6_0.2_{i}.npz')
    # Create small dummy masks (10 samples)
    train_mask = np.array([True, True, False, False, False, False, False, False, False, False])
    val_mask = np.array([False, False, True, True, False, False, False, False, False, False])
    test_mask = np.array([False, False, False, False, True, True, True, True, True, True])
    
    np.savez(
        split_file_path,
        train_mask=train_mask,
        val_mask=val_mask,
        test_mask=test_mask
    )

# Create a minimal dataset class with train_idx, valid_idx, test_idx for semi-supervised case
class MinimalDataset:
    def __init__(self):
        self.train_idx = np.array([0, 1])
        self.valid_idx = np.array([2, 3])
        self.test_idx = np.array([4, 5, 6, 7, 8, 9])

dataset = MinimalDataset()

ARGS = {
    'data_dir': temp_dir,
    'dataset': dataset,
    'name': 'cora',
    'protocol': 'semi'
}
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 list, ndim 1, dtype family float — a list 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
normalize_feat Ran
ran; our contract draft was wrong, not the code
phd-lanyu/spikegraphormer/medium/data_utils.py
code served (permissive licence) · get_code("162abe8248541689")
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 csr_matrix. 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 numpy as np
from scipy import sparse as sp

# Create a small sparse matrix for testing
# Using a 4x3 matrix (distinct dimensions for probing)
data = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
row = np.array([0, 1, 1, 2, 3])
col = np.array([0, 1, 2, 0, 2])
mx = sp.csr_matrix((data, (row, col)), shape=(4, 3))

ARGS = {
    "mx": mx
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type csr_matrix — a csr_matrix output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a csr_matrix 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
rand_train_test_idx Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
phd-lanyu/spikegraphormer/large/data_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from CUAI/Non-Homophily-Large-Scale, is pointer only (licence: NONE) · get_code("13234652741e2264")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from CUAI/Non-Homophily-Large-Scale, and GitHub detected no licence in that repository 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. A run is recorded.

rand_train_test_idx Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
phd-lanyu/spikegraphormer/medium/data_utils.py
code served (permissive licence) · get_code("cf34dc0377c08698")
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 torch
import numpy as np

torch.manual_seed(0)
np.random.seed(0)

# Create a label tensor with some labeled nodes (values != -1) and some unlabeled (-1)
# Using a small tensor with mixed labeled/unlabeled values
label = torch.tensor([0, 1, -1, 2, 1, -1, 0, 3])

ARGS = {
    "label": label,
    "train_prop": 0.5,
    "valid_prop": 0.25,
    "ignore_negative": True,
}
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 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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 1 the same month, 3 later) and 2 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
rand_train_test_idx 14 other papers
8 dated earlier, 1 the same month, 5 later
2110.14446 (2021-10)
Large Scale Learning on Non-Homophilous Graphs: New Benchmarks and Strong Simple Methods
2302.01524 (2023-02)
Ordered GNN: Ordering Message Passing to Deal with Heterophily and Over-smoothing
2306.08274 (2023-06)
A Simple and Scalable Graph Neural Network for Large Directed Graphs
and 11 more not named here
load_fixed_splits 3 other papers
2 dated earlier, 1 later
2306.10759 (2023-06)
SGFormer: Simplifying and Empowering Transformers for Large-Graph Representations
2310.05296 (2023-10)
Tailoring Self-Attention for Graph via Rooted Subtrees
2407.01290 (2024-07)
Hypformer: Exploring Efficient Transformer Fully in Hyperbolic Space
class_rand_splits 2 other papers
1 dated earlier, 1 later
2306.10759 (2023-06)
SGFormer: Simplifying and Empowering Transformers for Large-Graph Representations
2407.01290 (2024-07)
Hypformer: Exploring Efficient Transformer Fully in Hyperbolic Space

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

Repositories linked to this paper

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

Abstract

Recently, Graph Transformers have emerged as a promising solution to alleviate the inherent limitations of Graph Neural Networks (GNNs) and enhance graph representation performance. Unfortunately, Graph Transformers are computationally expensive due to the quadratic complexity inherent in self-attention when applied over large-scale graphs, especially for node tasks. In contrast, spiking neural networks (SNNs), with event-driven and binary spikes properties, can perform energy-efficient computation. In this work, we propose a novel insight into integrating SNNs with Graph Transformers and design a Spiking Graph Attention (SGA) module. The matrix multiplication is replaced by sparse addition and mask operations. The linear complexity enables all-pair node interactions on large-scale graphs with limited GPU memory. To our knowledge, our work is the first attempt to introduce SNNs into Graph Transformers. Furthermore, we design SpikeGraphormer, a Dual-branch architecture, combining a sparse GNN branch with our SGA-driven Graph Transformer branch, which can simultaneously perform all-pair node interactions and capture local neighborhoods. SpikeGraphormer consistently outperforms existing state-of-the-art approaches across various datasets and makes substantial improvements in training time, inference time, and GPU memory cost (10 ~ 20x lower than vanilla self-attention). It also performs well in cross-domain applications (image and text classification). We release our code at https://github.com/PHD-lanyu/SpikeGraphormer.

For agents

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

get_harvested_code_for_paper("2403.15480")
get_code_for_paper("2403.15480")
have("2403.15480")

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

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

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

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

Connect an agent — have() is free.