SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.03240 · 2023

Learning Hierarchical Relational Representations through Relational Convolutions

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 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 0 have no contract verdict; 8 failures of our instrument; 3 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/2310.03240.json · badge: /api/ran/2310.03240.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
awni00/relational-convolutions canonical (classifier label)
classifier basis: census
9 ran · 3 no recorded run
FunctionStatusWhere it lives
create_positional_encoding Ran
ran, honoured the contract we drafted
awni00/relational-convolutions/relational_neural_networks/grouping_layers.py
pointer only (licence: MIT); the stored copy get_code serves, from awni00/abstractor, is pointer only (licence: GPL-3.0) · get_code("e4da176e568a85ee")
How it ran

The body of this sample is withheld: MIT, as GitHub detects it on this paper's repository, awni00/relational-convolutions, is in the permissive set, but a licence decision keeps the body a pointer: the reason for that decision is not recorded with it. 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.

get_ds_spec Ran
ran; our contract draft was wrong, not the code
awni00/relational-convolutions/experiments/relational_games/serialize_data.py
code served (permissive licence) · get_code("f15e2c340982a7fb")
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 numpy as np

torch.manual_seed(0)

class MockDataset:
    def __init__(self, num_samples=2, x_shape=(4,), y_shape=(3,)):
        self.num_samples = num_samples
        self._x_shape = x_shape
        self._y_shape = y_shape
        self._element_spec = [
            type('TensorSpec', (), {'shape': self._x_shape})(),
            type('TensorSpec', (), {'shape': self._y_shape})()
        ]
    
    def __len__(self):
        return self.num_samples
    
    @property
    def element_spec(self):
        return self._element_spec

ds = MockDataset(num_samples=2, x_shape=(4,), y_shape=(3,))

ARGS = {
    'ds': ds
}
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 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_sub_rel_tensor Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
awni00/relational-convolutions/relational_neural_networks/relational_graphlet_convolution.py
code served (permissive licence) · get_code("723888fe8eb757a9")
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 EagerTensor, ndim 4, dtype family float, shape (2, 3, 3, 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 tensorflow as tf
import numpy as np

# Create a small relation tensor
# Shape: (batch_size=2, n_objects=5, n_objects=5, rel_dim=4)
batch_size = 2
n_objects = 5
rel_dim = 4
R = tf.random.normal((batch_size, n_objects, n_objects, rel_dim))

# Create group indices - selecting 3 objects from the 5 available
group_indices = tf.constant([0, 2, 4], dtype=tf.int32)

ARGS = {
    "R": R,
    "group_indices": group_indices
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 4, dtype family float, shape (2, 3, 3, 4) — shape (2, 3, 3, 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
load_ds_from_npz Ran
ran; our contract draft was wrong, not the code
awni00/relational-convolutions/experiments/relational_games/data_utils.py
code served (permissive licence) · get_code("004e6ed91e9571b9")
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 _TensorSliceDataset. 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
import tempfile
import os

# Create a temporary npz file with the required structure
temp_dir = tempfile.mkdtemp()
npz_file = os.path.join(temp_dir, "test_data.npz")

# Create dummy data matching the expected format
# imgs should have shape that after processing becomes (batch, 9, 12, 12, 3)
# Working backwards:
# Final: (batch, 9, 12, 12, 3)
# Before transpose(0, 1, 3, 4, 2): (batch, 9, 3, 12, 12)
# Before reshape(len(imgs), 9, 3, 12, 12): (batch, 3, 3, 12, 3, 12)
# Before transpose(0, 2, 4, 1, 3, 5): (batch, 3, 3, 12, 3, 12)
# Before reshape(len(imgs), 3, 3, 12, 3, 12): (batch, 3, 3, 12, 3, 12) - shape mismatch, need to compute
# Before transpose(0, 3, 1, 2): (batch, 12, 3, 12, 3, 12) which becomes (batch, 3, 3, 12, 3, 12)
# So original imgs needs shape (batch, 12, 12, 3, 12) -> after transpose(0, 3, 1, 2) -> (batch, 3, 12, 12, 3)

# Let me trace through more carefully:
# Input: (batch, height, width, channels) = (batch, 12, 12, 3)
# After transpose(0, 3, 1, 2): (batch, 3, 12, 12)
# After reshape(batch, 3, 3, 12, 3, 12): needs input of shape (batch, 3*3*12*3*12) = (batch, 3*3*12*3*12)
# So input (batch, 12, 12, 3) has 432 elements per image, reshape to (batch, 3, 3, 12, 3, 12) needs 3*3*12*3*12 = 1944 elements

# Correct approach: original should be (batch, 36, 36, 3)
batch_size = 2
imgs = np.random.randint(0, 256, size=(batch_size, 36, 36, 3), dtype=np.uint8)
labels = np.array([0, 1], dtype=np.int32)

np.savez(npz_file, images=imgs, labels=labels)

ARGS = {
    "filename": npz_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type _TensorSliceDataset — a _TensorSliceDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a _TensorSliceDataset 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
plot_confusion_matrices Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
awni00/relational-convolutions/utils.py
code served (permissive licence) · get_code("c0ac3856f5218dc0")
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 Figure. 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
import sklearn.metrics

# Create synthetic y and pred data
np.random.seed(0)

# y can be 1D array or 2D array with shape (n_samples, 2)
# pred can be 1D array or 2D array with shape (n_samples, 2)
# The function extracts column 1 if 2D

# Create 1D predictions and labels (binary classification)
y = np.array([0, 1, 1, 0, 1, 0, 1, 1, 0, 0])
pred = np.array([0, 1, 1, 0, 0, 0, 1, 1, 0, 1])

ARGS = {
    'y': y,
    'pred': pred
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Figure — a Figure output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Figure 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
rel_inner_prod_filter Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
awni00/relational-convolutions/relational_neural_networks/relational_graphlet_convolution.py
code served (permissive licence) · get_code("6de627e2615f8edf")
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 EagerTensor, ndim 1, dtype family float, shape (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 tensorflow as tf
import numpy as np

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

# Define the arguments
batch_size = 2
group_size = 3
rel_dim = 4

# Create R_g tensor: (batch_size, group_size, group_size, rel_dim)
R_g = tf.constant(
    np.random.randn(batch_size, group_size, group_size, rel_dim).astype(np.float32)
)

# Create filter_ tensor: (group_size, group_size, rel_dim)
filter_ = tf.constant(
    np.random.randn(group_size, group_size, rel_dim).astype(np.float32)
)

ARGS = {
    "R_g": R_g,
    "filter_": filter_,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 1, dtype family float, shape (2,) — shape (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
rel_inner_prod_filters Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
awni00/relational-convolutions/relational_neural_networks/relational_graphlet_convolution.py
code served (permissive licence) · get_code("c15490d8bf9e30a4")
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 EagerTensor, ndim 2, dtype family float, shape (2, 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)

# Create tiny tensors with distinct sizes for different dimensions
batch_size = 2
group_size = 3
rel_dim = 4
n_filters = 5

# R_g: relation tensor of shape (batch_size, group_size, group_size, rel_dim)
R_g = tf.constant(
    np.random.randn(batch_size, group_size, group_size, rel_dim).astype(np.float32)
)

# filters: stack of graphlet filters of shape (n_filters, group_size, group_size, rel_dim)
filters = tf.constant(
    np.random.randn(n_filters, group_size, group_size, rel_dim).astype(np.float32)
)

ARGS = {
    "R_g": R_g,
    "filters": filters,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 5) — shape (2, 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
split_ds Ran
ran; our contract draft was wrong, not the code
awni00/relational-convolutions/utils.py
code served (permissive licence) · get_code("4b852328850892cc")
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, 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 torch.nn as nn

# Create a mock dataset class that supports the required operations
class MockDataset:
    def __init__(self, size):
        self.size = size
        self.data = list(range(size))
    
    def __len__(self):
        return self.size
    
    def shuffle(self, buffer_size):
        # Return a new shuffled dataset
        import random
        shuffled_data = self.data.copy()
        random.shuffle(shuffled_data)
        result = MockDataset(self.size)
        result.data = shuffled_data
        return result
    
    def take(self, n):
        # Return first n elements
        result = MockDataset(n)
        result.data = self.data[:n]
        return result
    
    def skip(self, n):
        # Skip first n elements and return remaining
        result = MockDataset(max(0, self.size - n))
        result.data = self.data[n:]
        return result

# Create dataset with 100 samples
ds = MockDataset(100)

# Test with float val_size and test_size (proportions)
val_size_float = 0.2
test_size_float = 0.1

# Alternative: test with int val_size and test_size (absolute counts)
val_size_int = 20
test_size_int = 10

ARGS = {
    "ds": ds,
    "val_size": val_size_float,
    "test_size": test_size_float
}
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, ndim 1, dtype family float — a tuple 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
train_val_test_split Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
awni00/relational-convolutions/utils.py
code served (permissive licence) · get_code("8f28cfccddd15816")
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 numpy as np
import sklearn.model_selection

# Create small sample data
np.random.seed(0)

# X: list of samples (small feature vectors)
X = [np.array([1.0, 2.0, 3.0, 4.0]), 
     np.array([5.0, 6.0, 7.0, 8.0]),
     np.array([9.0, 10.0, 11.0, 12.0]),
     np.array([13.0, 14.0, 15.0, 16.0]),
     np.array([17.0, 18.0, 19.0, 20.0]),
     np.array([21.0, 22.0, 23.0, 24.0]),
     np.array([25.0, 26.0, 27.0, 28.0]),
     np.array([29.0, 30.0, 31.0, 32.0]),
     np.array([33.0, 34.0, 35.0, 36.0]),
     np.array([37.0, 38.0, 39.0, 40.0])]

# y: labels for stratification (need at least 2 of each class for stratified split)
y = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1])

# test_size: fraction of data for test set
test_size = 0.2

# val_size: fraction of data for validation set
val_size = 0.2

ARGS = {
    "X": X,
    "y": y,
    "test_size": test_size,
    "val_size": val_size
}
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 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
create_callbacks Not yet run
unverified (harvested, no recorded run)
awni00/relational-convolutions/experiments/relational_games/train_model.py
code served (permissive licence) · get_code("c8d580b625c2f4a6")
How it ran

no invocation recorded.

get_obj_seq Not yet run
unverified (harvested, no recorded run)
awni00/relational-convolutions/experiments/relational_games/data_utils.py
code served (permissive licence) · get_code("051c4000e8ab257f")
How it ran

no invocation recorded.

load_ds_from_tfrecord Not yet run
unverified (harvested, no recorded run)
awni00/relational-convolutions/experiments/relational_games/data_utils.py
code served (permissive licence) · get_code("9d0137eab309cda4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 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.

FunctionAlso present inEarliest-datedOthers named
create_positional_encoding 1 other paper
1 dated earlier
2304.00195 (2023-04)
Abstractors and relational cross-attention: An inductive bias for explicit relational reasoning in 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

An evolving area of research in deep learning is the study of architectures and inductive biases that support the learning of relational feature representations. In this paper, we address the challenge of learning representations of hierarchical relations--that is, higher-order relational patterns among groups of objects. We introduce "relational convolutional networks", a neural architecture equipped with computational mechanisms that capture progressively more complex relational features through the composition of simple modules. A key component of this framework is a novel operation that captures relational patterns in groups of objects by convolving graphlet filters--learnable templates of relational patterns--against subsets of the input. Composing relational convolutions gives rise to a deep architecture that learns representations of higher-order, hierarchical relations. We present the motivation and details of the architecture, together with a set of experiments to demonstrate how relational convolutional networks can provide an effective framework for modeling relational tasks that have hierarchical structure.

For agents

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

get_harvested_code_for_paper("2310.03240")
get_code_for_paper("2310.03240")
have("2310.03240")

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

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

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

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

Connect an agent — have() is free.