SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.05830 · 2026

Learning Compact Boolean Networks

Martin Vechev, Yuhao Mao, Yani Zhang, Shengpu Wang

arXiv · PDF · Open in the Atlas

Code that ran

17 of 18 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; 4 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 12 failures of our instrument; 1 no recorded run), measured 2026-11-21; 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/2602.05830.json · badge: /api/ran/2602.05830.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
eth-sri/CompactLogic canonical (classifier label)
classifier basis: census
17 ran · 1 no recorded run
FunctionStatusWhere it lives
binarize_2D Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/experiments/ecg_dataset.py
code served (permissive licence) · get_code("5c2f9e1a7b96d390")
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 3, dtype family float, shape (1, 5, 7) 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)

# Create a small 1-D signal tensor
# The function accepts shape (1, L) or (L,), so we'll test with (L,)
x = torch.randn(7)

# Number of threshold levels
num_thd = 5

ARGS = {
    "x": x,
    "num_thd": num_thd,
}
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 3, dtype family float, shape (1, 5, 7) — shape (1, 5, 7) 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
binarize_flat Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/experiments/ecg_dataset.py
code served (permissive licence) · get_code("f152a8954eeea37c")
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 (12,) 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)

# Create a small 1-D signal tensor of shape (1, L)
# L = 4 for a small example
x = torch.randn(1, 4)

# Number of threshold levels
num_thd = 3

ARGS = {
    "x": x,
    "num_thd": num_thd,
}
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 (12,) — shape (12,) 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
binarize_tensor Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/experiments/experiment_script.py
code served (permissive licence) · get_code("7d9322d31da5531d")
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 2, dtype family float, shape (2, 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 torch

torch.manual_seed(0)

# Create a small tensor with values between 0 and 1 for testing binarization
t = torch.rand(2, 4)

ARGS = {
    "t": t,
    "threshold": 0.5
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
default_pruned_module_name Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/compiler/naming.py
code served (permissive licence) · get_code("55a7335a4896082f")
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 torch
import numpy as np

torch.manual_seed(0)

# Construct arguments for default_pruned_module_name
metadata = {
    'dataset': 'cifar-10',
    'struct': 'conv-net',
    'experiment_id': 'exp_001'
}

reduction_style = 'balanced'

ARGS = {
    'metadata': metadata,
    'reduction_style': reduction_style
}
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 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
emit_clocked_wrapper_verilog Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/compiler/clocked.py
code served (permissive licence) · get_code("7d0bdc7f57f35316")
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.

# Setup code for emit_clocked_wrapper_verilog

ARGS = {
    'inner_module_name': 'my_dut',
    'input_width': 8,
    'output_width': 16,
    'wrapper_module_name': 'my_dut_clocked',
}
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
eval_gate_torch Ran
ran, violated the contract we drafted
eth-sri/CompactLogic/compiler/gates.py
code served (permissive licence) · get_code("5b2ae47540075a3b")
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 2, dtype family float, shape (2, 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 torch

torch.manual_seed(0)

# Create small boolean tensors for bitwise operations
# Shape: (2, 4) - batch size 2, dimension 4
a = torch.tensor([[True, False, True, False], 
                   [False, True, False, True]], dtype=torch.bool)
b = torch.tensor([[True, True, False, False], 
                   [True, False, True, False]], dtype=torch.bool)

# gate_id should be an integer between 0 and 15
gate_id = 1

ARGS = {
    "gate_id": gate_id,
    "a": a,
    "b": b
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
get_data_dir Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/experiments/experiment_script.py
code served (permissive licence) · get_code("0803d9ef52f24c28")
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 torch
import numpy as np
from pathlib import Path

class Args:
    def __init__(self, data_path=None):
        self.data_path = data_path

ARGS = {
    "args": Args(data_path="/tmp/data"),
    "name": "dataset"
}
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 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
infer_metadata_path Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/compiler/extract.py
code served (permissive licence) · get_code("d2d9416392ffe25f")
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 PosixPath. 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.

from pathlib import Path

checkpoint_path = Path("/tmp/checkpoint_epoch_5.pt")

ARGS = {
    "checkpoint_path": checkpoint_path,
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
input_dim_of_dataset Ran
ran, honoured the contract we drafted
eth-sri/CompactLogic/compiler/model_builder.py
code served (permissive licence) · get_code("700beef031b89839")
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)

# The function takes a single parameter: dataset (a string)
# It parses the dataset string to extract information and compute input dimensions
# We need to provide valid dataset strings that match the patterns in the function

ARGS = {
    'dataset': 'mnist'
}
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
input_shape_of_dataset Ran
ran, honoured the contract we drafted
eth-sri/CompactLogic/compiler/model_builder.py
code served (permissive licence) · get_code("459081541341753b")
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 int; 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

# Test with 'mnist' dataset
ARGS = {
    'dataset': 'mnist'
}

# Verify the function can be called with this argument
def input_shape_of_dataset(dataset: str) -> tuple[int, ...]:
    if dataset == 'mnist':
        return (1, 28, 28)
    if 'cifar-10' in dataset:
        num_thd = int(dataset.split('-')[2])
        return (3 * num_thd, 32, 32)
    if 'tiny-imagenet' in dataset:
        num_thd = int(dataset.split('-')[2])
        return (3 * num_thd, 64, 64)
    if 'ECG2D' in dataset:
        num_thd = int(dataset.split('-')[1])
        return (1, num_thd, 187)
    raise ValueError(f'Unsupported dataset for compactlogic compiler model builder: {dataset!r}')

# Test cases to ensure ARGS works
result = input_shape_of_dataset(**ARGS)
assert result == (1, 28, 28), f"Expected (1, 28, 28), got {result}"
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 int — 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
load_checkpoint_artifacts Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/compiler/extract.py
code served (permissive licence) · get_code("a2a627f547c4fa12")
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 json
import tempfile
from pathlib import Path

torch.manual_seed(0)

# Create temporary directory for test files
tmpdir = tempfile.TemporaryDirectory()
tmppath = Path(tmpdir.name)

# Create a checkpoint file
checkpoint_data = {
    'model_state': {'layer1.weight': torch.randn(4, 3)},
    'optimizer_state': {'lr': 0.001},
    'epoch': 5
}
checkpoint_path = tmppath / 'checkpoint.pt'
torch.save(checkpoint_data, checkpoint_path)

# Create a metadata JSON file
metadata = {
    'experiment_name': 'test_experiment',
    'model_type': 'transformer',
    'config': {'hidden_dim': 128, 'num_layers': 2}
}
metadata_path = tmppath / 'meta_data.json'
with metadata_path.open('w', encoding='utf-8') as f:
    json.dump(metadata, f)

ARGS = {
    'checkpoint_path': checkpoint_path,
    'metadata_path': metadata_path
}
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
load_ecg_loaders Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/experiments/ecg_dataset.py
code served (permissive licence) · get_code("81de69b524c2229b")
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 numpy as np
import pandas as pd
import torch
from torch.utils.data import Dataset, DataLoader
from io import StringIO

torch.manual_seed(0)

# Create small synthetic ECG data as CSV strings
train_csv_data = """0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,0.5,0
0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,0.9,0.8,1
0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,0.9,0.8,0.7,0"""

test_csv_data = """0.15,0.25,0.35,0.45,0.55,0.65,0.75,0.85,0.95,0.85,0.75,0
0.25,0.35,0.45,0.55,0.65,0.75,0.85,0.95,0.85,0.75,0.65,1"""

# Parse the CSV data into dataframes
train_df = pd.read_csv(StringIO(train_csv_data), header=None)
test_df = pd.read_csv(StringIO(test_csv_data), header=None)

# Create temporary CSV files
import tempfile
import os

temp_dir = tempfile.mkdtemp()
train_path = os.path.join(temp_dir, 'mitbih_train.csv')
test_path = os.path.join(temp_dir, 'mitbih_test.csv')

train_df.to_csv(train_path, header=False, index=False)
test_df.to_csv(test_path, header=False, index=False)

# Define ARGS with all parameters for load_ecg_loaders
ARGS = {
    'train_path': train_path,
    'test_path': test_path,
    'num_thd': 3,
    'use_2d': False,
    'batch_size': 2,
    'num_workers': 0,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, 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
module_name_from_metadata Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/compiler/naming.py
code served (permissive licence) · get_code("81e47d8ec93a5c61")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Construct metadata dict with all relevant fields
metadata = {
    'dataset': 'imagenet-v2',
    'struct': 'deep-learning',
    'experiment_id': 'baseline_001'
}

# Construct suffix parameter
suffix = 'final'

# Map all parameters to values
ARGS = {
    'metadata': metadata,
    'suffix': suffix
}
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 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
num_classes_of_dataset Ran
ran, honoured the contract we drafted
eth-sri/CompactLogic/compiler/model_builder.py
code served (permissive licence) · get_code("68703c94f45c875b")
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

torch.manual_seed(0)

# The function takes a dataset string and returns the number of classes
# It checks if the dataset string matches certain patterns
ARGS = {
    'dataset': 'mnist'
}
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 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
stable_sample_key Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/experiments/cancer_dataset.py
code served (permissive licence) · get_code("e0506c590809caa4")
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 hashlib
import numpy as np

# Create small numpy arrays for image and mask
image = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)
mask = np.random.randint(0, 2, size=(4, 3), dtype=np.int32)
cell_type = np.array([1, 2, 3, 4], dtype=np.int64)

ARGS = {
    "image": image,
    "mask": mask,
    "cell_type": cell_type
}
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 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
truth_eval_scalar Ran
ran, honoured the contract we drafted
eth-sri/CompactLogic/compiler/gates.py
code served (permissive licence) · get_code("2e8ccc1dae06051a")
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

torch.manual_seed(0)

ARGS = {
    "gate_id": 7,
    "a": 1,
    "b": 0,
}
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 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
verilog_gate_expr Ran
ran; our contract draft was wrong, not the code
eth-sri/CompactLogic/compiler/gates.py
code served (permissive licence) · get_code("81739331a6f03b6f")
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.

# Setup code for verilog_gate_expr function

ARGS = {
    'gate_id': 1,
    'a': 'input_a',
    'b': 'input_b'
}
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
emit_naive_pruned_reindexed_clocked_bundle_from_checkpoint Not yet run
unverified (harvested, no recorded run)
eth-sri/CompactLogic/compiler/clocked.py
code served (permissive licence) · get_code("77981c6865c19ec5")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Floating-point neural networks dominate modern machine learning but incur substantial inference costs, motivating emerging interest in Boolean networks for resource-constrained deployments. Since Boolean networks use only Boolean operations, they can achieve nanosecond-scale inference latency. However, learning Boolean networks that are both compact and accurate remains challenging because of their discrete, combinatorial structure. In this work we address this challenge via three novel, complementary contributions: (i) a new parameter-free strategy for learning effective connections, (ii) a novel compact convolutional Boolean architecture that exploits spatial locality while requiring fewer Boolean operations than existing convolutional kernels, and (iii) an adaptive discretization procedure that reduces the accuracy drop incurred when converting a continuously relaxed network into a discrete Boolean network. Across standard vision benchmarks, our method improves the Pareto frontier over prior state-of-the-art methods, achieving higher accuracy with up to 47× fewer Boolean operations. This advantage also extends to other modalities. Further, on an FPGA, our model on MNIST achieves 99.38% accuracy with 6.48 ns latency, surpassing the prior state-of-the-art in both accuracy and runtime, while generating a 7× smaller circuit. Code and models are available at https://github.com/eth-sri/CompactLogic.

For agents

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

get_harvested_code_for_paper("2602.05830")
get_code_for_paper("2602.05830")
have("2602.05830")

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

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

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

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

Connect an agent — have() is free.