SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2206.11140 · NeurIPS · 2022

Understanding and Extending Subgraph GNNs by Rethinking Their Symmetries

Michael Bronstein, Haggai Maron, Fabrizio Frasca, Beatrice Bevilacqua

arXiv · PDF · Open in the Atlas

Code that ran

4 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; 1 honoured the contract we drafted, 0 violated it and 2 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/2206.11140.json · badge: /api/ran/2206.11140.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
beabevi/sun canonical (classifier label)
classifier basis not recorded on the link
4 ran · 2 no recorded run
FunctionStatusWhere it lives
S2V_to_PyG Ran
ran; our contract draft was wrong, not the code
beabevi/sun/data.py
code served (permissive licence) · get_code("3a78609a71792145")
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 S2VData:
    def __init__(self):
        self.edge_mat = torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long)
        self.node_features = torch.randn(3, 4)
        self.label = 1

data = S2VData()

ARGS = {
    'data': data
}
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 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
get_node_idx Ran
ran, honoured the contract we drafted
beabevi/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 on a synthesized input
beabevi/sun/models.py
code served (permissive licence) · get_code("934bbeecdbae35c0")
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):
        self.num_subgraphs = torch.tensor([2, 3], dtype=torch.long)
        self.batch = torch.tensor([0, 0, 1, 1, 1], dtype=torch.long)
        self.node2subgraph = 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
to_torch_geom Ran
ran on a synthesized input
beabevi/sun/graph_property.py
code served (permissive licence) · get_code("62d7c9d7e000ee36")
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
import torch.nn as nn
from torch_geometric.data.data import Data
from torch_geometric.utils import dense_to_sparse

torch.manual_seed(0)

# Build tiny adjacency matrices (dense, will be converted to sparse)
# Shape: [batch_size=2, num_graphs=2, nodes=3, nodes=3]
adj_train = torch.tensor([
    [
        [[0., 1., 0.], [1., 0., 1.], [0., 1., 0.]],
        [[0., 1., 1.], [1., 0., 0.], [1., 0., 0.]]
    ],
    [
        [[0., 1., 0.], [1., 0., 1.], [0., 1., 0.]],
        [[1., 0., 1.], [0., 1., 0.], [1., 0., 1.]]
    ]
])

adj_test = torch.tensor([
    [
        [[0., 1., 0.], [1., 0., 0.], [0., 0., 0.]],
        [[0., 0., 1.], [0., 0., 1.], [1., 1., 0.]]
    ]
])

# Build node features
# Shape: [batch_size=2, num_graphs=2, nodes=3, feature_dim=4]
features_train = torch.randn(2, 2, 3, 4)
features_test = torch.randn(1, 2, 3, 4)

# Build node labels (positions)
# Shape: [batch_size=2, num_graphs=2, nodes=3, pos_dim=2]
node_labels_train = torch.randn(2, 2, 3, 2)
node_labels_test = torch.randn(1, 2, 3, 2)

# Build graph labels
# Shape: [batch_size=2, num_graphs=2, 1] (scalar labels per graph)
graph_labels_train = torch.randint(0, 2, (2, 2, 1), dtype=torch.float)
graph_labels_test = torch.randint(0, 2, (1, 2, 1), dtype=torch.float)

# Construct the nested dictionaries
adj = {
    'train': [adj_train[0], adj_train[1]],
    'test': [adj_test[0]]
}

features = {
    'train': [features_train[0], features_train[1]],
    'test': [features_test[0]]
}

node_labels = {
    'train': [node_labels_train[0], node_labels_train[1]],
    'test': [node_labels_test[0]]
}

graph_labels = {
    'train': [graph_labels_train[0], graph_labels_train[1]],
    'test': [graph_labels_test[0]]
}

ARGS = {
    'adj': adj,
    'features': features,
    'node_labels': node_labels,
    'graph_labels': graph_labels
}
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 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
get_root_idx Not yet run
unverified (harvested, no recorded run)
beabevi/sun/models.py
code served (permissive licence) · get_code("831d6722f61aac8f")
How it ran

no invocation recorded.

preprocess Not yet run
unverified (harvested, no recorded run)
beabevi/sun/data.py
code served (permissive licence) · get_code("e604a429bcb3f798")
How it ran

no invocation recorded.

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 6 distinct functions with an identity, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 2 later) and 1 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
S2V_to_PyG 2 other papers
2 dated earlier
2110.02910 (2021-10)
Equivariant Subgraph Aggregation Networks
2111.06283 (2021-11)
DropGNN: Random Dropouts Increase the Expressiveness of Graph Neural Networks
get_node_idx 2 other papers
2 later
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness
2511.08028 (2025-11)
Generalizable Insights for Graph Transformers in Theory and Practice
get_root_idx 2 other papers
2 later
2304.07702 (2023-04)
An Empirical Study of Realized GNN Expressiveness
2511.08028 (2025-11)
Generalizable Insights for Graph Transformers in Theory and Practice
preprocess 1 other paper
1 dated earlier
2110.02910 (2021-10)
Equivariant Subgraph Aggregation Networks
to_torch_geom 1 other paper
1 dated earlier
2110.03753 (2021-10)
From Stars to Subgraphs: Uplifting Any GNN with Local Structure Awareness

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

Subgraph GNNs are a recent class of expressive Graph Neural Networks (GNNs) which model graphs as collections of subgraphs. So far, the design space of possible Subgraph GNN architectures as well as their basic theoretical properties are still largely unexplored. In this paper, we study the most prominent form of subgraph methods, which employs node-based subgraph selection policies such as ego-networks or node marking and deletion. We address two central questions: (1) What is the upper-bound of the expressive power of these methods? and (2) What is the family of equivariant message passing layers on these sets of subgraphs?. Our first step in answering these questions is a novel symmetry analysis which shows that modelling the symmetries of node-based subgraph collections requires a significantly smaller symmetry group than the one adopted in previous works. This analysis is then used to establish a link between Subgraph GNNs and Invariant Graph Networks (IGNs). We answer the questions above by first bounding the expressive power of subgraph methods by 3-WL, and then proposing a general family of message-passing layers for subgraph methods that generalises all previous node-based Subgraph GNNs. Finally, we design a novel Subgraph GNN dubbed SUN, which theoretically unifies previous architectures while providing better empirical performance on multiple benchmarks.

For agents

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

get_harvested_code_for_paper("2206.11140")
get_code_for_paper("2206.11140")
have("2206.11140")

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

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

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

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

Connect an agent — have() is free.