SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.16278 · 2024

Even Sparser Graph Transformers

arXiv · PDF · Open in the Atlas

Code that ran

7 of 11 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; 7 failures of our instrument; 4 no recorded run), measured 2026-11-24; 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/2411.16278.json · badge: /api/ran/2411.16278.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
hamed1375/Sp_Exphormer canonical (classifier label)
classifier basis: census
7 ran · 4 no recorded run
FunctionStatusWhere it lives
accuracy_SBM Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hamed1375/Sp_Exphormer/spexphormer/logger.py
code served (permissive licence) · get_code("ecf14287d3465c48")
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 float64, ndim 0, 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
import torch

torch.manual_seed(0)

# Create mock targets as a torch tensor
# The function expects targets to have .cpu().detach().numpy() method
targets = torch.tensor([0, 1, 0, 1, 2, 2], dtype=torch.long)

# Create mock predictions as integers (class indices)
# Should match targets shape
pred_int = np.array([0, 1, 0, 1, 2, 1], dtype=np.int64)

ARGS = {
    "targets": targets,
    "pred_int": pred_int
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
eval_ap Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hamed1375/Sp_Exphormer/spexphormer/metrics_ogb.py
code served (permissive licence) · get_code("18f2c4029261f51b")
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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create small sample data
# y_true: binary labels, shape (n_samples, n_tasks)
# y_pred: predicted probabilities, shape (n_samples, n_tasks)
n_samples = 10
n_tasks = 4

# Create y_true with both positive and negative labels for each task
y_true = np.array([
    [1, 0, 1, 0],
    [0, 1, 0, 1],
    [1, 1, 0, 0],
    [0, 0, 1, 1],
    [1, 0, 1, 0],
    [0, 1, 0, 1],
    [1, 1, 0, 0],
    [0, 0, 1, 1],
    [1, 0, 1, 0],
    [0, 1, 0, 1],
], dtype=np.int64)

# Create y_pred with continuous values between 0 and 1
y_pred = np.array([
    [0.9, 0.1, 0.8, 0.2],
    [0.2, 0.8, 0.1, 0.9],
    [0.7, 0.6, 0.3, 0.4],
    [0.1, 0.2, 0.7, 0.8],
    [0.85, 0.15, 0.75, 0.25],
    [0.25, 0.75, 0.15, 0.85],
    [0.65, 0.55, 0.35, 0.45],
    [0.15, 0.25, 0.65, 0.75],
    [0.8, 0.2, 0.7, 0.3],
    [0.3, 0.7, 0.2, 0.8],
], dtype=np.float32)

ARGS = {
    'y_true': y_true,
    'y_pred': y_pred,
}
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 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
eval_rmse Ran
ran; our contract draft was wrong, not the code
hamed1375/Sp_Exphormer/spexphormer/metrics_ogb.py
code served (permissive licence) · get_code("62d2fbdba0ffa255")
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 numpy as np

# Create sample data for y_true and y_pred
# The function iterates over y_true.shape[1], so we need 2D arrays
# y_true.shape[1] represents number of tasks
# We'll create data with some NaN values to test the is_labeled condition

np.random.seed(0)

# Create y_true with shape (5, 3) - 5 samples, 3 tasks
y_true = np.array([
    [1.0, 2.0, 3.0],
    [2.0, 3.0, 4.0],
    [3.0, 4.0, 5.0],
    [4.0, 5.0, 6.0],
    [5.0, 6.0, 7.0]
], dtype=np.float32)

# Create y_pred with similar shape
y_pred = np.array([
    [1.1, 2.1, 3.1],
    [2.1, 3.1, 4.1],
    [3.1, 4.1, 5.1],
    [4.1, 5.1, 6.1],
    [5.1, 6.1, 7.1]
], dtype=np.float32)

ARGS = {
    'y_true': y_true,
    'y_pred': y_pred
}
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 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
eval_rocauc Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
hamed1375/Sp_Exphormer/spexphormer/metrics_ogb.py
code served (permissive licence) · get_code("7cae08c15fd4d60b")
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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create sample data for eval_rocauc
# y_true: shape (n_samples, n_tasks) with binary labels (0 or 1)
# y_pred: shape (n_samples, n_tasks) with prediction scores in [0, 1]

n_samples = 10
n_tasks = 4

# Create y_true with binary labels, ensuring each task has both 0s and 1s
y_true = np.array([
    [1, 0, 1, 0],
    [0, 1, 0, 1],
    [1, 1, 0, 0],
    [0, 0, 1, 1],
    [1, 0, 1, 0],
    [0, 1, 0, 1],
    [1, 1, 0, 0],
    [0, 0, 1, 1],
    [1, 0, 1, 0],
    [0, 1, 0, 1],
], dtype=np.int64)

# Create y_pred with random prediction scores
y_pred = np.random.rand(n_samples, n_tasks).astype(np.float32)

ARGS = {
    'y_true': y_true,
    'y_pred': y_pred,
}
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 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
eval_spearmanr Ran
ran; our contract draft was wrong, not the code
hamed1375/Sp_Exphormer/spexphormer/logger.py
code served (permissive licence) · get_code("9dc78001d467fc9d")
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 numpy as np
from scipy.stats import stats

# Test case 1: 1D arrays (single task)
y_true_1d = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
y_pred_1d = np.array([1.1, 2.2, 2.9, 4.1, 4.8])

# Test case 2: 2D arrays (multiple tasks) with some NaN values
y_true_2d = np.array([
    [1.0, 2.0, 3.0],
    [2.0, np.nan, 4.0],
    [3.0, 3.0, np.nan],
    [4.0, 4.0, 5.0],
    [5.0, 5.0, 6.0]
], dtype=float)

y_pred_2d = np.array([
    [1.1, 2.1, 3.1],
    [2.1, 1.9, 4.1],
    [3.1, 3.1, 5.1],
    [4.1, 3.9, 5.1],
    [5.1, 5.1, 6.1]
], dtype=float)

# Use 1D case for ARGS
ARGS = {
    'y_true': y_true_1d,
    'y_pred': y_pred_1d
}
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 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
separate_by_node Ran
ran; our contract draft was wrong, not the code
hamed1375/Sp_Exphormer/spexphormer/layer/ASE_Attention.py
code served (permissive licence) · get_code("94f29c72015b4f20")
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)

# Construct edges tensor: shape (2, num_edges)
# Each column is an edge (u, v) where u is source, v is destination
edges = torch.tensor([
    [0, 1, 2, 0],  # source nodes
    [1, 2, 1, 2]   # destination nodes
], dtype=torch.long)

# Construct scores tensor: shape (num_edges,)
# One score per edge
scores = torch.tensor([0.5, 0.3, 0.7, 0.2], dtype=torch.float32)

ARGS = {
    "edges": edges,
    "scores": scores
}
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
spearmanr Ran
ran; our contract draft was wrong, not the code
hamed1375/Sp_Exphormer/spexphormer/metric_wrapper.py
code served (permissive licence) · get_code("89ec8db31ff0cfc4")
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 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)

# Create small test tensors
preds = torch.tensor([0., 1., 2., 3.])
target = torch.tensor([0., 1., 2., 1.5])

ARGS = {
    'preds': preds,
    'target': target,
    'reduction': 'elementwise_mean'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchmetrics — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
l1_losses Not yet run
unverified (harvested, no recorded run)
hamed1375/Sp_Exphormer/spexphormer/loss/l1.py
code served (permissive licence) · get_code("d59c374db2cf64ae")
How it ran

no invocation recorded.

multilabel_cross_entropy Not yet run
unverified (harvested, no recorded run)
hamed1375/Sp_Exphormer/spexphormer/loss/multilabel_classification_loss.py
code served (permissive licence) · get_code("f1cbbbc857d8b871")
How it ran

no invocation recorded.

pearsonr Not yet run
unverified (harvested, no recorded run)
hamed1375/Sp_Exphormer/spexphormer/metric_wrapper.py
code served (permissive licence) · get_code("94decc23310a113d")
How it ran

no invocation recorded.

weighted_cross_entropy Not yet run
unverified (harvested, no recorded run)
hamed1375/Sp_Exphormer/spexphormer/loss/weighted_cross_entropy.py
code served (permissive licence) · get_code("4632e6a524984022")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 6 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 6 later) and 5 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
eval_spearmanr 6 other papers
4 dated earlier, 2 later
2305.17589 (2023-05)
Graph Inductive Biases in Transformers without Message Passing
2404.13604 (2024-04)
CKGConv: General Graph Convolution with Continuous Kernels
2405.13806 (2024-05)
A General Graph Spectral Wavelet Convolution via Chebyshev Order Decomposition
and 3 more not named here
accuracy_SBM 5 other papers
3 dated earlier, 2 later
2305.17589 (2023-05)
Graph Inductive Biases in Transformers without Message Passing
2404.13604 (2024-04)
CKGConv: General Graph Convolution with Continuous Kernels
2405.13806 (2024-05)
A General Graph Spectral Wavelet Convolution via Chebyshev Order Decomposition
and 2 more not named here
l1_losses 5 other papers
3 dated earlier, 2 later
2305.17589 (2023-05)
Graph Inductive Biases in Transformers without Message Passing
2404.13604 (2024-04)
CKGConv: General Graph Convolution with Continuous Kernels
2405.13806 (2024-05)
A General Graph Spectral Wavelet Convolution via Chebyshev Order Decomposition
and 2 more not named here
multilabel_cross_entropy 5 other papers
3 dated earlier, 2 later
2305.17589 (2023-05)
Graph Inductive Biases in Transformers without Message Passing
2404.13604 (2024-04)
CKGConv: General Graph Convolution with Continuous Kernels
2405.13806 (2024-05)
A General Graph Spectral Wavelet Convolution via Chebyshev Order Decomposition
and 2 more not named here
eval_rocauc 2 other papers
2 later
2412.09805 (2024-12)
Making Classic GNNs Strong Baselines Across Varying Homophily: A Smoothness-Generalization Perspective
2601.11135 (2026-01)
Context-aware Graph Causality Inference for Few-Shot Molecular Property Prediction
weighted_cross_entropy 1 other paper
1 later
2502.09263 (2025-02)
Can Classic GNNs Be Strong Baselines for Graph-level Tasks? Simple Architectures Meet Excellence

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

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 excel in long-range dependency modeling, but generally require quadratic memory complexity in the number of nodes in an input graph, and hence have trouble scaling to large graphs. Sparse attention variants such as Exphormer can help, but may require high-degree augmentations to the input graph for good performance, and do not attempt to sparsify an already-dense input graph. As the learned attention mechanisms tend to use few of these edges, such high-degree connections may be unnecessary. We show (empirically and with theoretical backing) that attention scores on graphs are usually quite consistent across network widths, and use this observation to propose a two-stage procedure, which we call Spexphormer: first, train a narrow network on the full augmented graph. Next, use only the active connections to train a wider network on a much sparser graph. We establish theoretical conditions when a narrow network's attention scores can match those of a wide network, and show that Spexphormer achieves good performance with drastically reduced memory requirements on various graph datasets.

For agents

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

get_harvested_code_for_paper("2411.16278")
get_code_for_paper("2411.16278")
have("2411.16278")

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

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

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

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

Connect an agent — have() is free.