SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.04963 · ICML · 2023

From Relational Pooling to Subgraph GNNs: A Universal Framework for More Expressive Graph Neural Networks

Muhan Zhang, Xiyuan Wang, Cai Zhou

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 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 5 have no contract verdict; 1 failure of our instrument; 2 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/2305.04963.json · badge: /api/ran/2305.04963.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
zhouc20/KLGNN canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
cumsum_pad0 Ran
ran; our contract draft was wrong, not the code
zhouc20/KLGNN/OGB/util.py
code served (permissive licence) · get_code("8134b52cd16bee5c")
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 (2, 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
from torch import Tensor

torch.manual_seed(0)

# The function cumsum_pad0 takes a single parameter: num
# which is a Tensor.
# The function:
# - Creates an empty tensor of the same shape as num
# - Sets the first element to 0
# - Sets remaining elements to cumsum of all but the last element
# So num should be a 1D or multi-dimensional tensor

# Create a small test tensor with shape (2, 4) as specified
num = torch.randn(2, 4)

ARGS = {
    "num": 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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
deg2rowptr Ran
ran on a synthesized input
zhouc20/KLGNN/OGB/util.py
code served (permissive licence) · get_code("42519ba0adc90b40")
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)

# Create a small degree tensor
# deg2rowptr expects a tensor with degree values that will be converted to row pointers
# Using a 1D tensor of small integers representing node degrees
num = torch.tensor([2, 3, 1, 4], dtype=torch.long)

ARGS = {
    "num": 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 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
extractsubg Ran
ran on a synthesized input
zhouc20/KLGNN/OGB/preprocess.py
code served (permissive licence) · get_code("fa0f06a122a1bfe6")
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 3, dtype family float, shape (2, 3, 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 torch

torch.manual_seed(0)

# padded_adj should be (N+1, N+1) - a square adjacency matrix
# Let's use N=4, so padded_adj is (5, 5)
N = 4
padded_adj = torch.randn(N + 1, N + 1)

# subgs should be (ns, k) where ns is number of subgraphs and k is nodes per subgraph
# Let's use ns=2 subgraphs with k=3 nodes each
ns = 2
k = 3
subgs = torch.randint(0, N + 1, (ns, k))

ARGS = {
    "padded_adj": padded_adj,
    "subgs": subgs,
}
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 3, dtype family float, shape (2, 3, 3) — shape (2, 3, 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
extracttuple Ran
ran on a synthesized input
zhouc20/KLGNN/OGB/util.py
code served (permissive licence) · get_code("353bd683adeed414")
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 (12, 2) 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)

# The function extracttuple takes:
# - elems: a 1D Tensor of N elements
# - k: an integer representing the tuple size

# Create a small 1D tensor with distinct elements
elems = torch.tensor([1, 2, 3, 4], dtype=torch.float32)

# Create a k value for tuple extraction
k = 2

ARGS = {
    "elems": elems,
    "k": k,
}
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 2, dtype family float, shape (12, 2) — shape (12, 2) 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
indexbmm Ran
ran on a synthesized input
zhouc20/KLGNN/OGB/IDMPNN_Global.py
code served (permissive licence) · get_code("d5bc45a4bfa5fab3")
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 4, 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 Tensor

torch.manual_seed(0)

# Construct tensors for the indexbmm function
# A: (B, Nm, Nm, d) - batch of square matrices
# x: (ns1+ns2+...+nsB, nm, #perm, d) - stacked tensors
# batch: index tensor to select from batch dimension of A

B = 2  # batch size
Nm = 3  # matrix dimension
d = 4  # feature dimension
ns_total = 5  # total number of elements across all batch samples
num_perm = 2  # number of permutations

# A tensor: (B=2, Nm=3, Nm=3, d=4)
A = torch.randn(B, Nm, Nm, d)

# x tensor: (ns_total=5, nm=3, #perm=2, d=4)
x = torch.randn(ns_total, Nm, num_perm, d)

# batch tensor: indices to select from A's batch dimension
# Should have length equal to ns_total to index into A properly
batch = torch.tensor([0, 0, 1, 1, 0], dtype=torch.long)

ARGS = {
    "batch": batch,
    "A": A,
    "x": x,
}
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 4, dtype family float — no output shape is stated: observe_signature.py could not observe it (import:OSError)
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_dense_batch Ran
ran on a synthesized input
zhouc20/KLGNN/QM9/IDPPGN.py
code served (permissive licence) · get_code("0d541a5bec4a4c53")
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 torch_geometric.utils as pyg_utils

torch.manual_seed(0)

# Construct arguments for to_dense_batch function
# We need: x, edge_index, edge_attr, batch, max_num_nodes

# x: node feature matrix (num_nodes, num_features)
x = torch.randn(6, 4)

# edge_index: graph connectivity (2, num_edges)
edge_index = torch.tensor([
    [0, 1, 2, 3, 4, 5],
    [1, 2, 3, 4, 5, 0]
], dtype=torch.long)

# edge_attr: edge features (num_edges, num_edge_features)
edge_attr = torch.randn(6, 3)

# batch: batch assignment for each node (num_nodes,)
# Nodes 0-2 in batch 0, nodes 3-5 in batch 1
batch = torch.tensor([0, 0, 0, 1, 1, 1], dtype=torch.long)

# max_num_nodes: optional parameter to specify max nodes per graph
max_num_nodes = None

ARGS = {
    'x': x,
    'edge_index': edge_index,
    'edge_attr': edge_attr,
    'batch': batch,
    'max_num_nodes': max_num_nodes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torch_geometric — 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
noindexbmm Not yet run
unverified (harvested, no recorded run)
zhouc20/KLGNN/OGB/IDMPNN_Global.py
code served (permissive licence) · get_code("4825f61c1afb6cbb")
How it ran

no invocation recorded.

train Not yet run
unverified (harvested, no recorded run)
zhouc20/KLGNN/OGB/molhiv.py
code served (permissive licence) · get_code("bc15613c664952e7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
cumsum_pad0 1 other paper
1 later
2404.03380 (2024-04)
On the Theoretical Expressive Power and the Design Space of Higher-Order Graph Transformers

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

Relational pooling (RP) is a framework for building more expressive and permutation-invariant graph neural networks (GNN). However, there is limited understanding of the exact enhancement in the expressivity of RP and its connection with the Weisfeiler-Lehman (WL) hierarchy. Starting from RP, we propose to explicitly assign labels to nodes as additional features to improve graph isomorphism distinguishing power of message passing neural networks. The method is then extended to higher-dimensional WL, leading to a novel k, l-WL algorithm, a more general framework than k-WL. We further introduce the subgraph concept into our hierarchy and propose a localized k, l-WL framework, incorporating a wide range of existing work, including many subgraph GNNs. Theoretically, we analyze the expressivity of k, l-WL w.r.t. k and l and compare it with the traditional k-WL. Complexity reduction methods are also systematically discussed to build powerful and practical k, l-GNN instances. We theoretically and experimentally prove that our method is universally compatible and capable of improving the expressivity of any base GNN model. Our k, l-GNNs achieve superior performance on many synthetic and real-world datasets, which verifies the effectiveness of our framework.

For agents

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

get_harvested_code_for_paper("2305.04963")
get_code_for_paper("2305.04963")
have("2305.04963")

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

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

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

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

Connect an agent — have() is free.