SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.06427 · ICML · 2021

Neural Symbolic Regression that Scales

Aurelien Lucchi, Luca Biggio, Tommaso Bendinelli, Alexander Neitz, Giambattista Parascandolo

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2106.06427.json · badge: /api/ran/2106.06427.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
deep-symbolic-mathematics/TPSR community
Papers with Code archive
4 ran · 2 no recorded run
SymposiumOrganization/NeuralSymbolicRegressionThatScales marked official in Papers with Code
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
ISAB Ran
ran on a synthesized input · constructed an object; no result was computed
deep-symbolic-mathematics/TPSR/nesymres/src/nesymres/architectures/model.py
code served (permissive licence) · get_code("3b2ac5946d2ff47e")
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 an instance of its own class, ISAB: 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    "dim_in": 4,
    "dim_out": 6,
    "num_heads": 2,
    "num_inds": 3,
    "ln": False
}
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 ISAB — 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 ISAB 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
MAB Ran
ran on a synthesized input · constructed an object; no result was computed
deep-symbolic-mathematics/TPSR/nesymres/src/nesymres/architectures/model.py
code served (permissive licence) · get_code("cda79b95cee80af2")
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 an instance of its own class, MAB: 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
from torch import nn
import math

torch.manual_seed(0)

# Define the MAB module first
class MAB(nn.Module):

    def __init__(self, dim_Q, dim_K, dim_V, num_heads, ln=False):
        super(MAB, self).__init__()
        self.dim_V = dim_V
        self.num_heads = num_heads
        self.fc_q = nn.Linear(dim_Q, dim_V)
        self.fc_k = nn.Linear(dim_K, dim_V)
        self.fc_v = nn.Linear(dim_K, dim_V)
        if ln:
            self.ln0 = nn.LayerNorm(dim_V)
            self.ln1 = nn.LayerNorm(dim_V)
        self.fc_o = nn.Linear(dim_V, dim_V)

    def forward(self, Q, K):
        Q = self.fc_q(Q)
        K, V = (self.fc_k(K), self.fc_v(K))
        dim_split = self.dim_V // self.num_heads
        Q_ = torch.cat(Q.split(dim_split, 2), 0)
        K_ = torch.cat(K.split(dim_split, 2), 0)
        V_ = torch.cat(V.split(dim_split, 2), 0)
        A = torch.softmax(Q_.bmm(K_.transpose(1, 2)) / math.sqrt(self.dim_V), 2)
        O = torch.cat((Q_ + A.bmm(V_)).split(Q.size(0), 0), 2)
        O = O if getattr(self, 'ln0', None) is None else self.ln0(O)
        O = O + torch.nn.functional.relu(self.fc_o(O))
        O = O if getattr(self, 'ln1', None) is None else self.ln1(O)
        return O


# Create an instance of MAB with valid parameters
# dim_Q=4, dim_K=5, dim_V=8 (divisible by num_heads=2)
mab_instance = MAB(dim_Q=4, dim_K=5, dim_V=8, num_heads=2, ln=False)

# Create input tensors
# Q: (batch_size=2, seq_len=3, dim_Q=4)
# K: (batch_size=2, seq_len=3, dim_K=5)
Q = torch.randn(2, 3, 4)
K = torch.randn(2, 3, 5)

ARGS = {
    'dim_Q': 4,
    'dim_K': 5,
    'dim_V': 8,
    'num_heads': 2,
    'ln': False
}
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 MAB — 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 MAB 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
PMA Ran
ran on a synthesized input · constructed an object; no result was computed
deep-symbolic-mathematics/TPSR/nesymres/src/nesymres/architectures/model.py
code served (permissive licence) · get_code("fcf17228bc421518")
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 an instance of its own class, PMA: 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
from torch import nn

torch.manual_seed(0)

# Define the PMA class (from the provided code)
class MAB(nn.Module):
    def __init__(self, dim_Q, dim_K, dim_V, num_heads, ln=False):
        super(MAB, self).__init__()
        self.dim_V = dim_V
        self.num_heads = num_heads
        self.fc_q = nn.Linear(dim_Q, dim_V)
        self.fc_k = nn.Linear(dim_K, dim_V)
        self.fc_v = nn.Linear(dim_K, dim_V)
        if ln:
            self.ln0 = nn.LayerNorm(dim_V)
            self.ln1 = nn.LayerNorm(dim_V)
        self.fc_o = nn.Linear(dim_V, dim_V)

    def forward(self, Q, K):
        import math
        import torch.nn.functional as F
        Q = self.fc_q(Q)
        K, V = (self.fc_k(K), self.fc_v(K))
        dim_split = self.dim_V // self.num_heads
        Q_ = torch.cat(Q.split(dim_split, 2), 0)
        K_ = torch.cat(K.split(dim_split, 2), 0)
        V_ = torch.cat(V.split(dim_split, 2), 0)
        A = torch.softmax(Q_.bmm(K_.transpose(1, 2)) / math.sqrt(self.dim_V), 2)
        O = torch.cat((Q_ + A.bmm(V_)).split(Q.size(0), 0), 2)
        O = O if getattr(self, 'ln0', None) is None else self.ln0(O)
        O = O + F.relu(self.fc_o(O))
        O = O if getattr(self, 'ln1', None) is None else self.ln1(O)
        return O

class PMA(nn.Module):
    def __init__(self, dim, num_heads, num_seeds, ln=False):
        super(PMA, self).__init__()
        self.S = nn.Parameter(torch.Tensor(1, num_seeds, dim))
        nn.init.xavier_uniform_(self.S)
        self.mab = MAB(dim, dim, dim, num_heads, ln=ln)

    def forward(self, X):
        return self.mab(self.S.repeat(X.size(0), 1, 1), X)

# Build arguments for PMA.__init__
dim = 4
num_heads = 2
num_seeds = 3
ln = False

ARGS = {
    "dim": dim,
    "num_heads": num_heads,
    "num_seeds": num_seeds,
    "ln": ln
}
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 PMA — 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 PMA 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
SetEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
deep-symbolic-mathematics/TPSR/nesymres/src/nesymres/architectures/model.py
code served (permissive licence) · get_code("ef86d9aa5e381b7f")
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 an instance of its own class, SetEncoder: 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)

class Config:
    def __init__(self):
        self.linear = True
        self.bit16 = False
        self.norm = False
        self.mean = [0.0]
        self.std = [1.0]
        self.activation = 'relu'
        self.input_normalization = False
        self.dim_input = 3
        self.dim_hidden = 8
        self.num_heads = 2
        self.num_inds = 4
        self.n_l_enc = 1
        self.num_features = 2
        self.ln = False

cfg = Config()

ARGS = {
    'cfg': cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pytorch_lightning, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SetEncoder — 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 SetEncoder 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
InvalidPrefixExpression Not yet run
unverified (harvested, no recorded run)
deep-symbolic-mathematics/TPSR/nesymres/src/nesymres/architectures/model.py
code served (permissive licence) · get_code("edb194deb9c56b4a")
How it ran

no invocation recorded.

Model Not yet run
unverified (harvested, no recorded run)
deep-symbolic-mathematics/TPSR/nesymres/src/nesymres/architectures/model.py
code served (permissive licence) · get_code("726dafacf43bbdcc")
How it ran

no invocation recorded.

Model Not yet run
unverified (harvested, no recorded run)
SymposiumOrganization/NeuralSymbolicRegressionThatScales/src/nesymres/architectures/model.py
code served (permissive licence) · get_code("860cef76070a12cb")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 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
MAB
brick of this paper's assembly: helper
1 other paper
1 later
2301.12780 (2023-01)
Equivariant Architectures for Learning in Deep Weight Spaces

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

Symbolic equations are at the core of scientific discovery. The task of discovering the underlying equation from a set of input-output pairs is called symbolic regression. Traditionally, symbolic regression methods use hand-designed strategies that do not improve with experience. In this paper, we introduce the first symbolic regression method that leverages large scale pre-training. We procedurally generate an unbounded set of equations, and simultaneously pre-train a Transformer to predict the symbolic equation from a corresponding set of input-output-pairs. At test time, we query the model on a new set of points and use its output to guide the search for the equation. We show empirically that this approach can re-discover a set of well-known physical equations, and that it improves over time with more data and compute.

For agents

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

get_harvested_code_for_paper("2106.06427")
get_code_for_paper("2106.06427")
have("2106.06427")

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

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

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

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

Connect an agent — have() is free.