SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.05838 · ICML · 2023

Expectation-Complete Graph Representations with Homomorphisms

Maximilian Thiessen, Pascal Welke, Fabian Jogl, Thomas Gärtner

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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 8 have no contract verdict; 0 failures 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/2306.05838.json · badge: /api/ran/2306.05838.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
ocatias/homcountgnns canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
pwelke/homcount canonical (classifier label)
classifier basis: census
2 ran · 0 no recorded run
FunctionStatusWhere it lives
compute_final_tracking_dict Ran
ran on a synthesized input
ocatias/homcountgnns/Exp/training_loop_functions.py
code served (permissive licence) · get_code("0db6ddd2616d04dc")
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

torch.manual_seed(0)

# Create a minimal tracking dict
tracking_dict = {
    'correct_classifications': 5,
    'y_preds': [torch.tensor([[0.1, 0.9], [0.8, 0.2]]), torch.tensor([[0.3, 0.7]])],
    'y_true': [torch.tensor([[0, 1], [1, 0]]), torch.tensor([[0, 1]])],
    'total_loss': 2.5,
    'batch_losses': [0.5, 0.8]
}

# Create output_dict
output_dict = {}

# Create a minimal loader with dataset
class MinimalDataset:
    def __init__(self):
        self.data = [1, 2, 3]
    
    def __len__(self):
        return 3

loader = type('Loader', (), {'dataset': MinimalDataset()})()

# Test with 'accuracy' metric
ARGS = {
    'tracking_dict': tracking_dict,
    'output_dict': output_dict,
    'loader': loader,
    'metric': 'accuracy',
    'metric_method': None,
    'train': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, wandb — 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
dict_to_args Ran
ran on a synthesized input
ocatias/homcountgnns/Exp/run_experiment.py
code served (permissive licence) · get_code("b5c4765e5836293f")
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

torch.manual_seed(0)

# The function dict_to_args takes a single parameter: args_dict
# It iterates over items in the dict, checking if values are empty strings
# and builds a list of keys and string values
# So we need a dictionary with string keys and values that are either empty strings or non-empty

ARGS = {
    "args_dict": {
        "learning_rate": "0.001",
        "batch_size": "32",
        "epochs": "10",
        "model_name": "bert",
        "debug_mode": "",
        "output_dir": "/tmp/results",
        "seed": "42",
        "verbose": ""
    }
}
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
get_graph_norm Ran
ran on a synthesized input
ocatias/homcountgnns/Models/utils.py
code served (permissive licence) · get_code("94cf6905f3dcab5a")
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 type. 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.nn import BatchNorm1d as BN, LayerNorm as LN, Identity

torch.manual_seed(0)

# The function get_graph_norm takes a single parameter 'norm' which is a string
# It checks the string value and returns the corresponding normalization class
# We need to test with valid string values that map to actual classes

ARGS = {
    'norm': 'bn'
}
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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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_nonlinearity Ran
ran on a synthesized input
ocatias/homcountgnns/Models/utils.py
code served (permissive licence) · get_code("5c19bfd30a45d69f")
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 type. 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)

# The function get_nonlinearity takes two parameters:
# 1. nonlinearity: a string specifying which nonlinearity to use
# 2. return_module: a boolean indicating whether to return the module class or the function

ARGS = {
    'nonlinearity': 'relu',
    'return_module': 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 type — a type output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a type 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_pooling_fn Ran
ran on a synthesized input
ocatias/homcountgnns/Models/utils.py
code served (permissive licence) · get_code("0b3d1cd7066aaf21")
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 function. 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 torch_geometric.nn import global_mean_pool, global_add_pool

torch.manual_seed(0)

ARGS = {
    'readout': 'mean'
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
mean_different_length_array Ran
ran on a synthesized input
pwelke/homcount/experiments/plot_equivalence_class_counting.py
code served (permissive licence) · get_code("d28a5900845bb48e")
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 ndarray, ndim 1, dtype family float, shape (54,) 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 numpy as np

# Construct a list of arrays with different lengths
# The function expects a list where each element is a tuple/list where the first item is an array
array1 = np.array([1.0, 2.0, 3.0])
array2 = np.array([4.0, 5.0])
array3 = np.array([6.0, 7.0, 8.0, 9.0])

# Wrap each array in a tuple to match how the function accesses obj[0]
list_of_arrays = [(array1,), (array2,), (array3,)]

ARGS = {
    'list_of_arrays': list_of_arrays,
    'new_len': 54,
    'pad_value': -1
}
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 ndarray, ndim 1, dtype family float, shape (54,) — shape (54,) 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
std_different_length_array Ran
ran on a synthesized input
pwelke/homcount/experiments/plot_equivalence_class_counting.py
code served (permissive licence) · get_code("e9e6e17f984c669d")
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 ndarray, ndim 1, dtype family float, shape (54,) 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 numpy as np

# Construct valid arguments for std_different_length_array
# The function expects a list of arrays where each element is a tuple/list
# containing an array as the first element (obj[0])

# Create arrays of different lengths
array1 = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
array2 = np.array([10.0, 20.0, 30.0])
array3 = np.array([100.0, 200.0, 300.0, 400.0])

# Wrap them in tuples/lists so they can be indexed with [0]
list_of_arrays = [
    (array1,),
    (array2,),
    (array3,)
]

ARGS = {
    'list_of_arrays': list_of_arrays,
    'new_len': 54,
    'pad_value': -1
}
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 ndarray, ndim 1, dtype family float, shape (54,) — shape (54,) 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
train Ran
ran on a synthesized input
ocatias/homcountgnns/Exp/training_loop_functions.py
code served (permissive licence) · get_code("0bf4c377291fbef4")
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

torch.manual_seed(0)

class SimpleGNNModel(nn.Module):
    def __init__(self, num_tasks=1):
        super().__init__()
        self.num_tasks = num_tasks
        self.linear = nn.Linear(4, 10)
    
    def forward(self, batch):
        return self.linear(batch.x)

class MockBatch:
    def __init__(self):
        self.x = torch.randn(2, 4)
        self.y = torch.tensor([0, 1])
        self.edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long)
        self.edge_attr = None
    
    def to(self, device):
        self.x = self.x.to(device)
        self.y = self.y.to(device)
        self.edge_index = self.edge_index.to(device)
        if self.edge_attr is not None:
            self.edge_attr = self.edge_attr.to(device)
        return self

class MockDataLoader:
    def __init__(self, num_batches=2):
        self.batches = [MockBatch() for _ in range(num_batches)]
        self.dataset = type('Dataset', (), {'__len__': lambda self: num_batches * 2})()
    
    def __iter__(self):
        return iter(self.batches)
    
    def __len__(self):
        return len(self.batches)

model = SimpleGNNModel(num_tasks=1)
device = torch.device('cpu')
train_loader = MockDataLoader(num_batches=2)
optimizer = torch.optim.Adam(model.parameters(), lr=0.001)
loss_fct = nn.CrossEntropyLoss()
eval_name = 'accuracy'
use_tracking = False
metric_method = None

ARGS = {
    'model': model,
    'device': device,
    'train_loader': train_loader,
    'optimizer': optimizer,
    'loss_fct': loss_fct,
    'eval_name': eval_name,
    'use_tracking': use_tracking,
    'metric_method': metric_method,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, wandb — 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
compute_loss_predictions Not yet run
unverified (harvested, no recorded run)
ocatias/homcountgnns/Exp/training_loop_functions.py
code served (permissive licence) · get_code("11bcc8c9edb1d6e0")
How it ran

no invocation recorded.

parse_args Not yet run
unverified (harvested, no recorded run)
ocatias/homcountgnns/Exp/parser.py
code served (permissive licence) · get_code("226aee21eee53d3f")
How it ran

no invocation recorded.

Also present in other papers' code

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

We investigate novel random graph embeddings that can be computed in expected polynomial time and that are able to distinguish all non-isomorphic graphs in expectation. Previous graph embeddings have limited expressiveness and either cannot distinguish all graphs or cannot be computed efficiently for every graph. To be able to approximate arbitrary functions on graphs, we are interested in efficient alternatives that become arbitrarily expressive with increasing resources. Our approach is based on Lovász' characterisation of graph isomorphism through an infinite dimensional vector of homomorphism counts. Our empirical evaluation shows competitive results on several benchmark graph learning tasks.

For agents

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

get_harvested_code_for_paper("2306.05838")
get_code_for_paper("2306.05838")
have("2306.05838")

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

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

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

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

Connect an agent — have() is free.