SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.06833 · NeurIPS · 2023

Transformer-based Planning for Symbolic Regression

Chandan Reddy, Parshin Shojaee, Kazem Meidani, Amir Farimani

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 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 2 have no contract verdict; 2 failures of our instrument; 4 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/2303.06833.json · badge: /api/ran/2303.06833.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 canonical (classifier label)
classifier basis: classifier_2025
4 ran · 4 no recorded run
FunctionStatusWhere it lives
BeamHypotheses Ran
ran on a synthesized input · constructed an object; no result was computed
deep-symbolic-mathematics/TPSR/symbolicregression/model/transformer.py
code served (permissive licence) · get_code("04ecacf475538188")
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, BeamHypotheses: 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

torch.manual_seed(0)

# BeamHypotheses parameters:
# - n_hyp: number of hypotheses to keep (int)
# - max_len: maximum length of hypotheses (int)
# - length_penalty: penalty applied to length (float)
# - early_stopping: whether to stop early (bool)

ARGS = {
    "n_hyp": 3,
    "max_len": 20,
    "length_penalty": 1.0,
    "early_stopping": 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 BeamHypotheses — 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 BeamHypotheses 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
TransformerFFN Ran
ran on a synthesized input · constructed an object; no result was computed
deep-symbolic-mathematics/TPSR/symbolicregression/model/transformer.py
code served (permissive licence) · get_code("5ada5edea86dc67b")
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, TransformerFFN: 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)

ARGS = {
    "in_dim": 4,
    "dim_hidden": 8,
    "out_dim": 3,
    "hidden_layers": 3,
    "dropout": 0.1
}
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 TransformerFFN — 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 TransformerFFN 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_masks Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deep-symbolic-mathematics/TPSR/symbolicregression/model/transformer.py
code served (permissive licence) · get_code("57e18f5aa5126f5b")
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 tuple, ndim 3, 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

torch.manual_seed(0)

# Construct arguments for get_masks function
slen = 5  # sequence length
lengths = torch.tensor([3, 4], dtype=torch.long)  # batch size 2, with different lengths
causal = False  # boolean flag for causal masking

ARGS = {
    "slen": slen,
    "lengths": lengths,
    "causal": causal,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, 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
top_k_top_p_filtering Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
deep-symbolic-mathematics/TPSR/symbolicregression/model/transformer.py
code served (permissive licence) · get_code("02e71d97ed55e54d")
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 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
import torch.nn as nn

torch.manual_seed(0)

# Create a small logits tensor: batch_size=2, vocab_size=4
logits = torch.randn(2, 4)

ARGS = {
    "logits": logits,
    "top_k": 2,
    "top_p": 0.9,
    "filter_value": -float('Inf'),
    "min_tokens_to_keep": 1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, 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
Embedding Not yet run
unverified (harvested, no recorded run)
deep-symbolic-mathematics/TPSR/symbolicregression/model/transformer.py
code served (permissive licence) · get_code("b519b32ab2493ee4")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

MultiHeadAttention Not yet run
unverified (harvested, no recorded run)
deep-symbolic-mathematics/TPSR/symbolicregression/model/transformer.py
code served (permissive licence) · get_code("f9946efd274ff9ea")
How it ran

no invocation recorded.

TransformerModel Not yet run
unverified (harvested, no recorded run)
deep-symbolic-mathematics/TPSR/symbolicregression/model/transformer.py
code served (permissive licence) · get_code("a554724206d77f64")
How it ran

no invocation recorded.

create_sinusoidal_embeddings Not yet run
unverified (harvested, no recorded run)
deep-symbolic-mathematics/TPSR/symbolicregression/model/transformer.py
code served (permissive licence) · get_code("61308f1bc02569e6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 7 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 6 later) and 1 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
Embedding
brick of this paper's assembly: model
18 other papers
14 dated earlier, 4 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
get_masks
brick of this paper's assembly: model
8 other papers
4 dated earlier, 4 later · 1 only as an assembly brick
1911.02116 (2019-11)
Unsupervised Cross-lingual Representation Learning at Scale
2010.03017 (2020-10)
On Negative Interference in Multilingual Models: Findings and A Meta-Learning Treatment
2110.03501 (2021-10)
Pretrained Language Models are Symbolic Mathematics Solvers too!
and 5 more not named here
BeamHypotheses
brick of this paper's assembly: sampler
3 other papers
2 dated earlier, 1 later · 2 only as an assembly brick
1911.02116 (2019-11)
Unsupervised Cross-lingual Representation Learning at Scale
2106.06427 (2021-06)
Neural Symbolic Regression that Scales
2306.11641 (2023-06)
SALSA VERDE: a machine learning attack on Learning With Errors with sparse small secrets
MultiHeadAttention
brick of this paper's assembly: model
1 other paper
1 later
2510.23295 (2025-10)
Predicting symbolic ODEs from multiple trajectories
TransformerFFN
brick of this paper's assembly: model
1 other paper
1 later · 1 only as an assembly brick
2510.23295 (2025-10)
Predicting symbolic ODEs from multiple trajectories
create_sinusoidal_embeddings
brick of this paper's assembly: model
1 other paper
1 later
2510.23295 (2025-10)
Predicting symbolic ODEs from multiple trajectories
top_k_top_p_filtering 1 other paper
1 dated earlier
2204.10532 (2022-04)
End-to-end symbolic regression with transformers

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-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 regression (SR) is a challenging task in machine learning that involves finding a mathematical expression for a function based on its values. Recent advancements in SR have demonstrated the effectiveness of pre-trained transformerbased models in generating equations as sequences, leveraging large-scale pretraining on synthetic datasets and offering notable advantages in terms of inference time over classical Genetic Programming (GP) methods. However, these models primarily rely on supervised pre-training goals borrowed from text generation and overlook equation discovery objectives like accuracy and complexity. To address this, we propose TPSR, a Transformer-based Planning strategy for Symbolic Regression that incorporates Monte Carlo Tree Search into the transformer decoding process. Unlike conventional decoding strategies, TPSR enables the integration of non-differentiable feedback, such as fitting accuracy and complexity, as external sources of knowledge into the transformer-based equation generation process. Extensive experiments on various datasets show that our approach outperforms state-of-the-art methods, enhancing the model's fitting-complexity trade-off, extrapolation abilities, and robustness to noise 2 .

For agents

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

get_harvested_code_for_paper("2303.06833")
get_code_for_paper("2303.06833")
have("2303.06833")

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

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

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

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

Connect an agent — have() is free.