SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2208.08195 · 2022

Benchmarking Compositionality with Formal Languages

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 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; 3 failures of our instrument; 0 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/2208.08195.json · badge: /api/ran/2208.08195.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
valvoda/neuraltransducer canonical (classifier label)
classifier basis not recorded on the link
9 ran · 0 no recorded run
FunctionStatusWhere it lives
Embedding Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) · constructed an object; no result was computed
valvoda/neuraltransducer/src/transformer.py
code served (permissive licence) · get_code("a3e27bd1e8b628ed")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned an instance of its own class, Embedding: 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)

num_embeddings = 10
embedding_dim = 4
padding_idx = 0

ARGS = {
    'num_embeddings': num_embeddings,
    'embedding_dim': embedding_dim,
    'padding_idx': padding_idx
}
Setup block drafted by
a language model, Claude Sonnet 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 Embedding — 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 Embedding 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
Linear Ran
ran; our contract draft was wrong, not the code · constructed an object; no result was computed
valvoda/neuraltransducer/src/transformer.py
pointer only (licence: MIT); the stored copy get_code serves, from instance-wise-ordered-transformer/iot, is pointer only (licence: NOASSERTION) · get_code("8cd8cb0d1e9e63e4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from instance-wise-ordered-transformer/iot, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

dummy_mask Ran
ran on a synthesized input
valvoda/neuraltransducer/src/model.py
code served (permissive licence) · get_code("6770850b6271c818")
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 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 torch

torch.manual_seed(0)

# The function accepts a sequence that can be either:
# - a 1D tensor
# - a 2D tensor with second dimension = 1
# - a tuple where the first element is one of the above

# Create a 1D tensor case
seq_1d = torch.randn(2)

# Create a 2D tensor case with shape (batch, 1)
seq_2d = torch.randn(2, 1)

# Create a tuple case
seq_tuple = (torch.randn(2), "metadata")

ARGS = {
    "seq": seq_1d
}
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 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
fancy_gather Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
valvoda/neuraltransducer/src/model.py
code served (permissive licence) · get_code("e75d3bbaec7257ef")
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 Tensor, ndim 3, dtype family float, shape (2, 4, 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)

# Analyze the function:
# - fancy_gather takes 'value' and 'index' tensors
# - Asserts value.size(1) == index.size(1)
# - Splits both tensors along dim=1
# - For each pair (v, i), indexes v with i.view(-1)
# - Concatenates results along dim=1

# value: needs to be indexable with a 1D tensor
# index: contains indices to gather from value
# Both need same size(1) dimension

# Create value tensor: shape (batch=2, dim=4, feature=3)
# This allows indexing with 1D indices
value = torch.randn(2, 4, 3)

# Create index tensor: shape (batch=2, dim=4)
# Contains indices in range [0, 2) to index into value's first dimension
index = torch.randint(0, 2, (2, 4))

ARGS = {
    "value": value,
    "index": index,
}
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 Tensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
find_split Ran
ran on a synthesized input
valvoda/neuraltransducer/dataset_generator.py
code served (permissive licence) · get_code("c12921cb3468831c")
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 int, ndim 0, dtype family int, shape () 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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# - find_split takes 'outputs' as parameter
# - It iterates through outputs and checks len(i) for each element
# - It needs elements where len(i) returns a value
# - The function is looking for a split ratio between 0.15 and 0.25
# - We need lists/sequences as elements in outputs

# Create outputs as a list of lists with varying lengths
# We want to construct data such that some threshold len_n produces a split between 0.15 and 0.25
# If split = len(long_lengths) / (len(long_lengths) + len(small_lengths))
# And we want 0.15 < split < 0.25
# For example: 4 long and 16 small = 4/20 = 0.20 (valid)

outputs = [
    [1, 2],                    # length 2
    [1, 2, 3],                 # length 3
    [1, 2, 3, 4],              # length 4
    [1, 2, 3, 4, 5],           # length 5
    [1, 2, 3, 4, 5, 6],        # length 6
    [1, 2, 3, 4, 5, 6, 7],     # length 7
    [1, 2, 3, 4, 5, 6, 7, 8],  # length 8
    [1, 2, 3, 4, 5, 6, 7, 8, 9],  # length 9
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],  # length 10
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],  # length 11
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],  # length 12
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13],  # length 13
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],  # length 14
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],  # length 15
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16],  # length 16
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],  # length 17
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18],  # length 18
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],  # length 19
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],  # length 20
    list(range(25)),  # length 25
    list(range(30)),  # length 30
    list(range(35)),  # length 35
    list(range(40)),  # length 40
]

ARGS = {
    "outputs": outputs
}
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 int, ndim 0, dtype family int, shape () — shape () 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_logger Ran
ran on a synthesized input
valvoda/neuraltransducer/src/util.py
code served (permissive licence) · get_code("03bea59a9689bb8f")
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 RootLogger. 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 logging
import sys
import time
import tempfile
import os

class LogFormatter:

    def __init__(self):
        self.start_time = time.time()

    def format(self, record):
        elapsed_seconds = round(record.created - self.start_time)
        prefix = '%s - %s - %s' % (record.levelname, time.strftime('%x %X'), timedelta(seconds=elapsed_seconds))
        message = record.getMessage()
        message = message.replace('\n', '\n' + ' ' * (len(prefix) + 3))
        return '%s - %s' % (prefix, message) if message else ''

from datetime import timedelta

def get_logger(log_file, log_level='info'):
    """
    create logger and output to file and stdout
    """
    assert log_level in ['info', 'debug']
    log_formatter = LogFormatter()
    logger = logging.getLogger()
    log_level = {'info': logging.INFO, 'debug': logging.DEBUG}[log_level]
    logger.setLevel(log_level)
    stream = logging.StreamHandler(sys.stdout)
    stream.setFormatter(log_formatter)
    logger.addHandler(stream)
    filep = logging.FileHandler(log_file, mode='a')
    filep.setFormatter(log_formatter)
    logger.addHandler(filep)
    return logger

# Create a temporary file path for the log file
temp_dir = tempfile.gettempdir()
log_file_path = os.path.join(temp_dir, 'test_logger.log')

ARGS = {
    'log_file': log_file_path,
    'log_level': 'info'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type RootLogger — a RootLogger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a RootLogger 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_temp_log_filename Ran
ran on a synthesized input
valvoda/neuraltransducer/src/util.py
code served (permissive licence) · get_code("693fef0d16061a2b")
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 str. 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 os
import random
import string
import tempfile

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

def maybe_mkdir(filename):
    """
    maybe mkdir
    """
    path = os.path.dirname(filename)
    if not os.path.isdir(path):
        try:
            os.makedirs(path)
        except FileExistsError:
            pass

def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
    return ''.join((random.choice(chars) for _ in range(size)))

def get_temp_log_filename(prefix='exp', dir='scratch/explog'):
    id = id_generator()
    fp = f'{dir}/{prefix}-{id}'
    maybe_mkdir(fp)
    return fp

# Create a temporary directory for testing
temp_base_dir = tempfile.mkdtemp()

ARGS = {
    'prefix': 'test_exp',
    'dir': os.path.join(temp_base_dir, 'scratch/explog')
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
grad_norm Ran
ran on a synthesized input
valvoda/neuraltransducer/src/util.py
code served (permissive licence) · get_code("eb97ec33109d48b7")
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 0, dtype family float, shape () 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

torch.manual_seed(0)

# Create a small model with parameters that have gradients
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        return self.linear2(self.linear1(x))

model = SimpleModel()

# Create some dummy input and compute forward pass
x = torch.randn(2, 4)
y = torch.randn(2, 2)

# Forward pass
output = model(x)

# Compute loss and backward to populate gradients
loss = nn.MSELoss()(output, y)
loss.backward()

# Collect parameters with gradients
parameters = list(model.parameters())

ARGS = {
    "parameters": parameters,
    "norm_type": 2
}
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 0, dtype family float, shape () — shape () 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
model_func Ran
ran on a synthesized input
valvoda/neuraltransducer/get_results.py
code served (permissive licence) · get_code("9a67703c4f6f0e07")
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 (10,) 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 small numpy arrays for the exponential decay model
x = np.linspace(0, 5, 10)  # input values
a = 2.5  # amplitude parameter
k = 0.3  # decay rate parameter
b = 0.5  # baseline parameter

ARGS = {
    'x': x,
    'a': a,
    'k': k,
    'b': b
}
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 (10,) — shape (10,) 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

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 3 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 6 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
Linear 58 other papers
28 dated earlier, 29 later, 1 same year, order not determinable · 5 only as an assembly brick
1409.0473 (2014-09)
Neural Machine Translation by Jointly Learning to Align and Translate
1706.03762 (2017-06)
Attention Is All You Need
1904.01681 (2019-04)
Augmented Neural ODEs
and 55 more not named here
Embedding 18 other papers
13 dated earlier, 5 later · 3 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1905.12790 (2019-05)
A Generalized Framework of Sequence Generation with Application to Undirected Sequence Models
1911.02116 (2019-11)
Unsupervised Cross-lingual Representation Learning at Scale
and 15 more not named here
fancy_gather 1 other paper
1 dated earlier
1808.10024 (2018-08)
Hard Non-Monotonic Attention for Character-Level Transduction

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

Recombining known primitive concepts into larger novel combinations is a quintessentially human cognitive capability. Whether large neural models in NLP can acquire this ability while learning from data is an open question. In this paper, we investigate this problem from the perspective of formal languages. We use deterministic finite-state transducers to make an unbounded number of datasets with controllable properties governing compositionality. By randomly sampling over many transducers, we explore which of their properties contribute to learnability of a compositional relation by a neural network. We find that the models either learn the relations completely or not at all. The key is transition coverage, setting a soft learnability limit at 400 examples per transition.

For agents

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

get_harvested_code_for_paper("2208.08195")
get_code_for_paper("2208.08195")
have("2208.08195")

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

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

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

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

Connect an agent — have() is free.