SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.29331 · 2026

Sample Complexity of Scientific Discovery: PAC Learnability of Compositional Function Trees

S ¸uayp, Talha Kocabay, Talha Üzgar Akkus, Kerem Yalc ¸ın

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 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, 1 violated it and 0 have no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2606.29331.json · badge: /api/ran/2606.29331.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
suayptalha/scientific-pac canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
load_rows Ran
ran; our contract draft was wrong, not the code
suayptalha/scientific-pac/make_paper_artifacts.py
code served (permissive licence) · get_code("bb25d3a84bcd337a")
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 json
import tempfile
import os
from dataclasses import dataclass
from typing import Dict, List, Tuple

@dataclass(frozen=True)
class Row:
    depth: int
    n_train: int
    train_mse: float
    test_mse: float
    gen_gap: float
    L_hat: float
    x_term: float

def load_rows(path: str) -> List[Row]:
    out: List[Row] = []
    with open(path, 'r', encoding='utf-8') as f:
        for line in f:
            if not line.strip():
                continue
            d = json.loads(line)
            out.append(Row(depth=int(d['depth']), n_train=int(d['n_train']), train_mse=float(d['train_mse']), test_mse=float(d['test_mse']), gen_gap=float(d['gen_gap']), L_hat=float(d['L_hat']), x_term=float(d['x_term'])))
    return out

# Create a temporary file with valid JSON lines
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.jsonl')
temp_path = temp_file.name

# Write sample data to the temporary file
sample_data = [
    {"depth": 1, "n_train": 100, "train_mse": 0.5, "test_mse": 0.6, "gen_gap": 0.1, "L_hat": 0.55, "x_term": 0.05},
    {"depth": 2, "n_train": 200, "train_mse": 0.3, "test_mse": 0.35, "gen_gap": 0.05, "L_hat": 0.32, "x_term": 0.02},
    {"depth": 3, "n_train": 300, "train_mse": 0.2, "test_mse": 0.25, "gen_gap": 0.05, "L_hat": 0.22, "x_term": 0.02},
]

for row_dict in sample_data:
    temp_file.write(json.dumps(row_dict) + '\n')

temp_file.close()

ARGS = {
    "path": temp_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 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
load_rows Ran
ran; our contract draft was wrong, not the code
suayptalha/scientific-pac/postprocess_results.py
code served (permissive licence) · get_code("476e81ebdff6983b")
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 json
import tempfile
import os
from dataclasses import dataclass
from typing import Dict, List, Tuple

@dataclass(frozen=True)
class Row:
    depth: int
    n_train: int
    gen_gap: float
    L_hat: float
    x_term: float

def load_rows(path: str) -> List[Row]:
    rows: List[Row] = []
    with open(path, 'r', encoding='utf-8') as f:
        for line in f:
            if not line.strip():
                continue
            d = json.loads(line)
            rows.append(Row(depth=int(d['depth']), n_train=int(d['n_train']), gen_gap=float(d['gen_gap']), L_hat=float(d['L_hat']), x_term=float(d['x_term'])))
    return rows

# Create a temporary file with valid JSON lines
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.jsonl', encoding='utf-8')
temp_file.write('{"depth": 1, "n_train": 100, "gen_gap": 0.05, "L_hat": 0.1, "x_term": 0.2}\n')
temp_file.write('{"depth": 2, "n_train": 200, "gen_gap": 0.08, "L_hat": 0.15, "x_term": 0.25}\n')
temp_file.write('\n')  # empty line to test line stripping
temp_file.write('{"depth": 3, "n_train": 300, "gen_gap": 0.12, "L_hat": 0.2, "x_term": 0.3}\n')
temp_file.close()

ARGS = {
    'path': temp_file.name
}
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 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
mse Ran
ran, honoured the contract we drafted
suayptalha/scientific-pac/run_experiments.py
code served (permissive licence) · get_code("9e5d916d0d4b1e82")
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 float, 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
from torch import nn
from torch.utils.data import DataLoader, Dataset

torch.manual_seed(0)

# Define a minimal model that accepts input and produces output
class SimpleModel(nn.Module):
    def __init__(self, input_dim: int, output_dim: int):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x):
        return self.linear(x)

# Define a minimal dataset
class SimpleDataset(Dataset):
    def __init__(self, n_samples: int, input_dim: int, output_dim: int):
        self.n_samples = n_samples
        self.input_dim = input_dim
        self.output_dim = output_dim
    
    def __len__(self):
        return self.n_samples
    
    def __getitem__(self, idx):
        x = torch.randn(self.input_dim)
        y = torch.randn(self.output_dim)
        return x, y

# Create instances
model = SimpleModel(input_dim=4, output_dim=3)
dataset = SimpleDataset(n_samples=2, input_dim=4, output_dim=3)
loader = DataLoader(dataset, batch_size=2)
device = torch.device('cpu')

ARGS = {
    'model': model,
    'loader': loader,
    'device': device
}
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 float, 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
pearsonr Ran
ran, violated the contract we drafted
suayptalha/scientific-pac/postprocess_results.py
code served (permissive licence) · get_code("ef2415d1163268eb")
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 float, 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 numpy as np

# Create two numpy arrays with distinct shapes to test pearsonr
x = np.array([1.0, 2.0, 3.0, 4.0, 5.0], dtype=np.float32)
y = np.array([2.0, 4.0, 5.0, 4.0, 6.0], dtype=np.float32)

ARGS = {
    "x": x,
    "y": y,
}
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 float, 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
r2_linear_through_origin Ran
ran; our contract draft was wrong, not the code
suayptalha/scientific-pac/postprocess_results.py
code served (permissive licence) · get_code("c6e4bab4a81d5c0a")
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

# Create small numpy arrays for x and y
# x and y are 1D arrays of floats
np.random.seed(0)
x = np.random.randn(10).astype(np.float64)
y = np.random.randn(10).astype(np.float64)

ARGS = {
    "x": x,
    "y": y,
}
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 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
sample_ground_truth Ran
ran; our contract draft was wrong, not the code
suayptalha/scientific-pac/run_experiments.py
code served (permissive licence) · get_code("4f37c271a7ea8253")
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 GroundTruthSpec. 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)

ARGS = {
    "depth": 2,
    "seed": 42,
}
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 GroundTruthSpec — a GroundTruthSpec output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a GroundTruthSpec 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
fit_model Not yet run
unverified (harvested, no recorded run)
suayptalha/scientific-pac/run_experiments.py
code served (permissive licence) · get_code("746a088e29ceb105")
How it ran

no invocation recorded.

write_table_landscape_grid Not yet run
unverified (harvested, no recorded run)
suayptalha/scientific-pac/make_paper_artifacts.py
code served (permissive licence) · get_code("28895b2bbe046918")
How it ran

no invocation recorded.

write_table_main_compact Not yet run
unverified (harvested, no recorded run)
suayptalha/scientific-pac/make_paper_artifacts.py
code served (permissive licence) · get_code("b094adfdf28f6526")
How it ran

no invocation recorded.

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, 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 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

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

Abstract

Scientific discovery via symbolic regression is often viewed as statistically and computationally intractable because the hypothesis space of expressions grows combinatorially with depth. This paper revisits the statistical side through the lens of PAC learning, focusing on compositional function trees built from a finite vocabulary of smooth operators (e.g., {+, ×, sin, exp} and affine maps). We prove that the relevant generalization quantity-Rademacher complexity, hence the excess risk-does not necessarily blow up exponentially with the number of distinct symbolic structures, but is controlled by (i) the depth d and (ii) the Lipschitz constants of the base operators along the composed computation graph. Concretely, under mild Lipschitz conditions on operators and bounded affine leaves, a finite-union bound over a vocabulary of size K=|H base | together with Maurer-type vector contraction yields ) with arity bound b; corresponding high-probability risk bounds scale as O(L d / √ n) when K, b=O(1) and R n (H 1 comp )=O(n -1/2 ). We complement the theory with a modular codebase that trains differentiable operator trees (not MLPs) on synthetic "physics-like" targets of controlled depth and shows that the empirical generalization gap correlates positively with the predicted complexity term ( L d )/ √ n.

For agents

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

get_harvested_code_for_paper("2606.29331")
get_code_for_paper("2606.29331")
have("2606.29331")

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

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

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

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

Connect an agent — have() is free.