SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.15646 · ICLR · 2021

Expressive Power of Invariant and Equivariant Graph Neural Networks

Waïss Azizian, Marc Lelarge

arXiv · PDF · Open in the Atlas

Code that ran

8 of 14 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 2 failures of our instrument; 6 no recorded run), measured 2026-11-22; 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/2006.15646.json · badge: /api/ran/2006.15646.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
mlelarge/graph_neural_net canonical (classifier label)
classifier basis: classifier_2025
6 ran · 6 no recorded run
RuihongQiu/FGNN reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
Embedding2Score Ran
ran on a synthesized input
RuihongQiu/FGNN/model.py
pointer only (licence: NONE) · get_code("aec2fbd3811ade54")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, RuihongQiu/FGNN 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.

GNNModel Ran
ran on a synthesized input · constructed an object; no result was computed
RuihongQiu/FGNN/model.py
pointer only (licence: NONE) · get_code("b54a3cbf74014993")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, RuihongQiu/FGNN 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.

GraphNorm Ran
ran on a synthesized input · constructed an object; no result was computed
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("80b5dc122a661e5a")
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 an instance of its own class, GraphNorm: the run constructed the object and did not call it, so no result was computed. 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

torch.manual_seed(0)

ARGS = {
    'features': 4,
    'constant_n_vertices': True,
    'elementwise_affine': True,
    'eps': 1e-05,
    'device': None,
    'dtype': None,
}
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 GraphNorm — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GraphNorm 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
Identity Ran
ran on a synthesized input · constructed an object; no result was computed
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("9375f2695dc66fe0")
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 an instance of its own class, Identity: the run constructed the object and did not call it, so no result was computed. 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
from collections import namedtuple

class Identity(namedtuple('Identity', [])):
    def __call__(self, x):
        return x

torch.manual_seed(0)

ARGS = {}
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 Identity — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Identity output the recorded ndim 1 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
Matmul Ran
ran on a synthesized input
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("0ed647828cd8e7e6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 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
import torch.nn as nn

class Matmul(nn.Module):

    def forward(self, xs1, xs2):
        return torch.matmul(xs1, xs2)

INIT_ARGS = {}

ARGS = {
    'xs1': torch.randn(2, 4, 3),
    'xs2': torch.randn(2, 3, 5)
}

if __name__ == '__main__':
    model = Matmul(**INIT_ARGS)
    output = model(**ARGS)
    print(output.shape)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 4, 5) — shape (2, 4, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MlpBlock_Real Ran
ran on a synthesized input · constructed an object; no result was computed
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("4dfdc22b4a6ed295")
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 an instance of its own class, MlpBlock_Real: the run constructed the object and did not call it, so no result was computed. 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create sample input tensor
# Shape: (batch=2, channels=4, height=3, width=3)
sample_input = torch.randn(2, 4, 3, 3)

ARGS = {
    'in_features': 4,
    'out_features': 8,
    'depth_of_mlp': 2,
    'activation_fn': F.relu,
    'constant_n_vertices': True,
}
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 MlpBlock_Real — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MlpBlock_Real 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
base_model Ran
ran; our contract draft was wrong, not the code
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("aa2de678f6c52280")
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 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
import torch.nn.functional as F
from collections import namedtuple

torch.manual_seed(0)

class GraphNorm(nn.Module):
    def __init__(self, num_features, constant_n_vertices=True):
        super().__init__()
        self.num_features = num_features
        self.constant_n_vertices = constant_n_vertices
        self.weight = nn.Parameter(torch.ones(num_features))
        self.bias = nn.Parameter(torch.zeros(num_features))
    
    def forward(self, x):
        return x * self.weight.view(1, -1, 1, 1) + self.bias.view(1, -1, 1, 1)

def _init_weights(module):
    if isinstance(module, nn.Conv2d):
        nn.init.kaiming_normal_(module.weight, mode='fan_out', nonlinearity='relu')
        if module.bias is not None:
            nn.init.constant_(module.bias, 0)

class Concat(nn.Module):
    def forward(self, *xs):
        return torch.cat(xs, dim=1)

class Identity(namedtuple('Identity', [])):
    def __call__(self, x):
        return x

class Matmul(nn.Module):
    def forward(self, xs1, xs2):
        return torch.matmul(xs1, xs2)

class MlpBlock_Real(nn.Module):
    def __init__(self, in_features, out_features, depth_of_mlp, activation_fn=F.relu, constant_n_vertices=True):
        super().__init__()
        self.activation = activation_fn
        self.depth_mlp = depth_of_mlp
        self.cst_vertices = constant_n_vertices
        self.convs = nn.ModuleList()
        for _ in range(depth_of_mlp):
            self.convs.append(nn.Conv2d(in_features, out_features, kernel_size=1, padding=0, bias=True))
            _init_weights(self.convs[-1])
            in_features = out_features
        self.gn = GraphNorm(out_features, constant_n_vertices=constant_n_vertices)

    def forward(self, inputs):
        n = inputs.size(-1)
        out = inputs
        for conv_layer in self.convs[:-1]:
            out = self.activation(conv_layer(out))
        return self.gn(self.convs[-1](out))

def block(in_features, out_features, depth_of_mlp, constant_n_vertices=True):
    return {'in': Identity(), 'mlp1': (MlpBlock_Real(in_features, out_features, depth_of_mlp, constant_n_vertices=constant_n_vertices), ['in']), 'mlp2': (MlpBlock_Real(in_features, out_features, depth_of_mlp, constant_n_vertices=constant_n_vertices), ['in']), 'mult': (Matmul(), ['mlp1', 'mlp2']), 'cat': (Concat(), ['mult', 'in']), 'mlp3': MlpBlock_Real(in_features + out_features, out_features, depth_of_mlp, constant_n_vertices=constant_n_vertices)}

def base_model(original_features_num, num_blocks, in_features, out_features, depth_of_mlp, block=block, constant_n_vertices=True):
    d = {'in': Identity()}
    last_layer_features = original_features_num
    for i in range(num_blocks - 1):
        d['block' + str(i + 1)] = block(last_layer_features, in_features, depth_of_mlp, constant_n_vertices=constant_n_vertices)
        last_layer_features = in_features
    d['block' + str(num_blocks)] = block(last_layer_features, out_features, depth_of_mlp, constant_n_vertices=constant_n_vertices)
    return d

ARGS = {
    'original_features_num': 8,
    'num_blocks': 2,
    'in_features': 16,
    'out_features': 32,
    'depth_of_mlp': 2,
    'block': block,
    'constant_n_vertices': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
block Ran
ran; our contract draft was wrong, not the code
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("d7331e9b86e16f47")
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
import torch.nn.functional as F
from collections import namedtuple
from torch.nn.parameter import Parameter

torch.manual_seed(0)

class Concat(nn.Module):
    def forward(self, *xs):
        return torch.cat(xs, dim=1)

class GraphNorm(nn.Module):
    def __init__(self, features, constant_n_vertices=True, elementwise_affine=True, eps=1e-05, device=None, dtype=None):
        super().__init__()
        factory_kwargs = {'device': device, 'dtype': dtype}
        self.constant_n_vertices = constant_n_vertices
        self.eps = eps
        self.elementwise_affine = elementwise_affine
        self.features = (1, features, 1, 1)
        if self.elementwise_affine:
            self.weight = Parameter(torch.empty(self.features, **factory_kwargs))
            self.bias = Parameter(torch.empty(self.features, **factory_kwargs))
        else:
            self.register_parameter('weight', None)
            self.register_parameter('bias', None)
        self.reset_parameters()

    def reset_parameters(self) -> None:
        if self.elementwise_affine:
            nn.init.ones_(self.weight)
            nn.init.zeros_(self.bias)

    def forward(self, b):
        return self.weight * normalize(b, constant_n_vertices=self.constant_n_vertices, eps=self.eps) + self.bias

class Identity(namedtuple('Identity', [])):
    def __call__(self, x):
        return x

class Matmul(nn.Module):
    def forward(self, xs1, xs2):
        return torch.matmul(xs1, xs2)

class MlpBlock_Real(nn.Module):
    def __init__(self, in_features, out_features, depth_of_mlp, activation_fn=F.relu, constant_n_vertices=True):
        super().__init__()
        self.activation = activation_fn
        self.depth_mlp = depth_of_mlp
        self.cst_vertices = constant_n_vertices
        self.convs = nn.ModuleList()
        for _ in range(depth_of_mlp):
            self.convs.append(nn.Conv2d(in_features, out_features, kernel_size=1, padding=0, bias=True))
            _init_weights(self.convs[-1])
            in_features = out_features
        self.gn = GraphNorm(out_features, constant_n_vertices=constant_n_vertices)

    def forward(self, inputs):
        n = inputs.size(-1)
        out = inputs
        for conv_layer in self.convs[:-1]:
            out = self.activation(conv_layer(out))
        return self.gn(self.convs[-1](out))

def _init_weights(layer):
    nn.init.xavier_uniform_(layer.weight)
    if layer.bias is not None:
        nn.init.zeros_(layer.bias)

def normalize(b, constant_n_vertices=True, eps=1e-05):
    means = torch.mean(b, dim=(-1, -2), keepdim=True)
    vars = torch.var(b, unbiased=False, dim=(-1, -2), keepdim=True)
    if constant_n_vertices:
        n = b.size(-1)
    else:
        n = torch.sum(b.mask_dict['N'], dim=1).align_as(vars)
    return (b - means) / (2 * torch.sqrt(n * (vars + eps)))

def block(in_features, out_features, depth_of_mlp, constant_n_vertices=True):
    return {'in': Identity(), 'mlp1': (MlpBlock_Real(in_features, out_features, depth_of_mlp, constant_n_vertices=constant_n_vertices), ['in']), 'mlp2': (MlpBlock_Real(in_features, out_features, depth_of_mlp, constant_n_vertices=constant_n_vertices), ['in']), 'mult': (Matmul(), ['mlp1', 'mlp2']), 'cat': (Concat(), ['mult', 'in']), 'mlp3': MlpBlock_Real(in_features + out_features, out_features, depth_of_mlp, constant_n_vertices=constant_n_vertices)}

ARGS = {
    'in_features': 4,
    'out_features': 3,
    'depth_of_mlp': 2,
    'constant_n_vertices': True
}
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
Concat Not yet run
unverified (harvested, no recorded run)
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("62b5e09668e8358b")
How it ran

no invocation recorded.

MlpBlock_Real Not yet run
unverified (harvested, no recorded run)
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("21bde57ff07e5dcc")
How it ran

no invocation recorded.

_init_weights Not yet run
unverified (harvested, no recorded run)
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("db4528f69778c115")
How it ran

no invocation recorded.

base_model Not yet run
unverified (harvested, no recorded run)
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("ca9b98d9883fa747")
How it ran

no invocation recorded.

block Not yet run
unverified (harvested, no recorded run)
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("f93f27ccbc08cab8")
How it ran

no invocation recorded.

normalize Not yet run
unverified (harvested, no recorded run)
mlelarge/graph_neural_net/models/blocks_emb.py
code served (permissive licence) · get_code("9219da3439a2613c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 11 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 11 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-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

Various classes of Graph Neural Networks (GNN) have been proposed and shown to be successful in a wide range of applications with graph structured data. In this paper, we propose a theoretical framework able to compare the expressive power of these GNN architectures. The current universality theorems only apply to intractable classes of GNNs. Here, we prove the first approximation guarantees for practical GNNs, paving the way for a better understanding of their generalization. Our theoretical results are proved for invariant GNNs computing a graph embedding (permutation of the nodes of the input graph does not affect the output) and equivariant GNNs computing an embedding of the nodes (permutation of the input permutes the output). We show that Folklore Graph Neural Networks (FGNN), which are tensor based GNNs augmented with matrix multiplication are the most expressive architectures proposed so far for a given tensor order. We illustrate our results on the Quadratic Assignment Problem (a NP-Hard combinatorial problem) by showing that FGNNs are able to learn how to solve the problem, leading to much better average performances than existing algorithms (based on spectral, SDP or other GNNs architectures). On a practical side, we also implement masked tensors to handle batches of graphs of varying sizes.

For agents

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

get_harvested_code_for_paper("2006.15646")
get_code_for_paper("2006.15646")
have("2006.15646")

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

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

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

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

Connect an agent — have() is free.