L2G-SR: Learning to Guide LLM-based Symbolic Regression
Summary
L2G-SR 提出用学习到的结构验证器(基于改进的树编辑距离)引导 LLM 进行符号回归搜索,弥补纯数值误差无法识别正确公式结构的不足,并在 LLM-SRBench 上取得最先进的数值拟合与结构准确率。
View Cached Full Text
Cached at: 10/16/26, 06:50 AM
# Learning to GuideLLM-based Symbolic Regression
Source: [https://arxiv.org/html/2610.20685](https://arxiv.org/html/2610.20685)
## L2G\-SR: Learning to Guide LLM\-based Symbolic Regression
###### Abstract
Symbolic regression searches for an equation that explains observed data\. Numerical error is commonly used to guide the search, but it alone can favor an accurate surrogate over a candidate with the right structure\. We propose L2G\-SR, a framework for LLM\-based symbolic regression that guides search with a learned structural verifier\. We construct structural supervision signal using tree edit distance \(TED\), accounting for commutative operators and alternative expression forms\. A verifier first aligns numerical observations with the formulas, then learns to score a candidate’s structural similarity to the target formula\. At search time, the target formula is hidden and the verifier complements numerical error in parent selection\. An analyst then uses verifier feedback and diagnostic tools to propose revisions, which a generator converts into refined expressions\. On LLM\-SRBench, L2G\-SR achieves state\-of\-the\-art numerical fit, equation level accuracy and TED across the evaluated LLM backbones and domains\. L2G\-SR demonstrates the value of learned structural guidance for LLM\-based symbolic regression\.
## 1Introduction
Symbolic regression discovers both the structure and constants of an expression that explains observed variables, making it useful for interpretable modeling and the discovery of candidate scientific laws\([Schmidt & Lipson, 2009](https://arxiv.org/html/2610.20685#bib.bib24);[Cranmer, 2023](https://arxiv.org/html/2610.20685#bib.bib3)\)\. However, finding an optimal expression is NP\-hard in general\([Virgolin & Pissis, 2022](https://arxiv.org/html/2610.20685#bib.bib30)\), and the combinatorial growth of possible structures makes efficient exploration essential\. Existing approaches include search\-based methods that evolve candidate expressions\([Koza, 1992](https://arxiv.org/html/2610.20685#bib.bib11);[Cranmer, 2023](https://arxiv.org/html/2610.20685#bib.bib3)\), neural methods that learn to map observations to symbolic expressions\([Biggio et al\., 2021](https://arxiv.org/html/2610.20685#bib.bib1);[Kamienny et al\., 2022](https://arxiv.org/html/2610.20685#bib.bib9)\), and methods based on large language models \(LLMs\) that combine scientific priors with numerical feedback to propose and refine equations\([Shojaee et al\., 2025a](https://arxiv.org/html/2610.20685#bib.bib26);[Grayeli et al\., 2024](https://arxiv.org/html/2610.20685#bib.bib5);[Wang et al\., 2025](https://arxiv.org/html/2610.20685#bib.bib32);[Pang et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib19);[Li & Pan, 2026](https://arxiv.org/html/2610.20685#bib.bib14)\)\.
Despite these advances, existing methods still rely heavily on numerical fit to guide search and evaluate recovered formulas using metrics such as normalized mean squared error \(NMSE\) and accuracy at a 1% relative\-error tolerance \(Acc0\.01\\mathrm\{Acc\}\_\{0\.01\}\)\. It is essential feedback, but it need not identify the most useful structure to revise: near the origin,x−x3/6x\-x^\{3\}/6approximatessinx\\sin xdespite using different operators, whileexp\(1\.05x\)\\exp\(1\.05x\)shares the form ofexp\(x\)\\exp\(x\)yet can accumulate substantial error\. Numerical metrics alone are therefore insufficient to reliably guide formula discovery, motivating a complementary structural score\.
To address this gap, we introduce L2G\-SR through three connected components, which guides LLM\-based SR with a learned structural verifier \(Figure[1](https://arxiv.org/html/2610.20685#S1.F1)\)\. A*modified tree edit distance*\(TED\) abstracts constants, matches commutative operands, and compares selected algebraic views to label structural similarity\. A*learned verifier*first aligns observations with their generating formulas, then learns to predict a candidate’s structural similarity\. A*two\-signal search*combines verifier output and numerical error to select parents, suggest edits, and retain candidates\.
On 240 LLM\-SRBench equations, L2G\-SR achieves the highest or the second highest performance on all metrics and LLM backbones, showing the strong performance of our method\. Replacing its structural channel with validation MSE substantially lowers the performance\.
Figure 1:Overview of L2G\-SR\. \(A\) A verifier learns TED with two\-stage training\. \(B\) During search, numerical error and predicted TED guide candidate selection and retention\.Our contributions are threefold:
- •We propose a modified TED that measures structural similarity between formulas while accommodating common simplifications and equivalent forms, providing structural supervision beyond numerical fit alone\.
- •We develop a multimodal TED verifier that predicts a candidate’s structural distance to an unseen target formula from the candidate and its observations, making structural feedback available during symbolic regression\.
- •We integrate this learned feedback into an LLM\-guided search agent, enabling it to prioritize and revise formulas that are structurally promising as well as numerically accurate\.
## 2Related work
##### Symbolic and neural search\.
Genetic programming, Eureqa, Operon, PySR, GP\-GOMEA, AI Feynman, and Bayesian SR search expressions through evolution, physical structure, or probabilistic modeling\([Koza, 1992](https://arxiv.org/html/2610.20685#bib.bib11);[Schmidt & Lipson, 2009](https://arxiv.org/html/2610.20685#bib.bib24);[Burlacu et al\., 2020](https://arxiv.org/html/2610.20685#bib.bib2);[Cranmer, 2023](https://arxiv.org/html/2610.20685#bib.bib3);[Virgolin et al\., 2021](https://arxiv.org/html/2610.20685#bib.bib31);[Udrescu & Tegmark, 2020](https://arxiv.org/html/2610.20685#bib.bib28);[Udrescu et al\., 2020](https://arxiv.org/html/2610.20685#bib.bib29);[Jin et al\., 2019](https://arxiv.org/html/2610.20685#bib.bib8)\); SRBench compares representative methods\([La Cava et al\., 2021](https://arxiv.org/html/2610.20685#bib.bib12)\)\. DSR and uDSR learn generation policies, while neural\-guided GP, DGSR\-MCTS, and TPSR combine learned proposals with search\([Petersen et al\., 2021](https://arxiv.org/html/2610.20685#bib.bib20);[Landajuela et al\., 2022](https://arxiv.org/html/2610.20685#bib.bib13);[Mundhenk et al\., 2021](https://arxiv.org/html/2610.20685#bib.bib18);[Kamienny et al\., 2023](https://arxiv.org/html/2610.20685#bib.bib10);[Shojaee et al\., 2023](https://arxiv.org/html/2610.20685#bib.bib25)\)\. Pretrained and end\-to\-end models amortize discovery over synthetic corpora\([Biggio et al\., 2021](https://arxiv.org/html/2610.20685#bib.bib1);[Kamienny et al\., 2022](https://arxiv.org/html/2610.20685#bib.bib9);[Holt et al\., 2023](https://arxiv.org/html/2610.20685#bib.bib6)\)\. SNIP, MDLformer, and MOD\-SR connect numerical and symbolic representations\([Meidani et al\., 2024](https://arxiv.org/html/2610.20685#bib.bib17);[Yu et al\., 2025](https://arxiv.org/html/2610.20685#bib.bib36);[Xiang et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib34)\)\. We use such representations to score a candidate’s structural similarity for an external search procedure\.
##### LLM\-guided discovery and structural comparison\.
LLM\-SR, LaSR, and DrSR use language\-model priors to refine expressions\([Shojaee et al\., 2025a](https://arxiv.org/html/2610.20685#bib.bib26);[Grayeli et al\., 2024](https://arxiv.org/html/2610.20685#bib.bib5);[Wang et al\., 2025](https://arxiv.org/html/2610.20685#bib.bib32)\)\. DE, RESTART, SR\-Scientist, and related systems add diagnostics, reusable structures, multiple roles, or engine control\([Pang et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib19);[Li & Pan, 2026](https://arxiv.org/html/2610.20685#bib.bib14);[Xia et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib33);[Zhao et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib38);[Saveliev et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib22);[Xie et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib35);[Ma et al\., 2024](https://arxiv.org/html/2610.20685#bib.bib15)\)\. Our distinction is the supervised structural signal in selection, diagnosis, and retention\. TED compares labeled trees\([Zhang & Shasha, 1989](https://arxiv.org/html/2610.20685#bib.bib37)\); SRSD and PHYBench evaluate recovered structure, and EGG\-SR represents equivalences with equality graphs\([Matsubara et al\., 2024](https://arxiv.org/html/2610.20685#bib.bib16);[Qiu et al\., 2025](https://arxiv.org/html/2610.20685#bib.bib21);[Jiang et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib7)\)\.
## 3Method
### 3\.1Problem formulation
Given observations𝒟=\{\(xi,yi\)\}i=1n\\mathcal\{D\}=\\\{\(x\_\{i\},y\_\{i\}\)\\\}\_\{i=1\}^\{n\}, wherexi∈ℝpx\_\{i\}\\in\\mathbb\{R\}^\{p\}andyi=f⋆\(xi\)\+ϵiy\_\{i\}=f^\{\\star\}\(x\_\{i\}\)\+\\epsilon\_\{i\}, symbolic regression seeks a compact expressionfffor the unknown targetf⋆f^\{\\star\}\. The admissible expression spaceℱ\\mathcal\{F\}is defined by the available variables, operators, and constants; each candidate has a symbolic structure and fitted numerical constants\. Numerical fit is commonly measured by mean squared error,
ℒMSE\(f,𝒟\)=1n∑i=1n\(f\(xi\)−yi\)2\.\\mathcal\{L\}\_\{\\mathrm\{MSE\}\}\(f;\\mathcal\{D\}\)=\\frac\{1\}\{n\}\\sum\_\{i=1\}^\{n\}\\bigl\(f\(x\_\{i\}\)\-y\_\{i\}\\bigr\)^\{2\}\.\(1\)Finite observations can support expressions with different structures, so low empirical error alone does not establish similarity tof⋆f^\{\\star\}\. We therefore seek candidates with good numerical fit while estimating their structural similarity to the target from𝒟\\mathcal\{D\}and the candidate expression\. The target expression remains hidden during search\.
### 3\.2Structural similarity measure
We use a modified tree edit distance \(TED\),dstr\(f,g\)d\_\{\\mathrm\{str\}\}\(f,g\), to compare formula structures despite fitted constants, operand order, and common algebraic rewrites; smaller values indicate closer structures\.
Step 1: Abstract trees and edit costs\.To ignore constant values and grouping, we map numeric\-only subtrees tonumber, symbolic constants toparam, and flatten Add/Mul nodes\. Insertions, deletions, and other relabelings cost one; identical labels andnumber/paramexchanges cost zero\([Zhang & Shasha, 1989](https://arxiv.org/html/2610.20685#bib.bib37)\)\. With PHYBench’s discount\([Qiu et al\., 2025](https://arxiv.org/html/2610.20685#bib.bib21)\), insertion or deletion of a subtree of sizesscosts
κ\(s\)=min\{s,0\.6\(s−5\)\+5\}\.\\kappa\(s\)=\\min\\\{s,\\;0\.6\(s\-5\)\+5\\\}\.\(2\)
Step 2: Match commutative operands\.LetDord\(A,B\)D\_\{\\mathrm\{ord\}\}\(A,B\)be ordered TED under these costs\. At addition or multiplication roots, we also match children by minimum\-cost assignment to reduce sensitivity to operand order:
Dhyb\(A,B\)=\{min\{Dord\(A,B\),c\(a,b\)\+min∑i=1mπCi,π\(i\)\},a,b∈\{Add,Mul\},Dord\(A,B\),otherwise\.D\_\{\\mathrm\{hyb\}\}\(A,B\)=\\begin\{cases\}\\min\\\!\\left\\\{D\_\{\\mathrm\{ord\}\}\(A,B\),\\,c\(a,b\)\+\\min\_\{\\pi\}\\sum\_\{i=1\}^\{m\}C\_\{i,\\pi\(i\)\}\\right\\\},&a,b\\in\\\{\\mathrm\{Add\},\\mathrm\{Mul\}\\\},\\\\ D\_\{\\mathrm\{ord\}\}\(A,B\),&\\text\{otherwise\}\.\\end\{cases\}\(3\)Herea,ba,bare root labels,ccis their relabeling cost, andmmis the larger child count\.CijC\_\{ij\}is the recursive hybrid cost for real children orκ\(s\)\\kappa\(s\)for a dummy match\. We retain the cheaper of ordered editing and child assignment\.
Step 3: Compare algebraic views\.We compare three views to tolerate common rewrites: a structure\-preserving candidate parse \(evaluated reference\), ordinary evaluation with constant absorption, and expansion with power simplification\. LetPkc,PkrP\_\{k\}^\{c\},P\_\{k\}^\{r\}transform the candidate and reference, andTTbuild the tree:
dstr\(f,g\)=mink∈\{0,1,2\}Dhyb\(T\(Pkc\(f\)\),T\(Pkr\(g\)\)\)\|T\(Pkr\(g\)\)\|\.d\_\{\\mathrm\{str\}\}\(f,g\)=\\min\_\{k\\in\\\{0,1,2\\\}\}\\frac\{D\_\{\\mathrm\{hyb\}\}\\\!\\left\(T\(P\_\{k\}^\{c\}\(f\)\),T\(P\_\{k\}^\{r\}\(g\)\)\\right\)\}\{\|T\(P\_\{k\}^\{r\}\(g\)\)\|\}\.\(4\)Each cost is relative to the reference\-tree size\. Appendix[A](https://arxiv.org/html/2610.20685#A1)specifies the transformations\.
Figure[2](https://arxiv.org/html/2610.20685#S3.F2)illustrates the shared abstract representation and the distinctions retained by this measure\. More examples and explanations are provided in Appendix[A](https://arxiv.org/html/2610.20685#A1)\.
Figure 2:Examples of structural similarity under the modified TED\. \(a\) The two linear expressions map to the same abstract tree\. \(b\) Scores are normalized by the ground\-truth tree size\. In these examples, changes in coefficient values, operand order, and numeric exponent values yield zero distance, whereas operator and variable label changes incur a cost\.
### 3\.3Data generation
Training our Transformer verifier requires a large volume of paired numerical and symbolic data\. To produce diverse synthetic formulas that resemble scientific equations and search\-time expressions, we use a fixed data\-generation scheme informed by SRBench/Feynman ground\-truth formulas and recorded LLM\-SR/PySR search trajectories on SRBench\. These sources provide realistic structural priors, while all training instances are independently generated by our own synthesis algorithm, without access to LLMSRbench\. The resulting data pools contain 91\.9 million target–candidate pairs\. To prevent benchmark overlap, we remove training pairs that share the same symbolic structure with any LLM\-SRBench ground\-truth expression after constant abstraction and symbolic canonicalization\. More details are provided in Appendix[B](https://arxiv.org/html/2610.20685#A2)\.
Random formulas\.We first sample the total number of nodes and operators from empirical priors\. We then sample an ordered tree shape using Catalan weights and place the operators, variables, and constants\. These priors balance ground\-truth and LLM\-SR search formulas, preserving common structures while generating diverse new expressions\.
Target–candidate pairs\.We construct two types of target–candidate pairs: random and edited\. Random pairs draw a candidateffindependently of the targetf⋆f^\{\\star\}; edited pairs obtainffby locally modifyingf⋆f^\{\\star\}, including point relabeling, unary insertion or deletion, subtree replacement, etc\. Random pairs mainly generate distant pairs \(TED≥0\.6\\geq 0\.6\), whereas edited pairs mainly generate close pairs \(TED<0\.6<0\.6\)\. Our aim is to cover as broad a range of TED values as possible\. To reduce bias from the uneven TED distribution of generated pairs, we sample 12 TED intervals equally\.
Simplification and validation\.We fold constant\-only subtrees and apply selected algebraic simplifications\. We reject scientifically implausible formulas, such as those with atypical operator nesting or invalid domains\. This filtering aims to keep synthetic formulas scientifically plausible and closer to the structural patterns of LLM\-generated search expressions\.
Numerical observations\.We adapt the observation sampler of MDLformer\([Yu et al\., 2025](https://arxiv.org/html/2610.20685#bib.bib36)\)to generate observation points that cover diverse regions of the input space\. For each synthetic targetf⋆f^\{\\star\}, we draw inputs from a mixture of randomly located and rotated Gaussian or uniform components\. The resulting observation set is
𝒟⋆\\displaystyle\\mathcal\{D\}^\{\\star\}=\{\(𝐱i,f⋆\(𝐱i\)\)\}i=1M,\\displaystyle=\\\{\(\\mathbf\{x\}\_\{i\},f^\{\\star\}\(\\mathbf\{x\}\_\{i\}\)\)\\\}\_\{i=1\}^\{M\},𝐱i\\displaystyle\\mathbf\{x\}\_\{i\}∼∑k=1CρkQk,\\displaystyle\\sim\\sum\_\{k=1\}^\{C\}\\rho\_\{k\}Q\_\{k\},Qk\\displaystyle Q\_\{k\}∈\{QkG,QkU\},\\displaystyle\\in\\\{Q\_\{k\}^\{\\mathrm\{G\}\},Q\_\{k\}^\{\\mathrm\{U\}\}\\\},\(5\)QkG\\displaystyle Q\_\{k\}^\{\\mathrm\{G\}\}=Law\(\(𝝁k\+ϵk\)Rk\),\\displaystyle=\\operatorname\{Law\}\\\!\\left\(\(\\bm\{\\mu\}\_\{k\}\+\\bm\{\\epsilon\}\_\{k\}\)R\_\{k\}\\right\),ϵk\\displaystyle\\bm\{\\epsilon\}\_\{k\}∼𝒩\(𝟎,diag\(𝐜k\)\),\\displaystyle\\sim\\mathcal\{N\}\\\!\\left\(\\mathbf\{0\},\\operatorname\{diag\}\(\\mathbf\{c\}\_\{k\}\)\\right\),QkU\\displaystyle Q\_\{k\}^\{\\mathrm\{U\}\}=Law\(\(𝝁k\+𝐜k⊙𝐮k\)Rk\),\\displaystyle=\\operatorname\{Law\}\\\!\\left\(\(\\bm\{\\mu\}\_\{k\}\+\\sqrt\{\\mathbf\{c\}\_\{k\}\}\\odot\\mathbf\{u\}\_\{k\}\)R\_\{k\}\\right\),𝐮k\\displaystyle\\mathbf\{u\}\_\{k\}∼𝒰\(\[−1,1\]d\)\.\\displaystyle\\sim\\mathcal\{U\}\(\[\-1,1\]^\{d\}\)\.Here,RkR\_\{k\}is a random orthogonal rotation; before rotation, the mean is𝝁k\\bm\{\\mu\}\_\{k\}and coordinatewise variances are𝐜k\\mathbf\{c\}\_\{k\}\(Gaussian\) or𝐜k/3\\mathbf\{c\}\_\{k\}/3\(uniform\)\.
### 3\.4Verifier
Architecture\.
The verifier first aligns numerical observations𝒟\\mathcal\{D\}with their generating formulas in a shared embedding space\. It then combines the observation embedding with a candidate formula embedding and regression summariesR\(𝒟\)R\(\\mathcal\{D\}\)to estimate the candidate’s TED to the unknown target:
zD=ED\(𝒟\),zf=Ef\(f\),zR=ER\(R\(𝒟\)\),d^=hθ\(\[zD;zf;zR\]\)\.z\_\{D\}=E\_\{D\}\(\\mathcal\{D\}\),\\qquad z\_\{f\}=E\_\{f\}\(f\),\\qquad z\_\{R\}=E\_\{R\}\(R\(\\mathcal\{D\}\)\),\\qquad\\widehat\{d\}=h\_\{\\theta\}\(\[z\_\{D\};z\_\{f\};z\_\{R\}\]\)\.\(6\)Embedding\.Following MDLformer\([Yu et al\., 2025](https://arxiv.org/html/2610.20685#bib.bib36)\), we encode each input and target value in scientific notation using three tokens: its sign \(positive or negative\), its mantissa \(the coefficient rounded to four significant digits\), and its base\-10 exponent \(which specifies the power of ten multiplying the coefficient\); for example,54\.321≈5\.432×101⟼\[\+,5\.432,\+1\]54\.321\\approx 5\.432\\times 10^\{1\}\\quad\\longmapsto\\quad\[\+,\\,5\.432,\\,\+1\]\. As in MDLformer\([Yu et al\., 2025](https://arxiv.org/html/2610.20685#bib.bib36)\), we tokenizeffin prefix order\. However, TED prediction relies on the expression’s tree structure, while prefix order does not explicitly mark each token’s depth or branch\. We therefore add a tree address to each token\([Scarlatos & Lan, 2023](https://arxiv.org/html/2610.20685#bib.bib23)\)\. For a root\-to\-node path with child slots\(c1,…,cd\)\(c\_\{1\},\\ldots,c\_\{d\}\), its address contribution is
a=WA∑ℓ=1delevel\(ℓ\)⊙eslot\(cℓ\)max\(d,1\)\+edepth\(d\)\.a=W\_\{A\}\\frac\{\\sum\_\{\\ell=1\}^\{d\}e\_\{\\mathrm\{level\}\}\(\\ell\)\\odot e\_\{\\mathrm\{slot\}\}\(c\_\{\\ell\}\)\}\{\\sqrt\{\\max\(d,1\)\}\}\+e\_\{\\mathrm\{depth\}\}\(d\)\.\(7\)At each depth, the level and child\-slot embeddings together record the branch taken; adding these records describes the path from root to node, scaling limits the effect of path length, andWAW\_\{A\}places the result in the token\-embedding space whileedepth\(d\)e\_\{\\mathrm\{depth\}\}\(d\)marks its depth\.
Regression summaries\.For each variable, we evaluate 12 simple relations, includinglogy∼logxj\\log y\\sim\\log x\_\{j\},y∼xjy\\sim x\_\{j\}, andy∼xj2y\\sim x\_\{j\}^\{2\}\(Appendix[C](https://arxiv.org/html/2610.20685#A3)\)\. Letrrbe the Pearson correlation between the transformed input and target values\. Each valid relation is encoded as
𝐭=\|r\|Linear\(\[𝐞relation;r\]\)\.\\mathbf\{t\}=\|r\|\\,\\operatorname\{Linear\}\(\[\\mathbf\{e\}\_\{\\mathrm\{relation\}\};r\]\)\.Here𝐞relation\\mathbf\{e\}\_\{\\mathrm\{relation\}\}joins three learned vectors that specify whether the output isyyorlogy\\log y, the operation on the input \(such asxx,x2x^\{2\}, orlogx\\log x\), and which input variablexjx\_\{j\}is used\. The\|r\|\|r\|factor downweights weak correlations\. The log–log relation probes how input and output magnitudes scale together; the other 11 probe different input–output relations, such as linear and quadratic patterns\.
Two\-Stage Training\.
Stage 1: symbolic–numeric alignment\.Following MDLformer\([Yu et al\., 2025](https://arxiv.org/html/2610.20685#bib.bib36)\), which builds on SNIP\([Meidani et al\., 2024](https://arxiv.org/html/2610.20685#bib.bib17)\), we use symmetric in\-batch contrastive learning to alignui=ED\(𝒟i\)u\_\{i\}=E\_\{D\}\(\\mathcal\{D\}\_\{i\}\)withvi=Ef\(fi⋆\)v\_\{i\}=E\_\{f\}\(f\_\{i\}^\{\\star\}\), so observations and their generating formulas have consistent embeddings:
ℒalign=−12B∑i=1B\[logexp\(ui⊤vi/t\)∑j=1Bexp\(ui⊤vj/t\)\+logexp\(vi⊤ui/t\)∑j=1Bexp\(vi⊤uj/t\)\],\\mathcal\{L\}\_\{\\mathrm\{align\}\}=\-\\frac\{1\}\{2B\}\\sum\_\{i=1\}^\{B\}\\left\[\\log\\frac\{\\exp\(u\_\{i\}^\{\\top\}v\_\{i\}/t\)\}\{\\sum\_\{j=1\}^\{B\}\\exp\(u\_\{i\}^\{\\top\}v\_\{j\}/t\)\}\+\\log\\frac\{\\exp\(v\_\{i\}^\{\\top\}u\_\{i\}/t\)\}\{\\sum\_\{j=1\}^\{B\}\\exp\(v\_\{i\}^\{\\top\}u\_\{j\}/t\)\}\\right\],\(8\)Stage 2: structural prediction\.Starting from the Stage 1 encoders, we train the verifier to predict normalized TEDd=dstr\(f,f⋆\)d=d\_\{\\mathrm\{str\}\}\(f,f^\{\\star\}\)for observation–candidate pairs using
ℒ\(d^,d\)=\{\|d^−d\|,d≤1,max\(0,1−d^\),d\>1\.\\mathcal\{L\}\(\\widehat\{d\},d\)=\\begin\{cases\}\|\\widehat\{d\}\-d\|,&d\\leq 1,\\\\ \\max\(0,1\-\\widehat\{d\}\),&d\>1\.\\end\{cases\}\(9\)Ford\>1d\>1, candidates are already structurally far from the target, so we only required^≥1\\widehat\{d\}\\geq 1\. This limits the effect of large distances and helps keep predictions from clustering near the mean\. Appendix[C](https://arxiv.org/html/2610.20685#A3)gives the training configuration and checkpoint selection\.
### 3\.5L2G\-SR: TED\-guided symbolic search
We present L2G\-SR, a symbolic regression method that finds formulas by repeatedly proposing and testing candidates\([Cranmer, 2023](https://arxiv.org/html/2610.20685#bib.bib3);[Shojaee et al\., 2025a](https://arxiv.org/html/2610.20685#bib.bib26)\)\. Its core principle is to guide the search with two complementary signals: numerical fit to the observations and predicted TED to the unknown target formula\. An LLM analyst suggests revisions, and an LLM generator writes new formulas\. Further details are provided in Appendix[D](https://arxiv.org/html/2610.20685#A4)\.
We compute validation MSE on a fixed 20% holdout of the search observations to measure each candidate’s predictive accuracy beyond the fitting subset\.
We begin by generating formulas for four islands, each a separate candidate pool\. In each search round, we select an island and a parent formula using either validation MSE or predicted TED\. The analyst examines the parent and suggests four distinct ways to revise it; the generator then turns these suggestions into four complete formulas\. We check each formula, fit its constants, simplify it, and score it with both signals before updating the selected island\. After the search, we choose a simple formula among those with the best numerical fit\. Algorithm[1](https://arxiv.org/html/2610.20685#alg1)summarizes the loop\.
Dual\-score selection\.Each round considers one of the four islands\. We randomly draw a few formulas from that island, then choose one to revise \(the parent\): half the rounds take the formula with the lowest validation MSE, and the other half take the one with the lowest predicted TED\. If𝒮\\mathcal\{S\}denotes the formulas drawn in the current round, then
fparent=\{argminf∈𝒮MSEval\(f\),MSE round,argminf∈𝒮d^\(f\),TED round\.f\_\{\\mathrm\{parent\}\}=\\begin\{cases\}\\arg\\min\_\{f\\in\\mathcal\{S\}\}\\mathrm\{MSE\}\_\{\\mathrm\{val\}\}\(f\),&\\text\{MSE round\},\\\\ \\arg\\min\_\{f\\in\\mathcal\{S\}\}\\widehat\{d\}\(f\),&\\text\{TED round\}\.\\end\{cases\}\(10\)
Analyst agent\.The analyst receives validation MSE and predicted TED for the parent and several retained formulas, plus summaries of the parent’s residuals and transformed\-variable regressions\. In TED rounds, it compares lower\-TED formulas with the parent to spot terms or operators worth testing\. In MSE rounds, it focuses on patterns in the residualy−f\(x\)y\-f\(x\)\. To check a specific idea, it can name a reference formula in a structure\-comparison request or a parent subtree in a residual\-probe request\. The first tool reports which parts differ; the second tests whether the selected subtree explains the residual on training data\. Using these results and past edit outcomes, the analyst gives the generator four specific suggestions about what to change or keep\.
Generator agent\.A second LLM, the generator, uses the parent, the analyst’s suggestions, and cited evidence to produce four complete formulas\. Each formula occupies one proposal slot and is checked, fitted, and scored before it can be kept for later rounds\. The agent is told the physical units and restrictions needed for formulas to remain real\-valued\.
Fitting and simplification\.For each generated formula, we keep its symbolic structure fixed and use BFGS to optimize any unknown constants on the fitting subset\.
We use SymPy to simplify algebraically equivalent expressions and combine redundant constants\. We also remove terms that contribute little to the formula’s predictions, as defined by Equation[26](https://arxiv.org/html/2610.20685#A4.E26)in Appendix[D](https://arxiv.org/html/2610.20685#A4)\. Such terms create spurious branches in the formula tree, which later revisions may inherit or modify and thus steer the search away from the useful structure\. They can also make the verifier predict an excessively large TED for an otherwise promising formula\. We replace exponents that are already close to simple values\. We optimize the remaining constants again with BFGS after removing terms or replacing exponents\. The verifier scores only the final accepted formula\.
Memory\.We keep four islands, each with at most 64 formulas, plus a separate history of proposals and outcomes for the analyst\. After each round, valid formulas enter the selected island, and we compute each member’s island\-local rank by validation MSE and by predicted TED, with lower scores ranked first in both\. When formulas share the same structure, only the version with lower validation MSE enters these rankings\. If an island exceeds 64 formulas, we prune it using the two rankings\. We keep up to 32 leading formulas from each ranking\. The survivors can become parents in later rounds; final selection favors simple formulas among those with the best validation fit\.
## 4Experiments
### 4\.1Experimental setup
Benchmark\.We evaluate on LLM\-SRBench\([Shojaee et al\., 2025b](https://arxiv.org/html/2610.20685#bib.bib27)\), a symbolic regression benchmark designed to test discovery beyond memorized canonical formulas\. Our evaluated configuration contains 240 equations across five domains: 111 Transform, 44 Physics, 25 Materials, 36 Chemistry, and 24 Biology\.
Baselines\.We compare L2G\-SR with representative LLM\-based symbolic regression methods, including LLMDirect\([Shojaee et al\., 2025b](https://arxiv.org/html/2610.20685#bib.bib27)\), LLM\-SR\([Shojaee et al\., 2025a](https://arxiv.org/html/2610.20685#bib.bib26)\), LaSR\([Grayeli et al\., 2024](https://arxiv.org/html/2610.20685#bib.bib5)\), SGA\([Ma et al\., 2024](https://arxiv.org/html/2610.20685#bib.bib15)\), DE\([Pang et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib19)\), A\-SR\([Zhao et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib38)\), RESTART\([Li & Pan, 2026](https://arxiv.org/html/2610.20685#bib.bib14)\), and SR\-Scientist\([Xia et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib33)\)\.
Metrics\.We report normalized mean squared error \(NMSE; lower is better\), accuracy at a relative\-error tolerance of 0\.01 \(Acc0\.01\\mathrm\{Acc\}\_\{0\.01\}; higher is better\), and true normalized tree edit distance \(TED; lower is better\) between a selected formula and the target expression\. Following DE’s evaluation protocol\([Pang et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib19)\), we score test predictions in float64 and discard 5% of the observations with the largest relative errors for each equation\. For the retained setIIand its target meany¯I\\bar\{y\}\_\{I\}, the numerical metrics are
NMSE\(f\)=∑i∈I\(f\(xi\)−yi\)2∑i∈I\(yi−y¯I\)2,A\(f\)=\[maxi∈I\|f\(xi\)−yi\|max\(\|yi\|,10−12\)≤0\.01\]\.\\mathrm\{NMSE\}\(f\)=\\frac\{\\sum\_\{i\\in I\}\(f\(x\_\{i\}\)\-y\_\{i\}\)^\{2\}\}\{\\sum\_\{i\\in I\}\(y\_\{i\}\-\\bar\{y\}\_\{I\}\)^\{2\}\},\\qquad A\(f\)=\\mathbf\{1\}\\\!\\left\[\\max\_\{i\\in I\}\\frac\{\|f\(x\_\{i\}\)\-y\_\{i\}\|\}\{\\max\(\|y\_\{i\}\|,10^\{\-12\}\)\}\\leq 0\.01\\right\]\.\(11\)We average equation\-level NMSE,A\(f\)A\(f\), and TED within each domain\.
### 4\.2Main experimental results
Table 1:Performance on five LLM\-SRBench domains with Llama3\.1\-8B\-Instruct and Qwen3\-4B\-Instruct\-2507\. Columns report NMSE \(↓\\downarrow\) andAcc0\.01\\mathrm\{Acc\}\_\{0\.01\}\(↑\\uparrow, %\)\. LLMDirect, LLM\-SR, LaSR, SGA, and DE results are from DE\([Pang et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib19)\); A\-SR results are from[Zhao et al\. \(2026\)](https://arxiv.org/html/2610.20685#bib.bib38)\. L2G\-SR shows mean±\\pmsample standard deviation over three seeds\. Bold and underlined means mark the best and second\-best displayed values\.Research Question 1: How accurately does L2G\-SR fit benchmark equations?Across both backbones and all five LLM\-SRBench domains, L2G\-SR achieves state\-of\-the\-art performance in numerical fit and equation\-level accuracy \(Table[1](https://arxiv.org/html/2610.20685#S4.T1)\)\. Its NMSE andAcc0\.01\\mathrm\{Acc\}\_\{0\.01\}rank first or second for every backbone and domain, showing consistent performance across models and domains\. In the available final\-formula comparisons, L2G\-SR also attains the lowest mean true TED in every domain under both backbones \(Figure[3](https://arxiv.org/html/2610.20685#S4.F3)\), indicating that it finds formulas structurally closer to the targets\. Additional RQ1 results, including baseline variability and LLM usage, appear in Appendix[E](https://arxiv.org/html/2610.20685#A5)\(Tables[16](https://arxiv.org/html/2610.20685#A5.T16)and[17](https://arxiv.org/html/2610.20685#A5.T17)\)\.
Figure 3:True TED \(↓\\downarrow\) of the final formulas from Table[1](https://arxiv.org/html/2610.20685#S4.T1)\.
### 4\.3Verifier analysis
Research Question 2: How well does the verifier perform?
Stage 2 random test set\.Table[3](https://arxiv.org/html/2610.20685#S4.T3)reports metrics on the random test set for the checkpoint used in search\. The checkpoint performs strongly on this random dataset, with accurate estimates for structurally close formulas and useful detection of more distant ones\.
Table 2:Selected Stage 2 checkpoint on the synthetic validation set\. Objective follows Eq\. \([9](https://arxiv.org/html/2610.20685#S3.E9)\)\. MAE≤1is the mean absolute error on targets with TED≤1\\leq 1; Recall\>1is the percentage of targets with TED\>1\>1predicted at or above 1\.
Table 3:Verifier performance measured after search on recorded candidate formulas\. Correlation is Pearsonrr\.
Downstream predictions\.On recorded search candidates, the verifier predicts TED with reasonable accuracy \(Table[3](https://arxiv.org/html/2610.20685#S4.T3)\), providing effective structural guidance that improves downstream search \(Table[5](https://arxiv.org/html/2610.20685#S4.T5)\)\.
The matched Physics ablation gives more direct evidence for the verifier’s role: replacing its score with validation MSE in the structural channel worsens test NMSE and accuracy while increasing the final formula’s true TED \(Table[5](https://arxiv.org/html/2610.20685#S4.T5)\)\.
### 4\.4Ablation study
Research Question 3: Does TED feedback improve search under a matched budget?We ablate the TED verifier on Physics by replacing its predicted TED score with internal\-validation MSE throughout the structural channel\. We keep two\-role generation, diagnostics, fitting and simplification, the selection schedule, retention policy, and the 400\-slot budget fixed, so the comparison isolates the verifier’s structural guidance\. As shown in Table[5](https://arxiv.org/html/2610.20685#S4.T5), removing this guidance substantially worsens both NMSE and accuracy, demonstrating that the TED verifier is an important contributor to L2G\-SR’s search performance in this setting\.
Notably, this downstream benefit is observed despite moderate and domain\-dependent candidate\-level verifier correlations \(Table[3](https://arxiv.org/html/2610.20685#S4.T3)\)\. Together, Tables[3](https://arxiv.org/html/2610.20685#S4.T3)and[5](https://arxiv.org/html/2610.20685#S4.T5)suggest that the verifier’s value may lie less in precisely estimating absolute TED for every candidate than in providing sufficiently informative relative structural preferences during search\.
Table 4:Matched Physics ablation: mean±\\pmsample standard deviation across three seeds, with 44 tasks per seed\. The numerical\-only condition replaces TED by MSE throughout the structural\-score path\.
Table 5:Verifier ablations on the fixed synthetic validation set\.
Research Question 4: Which verifier inputs and training stages improve prediction?
We compare the full verifier with four variants: \(i\)*without tree address*, which zeroes the formula encoder’s depth/address contribution and retrains both stages; \(ii\)*formula only*, which removes both numerical encoders while preserving the fusion\-head interface; \(iii\)*without correlation branch*, which removes the signed\-correlation encoder; and \(iv\)*one\-stage*, which retains the full architecture and inputs but optimizes the Stage 2 objective from random initialization\. The formula\-only and no\-correlation variants start from the full model’s Stage 1 checkpoint\.
Table[5](https://arxiv.org/html/2610.20685#S4.T5)shows that every ablation worsens both the objective and MAE≤1relative to the full verifier\. Recall also decreases without numerical inputs, the correlation branch, or Stage 1, while the no\-tree\-address variant ties the full model\. Together, these results indicate that each tested component is needed to attain the best overall verifier performance\. Training details appear in Appendix[E\.6](https://arxiv.org/html/2610.20685#A5.SS6)\.
### 4\.5Case study: Physics 11
In round 57 of Physics 11, a T\-round selects a parent with worse validation NMSE \(1\.019 versus 0\.0476\) but lower predicted TED \(0\.504 versus 0\.758\)\. Its child separates sinusoidal damping and adds a time–position term, reaching test NMSE2\.09×10−152\.09\\times 10^\{\-15\}\. Figure[4](https://arxiv.org/html/2610.20685#S4.F4)shows this choice\. This example shows that the TED verifier can guide the LLM toward the correct formula\.
Figure 4:PO11 case study\. \(a\) Structural feedback selects slot 47 despite its higher validation NMSE\. \(b\) Ground truth, candidate structures, and the child generated from slot 47;cic\_\{i\}denote fitted constants\. \(c\) Numerical and structural outcomes\.
## 5Conclusion and future work
We introduced L2G\-SR through three contributions: a modified TED for structural supervision, a verifier that estimates structural distance to an unseen target from observations and candidate formulas, and an LLM\-guided search agent that combines structural and numerical feedback to select and refine formulas\. Limited computational resources led us to evaluate lightweight, low\-cost LLMs\. Future work will optimize the framework with the latest LLMs\. We will also explore alternative training strategies, including post\-training LLMs as structural verifiers or directly post\-training the analyst to improve formula revision\.
## AI use statement
AI was used for writing code, debugging, running some experiments, polishing the manuscript, checking mathematical derivations, literature searches, and identifying relevant studies for parts of the related work\.
## Reproducibility statement
Appendices[A](https://arxiv.org/html/2610.20685#A1)–[D](https://arxiv.org/html/2610.20685#A4)specify the structural target, verifier inputs, optimization settings, and search decisions\. Appendix[E](https://arxiv.org/html/2610.20685#A5)records measurements, denominators, and the reporting protocol\. The accompanying writing artifacts contain the source\-linked result summaries and scripts used to construct the tables and figures\.
## Ethics statement
The study concerns equation discovery from benchmark observations and synthetic mathematical expressions\. A plausible expression or a small structural score is not a certificate of a physical law\. The formulas discovered by this model do not necessarily represent actual physical laws, and users should assess their correctness and validity\.
## References
- Biggio et al\. \(2021\)Luca Biggio, Tommaso Bendinelli, Alexander Neitz, Aurelien Lucchi, and Giambattista Parascandolo\.Neural Symbolic Regression that Scales\.In*International Conference on Machine Learning*, pp\. 936–945, 2021\.
- Burlacu et al\. \(2020\)Bogdan Burlacu, Gabriel Kronberger, and Michael Kommenda\.Operon C\+\+: An Efficient Genetic Programming Framework for Symbolic Regression\.In*Genetic and Evolutionary Computation Conference Companion*, pp\. 1562–1570, 2020\.doi:10\.1145/3377929\.3398099\.
- Cranmer \(2023\)Miles Cranmer\.Interpretable Machine Learning for Science with PySR and SymbolicRegression\.jl\.arXiv:2305\.01582, 2023\.
- Flajolet & Sedgewick \(2009\)Philippe Flajolet and Robert Sedgewick\.*Analytic Combinatorics*\.Cambridge University Press, 2009\.ISBN 9780521898065\.doi:10\.1017/CBO9780511801655\.
- Grayeli et al\. \(2024\)Arya Grayeli, Atharva Sehgal, Omar Costilla\-Reyes, Miles Cranmer, and Swarat Chaudhuri\.Symbolic Regression with a Learned Concept Library\.In*Advances in Neural Information Processing Systems*, volume 37, pp\. 44678–44709\. Curran Associates, Inc\., 2024\.doi:10\.52202/079017\-1419\.URL[https://papers\.nips\.cc/paper\_files/paper/2024/hash/4ec3ddc465c6d650c9c419fb91f1c00a\-Abstract\-Conference\.html](https://papers.nips.cc/paper_files/paper/2024/hash/4ec3ddc465c6d650c9c419fb91f1c00a-Abstract-Conference.html)\.
- Holt et al\. \(2023\)Samuel Holt, Zhaozhi Qian, and Mihaela van der Schaar\.Deep Generative Symbolic Regression\.In*International Conference on Learning Representations*, 2023\.
- Jiang et al\. \(2026\)Nan Jiang, Ziyi Wang, and Yexiang Xue\.EGG\-SR: Embedding Symbolic Equivalence into Symbolic Regression via Equality Graph\.In*International Conference on Learning Representations*, pp\. 13650–13689, 2026\.URL[https://proceedings\.iclr\.cc/paper\_files/paper/2026/file/1704fe7aaff33a54802b83a016050ab8\-Paper\-Conference\.pdf](https://proceedings.iclr.cc/paper_files/paper/2026/file/1704fe7aaff33a54802b83a016050ab8-Paper-Conference.pdf)\.
- Jin et al\. \(2019\)Ying Jin, Weilin Fu, Jian Kang, Jiadong Guo, and Jian Guo\.Bayesian Symbolic Regression\.arXiv:1910\.08892, 2019\.
- Kamienny et al\. \(2022\)Pierre\-Alexandre Kamienny, Stéphane d’Ascoli, Guillaume Lample, and François Charton\.End\-to\-end Symbolic Regression with Transformers\.In*Advances in Neural Information Processing Systems*, volume 35, pp\. 10269–10281\. Curran Associates, Inc\., 2022\.doi:10\.52202/068431\-0746\.URL[https://papers\.nips\.cc/paper/2022/hash/42eb37cdbefd7abae0835f4b67548c39\-Abstract\-Conference\.html](https://papers.nips.cc/paper/2022/hash/42eb37cdbefd7abae0835f4b67548c39-Abstract-Conference.html)\.
- Kamienny et al\. \(2023\)Pierre\-Alexandre Kamienny, Guillaume Lample, Sylvain Lamprier, and Marco Virgolin\.Deep Generative Symbolic Regression with Monte\-Carlo\-Tree\-Search\.In*International Conference on Machine Learning*, volume 202 of*Proceedings of Machine Learning Research*, pp\. 15655–15668, 2023\.
- Koza \(1992\)John R\. Koza\.*Genetic Programming: On the Programming of Computers by Means of Natural Selection*\.MIT Press, 1992\.
- La Cava et al\. \(2021\)William La Cava, Patryk Orzechowski, Bogdan Burlacu, Fabrício Olivetti de França, Marco Virgolin, Ying Jin, Michael Kommenda, and Jason H\. Moore\.Contemporary Symbolic Regression Methods and Their Relative Performance\.In*Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks*, volume 1, 2021\.
- Landajuela et al\. \(2022\)Mikel Landajuela, Chak Shing Lee, Jiachen Yang, Ruben Glatt, Claudio P\. Santiago, T\. Nathan Mundhenk, Ignacio Aravena, Garrett Mulcahy, and Brenden K\. Petersen\.A Unified Framework for Deep Symbolic Regression\.In*Advances in Neural Information Processing Systems*, volume 35, 2022\.doi:10\.52202/068431\-2463\.
- Li & Pan \(2026\)Yunlun Li and Sinno Jialin Pan\.Robust Equation Structure Learning with Adaptive Refinement\.In*International Conference on Learning Representations*, pp\. 70029–70053, 2026\.URL[https://proceedings\.iclr\.cc/paper\_files/paper/2026/file/72416ded78a439907ff72165ac9c56e0\-Paper\-Conference\.pdf](https://proceedings.iclr.cc/paper_files/paper/2026/file/72416ded78a439907ff72165ac9c56e0-Paper-Conference.pdf)\.
- Ma et al\. \(2024\)Pingchuan Ma, Tsun\-Hsuan Wang, Minghao Guo, Zhiqing Sun, Joshua B\. Tenenbaum, Daniela Rus, Chuang Gan, and Wojciech Matusik\.LLM and Simulation as Bilevel Optimizers: A New Paradigm to Advance Physical Scientific Discovery\.In*Proceedings of the 41st International Conference on Machine Learning*, volume 235, pp\. 33940–33962\. PMLR, 2024\.URL[https://proceedings\.mlr\.press/v235/ma24m\.html](https://proceedings.mlr.press/v235/ma24m.html)\.
- Matsubara et al\. \(2024\)Yoshitomo Matsubara, Naoya Chiba, Ryo Igarashi, and Yoshitaka Ushiku\.Rethinking Symbolic Regression Datasets and Benchmarks for Scientific Discovery\.*Journal of Data\-centric Machine Learning Research*, 1\(3\):1–38, 2024\.URL[https://data\.mlr\.press/assets/pdf/v01\-3\.pdf](https://data.mlr.press/assets/pdf/v01-3.pdf)\.
- Meidani et al\. \(2024\)Kazem Meidani, Parshin Shojaee, Chandan K\. Reddy, and Amir Barati Farimani\.SNIP: Bridging Mathematical Symbolic and Numeric Realms with Unified Pre\-training\.In*International Conference on Learning Representations*, pp\. 42359–42372, 2024\.URL[https://proceedings\.iclr\.cc/paper\_files/paper/2024/hash/b935d7193defab655b5f5d5b6f07ad41\-Abstract\-Conference\.html](https://proceedings.iclr.cc/paper_files/paper/2024/hash/b935d7193defab655b5f5d5b6f07ad41-Abstract-Conference.html)\.
- Mundhenk et al\. \(2021\)T\. Nathan Mundhenk, Mikel Landajuela, Ruben Glatt, Claudio P\. Santiago, Daniel M\. Faissol, and Brenden K\. Petersen\.Symbolic Regression via Deep Reinforcement Learning Enhanced Genetic Programming Seeding\.In*Advances in Neural Information Processing Systems*, volume 34, 2021\.
- Pang et al\. \(2026\)Xinyu Pang, Zhanke Zhou, Xuan Li, Fangrui Lv, Shanshan Wei, Sen Cui, Bo Han, and Changshui Zhang\.Deliberate Evolution: Agentic Reasoning for Sample\-Efficient Symbolic Regression with LLMs\.In*International Conference on Machine Learning*, 2026\.URL[https://icml\.cc/virtual/2026/poster/66263](https://icml.cc/virtual/2026/poster/66263)\.
- Petersen et al\. \(2021\)Brenden K\. Petersen, Mikel Landajuela, T\. Nathan Mundhenk, Claudio P\. Santiago, Soo K\. Kim, and Joanne T\. Kim\.Deep Symbolic Regression: Recovering Mathematical Expressions from Data via Risk\-Seeking Policy Gradients\.In*International Conference on Learning Representations*, 2021\.
- Qiu et al\. \(2025\)Shi Qiu, Shaoyang Guo, Zhuo\-Yang Song, Yunbo Sun, Zeyu Cai, Jiashen Wei, Tianyu Luo, Yixuan Yin, Haoxu Zhang, Yi Hu, Chenyang Wang, Chencheng Tang, Haoling Chang, Qi Liu, Ziheng Zhou, Tianyu Zhang, Jingtian Zhang, Zhangyi Liu, Minghao Li, Yuku Zhang, Boxuan Jing, Xianqi Yin, Yutong Ren, Zizhuo Fu, Jiaming Ji, Weike Wang, Xudong Tian, Anqi Lv, Laifu Man, Jianxiang Li, Feiyu Tao, Qihua Sun, Zhou Liang, Yushu Mu, Zhongxuan Li, Jing\-Jun Zhang, Shutao Zhang, Xiaotian Li, Xingqi Xia, Jiawei Lin, Zheyu Shen, Jiahang Chen, Qiuhao Xiong, Binran Wang, Fengyuan Wang, Ziyang Ni, Bohan Zhang, Fan Cui, Changkun Shao, Qing\-Hong Cao, Ming\-xing Luo, Yaodong Yang, Muhan Zhang, and Hua Xing Zhu\.PHYBench: Holistic Evaluation of Physical Perception and Reasoning in Large Language Models\.In*Advances in Neural Information Processing Systems*, volume 38, 2025\.doi:10\.52202/085713\-0044\.URL[https://papers\.nips\.cc/paper\_files/paper/2025/hash/01e793f8cf5689aa0ea46a1b01071bea\-Abstract\-Datasets\_and\_Benchmarks\_Track\.html](https://papers.nips.cc/paper_files/paper/2025/hash/01e793f8cf5689aa0ea46a1b01071bea-Abstract-Datasets_and_Benchmarks_Track.html)\.EED code:[https://github\.com/phybench\-official/phybench/tree/d9db3ec7246f3678aaee65d44a32649ad93beea2/EED](https://github.com/phybench-official/phybench/tree/d9db3ec7246f3678aaee65d44a32649ad93beea2/EED)\.
- Saveliev et al\. \(2026\)Evgeny S\. Saveliev, Samuel Holt, Nabeel Seedat, David L\. Bentley, Jim Weatherall, and Mihaela van der Schaar\.Influence\-Guided Symbolic Regression: Scientific Discovery via LLM\-Driven Equation Search with Granular Feedback\.In*International Conference on Machine Learning*, 2026\.URL[https://icml\.cc/virtual/2026/poster/60987](https://icml.cc/virtual/2026/poster/60987)\.
- Scarlatos & Lan \(2023\)Alexander Scarlatos and Andrew Lan\.Tree\-Based Representation and Generation of Natural and Mathematical Language\.In*Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)*, pp\. 3714–3730\. Association for Computational Linguistics, 2023\.doi:10\.18653/v1/2023\.acl\-long\.205\.URL[https://aclanthology\.org/2023\.acl\-long\.205/](https://aclanthology.org/2023.acl-long.205/)\.
- Schmidt & Lipson \(2009\)Michael Schmidt and Hod Lipson\.Distilling Free\-Form Natural Laws from Experimental Data\.*Science*, 324\(5923\):81–85, 2009\.doi:10\.1126/science\.1165893\.
- Shojaee et al\. \(2023\)Parshin Shojaee, Kazem Meidani, Amir Barati Farimani, and Chandan K\. Reddy\.Transformer\-Based Planning for Symbolic Regression\.In*Advances in Neural Information Processing Systems*, volume 36, pp\. 45907–45919, 2023\.doi:10\.52202/075280\-1990\.
- Shojaee et al\. \(2025a\)Parshin Shojaee, Kazem Meidani, Shashank Gupta, Amir Barati Farimani, and Chandan K\. Reddy\.LLM\-SR: Scientific Equation Discovery via Programming with Large Language Models\.In*International Conference on Learning Representations*, pp\. 16054–16085, 2025a\.URL[https://proceedings\.iclr\.cc/paper\_files/paper/2025/hash/28df8e730c054c5331855fd4d5403ba9\-Abstract\-Conference\.html](https://proceedings.iclr.cc/paper_files/paper/2025/hash/28df8e730c054c5331855fd4d5403ba9-Abstract-Conference.html)\.
- Shojaee et al\. \(2025b\)Parshin Shojaee, Ngoc\-Hieu Nguyen, Kazem Meidani, Amir Barati Farimani, Khoa D Doan, and Chandan K\. Reddy\.LLM\-SRBench: A New Benchmark for Scientific Equation Discovery with Large Language Models\.In*Proceedings of the 42nd International Conference on Machine Learning*, volume 267 of*Proceedings of Machine Learning Research*, pp\. 55325–55359\. PMLR, 2025b\.URL[https://proceedings\.mlr\.press/v267/shojaee25a\.html](https://proceedings.mlr.press/v267/shojaee25a.html)\.
- Udrescu & Tegmark \(2020\)Silviu\-Marian Udrescu and Max Tegmark\.AI Feynman: A Physics\-Inspired Method for Symbolic Regression\.*Science Advances*, 6\(16\):eaay2631, 2020\.doi:10\.1126/sciadv\.aay2631\.
- Udrescu et al\. \(2020\)Silviu\-Marian Udrescu, Andrew Tan, Jiahai Feng, Orisvaldo Neto, Tailin Wu, and Max Tegmark\.AI Feynman 2\.0: Pareto\-Optimal Symbolic Regression Exploiting Graph Modularity\.In*Advances in Neural Information Processing Systems*, volume 33, pp\. 4860–4871, 2020\.
- Virgolin & Pissis \(2022\)Marco Virgolin and Solon P\. Pissis\.Symbolic Regression is NP\-hard\.*Transactions on Machine Learning Research*, 2022\.
- Virgolin et al\. \(2021\)Marco Virgolin, Tanja Alderliesten, Cees Witteveen, and Peter A\. N\. Bosman\.Improving Model\-Based Genetic Programming for Symbolic Regression of Small Expressions\.*Evolutionary Computation*, 29\(2\):211–237, 2021\.doi:10\.1162/EVCO\_A\_00278\.
- Wang et al\. \(2025\)Runxiang Wang, Boxiao Wang, Kai Li, Yifan Zhang, and Jian Cheng\.DrSR: LLM based Scientific Equation Discovery with Dual Reasoning from Data and Experience\.arXiv:2506\.04282, 2025\.
- Xia et al\. \(2026\)Shijie Xia, Yuhan Sun, and Pengfei Liu\.SR\-Scientist: Scientific Equation Discovery With Agentic AI\.In*International Conference on Learning Representations*, pp\. 75787–75811, 2026\.URL[https://proceedings\.iclr\.cc/paper\_files/paper/2026/file/7a9d48d13056b6b6a7f5bce1c3ba8f2d\-Paper\-Conference\.pdf](https://proceedings.iclr.cc/paper_files/paper/2026/file/7a9d48d13056b6b6a7f5bce1c3ba8f2d-Paper-Conference.pdf)\.
- Xiang et al\. \(2026\)Chuyang Xiang, Yichen Wei, and Junchi Yan\.MOD\-SR: Unifying Multimodal Learning and Direct Optimization with Gradient\-Guided Diffusion Model for Symbolic Regression\.In*International Conference on Machine Learning*, 2026\.URL[https://icml\.cc/virtual/2026/poster/61549](https://icml.cc/virtual/2026/poster/61549)\.
- Xie et al\. \(2026\)Zikai Xie, Wenmei Li, Man Luo, Jun Jiang, and Linjiang Chen\.Language models guide symbolic equation discovery by controlling search\.arXiv:2607\.04156, 2026\.
- Yu et al\. \(2025\)Zihan Yu, Jingtao Ding, Yong Li, and Depeng Jin\.Symbolic regression via MDLformer\-guided search: from minimizing prediction error to minimizing description length\.In*International Conference on Learning Representations*, pp\. 65306–65333, 2025\.URL[https://proceedings\.iclr\.cc/paper\_files/paper/2025/hash/a402493de088886740b5939f666a6e56\-Abstract\-Conference\.html](https://proceedings.iclr.cc/paper_files/paper/2025/hash/a402493de088886740b5939f666a6e56-Abstract-Conference.html)\.
- Zhang & Shasha \(1989\)Kaizhong Zhang and Dennis Shasha\.Simple Fast Algorithms for the Editing Distance between Trees and Related Problems\.*SIAM Journal on Computing*, 18\(6\):1245–1262, 1989\.doi:10\.1137/0218082\.
- Zhao et al\. \(2026\)Wenxiao Zhao, Dong Liu, Kaiyi Xu, Feng Liu, Zhen Zhao, Fei Ben, Shu Wang, Wenhao Li, Ying Nian Wu, Fenghua Ling, Haobo Li, and Lei Bai\.A\-SR: Self\-Evolving Agentic LLMs for Symbolic Regression via Hierarchical Coordination\.arXiv:2608\.04872, 2026\.
## Appendix AStructural target: implementation details
### A\.1Tree construction and preprocessing
Variables retain their identities\. Numeric\-only subexpressions become a singlenumberleaf; symbolic constants recognized by the parser becomeparam\. Function names and operation types supply internal labels\. Nested Add and Mul nodes are flattened recursively\. An AST is the representation; TED is the subsequent comparison algorithm\.
The three preprocessing views in Equation[4](https://arxiv.org/html/2610.20685#S3.E4)are:
1. 1\.Structure\-preserving candidate view\.Parse the candidate without automatic evaluation, absorb parameter\-only subexpressions, and collapse pure constants while preserving parse structure where possible\. Process the reference using the ordinary evaluated view below\.
2. 2\.Ordinary evaluated view\.Use normal symbolic evaluation, absorb constant\-only symbolic combinations, and collapse pure numeric subexpressions on both sides\.
3. 3\.Expanded view\.Absorb constants, expand products, expand power bases, combine powers, denest powers, collapse pure constants, and absorb remaining symbolic constant combinations\.
The expanded view applies forced power transformations, and TED is evaluated after this preprocessing\. Each view is normalized by its own reference\-tree size before taking the minimum\. The result is not clipped to\[0,1\]\[0,1\]\.
### A\.2Costs and local assignment
Node insertion and deletion cost one\. Relabeling identical labels costs zero, as does exchangingnumberandparam; other relabelings cost one\. Whole\-subtree insertion and deletion use Equation[2](https://arxiv.org/html/2610.20685#S3.E2): fors≤5s\\leq 5the cost isss, and larger subtrees receive a discount\. This extended ordered computation is evaluated for every root pair\.
When both roots belong to\{Add,Mul\}\\\{\\mathrm\{Add\},\\mathrm\{Mul\}\\\}, an additional child\-assignment route is evaluated, including the root relabeling cost when necessary\. Real\-child matches recurse through the hybrid routine; padded matches pay a subtree insertion or deletion cost\. The smaller ordered/assignment cost is retained\. At other roots, the ordered routine is returned\.
Changing a numeric exponent from two to three leaves the abstract power tree unchanged; changingsin\\sintocos\\coschanges an operator label\.
### A\.3Worked examples across the three views
We illustrate five distinct mechanisms using a candidateffand a referencegg\. WriteDkD\_\{k\}for the raw hybrid edit cost andnk=\|T\(Pkr\(g\)\)\|n\_\{k\}=\|T\(P\_\{k\}^\{r\}\(g\)\)\|for the reference\-tree size in viewvkv\_\{k\}\. The normalized score isDk/nkD\_\{k\}/n\_\{k\}, and the final TED is the minimum across the three views\. Table[6](https://arxiv.org/html/2610.20685#A1.T6)reports all three calculations\. Ties are resolved in the orderv0,v1,v2v\_\{0\},v\_\{1\},v\_\{2\}\. Figures[5](https://arxiv.org/html/2610.20685#A1.F5)and[6](https://arxiv.org/html/2610.20685#A1.F6)draw the actual candidate and reference trees after the selected preprocessing;NNdenotes anumberleaf\.
Table 6:Worked TED calculations\. Each view reports the raw edit cost divided by its reference\-tree size\. The letters match the tree diagrams\.\(a\) Associativity\.Forf=x\+\(y\+z\)f=x\+\(y\+z\)andg=\(x\+y\)\+zg=\(x\+y\)\+z, flattening nested Add nodes produces one Add root with leavesx,y,zx,y,zon both sides\. Each reference tree has four nodes, and no edits are needed:v0=v1=v2=0/4=0v\_\{0\}=v\_\{1\}=v\_\{2\}=0/4=0\. The selected view isv0v\_\{0\}\.
\(b\) Function relabeling\.Forf=sin\(x\+y\)f=\\sin\(x\+y\)andg=cos\(x\+y\)g=\\cos\(x\+y\), the Add subtree and its variable leaves agree\. Only the root function label changes, costing one\. All three reference trees have four nodes, sov0=v1=v2=1/4v\_\{0\}=v\_\{1\}=v\_\{2\}=1/4;v0v\_\{0\}is selected\. The highlighted roots show this single edit\.
\(c\) Product expansion\.Forf=x\(y\+z\)f=x\(y\+z\)andg=xy\+xzg=xy\+xz, viewsv0v\_\{0\}andv1v\_\{1\}retain a Mul root on the candidate and an Add root on the reference\. A minimum\-cost assignment changes the root at cost one, matchesxxtoxyxyat cost two \(insert Mul andyy\), and matchesy\+zy\+ztoxzxzat cost two \(Add to Mul andyytoxx\)\. ThusD0=D1=1\+2\+2=5D\_\{0\}=D\_\{1\}=1\+2\+2=5andn0=n1=7n\_\{0\}=n\_\{1\}=7\. Viewv2v\_\{2\}distributes the product, making both trees identical with seven nodes:v2=0/7v\_\{2\}=0/7\. The selected score is zero\.
Figure 5:Selected abstract trees for examples \(a\)–\(c\)\. Input formulas appear above each tree; the diagrams show the trees after the indicated preprocessing\. Flattening removes grouping differences in \(a\), the highlighted function labels require one edit in \(b\), and product expansion gives identical trees in \(c\)\.\(d\) Polynomial expansion\.Forf=\(x\+y\)2f=\(x\+y\)^\{2\}andg=x2\+2xy\+y2g=x^\{2\}\+2xy\+y^\{2\}, viewsv0v\_\{0\}andv1v\_\{1\}comparePow\(Add\(x,y\),N\)\\mathrm\{Pow\}\(\\mathrm\{Add\}\(x,y\),N\)with an Add root whose children arePow\(x,N\)\\mathrm\{Pow\}\(x,N\),Pow\(y,N\)\\mathrm\{Pow\}\(y,N\), andMul\(N,x,y\)\\mathrm\{Mul\}\(N,x,y\)\. An optimal ordered edit changes the root at cost one; convertsAdd\(x,y\)\\mathrm\{Add\}\(x,y\)toPow\(x,N\)\\mathrm\{Pow\}\(x,N\)at cost two; converts the remainingNNtoPow\(y,N\)\\mathrm\{Pow\}\(y,N\)at cost two; and inserts the four\-node mixed term at cost four\. HenceD0=D1=1\+2\+2\+4=9D\_\{0\}=D\_\{1\}=1\+2\+2\+4=9, withn0=n1=11n\_\{0\}=n\_\{1\}=11\. Viewv2v\_\{2\}expands the square, giving identical 11\-node trees and the selected score0/11=00/11=0\. Numeric exponent and coefficient leaves are all labeledNN\.
\(e\) Subtree deletion discount\.Forf=x\+sin\(yz\+w\)f=x\+\\sin\(yz\+w\)andg=xg=x, all views retain the extra branch\. The outlined branch has six nodes: sin, Add, Mul,y,z,wy,z,w\. Deleting it costsκ\(6\)=0\.6\(6−5\)\+5=5\.6\\kappa\(6\)=0\.6\(6\-5\)\+5=5\.6; deleting the outer Add root costs one more and leavesxx\. ThereforeD0=D1=D2=6\.6D\_\{0\}=D\_\{1\}=D\_\{2\}=6\.6, while every reference tree contains only one node\. All three normalized scores are6\.6/1=6\.66\.6/1=6\.6, andv0v\_\{0\}is selected\. This example also shows why normalization by the reference size does not bound the score by one\.
Figure 6:Selected abstract trees for examples \(d\)–\(e\)\. In \(d\), expanding the square yields identical trees;NNdenotes an abstract numeric leaf\. In \(e\), the dashed outline contains the six\-node branch deleted at discounted cost 5\.6; the highlighted Add root incurs another unit deletion cost\. Only the variablexxis retained\.
### A\.4Additional examples of partial structural matches
Table[7](https://arxiv.org/html/2610.20685#A1.T7)gives six further formula pairs, continuing the notation above\. All selectv0v\_\{0\}\. The tree diagrams preserve the child order returned by preprocessing; commutative assignment can still match children across different positions\. Orange nodes indicate deletions, insertions, or relabelings along one minimum\-cost edit path\. As before,NNdenotes anumberleaf\.
Table 7:Additional worked TED calculations\. Each view reports the raw edit cost divided by its reference\-tree size\. All six pairs selectv0v\_\{0\}, using the first view in a tie\.\(f\) Extra multiplicative factor\.Forf=x2sinyf=x^\{2\}\\sin yandg=sinyg=\\sin y, delete the three\-node factorPow\(x,N\)\\mathrm\{Pow\}\(x,N\)and the outer Mul root, retaining the entiresiny\\sin ysubtree\. The cost is3\+1=43\+1=4, and the reference has two nodes\. All views therefore give4/2=24/2=2\.
\(g\) Product versus sum\.Forf=\(x\+y\)\(x\+z\)f=\(x\+y\)\(x\+z\)andg=xy\+yzg=xy\+yz, the unexpanded view changes the Mul root to Add at cost one, changesAdd\(x,y\)\\mathrm\{Add\}\(x,y\)toMul\(x,y\)\\mathrm\{Mul\}\(x,y\)at cost one, and changesAdd\(x,z\)\\mathrm\{Add\}\(x,z\)toMul\(y,z\)\\mathrm\{Mul\}\(y,z\)at cost two\. Thusv0=v1=\(1\+1\+2\)/7=4/7v\_\{0\}=v\_\{1\}=\(1\+1\+2\)/7=4/7\. Expansion givesx2\+xy\+xz\+yzx^\{2\}\+xy\+xz\+yz; deleting the extra three\-node termsx2x^\{2\}andxzxzgivesv2=6/7v\_\{2\}=6/7\. The unexpanded view has the smaller distance\.
Figure 7:Selectedv0v\_\{0\}trees for \(f\)–\(g\)\. Orange marks nodes edited along a minimum\-cost path\. In \(f\), the extra power subtree and Mul root are deleted\. In \(g\), four relabelings transform the product of sums into the reference sum of products\.\(h\) Cube versus separate cubes\.Forf=\(x\+y\)3f=\(x\+y\)^\{3\}andg=x3\+y3g=x^\{3\}\+y^\{3\},v0v\_\{0\}andv1v\_\{1\}comparePow\(Add\(x,y\),N\)\\mathrm\{Pow\}\(\\mathrm\{Add\}\(x,y\),N\)withAdd\(Pow\(x,N\),Pow\(y,N\)\)\\mathrm\{Add\}\(\\mathrm\{Pow\}\(x,N\),\\mathrm\{Pow\}\(y,N\)\)\. Change the root at cost one, convertAdd\(x,y\)\\mathrm\{Add\}\(x,y\)toPow\(x,N\)\\mathrm\{Pow\}\(x,N\)at cost two, and turn the remainingNNintoPow\(y,N\)\\mathrm\{Pow\}\(y,N\)at cost two\. Hencev0=v1=5/7v\_\{0\}=v\_\{1\}=5/7\. After expansion, the two additional mixed terms3x2y3x^\{2\}yand3xy23xy^\{2\}each have six nodes\. Their discounted deletion costs givev2=2κ\(6\)/7=11\.2/7=1\.6v\_\{2\}=2\\kappa\(6\)/7=11\.2/7=1\.6, so the final score is5/75/7\.
\(i\) Square\-root argument\.Forf=x\+yf=\\sqrt\{x\+y\}andg=xg=\\sqrt\{x\}, the trees arePow\(Add\(x,y\),N\)\\mathrm\{Pow\}\(\\mathrm\{Add\}\(x,y\),N\)andPow\(x,N\)\\mathrm\{Pow\}\(x,N\)\. The exponent1/21/2becomes one numeric leaf\. Retain the Pow root,xx, andNN; delete the inner Add andyy\. All views give2/32/3\.
Figure 8:Selectedv0v\_\{0\}trees for \(h\)–\(i\)\. In \(h\), orange marks three relabelings and two inserted nodes; the original exponent leaf is retained as the reference’s rightmostNN\. In \(i\), deleting the orange Add andyynodes leaves the reference square\-root tree\. Numeric exponents are represented byNN\.\(j\) Shared additive factor\.Forf=\(x\+y\)\(x\+z\)f=\(x\+y\)\(x\+z\)andg=x\(x\+y\)g=x\(x\+y\), commutative assignment matches the commonAdd\(x,y\)\\mathrm\{Add\}\(x,y\)subtree across child positions\. In the other factor, delete Add andzzfromx\+zx\+z, retainingxx\. The raw cost is two and the reference has five nodes, givingv0=v1=2/5v\_\{0\}=v\_\{1\}=2/5\. Expansion producesx2\+xy\+xz\+yzx^\{2\}\+xy\+xz\+yzandx2\+xyx^\{2\}\+xy; deleting the two extra three\-node products givesv2=6/7v\_\{2\}=6/7\. The final score is2/52/5\.
\(k\) Numeric exponent abstraction\.Forf=\(x\+y\)2f=\(x\+y\)^\{2\}andg=\(x\+y\)3g=\(x\+y\)^\{3\},v0v\_\{0\}andv1v\_\{1\}both producePow\(Add\(x,y\),N\)\\mathrm\{Pow\}\(\\mathrm\{Add\}\(x,y\),N\), so their scores are0/50/5\. Inv2v\_\{2\}, the pure\-power terms still match because numeric exponents are abstracted\. Matching the candidate mixed term2xy2xyto one reference mixed term requires two insertions; inserting the remaining six\-node mixed term costsκ\(6\)=5\.6\\kappa\(6\)=5\.6\. The reference has 19 nodes, givingv2=\(2\+5\.6\)/19=0\.4v\_\{2\}=\(2\+5\.6\)/19=0\.4\. The final TED is zero, illustrating that zero structural distance does not imply algebraic equivalence\.
Figure 9:Selectedv0v\_\{0\}trees for \(j\)–\(k\)\. In \(j\), commutative matching preserves the common additive factor; deleting the orange Add andzznodes supplies the remainingxxfactor\. In \(k\), both exponent values become the same numeric leafNN, making the abstract trees identical\.
## Appendix BSynthetic formula and observation generation
We describe the archived August 30 configuration\. Listed probabilities are rounded proposals; feasibility checks and training resampling alter the resulting distributions\. Categorical weights are renormalized over permitted outcomes\.
### B\.1Empirical priors and formula size
1. 1\.Source formulas and weighting\.Priors use 32,177 LLM\-SR formulas from 153 problems, 20,400 PySR formulas from 239 problems, and 120 folded SRBench/Feynman targets, each treated as one problem\. Variable, root, operator, and constant statistics give equal weight to sources, problems within each source, and formulas within each problem: w\(g,p,s\)=13\|𝒫s\|\|ℱs,p\|,w\(g,p,s\)=\\frac\{1\}\{3\|\\mathcal\{P\}\_\{s\}\|\|\\mathcal\{F\}\_\{s,p\}\|\},\(12\)Here𝒫s\\mathcal\{P\}\_\{s\}contains sourcess’s problems, andℱs,p\\mathcal\{F\}\_\{s,p\}contains its formulas for problempp\. Before counting, negative powers use inverses, and exponents1/21/2,22, and33use square\-root, square, and cube operators\.
2. 2\.Node\-count and operator\-count prior\.LetNNcount all nodes,BBbinary operators \(e\.g\., addition or division\), andUUunary operators \(e\.g\., sine or logarithm\)\. WithB\+1B\+1leaves, For this joint size prior only, the source weights are\(πGT,πPySR,πLLM\-SR\)=\(0\.2,0\.2,0\.6\)\(\\pi\_\{\\mathrm\{GT\}\},\\pi\_\{\\mathrm\{PySR\}\},\\pi\_\{\\mathrm\{LLM\\text\{\-\}SR\}\}\)=\(0\.2,0\.2,0\.6\): P0\(N=n,B=b\)=∑s,p,gπs\|𝒫s\|\|ℱs,p\|𝟏\[N\(g\)=n,B\(g\)=b\]\.P\_\{0\}\(N=n,B=b\)=\\sum\_\{s,p,g\}\\frac\{\\pi\_\{s\}\}\{\|\\mathcal\{P\}\_\{s\}\|\|\\mathcal\{F\}\_\{s,p\}\|\}\\mathbf\{1\}\[N\(g\)=n,\\ B\(g\)=b\]\.\(13\)Exclude formulas exceeding 100 nodes, then adjust the length marginal while preservingP0\(B∣N\)P\_\{0\}\(B\\mid N\)\. Draw integerNNfrom the adjusted row sums andBBfrom that row’s feasible entries\. Table[8](https://arxiv.org/html/2610.20685#A2.T8)groups lengths for display only\. The legacy length\-bin floor of0\.0010\.001is inactive\.
3. 3\.Variable counts, root families, and feasibility\.Limit formulas to 100 nodes and 10 variables\. Clip variable\-bin upper endpoints tomin\(10,⌊\(N\+1\)/2⌋\)\\min\(10,\\lfloor\(N\+1\)/2\\rfloor\), remove empty bins, then select a bin and draw an integer uniformly within it\. A one\-node tree is a variable;N=2N=2forces a unary root;N\>2N\>2excludes a leaf root\. TheB\+1B\+1leaves must accommodate all variables after reserving exponent leaves\. A unary root or required inverse needs a unary operator; a non\-division binary root with required division needsB≥2B\\geq 2\. Retry infeasible proposals\.
#### B\.1\.1Theory of mixture priors and conditional sampling
LetPsP\_\{s\}be the empirical law obtained by averaging formulas within each problem and then problems within sourcess, as specified above\. The mixture isPπ=∑sπsPsP\_\{\\pi\}=\\sum\_\{s\}\\pi\_\{s\}P\_\{s\}\. For the joint size prior,π=\(0\.2,0\.2,0\.6\)\\pi=\(0\.2,0\.2,0\.6\)in GT/PySR/LLM\-SR order, and each source contains only formulas retained after the 100\-node cutoff and their nonempty problems\. Operator statistics instead useπs=1/3\\pi\_\{s\}=1/3\.
###### Proposition 1\(Conditional sampling from the mixed size prior\)\.
For any sampled lengthnnwithPπ\(N=n\)\>0P\_\{\\pi\}\(N=n\)\>0, the source weights conditional on that length and the resulting binary\-count law are
αs\(n\)\\displaystyle\\alpha\_\{s\}\(n\)=πsPs\(N=n\)∑tπtPt\(N=n\),\\displaystyle=\\frac\{\\pi\_\{s\}P\_\{s\}\(N=n\)\}\{\\sum\_\{t\}\\pi\_\{t\}P\_\{t\}\(N=n\)\},\(14\)P0\(B=b∣N=n\)\\displaystyle P\_\{0\}\(B=b\\mid N=n\)=∑sπsPs\(N=n,B=b\)∑sπsPs\(N=n\)=∑sαs\(n\)Ps\(B=b∣N=n\)\.\\displaystyle=\\frac\{\\sum\_\{s\}\\pi\_\{s\}P\_\{s\}\(N=n,B=b\)\}\{\\sum\_\{s\}\\pi\_\{s\}P\_\{s\}\(N=n\)\}=\\sum\_\{s\}\\alpha\_\{s\}\(n\)P\_\{s\}\(B=b\\mid N=n\)\.Sources with no mass atnnare omitted\. Thus normalizing the mixed joint row implements a source draw fromα\(n\)\\alpha\(n\)followed by a source\-specific conditional count draw\.
###### Proof\.
LetSSbe the selected source andZn=∑sπsPs\(N=n\)\>0Z\_\{n\}=\\sum\_\{s\}\\pi\_\{s\}P\_\{s\}\(N=n\)\>0\. The joint and marginal masses are
Pπ\(S=s,N=n,B=b\)\\displaystyle P\_\{\\pi\}\(S=s,N=n,B=b\)=πsPs\(N=n,B=b\),\\displaystyle=\\pi\_\{s\}P\_\{s\}\(N=n,B=b\),Pπ\(S=s,N=n\)\\displaystyle P\_\{\\pi\}\(S=s,N=n\)=∑bπsPs\(N=n,B=b\)=πsPs\(N=n\),\\displaystyle=\\sum\_\{b\}\\pi\_\{s\}P\_\{s\}\(N=n,B=b\)=\\pi\_\{s\}P\_\{s\}\(N=n\),Pπ\(N=n\)\\displaystyle P\_\{\\pi\}\(N=n\)=∑sPπ\(S=s,N=n\)=Zn\.\\displaystyle=\\sum\_\{s\}P\_\{\\pi\}\(S=s,N=n\)=Z\_\{n\}\.Hence
αs\(n\)=Pπ\(S=s,N=n\)Pπ\(N=n\)=πsPs\(N=n\)Zn≥0,∑sαs\(n\)=ZnZn=1\.\\alpha\_\{s\}\(n\)=\\frac\{P\_\{\\pi\}\(S=s,N=n\)\}\{P\_\{\\pi\}\(N=n\)\}=\\frac\{\\pi\_\{s\}P\_\{s\}\(N=n\)\}\{Z\_\{n\}\}\\geq 0,\\qquad\\sum\_\{s\}\\alpha\_\{s\}\(n\)=\\frac\{Z\_\{n\}\}\{Z\_\{n\}\}=1\.A zero\-mass source satisfiesPs\(N=n\)=0⇒Ps\(N=n,B=b\)=0P\_\{s\}\(N=n\)=0\\Rightarrow P\_\{s\}\(N=n,B=b\)=0for everybb\. On the remaining sources,
P0\(B=b∣N=n\)\\displaystyle P\_\{0\}\(B=b\\mid N=n\)=∑sπsPs\(N=n,B=b\)Zn\\displaystyle=\\frac\{\\sum\_\{s\}\\pi\_\{s\}P\_\{s\}\(N=n,B=b\)\}\{Z\_\{n\}\}=∑s:Ps\(N=n\)\>0πsPs\(N=n\)ZnPs\(B=b∣N=n\)\\displaystyle=\\sum\_\{s:P\_\{s\}\(N=n\)\>0\}\\frac\{\\pi\_\{s\}P\_\{s\}\(N=n\)\}\{Z\_\{n\}\}P\_\{s\}\(B=b\\mid N=n\)=∑s:Ps\(N=n\)\>0αs\(n\)Ps\(B=b∣N=n\)\.\\displaystyle=\\sum\_\{s:P\_\{s\}\(N=n\)\>0\}\\alpha\_\{s\}\(n\)P\_\{s\}\(B=b\\mid N=n\)\.The resulting law is normalized and equals the two\-stage sampling law:
∑bP0\(B=b∣N=n\)\\displaystyle\\sum\_\{b\}P\_\{0\}\(B=b\\mid N=n\)=∑s:Ps\(N=n\)\>0αs\(n\)∑bPs\(B=b∣N=n\)⏟1=1,\\displaystyle=\\sum\_\{s:P\_\{s\}\(N=n\)\>0\}\\alpha\_\{s\}\(n\)\\underbrace\{\\sum\_\{b\}P\_\{s\}\(B=b\\mid N=n\)\}\_\{1\}=1,Prtwo\-stage\(B=b∣n\)\\displaystyle\\Pr\_\{\\mathrm\{two\\text\{\-\}stage\}\}\(B=b\\mid n\)=∑s:Ps\(N=n\)\>0Pr\(S=s∣n\)Pr\(B=b∣S=s,n\)\\displaystyle=\\sum\_\{s:P\_\{s\}\(N=n\)\>0\}\\Pr\(S=s\\mid n\)\\Pr\(B=b\\mid S=s,n\)=∑s:Ps\(N=n\)\>0αs\(n\)Ps\(B=b∣N=n\)=P0\(B=b∣N=n\)\.\\displaystyle=\\sum\_\{s:P\_\{s\}\(N=n\)\>0\}\\alpha\_\{s\}\(n\)P\_\{s\}\(B=b\\mid N=n\)=P\_\{0\}\(B=b\\mid N=n\)\.∎
This justifies mixing joint counts before normalization: conditioning on length changes the appropriate source weights fromπs\\pi\_\{s\}toαs\(n\)\\alpha\_\{s\}\(n\)\.
###### Proposition 2\(Minimal\-change length reweighting and feasible sampling\)\.
LetP¯0\\bar\{P\}\_\{0\}be the normalized retained joint size law,pn=P¯0\(N=n\)p\_\{n\}=\\bar\{P\}\_\{0\}\(N=n\), andqqthe adjusted length distribution, supported wherepn\>0p\_\{n\}\>0\. Row scaling gives
Q\(n,b\)=qnpnP¯0\(n,b\)=qnP¯0\(b∣n\),Q\(n,b\)=\\frac\{q\_\{n\}\}\{p\_\{n\}\}\\bar\{P\}\_\{0\}\(n,b\)=q\_\{n\}\\bar\{P\}\_\{0\}\(b\\mid n\),\(15\)with zero mass on unused rows\. This law has length marginalqqand preserves the binary\-count conditional at each used length\. Among joint lawsR\(N,B\)R\(N,B\)supported onP¯0\\bar\{P\}\_\{0\}with length marginalqq, it uniquely minimizesDKL\(R∥P¯0\)D\_\{\\mathrm\{KL\}\}\(R\\\|\\bar\{P\}\_\{0\}\), attaining the minimumDKL\(q∥p\)D\_\{\\mathrm\{KL\}\}\(q\\\|p\)\.
Lethhcollect the sampled variable count, root family, and division/inverse requirements, and letℬ\(n,h\)\\mathcal\{B\}\(n,h\)be the admitted binary counts\. Forqn\>0q\_\{n\}\>0and positive admissible row mass, restricting eitherQ\(n,⋅\)Q\(n,\\cdot\)orP¯0\(n,⋅\)\\bar\{P\}\_\{0\}\(n,\\cdot\)gives the same sampling kernel:
KB\(b∣n,h\)=P¯0\(n,b\)1\[b∈ℬ\(n,h\)\]∑b′∈ℬ\(n,h\)P¯0\(n,b′\)\.K\_\{B\}\(b\\mid n,h\)=\\frac\{\\bar\{P\}\_\{0\}\(n,b\)\\,\\mathbf\{1\}\[b\\in\\mathcal\{B\}\(n,h\)\]\}\{\\sum\_\{b^\{\\prime\}\\in\\mathcal\{B\}\(n,h\)\}\\bar\{P\}\_\{0\}\(n,b^\{\\prime\}\)\}\.\(16\)
###### Proof\.
Marginal and conditional laws\.Forqn\>0q\_\{n\}\>0, the support assumption givespn\>0p\_\{n\}\>0, and
∑bQ\(n,b\)\\displaystyle\\sum\_\{b\}Q\(n,b\)=qnpn∑bP¯0\(n,b\)=qnpnpn=qn,\\displaystyle=\\frac\{q\_\{n\}\}\{p\_\{n\}\}\\sum\_\{b\}\\bar\{P\}\_\{0\}\(n,b\)=\\frac\{q\_\{n\}\}\{p\_\{n\}\}p\_\{n\}=q\_\{n\},∑n,bQ\(n,b\)\\displaystyle\\sum\_\{n,b\}Q\(n,b\)=∑nqn=1,\\displaystyle=\\sum\_\{n\}q\_\{n\}=1,Q\(b∣n\)\\displaystyle Q\(b\\mid n\)=Q\(n,b\)qn=P¯0\(n,b\)pn=P¯0\(b∣n\),\\displaystyle=\\frac\{Q\(n,b\)\}\{q\_\{n\}\}=\\frac\{\\bar\{P\}\_\{0\}\(n,b\)\}\{p\_\{n\}\}=\\bar\{P\}\_\{0\}\(b\\mid n\),Prsampler\(N=n,B=b\)\\displaystyle\\Pr\_\{\\mathrm\{sampler\}\}\(N=n,B=b\)=qnP¯0\(b∣n\)=Q\(n,b\)\.\\displaystyle=q\_\{n\}\\bar\{P\}\_\{0\}\(b\\mid n\)=Q\(n,b\)\.Rows withqn=0q\_\{n\}=0haveQ\(n,b\)=0Q\(n,b\)=0for allbb\.
KL decomposition\.For an admissibleRR, setrn\(b\)=R\(b∣n\)r\_\{n\}\(b\)=R\(b\\mid n\)andtn\(b\)=P¯0\(b∣n\)t\_\{n\}\(b\)=\\bar\{P\}\_\{0\}\(b\\mid n\)on rows withqn\>0q\_\{n\}\>0\. Then
R\(n,b\)=qnrn\(b\),P¯0\(n,b\)=pntn\(b\),∑brn\(b\)=∑btn\(b\)=1\.R\(n,b\)=q\_\{n\}r\_\{n\}\(b\),\\qquad\\bar\{P\}\_\{0\}\(n,b\)=p\_\{n\}t\_\{n\}\(b\),\\qquad\\sum\_\{b\}r\_\{n\}\(b\)=\\sum\_\{b\}t\_\{n\}\(b\)=1\.In KL sums, zero\-probability terms are interpreted as zero, using0log0=00\\log 0=0\. SinceRRis supported onP¯0\\bar\{P\}\_\{0\}, every denominator at a positive\-mass term is positive\. Expanding the logarithm gives
DKL\(R∥P¯0\)\\displaystyle D\_\{\\mathrm\{KL\}\}\(R\\\|\\bar\{P\}\_\{0\}\)=∑n:qn\>0∑bqnrn\(b\)logqnrn\(b\)pntn\(b\)\\displaystyle=\\sum\_\{n:q\_\{n\}\>0\}\\sum\_\{b\}q\_\{n\}r\_\{n\}\(b\)\\log\\frac\{q\_\{n\}r\_\{n\}\(b\)\}\{p\_\{n\}t\_\{n\}\(b\)\}\(17\)=∑n:qn\>0qn∑brn\(b\)\(logqnpn\+logrn\(b\)tn\(b\)\)\\displaystyle=\\sum\_\{n:q\_\{n\}\>0\}q\_\{n\}\\sum\_\{b\}r\_\{n\}\(b\)\\left\(\\log\\frac\{q\_\{n\}\}\{p\_\{n\}\}\+\\log\\frac\{r\_\{n\}\(b\)\}\{t\_\{n\}\(b\)\}\\right\)=∑n:qn\>0qnlogqnpn∑brn\(b\)⏟1\+∑n:qn\>0qn∑brn\(b\)logrn\(b\)tn\(b\)\\displaystyle=\\sum\_\{n:q\_\{n\}\>0\}q\_\{n\}\\log\\frac\{q\_\{n\}\}\{p\_\{n\}\}\\underbrace\{\\sum\_\{b\}r\_\{n\}\(b\)\}\_\{1\}\+\\sum\_\{n:q\_\{n\}\>0\}q\_\{n\}\\sum\_\{b\}r\_\{n\}\(b\)\\log\\frac\{r\_\{n\}\(b\)\}\{t\_\{n\}\(b\)\}=DKL\(q∥p\)\+∑n:qn\>0qnDKL\(rn∥tn\)\.\\displaystyle=D\_\{\\mathrm\{KL\}\}\(q\\\|p\)\+\\sum\_\{n:q\_\{n\}\>0\}q\_\{n\}D\_\{\\mathrm\{KL\}\}\(r\_\{n\}\\\|t\_\{n\}\)\.
Optimality and uniqueness\.The standard inequalityxlogx−x\+1≥0x\\log x\-x\+1\\geq 0forx≥0x\\geq 0, with equality only atx=1x=1, yields
DKL\(rn∥tn\)\\displaystyle D\_\{\\mathrm\{KL\}\}\(r\_\{n\}\\\|t\_\{n\}\)=∑b:tn\(b\)\>0tn\(b\)\[rn\(b\)tn\(b\)logrn\(b\)tn\(b\)−rn\(b\)tn\(b\)\+1\]≥0,\\displaystyle=\\sum\_\{b:t\_\{n\}\(b\)\>0\}t\_\{n\}\(b\)\\left\[\\frac\{r\_\{n\}\(b\)\}\{t\_\{n\}\(b\)\}\\log\\frac\{r\_\{n\}\(b\)\}\{t\_\{n\}\(b\)\}\-\\frac\{r\_\{n\}\(b\)\}\{t\_\{n\}\(b\)\}\+1\\right\]\\geq 0,DKL\(rn∥tn\)=0\\displaystyle D\_\{\\mathrm\{KL\}\}\(r\_\{n\}\\\|t\_\{n\}\)=0⟺rn=tn\.\\displaystyle\\Longleftrightarrow\\quad r\_\{n\}=t\_\{n\}\.The inserted linear terms sum to−∑brn\(b\)\+∑btn\(b\)=0\-\\sum\_\{b\}r\_\{n\}\(b\)\+\\sum\_\{b\}t\_\{n\}\(b\)=0\. Therefore
DKL\(R∥P¯0\)\\displaystyle D\_\{\\mathrm\{KL\}\}\(R\\\|\\bar\{P\}\_\{0\}\)≥DKL\(q∥p\)=DKL\(Q∥P¯0\),\\displaystyle\\geq D\_\{\\mathrm\{KL\}\}\(q\\\|p\)=D\_\{\\mathrm\{KL\}\}\(Q\\\|\\bar\{P\}\_\{0\}\),DKL\(R∥P¯0\)=DKL\(q∥p\)\\displaystyle D\_\{\\mathrm\{KL\}\}\(R\\\|\\bar\{P\}\_\{0\}\)=D\_\{\\mathrm\{KL\}\}\(q\\\|p\)⟺rn=tnfor everynwithqn\>0\\displaystyle\\Longleftrightarrow r\_\{n\}=t\_\{n\}\\ \\text\{for every \}n\\text\{ with \}q\_\{n\}\>0⟺R\(n,b\)=qnP¯0\(b∣n\)=Q\(n,b\)on all used rows\\displaystyle\\Longleftrightarrow R\(n,b\)=q\_\{n\}\\bar\{P\}\_\{0\}\(b\\mid n\)=Q\(n,b\)\\ \\text\{on all used rows\}⟺R=Q\.\\displaystyle\\Longleftrightarrow R=Q\.The last equivalence also usesqn=0⇒R\(n,b\)=Q\(n,b\)=0q\_\{n\}=0\\Rightarrow R\(n,b\)=Q\(n,b\)=0for allbb\.
Feasibility conditioning\.At fixed\(n,h\)\(n,h\)withqn\>0q\_\{n\}\>0, writeℬ=ℬ\(n,h\)\\mathcal\{B\}=\\mathcal\{B\}\(n,h\)andAn,h=∑b′∈ℬP¯0\(n,b′\)\>0A\_\{n,h\}=\\sum\_\{b^\{\\prime\}\\in\\mathcal\{B\}\}\\bar\{P\}\_\{0\}\(n,b^\{\\prime\}\)\>0\. Then
KB\(b∣n,h\)\\displaystyle K\_\{B\}\(b\\mid n,h\)=Q\(b∣n\)𝟏\[b∈ℬ\]∑b′∈ℬQ\(b′∣n\)\\displaystyle=\\frac\{Q\(b\\mid n\)\\mathbf\{1\}\[b\\in\\mathcal\{B\}\]\}\{\\sum\_\{b^\{\\prime\}\\in\\mathcal\{B\}\}Q\(b^\{\\prime\}\\mid n\)\}=Q\(n,b\)𝟏\[b∈ℬ\]∑b′∈ℬQ\(n,b′\)\\displaystyle=\\frac\{Q\(n,b\)\\mathbf\{1\}\[b\\in\\mathcal\{B\}\]\}\{\\sum\_\{b^\{\\prime\}\\in\\mathcal\{B\}\}Q\(n,b^\{\\prime\}\)\}=\(qn/pn\)P¯0\(n,b\)𝟏\[b∈ℬ\]\(qn/pn\)An,h=P¯0\(n,b\)𝟏\[b∈ℬ\]An,h,\\displaystyle=\\frac\{\(q\_\{n\}/p\_\{n\}\)\\bar\{P\}\_\{0\}\(n,b\)\\mathbf\{1\}\[b\\in\\mathcal\{B\}\]\}\{\(q\_\{n\}/p\_\{n\}\)A\_\{n,h\}\}=\\frac\{\\bar\{P\}\_\{0\}\(n,b\)\\mathbf\{1\}\[b\\in\\mathcal\{B\}\]\}\{A\_\{n,h\}\},∑bKB\(b∣n,h\)\\displaystyle\\sum\_\{b\}K\_\{B\}\(b\\mid n,h\)=An,hAn,h=1\.\\displaystyle=\\frac\{A\_\{n,h\}\}\{A\_\{n,h\}\}=1\.Thus feasibility conditioning cancels both the length marginal and the row multiplier, giving Equation[16](https://arxiv.org/html/2610.20685#A2.E16)\. ∎
The KL characterization makes row scaling a minimal\-change update of the empirical joint law under the prescribed length marginal; the sampler realizes this minimizer directly\. A zero denominator in the feasible kernel triggers a retry\. This result concerns the size proposal and its local feasibility mask: subsequent operator assignment, exponent\-leaf reservation, and formula filtering add further constraints\. Structural retries may redrawNN, and simplification may change its value, so the final accepted length distribution need not equalqq\. The separate empirical priors and sequential masks do not define a single empirically learned joint law over all formula properties\.
###### Proposition 3\(Conditional operator priors from weighted occurrences\)\.
For operatorooof arityaa, letms\(o\)=𝔼s\[co\(G\)\]m\_\{s\}\(o\)=\\mathbb\{E\}\_\{s\}\[c\_\{o\}\(G\)\]andms\(a\)=𝔼s\[ca\(G\)\]m\_\{s\}\(a\)=\\mathbb\{E\}\_\{s\}\[c\_\{a\}\(G\)\]under the same problem/formula hierarchy\. If∑sπsms\(a\)\>0\\sum\_\{s\}\\pi\_\{s\}m\_\{s\}\(a\)\>0, mixing occurrence counts and conditioning on arity gives
P\(o∣a\)=∑sπsms\(o\)∑sπsms\(a\)=∑s:ms\(a\)\>0πsms\(a\)∑tπtmt\(a\)⏟αs\(a\)ms\(o\)ms\(a\)\.P\(o\\mid a\)=\\frac\{\\sum\_\{s\}\\pi\_\{s\}m\_\{s\}\(o\)\}\{\\sum\_\{s\}\\pi\_\{s\}m\_\{s\}\(a\)\}=\\sum\_\{s:m\_\{s\}\(a\)\>0\}\\underbrace\{\\frac\{\\pi\_\{s\}m\_\{s\}\(a\)\}\{\\sum\_\{t\}\\pi\_\{t\}m\_\{t\}\(a\)\}\}\_\{\\alpha\_\{s\}\(a\)\}\\frac\{m\_\{s\}\(o\)\}\{m\_\{s\}\(a\)\}\.\(18\)Hereαs\(a\)\\alpha\_\{s\}\(a\)is the source probability conditional on an arity\-aaoccurrence\.
###### Proof\.
Let𝒪a\\mathcal\{O\}\_\{a\}be the operators of arityaaandμ\(s,o\)=πsms\(o\)\\mu\(s,o\)=\\pi\_\{s\}m\_\{s\}\(o\)their weighted occurrence mass\. Sinceca\(G\)=∑o∈𝒪aco\(G\)c\_\{a\}\(G\)=\\sum\_\{o\\in\\mathcal\{O\}\_\{a\}\}c\_\{o\}\(G\),
ms\(a\)=∑o∈𝒪ams\(o\),Ma:=∑s∑o∈𝒪aμ\(s,o\)=∑sπsms\(a\)\>0\.m\_\{s\}\(a\)=\\sum\_\{o\\in\\mathcal\{O\}\_\{a\}\}m\_\{s\}\(o\),\\qquad M\_\{a\}:=\\sum\_\{s\}\\sum\_\{o\\in\\mathcal\{O\}\_\{a\}\}\\mu\(s,o\)=\\sum\_\{s\}\\pi\_\{s\}m\_\{s\}\(a\)\>0\.For the occurrence sourceSS, labelOO, and arityAA,
P\(S=s,O=o∣A=a\)\\displaystyle P\(S=s,O=o\\mid A=a\)=μ\(s,o\)Ma=πsms\(o\)Ma,o∈𝒪a,\\displaystyle=\\frac\{\\mu\(s,o\)\}\{M\_\{a\}\}=\\frac\{\\pi\_\{s\}m\_\{s\}\(o\)\}\{M\_\{a\}\},\\qquad o\\in\\mathcal\{O\}\_\{a\},∑s∑o∈𝒪aP\(S=s,O=o∣A=a\)\\displaystyle\\sum\_\{s\}\\sum\_\{o\\in\\mathcal\{O\}\_\{a\}\}P\(S=s,O=o\\mid A=a\)=MaMa=1,\\displaystyle=\\frac\{M\_\{a\}\}\{M\_\{a\}\}=1,P\(S=s∣A=a\)\\displaystyle P\(S=s\\mid A=a\)=∑o∈𝒪aπsms\(o\)Ma=πsms\(a\)Ma=αs\(a\)\.\\displaystyle=\\sum\_\{o\\in\\mathcal\{O\}\_\{a\}\}\\frac\{\\pi\_\{s\}m\_\{s\}\(o\)\}\{M\_\{a\}\}=\\frac\{\\pi\_\{s\}m\_\{s\}\(a\)\}\{M\_\{a\}\}=\\alpha\_\{s\}\(a\)\.Forπsms\(a\)\>0\\pi\_\{s\}m\_\{s\}\(a\)\>0, conditioning within the source gives
P\(O=o∣S=s,A=a\)=P\(S=s,O=o∣A=a\)P\(S=s∣A=a\)=πsms\(o\)/Maπsms\(a\)/Ma=ms\(o\)ms\(a\)\.P\(O=o\\mid S=s,A=a\)=\\frac\{P\(S=s,O=o\\mid A=a\)\}\{P\(S=s\\mid A=a\)\}=\\frac\{\\pi\_\{s\}m\_\{s\}\(o\)/M\_\{a\}\}\{\\pi\_\{s\}m\_\{s\}\(a\)/M\_\{a\}\}=\\frac\{m\_\{s\}\(o\)\}\{m\_\{s\}\(a\)\}\.Consequently,
P\(O=o∣A=a\)\\displaystyle P\(O=o\\mid A=a\)=∑s:ms\(a\)\>0αs\(a\)ms\(o\)ms\(a\)\\displaystyle=\\sum\_\{s:m\_\{s\}\(a\)\>0\}\\alpha\_\{s\}\(a\)\\frac\{m\_\{s\}\(o\)\}\{m\_\{s\}\(a\)\}=∑s:ms\(a\)\>0πsms\(a\)Mams\(o\)ms\(a\)=∑sπsms\(o\)Ma,\\displaystyle=\\sum\_\{s:m\_\{s\}\(a\)\>0\}\\frac\{\\pi\_\{s\}m\_\{s\}\(a\)\}\{M\_\{a\}\}\\frac\{m\_\{s\}\(o\)\}\{m\_\{s\}\(a\)\}=\\frac\{\\sum\_\{s\}\\pi\_\{s\}m\_\{s\}\(o\)\}\{M\_\{a\}\},∑o∈𝒪aP\(O=o∣A=a\)\\displaystyle\\sum\_\{o\\in\\mathcal\{O\}\_\{a\}\}P\(O=o\\mid A=a\)=∑sπs∑o∈𝒪ams\(o\)Ma=MaMa=1\.\\displaystyle=\\frac\{\\sum\_\{s\}\\pi\_\{s\}\\sum\_\{o\\in\\mathcal\{O\}\_\{a\}\}m\_\{s\}\(o\)\}\{M\_\{a\}\}=\\frac\{M\_\{a\}\}\{M\_\{a\}\}=1\.Herems\(a\)=0⇒ms\(o\)=0m\_\{s\}\(a\)=0\\Rightarrow m\_\{s\}\(o\)=0for everyo∈𝒪ao\\in\\mathcal\{O\}\_\{a\}; sources of zero weighted mass contribute zero and require no conditional draw\. ∎
Even with equal source weightsπs=1/3\\pi\_\{s\}=1/3, the conditional source contribution depends on its weighted arity count\. Thus the implementation mixes occurrence counts before dividing, rather than averaging per\-formula operator ratios\. The unary floor and contextual exclusions are subsequent modifications of this base law\.
Table 8:Effective size, variable\-count, and root\-family proposals before feasibility constraints\. The variable and root columns are separate categorical distributions\.
### B\.2Tree shape and operator assignment
1. 1\.Ordered tree shape\.ForBBbinary operators, there areCB=\(2BB\)/\(B\+1\)C\_\{B\}=\\binom\{2B\}\{B\}/\(B\+1\)ordered skeletons\. Recursively choose left sizeiiand right sizeB−1−iB\-1\-iwith probabilityCiCB−1−i/CBC\_\{i\}C\_\{B\-1\-i\}/C\_\{B\}, giving each skeleton probability1/CB1/C\_\{B\}\.
2. 2\.Placement of the remaining operators\.Across2B\+12B\+1skeleton positions, distributeU=N−2B−1U=N\-2B\-1unary operators using a uniform weak composition\(u1,…,u2B\+1\)\(u\_\{1\},\\ldots,u\_\{2B\+1\}\)summing toUU; wrap positionjjinuju\_\{j\}operators\. A unary root reserves one operator before distributingU−1U\-1; a binary root receives zero, withUUdistributed elsewhere\.
3. 3\.Operator probabilities\.For an operatorooof arityaa, the empirical weight is P\(o∣a\)=∑s,p,gw\(g,p,s\)co\(g\)∑s,p,gw\(g,p,s\)ca\(g\),P\(o\\mid a\)=\\frac\{\\sum\_\{s,p,g\}w\(g,p,s\)c\_\{o\}\(g\)\}\{\\sum\_\{s,p,g\}w\(g,p,s\)c\_\{a\}\(g\)\},Herecoc\_\{o\}counts operatorooandcac\_\{a\}counts all arity\-aaoperators\. Floor rare unary probabilities at0\.0010\.001and proportionally rescale the rest \(Table[9](https://arxiv.org/html/2610.20685#A2.T9)\)\.
4. 4\.Root choices and division/inverse requirements\.An additive root choosesAdd/Subwith probabilities\(0\.656837367,0\.343162633\)\(0\.656837367,0\.343162633\); multiplicative, rational, and power roots forceMul,Div, andPow, respectively\. The formula\-level division proposal is0\.5923717440\.592371744and the inverse proposal is0\.0247172280\.024717228\. A rational root already requires division; otherwise, the probability of requiring it is 0\.592371744−0\.2335536411−0\.233553641=0\.468158142\.\\frac\{0\.592371744\-0\.233553641\}\{1\-0\.233553641\}=0\.468158142\.ForN=1N=1, disable both requirements\. A unary root isInvif required; otherwise excludeInv\. Force any still\-requiredDiv/Invat a uniformly chosen available position; exclude unrequired ones from unassigned nodes\. Multiply thePowweight by0\.150\.15for nonleaf exponents\. Renormalize remaining weights and apply the checks in Appendix[B\.4](https://arxiv.org/html/2610.20685#A2.SS4)\.
#### B\.2\.1Theory of the Catalan shape sampler
Condition on the sampled countsB=bB=bandU=uU=u, so thatN=2b\+u\+1N=2b\+u\+1\. We analyze ordered, unlabeled tree shapes; left and right child positions remain distinct even when their eventual operator is commutative\.
We use the standard Catalan countCb=\(2bb\)/\(b\+1\)C\_\{b\}=\\binom\{2b\}\{b\}/\(b\+1\)for ordered full binary skeletons, withC0=1C\_\{0\}=1andCb=∑i=0b−1CiCb−1−iC\_\{b\}=\\sum\_\{i=0\}^\{b\-1\}C\_\{i\}C\_\{b\-1\-i\}forb≥1b\\geq 1\([Flajolet & Sedgewick, 2009](https://arxiv.org/html/2610.20685#bib.bib4), pp\. 6–7\)\.
###### Proposition 4\(Uniform sampling of ordered binary skeletons\)\.
At each binary node with a remaining budgetb≥1b\\geq 1, draw the left\-subtree budgetIIwith
P\(I=i∣b\)=CiCb−1−iCb,i=0,…,b−1,P\(I=i\\mid b\)=\\frac\{C\_\{i\}C\_\{b\-1\-i\}\}\{C\_\{b\}\},\\qquad i=0,\\ldots,b\-1,\(19\)then draw both subtrees independently by the same rule\. Every ordered full binary skeleton withbbbinary nodes has probability1/Cb1/C\_\{b\}\.
###### Proof\.
Valid split probabilities\.The stated Catalan recurrence gives
P\(I=i∣b\)=CiCb−1−iCb≥0,∑i=0b−1P\(I=i∣b\)=∑i=0b−1CiCb−1−iCb=1\.P\(I=i\\mid b\)=\\frac\{C\_\{i\}C\_\{b\-1\-i\}\}\{C\_\{b\}\}\\geq 0,\\qquad\\sum\_\{i=0\}^\{b\-1\}P\(I=i\\mid b\)=\\frac\{\\sum\_\{i=0\}^\{b\-1\}C\_\{i\}C\_\{b\-1\-i\}\}\{C\_\{b\}\}=1\.Each recursive call has fewer binary nodes:
0≤I≤b−1,0≤b−1−I≤b−1,0\\leq I\\leq b\-1,\\qquad 0\\leq b\-1\-I\\leq b\-1,so recursion terminates at the uniqueb=0b=0leaf\.
Uniformity by induction\.Forb=0b=0,P\(leaf∣0\)=1=1/C0P\(\\mathrm\{leaf\}\\mid 0\)=1=1/C\_\{0\}\. Assume
P\(T′∣k\)=1Ckfor every0≤k<band every skeletonT′of sizek\.P\(T^\{\\prime\}\\mid k\)=\\frac\{1\}\{C\_\{k\}\}\\qquad\\text\{for every \}0\\leq k<b\\text\{ and every skeleton \}T^\{\\prime\}\\text\{ of size \}k\.A skeletonTTof sizebbuniquely determines its ordered subtrees and split:
T⟷\(i,TL,TR\),\|TL\|binary=i,\|TR\|binary=j=b−1−i\.T\\longleftrightarrow\(i,T\_\{L\},T\_\{R\}\),\\qquad\|T\_\{L\}\|\_\{\\mathrm\{binary\}\}=i,\\quad\|T\_\{R\}\|\_\{\\mathrm\{binary\}\}=j=b\-1\-i\.Conditional independence of the recursive draws and the induction hypothesis imply
P\(T∣b\)\\displaystyle P\(T\\mid b\)=P\(I=i∣b\)P\(TL,TR∣I=i,b\)\\displaystyle=P\(I=i\\mid b\)P\(T\_\{L\},T\_\{R\}\\mid I=i,b\)=P\(I=i∣b\)P\(TL∣i\)P\(TR∣j\)\\displaystyle=P\(I=i\\mid b\)P\(T\_\{L\}\\mid i\)P\(T\_\{R\}\\mid j\)=CiCjCb1Ci1Cj=1Cb\.\\displaystyle=\\frac\{C\_\{i\}C\_\{j\}\}\{C\_\{b\}\}\\frac\{1\}\{C\_\{i\}\}\\frac\{1\}\{C\_\{j\}\}=\\frac\{1\}\{C\_\{b\}\}\.There is no second construction path for the same ordered tree\. For the set𝒮b\\mathcal\{S\}\_\{b\}of all such skeletons,
∑T∈𝒮bP\(T∣b\)=\|𝒮b\|1Cb=1\.\\sum\_\{T\\in\\mathcal\{S\}\_\{b\}\}P\(T\\mid b\)=\|\\mathcal\{S\}\_\{b\}\|\\,\\frac\{1\}\{C\_\{b\}\}=1\.∎
###### Proposition 5\(Uniform unary–binary shapes with root constraints\)\.
Fixb,u≥0b,u\\geq 0and index theK=2b\+1K=2b\+1skeleton positions in preorder, with position one at the root\. Independently draw a uniform skeleton and a uniform nonnegative integer vector\(u1,…,uK\)\(u\_\{1\},\\ldots,u\_\{K\}\)summing touu, then insertuju\_\{j\}unary nodes above positionjj\. Every ordered shape with these arity counts has probability
P\(T∣b,u\)=1CbW\(u,K\),W\(u,K\)=\(u\+K−1K−1\)\.P\(T\\mid b,u\)=\\frac\{1\}\{C\_\{b\}W\(u,K\)\},\\qquad W\(u,K\)=\\binom\{u\+K\-1\}\{K\-1\}\.\(20\)A prescribed unary root restricts the vector tou1≥1u\_\{1\}\\geq 1; a prescribed binary root requiresu1=0u\_\{1\}=0andb≥1b\\geq 1\. The respective counts are
Wunary=\(u\+K−2K−1\)\(u≥1\),Wbinary=\(u\+K−2K−2\)\(b≥1\)\.W\_\{\\mathrm\{unary\}\}=\\binom\{u\+K\-2\}\{K\-1\}\\quad\(u\\geq 1\),\\qquad W\_\{\\mathrm\{binary\}\}=\\binom\{u\+K\-2\}\{K\-2\}\\quad\(b\\geq 1\)\.\(21\)A uniform draw among the admissible vectors assigns probability1/\(CbWr\)1/\(C\_\{b\}W\_\{r\}\)to each shape with root arityrr\.
###### Proof\.
One\-to\-one shape construction\.Write
𝒰u,K=\{\(u1,…,uK\)∈ℤ≥0K:∑j=1Kuj=u\},\\mathcal\{U\}\_\{u,K\}=\\left\\\{\(u\_\{1\},\\ldots,u\_\{K\}\)\\in\\mathbb\{Z\}\_\{\\geq 0\}^\{K\}:\\sum\_\{j=1\}^\{K\}u\_\{j\}=u\\right\\\},and let𝒯b,u\\mathcal\{T\}\_\{b,u\}be the target ordered shapes\. Insertion defines
Φ:𝒮b×𝒰u,K⟶𝒯b,u,Φ\(S,𝐮\)=insert\(S,𝐮\)\.\\Phi:\\mathcal\{S\}\_\{b\}\\times\\mathcal\{U\}\_\{u,K\}\\longrightarrow\\mathcal\{T\}\_\{b,u\},\\qquad\\Phi\(S,\\mathbf\{u\}\)=\\operatorname\{insert\}\(S,\\mathbf\{u\}\)\.Every maximal unary chain lies above a unique surviving skeleton node, including the root\. Contracting all such chains and recording their lengths in preorder therefore gives
Φ−1\(T\)=\(contract\(T\),chainlengths\(T\)\),Φ−1∘Φ=id,Φ∘Φ−1=id\.\\Phi^\{\-1\}\(T\)=\\bigl\(\\operatorname\{contract\}\(T\),\\operatorname\{chainlengths\}\(T\)\\bigr\),\\qquad\\Phi^\{\-1\}\\circ\\Phi=\\mathrm\{id\},\\quad\\Phi\\circ\\Phi^\{\-1\}=\\mathrm\{id\}\.Both operations preserve child order and the prescribed node counts\.
Uniform unary allocation\.ForK\>1K\>1, the composition sampler selectsK−1K\-1separator positions uniformly:
1≤t1<⋯<tK−1≤u\+K−1\.1\\leq t\_\{1\}<\\cdots<t\_\{K\-1\}\\leq u\+K\-1\.The forward and inverse maps are
u1\\displaystyle u\_\{1\}=t1−1,uj=tj−tj−1−1\(2≤j<K\),\\displaystyle=t\_\{1\}\-1,\\qquad u\_\{j\}=t\_\{j\}\-t\_\{j\-1\}\-1\\quad\(2\\leq j<K\),uK\\displaystyle u\_\{K\}=u\+K−1−tK−1,tj=j\+∑ℓ=1juℓ\(1≤j<K\)\.\\displaystyle=u\+K\-1\-t\_\{K\-1\},\\qquad t\_\{j\}=j\+\\sum\_\{\\ell=1\}^\{j\}u\_\{\\ell\}\\quad\(1\\leq j<K\)\.Hence
uj\\displaystyle u\_\{j\}≥0,∑j=1Kuj=u,\\displaystyle\\geq 0,\\qquad\\sum\_\{j=1\}^\{K\}u\_\{j\}=u,\|𝒰u,K\|\\displaystyle\|\\mathcal\{U\}\_\{u,K\}\|=\(u\+K−1K−1\)=W\(u,K\),P\(𝐮∣u,K\)=1W\(u,K\)\.\\displaystyle=\\binom\{u\+K\-1\}\{K\-1\}=W\(u,K\),\\qquad P\(\\mathbf\{u\}\\mid u,K\)=\\frac\{1\}\{W\(u,K\)\}\.ForK=1K=1,𝒰u,1=\{\(u\)\}\\mathcal\{U\}\_\{u,1\}=\\\{\(u\)\\\}andW\(u,1\)=1W\(u,1\)=1\. By the bijection and independence,
\|𝒯b,u\|\\displaystyle\|\\mathcal\{T\}\_\{b,u\}\|=\|𝒮b\|\|𝒰u,K\|=CbW\(u,K\),\\displaystyle=\|\\mathcal\{S\}\_\{b\}\|\\,\|\\mathcal\{U\}\_\{u,K\}\|=C\_\{b\}W\(u,K\),P\(T∣b,u\)\\displaystyle P\(T\\mid b,u\)=P\(S∣b\)P\(𝐮∣u,K\)=1Cb1W\(u,K\),\\displaystyle=P\(S\\mid b\)P\(\\mathbf\{u\}\\mid u,K\)=\\frac\{1\}\{C\_\{b\}\}\\frac\{1\}\{W\(u,K\)\},∑T∈𝒯b,uP\(T∣b,u\)\\displaystyle\\sum\_\{T\\in\\mathcal\{T\}\_\{b,u\}\}P\(T\\mid b,u\)=1\.\\displaystyle=1\.
Conditioning on the root arity\.For a unary root \(u≥1u\\geq 1\), reserving one root node gives the bijection
\{𝐮∈𝒰u,K:u1≥1\}\\displaystyle\\\{\\mathbf\{u\}\\in\\mathcal\{U\}\_\{u,K\}:u\_\{1\}\\geq 1\\\}⟷𝒰u−1,K,\\displaystyle\\longleftrightarrow\\mathcal\{U\}\_\{u\-1,K\},\(u1,u2,…,uK\)\\displaystyle\(u\_\{1\},u\_\{2\},\\ldots,u\_\{K\}\)⟼\(u1−1,u2,…,uK\),\\displaystyle\\longmapsto\(u\_\{1\}\-1,u\_\{2\},\\ldots,u\_\{K\}\),Wunary\\displaystyle W\_\{\\mathrm\{unary\}\}=W\(u−1,K\)=\(u\+K−2K−1\)\.\\displaystyle=W\(u\-1,K\)=\\binom\{u\+K\-2\}\{K\-1\}\.For a binary root \(b≥1b\\geq 1\), excluding the root position gives
\{𝐮∈𝒰u,K:u1=0\}\\displaystyle\\\{\\mathbf\{u\}\\in\\mathcal\{U\}\_\{u,K\}:u\_\{1\}=0\\\}⟷𝒰u,K−1,\\displaystyle\\longleftrightarrow\\mathcal\{U\}\_\{u,K\-1\},\(0,u2,…,uK\)\\displaystyle\(0,u\_\{2\},\\ldots,u\_\{K\}\)⟼\(u2,…,uK\),\\displaystyle\\longmapsto\(u\_\{2\},\\ldots,u\_\{K\}\),Wbinary\\displaystyle W\_\{\\mathrm\{binary\}\}=W\(u,K−1\)=\(u\+K−2K−2\)\.\\displaystyle=W\(u,K\-1\)=\\binom\{u\+K\-2\}\{K\-2\}\.The inverses add one to the first entry or prepend zero, respectively\. Let𝒯b,u,r\\mathcal\{T\}\_\{b,u,r\}contain the shapes with root arityrr\. Each admissible vector has probability1/Wr1/W\_\{r\}, independently of the skeleton:
\|𝒯b,u,r\|=CbWr,P\(T∣b,u,r\)=1CbWr,∑T∈𝒯b,u,rP\(T∣b,u,r\)=1\.\|\\mathcal\{T\}\_\{b,u,r\}\|=C\_\{b\}W\_\{r\},\\qquad P\(T\\mid b,u,r\)=\\frac\{1\}\{C\_\{b\}W\_\{r\}\},\\qquad\\sum\_\{T\\in\\mathcal\{T\}\_\{b,u,r\}\}P\(T\\mid b,u,r\)=1\.The feasible boundary cases are
\(b,u\)admissible allocationresultb=0,u\>0\(u\)one unary chainb\>0,u=0\(0,…,0\)unchanged binary skeletonb=u=0\(0\)one leaf\.\\begin\{array\}\[\]\{c\|c\|c\}\(b,u\)&\\text\{admissible allocation\}&\\text\{result\}\\\\ \\hline\\cr b=0,\\ u\>0&\(u\)&\\text\{one unary chain\}\\\\ b\>0,\\ u=0&\(0,\\ldots,0\)&\\text\{unchanged binary skeleton\}\\\\ b=u=0&\(0\)&\\text\{one leaf\}\.\\end\{array\}A unary root withu=0u=0or a binary root withb=0b=0is infeasible and excluded\. ∎
These statements characterize the raw, unlabeled shape proposal\. The empirical draw of\(N,B\)\(N,B\)controls how often different arity classes occur; Catalan and composition weights make the draw uniform within the selected class and root constraint\. Subsequent operator/leaf labels, simplification, and acceptance checks determine the distribution of the final formulas\.
Table 9:Base operator probabilities after the unary floor and before forced assignments or contextual exclusions\.Neg,Inv,Pow2, andPow3denote negation, reciprocal, square, and cube\.
### B\.3Variables, constants, and exponents
1. 1\.Variable coverage and ordinary leaves\.Reserve exponent leaves, shuffle ordinary leaves, and place each of thevvvariables once\. Each remaining leaf is a constant with probability0\.7029749620\.702974962, or a variable drawn uniformly from\{x1,…,xv\}\\\{x\_\{1\},\\ldots,x\_\{v\}\\\}\.
2. 2\.Constant magnitudes and signs\.Select a bin from Table[10](https://arxiv.org/html/2610.20685#A2.T10), returning zero or samplinglog10\|c\|\\log\_\{10\}\|c\|uniformly\. With probability0\.1512834140\.151283414, replace the nonzero draw by a uniformly chosen matching value from\{0\.5,1,2,e,π\}\\\{0\.5,1,2,e,\\pi\\\}, if available\. Positive and negative signs have probabilities0\.6676426150\.667642615and0\.3323573850\.332357385, respectively\. Exclude zero for leaves directly underMul,Div,Pow,Inv, orLog\.
3. 3\.General\-power exponents\.For aPowleaf exponent, draw uniformly from\{4,5,6\}\\\{4,5,6\\\}with probability0\.5362878570\.536287857, uniformly from\{0\.25,0\.75,1\.25,1\.5,2\.5,3\.5\}\\\{0\.25,0\.75,1\.25,1\.5,2\.5,3\.5\\\}with probability0\.0625669060\.062566906, or from𝒰\(0\.1,4\)\\mathcal\{U\}\(0\.1,4\)with probability0\.4011452360\.401145236\. Negative exponents and aliases−1,0\.5,2,3\-1,0\.5,2,3are excluded; reciprocal, square\-root, square, and cube forms use unary operators\.
Table 10:Constant\-magnitude proposals\. The smallest nonzero bin has the finite sampling range\[10−100,10−12\)\[10^\{\-100\},10^\{\-12\}\)\. The original mass above10610^\{6\}is redistributed proportionally between the two smallest nonzero bins\.
### B\.4Simplification and acceptance checks
1. 1\.Processing order\.Reparse serialized expressions, fold numerical subtrees bottom\-up, and apply the whitelist until stable, rejecting after 16 unsuccessful passes\. Process targets before pairing, random candidates after variable mapping, and edited candidates after editing, all before TED labeling\.
2. 2\.Numerical subtrees and domains\.Require real, finite scalar constants with\|c\|<106\|c\|<10^\{6\}\. Reject zero denominators,Inv\(0\),log\(c\)\\log\(c\)forc≤0c\\leq 0,c\\sqrt\{c\}forc<0c<0, inverse sine/cosine for\|c\|\>1\|c\|\>1,0c0^\{c\}forc≤0c\\leq 0, and negative constant bases with noninteger powers\. Folded fitted constants remain fitted; rewrite\-introduced structural constants are not fitted\.
3. 3\.Whitelist of algebraic rewrites\.The implemented whitelist contains the following groups: - •*Identities and signs:*remove additive zeros, subtractive zero, multiplicative zero or one, and division by one; map0−x0\-xto−x\-x, multiplication or division by−1\-1to negation,x−xx\-xto00,x\+xx\+xto2x2x, andxxxxtoPow2\(x\)\\mathrm\{Pow2\}\(x\)\. Remove double negation and double inversion, collapse repeated absolute value, and simplify negative numerical literals\. - •*Collection of terms and factors:*flatten addition/multiplication components and combine constants, signed coefficients of like terms, and repeated factors\. Group modulo associativity and commutativity, retaining first\-occurrence order\. Add positive integer exponents of repeated bases, without distribution or general fraction cancellation\. - •*Powers and absolute values:*applyx0↦1x^\{0\}\\mapsto 1,x1↦xx^\{1\}\\mapsto x,1x↦11^\{x\}\\mapsto 1, and aliases\(−1,0\.5,2,3\)↦\(Inv,Sqrt,Pow2,Pow3\)\(\-1,0\.5,2,3\)\\mapsto\(\\mathrm\{Inv\},\\mathrm\{Sqrt\},\\mathrm\{Pow2\},\\mathrm\{Pow3\}\)\. Combine nested positive integer powers by multiplying exponents; mapx2\\sqrt\{x^\{2\}\}to\|x\|\|x\|,\|−x\|\|\-x\|to\|x\|\|x\|,\|x2k\|\|x^\{2k\}\|tox2kx^\{2k\}for positive integerkk, and\(−x\)2\(\-x\)^\{2\}or\|x\|2\|x\|^\{2\}tox2x^\{2\}\. The whitelist excludes general distribution, factorization, rational cancellation, trigonometric identities, exponential/logarithmic cancellation, and unrestricted real\-power identities\.
4. 4\.Operator\-nesting restrictions\.The trigonometric family includesSin,Cos,Tan,Cot,Sec,Csc,Arcsin,Arccos,Arctan,Sinh,Cosh, andTanh\. After folding, reject nested family members or any ancestor–descendant combination withExp; also reject direct nesting within\{Exp,Log\}\\\{\\mathrm\{Exp\},\\mathrm\{Log\}\\\}or\{Pow,Pow2,Pow3,Sqrt\}\\\{\\mathrm\{Pow\},\\mathrm\{Pow2\},\\mathrm\{Pow3\},\\mathrm\{Sqrt\}\\\}\. General powers require finite, positive numerical leaf exponents\.
5. 5\.Formula and retry limits\.Require a variable, at most 100 nodes and 512 prefix tokens, candidate variables drawn from the target, and numerical validity\. Retry limits are 200 structural attempts, 200 tokenization calls, 100 numerical\-validity calls, and 100 pair attempts with fixed source/edit family\. Archived pair retries may redraw target length; the current generator instead holds raw length fixed for up to 200 filtered attempts\. Simplification can shorten either output\.
### B\.5Target–candidate construction and local edits
1. 1\.Independent and edited pairs\.Random pairs sample target and candidate independently; edited pairs modify a target copy\. Map candidate and donor variables consistently into the target set, uniformly without replacement when possible and with replacement otherwise\. Finite generation requests a 50:50 source split up to rounding; continuous pools are generated separately\. Training uses the mixture in Appendix[B\.7](https://arxiv.org/html/2610.20685#A2.SS7)\.
2. 2\.Edit family, count, and total budget\.Draw family/count proposals from Table[11](https://arxiv.org/html/2610.20685#A2.T11), truncate counts using Table[12](https://arxiv.org/html/2610.20685#A2.T12), and renormalize\. For target lengthLL, total affected\-node charges are capped atmax\(2,⌈rL⌉\)\\max\(2,\\lceil rL\\rceil\)using the listedrr\. Charges are one for point/unary edits, branch size plus connecting operator for branch edits, the larger subtree size for replacement, and removed nodes for promotion\. These charges differ from TED\.
3. 3\.Location selection\.Choose uniformly among eligible locations\. With probability0\.850\.85, restrict to paths disjoint from earlier edits when available; otherwise use all eligible locations\.
Table 11:Edit\-family probabilities and count proposals conditional on an edited pair\. Short\-target caps are applied after these proposals\.Table 12:Edit\-count caps by target lengthLLand cumulative affected\-node budget ratiorr\. Each piecewise list gives the largest permitted count\.Operations within each family\.These probabilities are conditional on the family\. Operators follow Table[9](https://arxiv.org/html/2610.20685#A2.T9), excluding the original operator for relabeling\.
1. 1\.Point relabeling\.Choose numerical\-value, variable, unary\-operator, binary\-operator, or variable\-to\-constant replacement with probabilities\(0,0\.10,0\.40,0\.45,0\.05\)\(0,0\.10,0\.40,0\.45,0\.05\)\. Variables change uniformly to another target variable\. Operator changes preserve children and arity and require a variable\-containing subtree\. Variable\-to\-constant edits use the ordinary constant sampler and must retain a variable overall\.
2. 2\.Unary insertion or deletion\.With equal probability0\.50\.5, wrap a subtree in a sampled unary operator or remove a unary operator while retaining its variable\-containing child\.
3. 3\.Branch insertion or deletion\.Choose insertion/deletion with probability0\.50\.5each\. For current sizeℓ\\ell, definec10\(ℓ\)=max\(1,min\(10,⌈0\.10ℓ⌉\)\)c\_\{10\}\(\\ell\)=\\max\(1,\\min\(10,\\lceil 0\.10\\ell\\rceil\)\)\. Insertion joins a subtree and a donor of at mostc10\(ℓ\)c\_\{10\}\(\\ell\)nodes under a sampled binary operator, with equally likely child order\. Restrict donors to non\-root subtrees with probability0\.700\.70\. Deletion retains a variable\-containing child and removes a sibling of at mostc10\(ℓ\)c\_\{10\}\(\\ell\)nodes\. Enforce the 100\-node limit\.
4. 4\.Subtree replacement\.Select a subtree of sizes≤c15\(ℓ\)s\\leq c\_\{15\}\(\\ell\), withc15\(ℓ\)=max\(1,min\(8,⌈0\.15ℓ⌉\)\)c\_\{15\}\(\\ell\)=\\max\(1,\\min\(8,\\lceil 0\.15\\ell\\rceil\)\), excluding the root unless the tree has one node\. Matched, shorter, and longer donors have probabilities\(0\.70,0\.05,0\.25\)\(0\.70,0\.05,0\.25\)and size intervals \[max\(1,⌊0\.8s⌋\),max\(1,⌊0\.8s⌋,⌈1\.2s⌉\)\],\[1,max\(1,s−1\)\],\[s\+1,min\(c15\(ℓ\)\+2,s\+4\)\]\.\\begin\{split\}&\[\\max\(1,\\lfloor 0\.8s\\rfloor\),\\ \\max\(1,\\lfloor 0\.8s\\rfloor,\\lceil 1\.2s\\rceil\)\],\\\\ &\[1,\\ \\max\(1,s\-1\)\],\\\\ &\[s\+1,\\ \\min\(c\_\{15\}\(\\ell\)\+2,s\+4\)\]\.\\end\{split\}Cap upper endpoints at100−\(ℓ−s\)100\-\(\\ell\-s\)\. Choose uniformly among eligible subtrees of a sampled donor formula, restricting to non\-root donors with probability0\.700\.70\. Both subtrees must contain a variable; reject identical replacements\.
5. 5\.Crossover or promotion\.Crossover \(probability0\.800\.80\) uses the preceding cap and intervals, size\-mode probabilities\(0\.80,0\.10,0\.10\)\(0\.80,0\.10,0\.10\), and non\-root donors\. Promotion \(probability0\.200\.20\) uniformly chooses an eligible ancestor–descendant pair, retains the variable\-containing descendant, and removes 1 tomax\(1,⌈0\.20ℓ⌉\)\\max\(1,\\lceil 0\.20\\ell\\rceil\)nodes\. Apply the same disjoint\-path preference\.
6. 6\.Mixed operations\.Form=2m=2, select two distinct families; form=3m=3, select two/three with probabilities\(0\.75,0\.25\)\(0\.75,0\.25\); form=4m=4, select two/three/four with probabilities\(0\.60,0\.30,0\.10\)\(0\.60,0\.30,0\.10\)\. Sample without replacement using point, unary, branch, subtree, and crossover/promotion weights\(0\.30,0\.25,0\.20,0\.20,0\.05\)\(0\.30,0\.25,0\.20,0\.20,0\.05\)\. Fill remaining slots with those weights, allowing repeats except for subtree and crossover/promotion, then shuffle\.
7. 7\.Retries, final validation, and labels\.Allow 30 sequence attempts and 10 attempts per operation\. Proposal routines allow 12 point, 8 unary, 12 branch, and 20 subtree trials; donor search allows 40 formulas\. Retry failed pairs with the same edit family\. Reject candidates that normalize back to the target, lose variables, violate constraints, or fail numerical validation\. Then compute normalized multi\-view TED \(Appendix[A](https://arxiv.org/html/2610.20685#A1)\), rejecting nonfinite labels without targeting a distance interval\. Command defaults allow a 40\-second TED deadline, 200\-second hard watchdog, and five failed task attempts before skipping\.
### B\.6Numerical observation sampling
The archived run uses the base mixture sampler adapted from MDLformer\. Letvvdenote the number of target variables andMMthe requested point count\.
1. 1\.Mixture parameters\.DrawCCuniformly from\{1,…,9\}\\\{1,\\ldots,9\\\}, weightsak∼𝒰\(0,1\)a\_\{k\}\\sim\\mathcal\{U\}\(0,1\), andρk=ak/∑jaj\\rho\_\{k\}=a\_\{k\}/\\sum\_\{j\}a\_\{j\}\. Each component draws𝝁k∼𝒩\(0,Iv\)\\bm\{\\mu\}\_\{k\}\\sim\\mathcal\{N\}\(0,I\_\{v\}\),ckj∼𝒰\(0,1\)c\_\{kj\}\\sim\\mathcal\{U\}\(0,1\), and a random special\-orthogonal rotationRkR\_\{k\}forv\>1v\>1\(identity forv=1v=1\)\. Allocate points byMultinomial\(M,𝝆\)\\operatorname\{Multinomial\}\(M;\\bm\{\\rho\}\)\.
2. 2\.Component type and coordinates\.Independently for each component, choose Gaussian or uniform sampling with probability0\.50\.5each: 𝐱=𝐳Rk,\{𝐳∼𝒩\(𝝁k,diag\(𝐜k\)\),Gaussian,zj=μkj\+ckjuj,uj∼𝒰\(−1,1\),uniform\.\\mathbf\{x\}=\\mathbf\{z\}R\_\{k\},\\qquad\\begin\{cases\}\\mathbf\{z\}\\sim\\mathcal\{N\}\(\\bm\{\\mu\}\_\{k\},\\operatorname\{diag\}\(\\mathbf\{c\}\_\{k\}\)\),&\\text\{Gaussian\},\\\\ z\_\{j\}=\\mu\_\{kj\}\+\\sqrt\{c\_\{kj\}\}\\,u\_\{j\},\\quad u\_\{j\}\\sim\\mathcal\{U\}\(\-1,1\),&\\text\{uniform\}\.\\end\{cases\}Gaussian and uniform coordinate variances areckjc\_\{kj\}andckj/3c\_\{kj\}/3, respectively\. Rotate means and offsets together\. The archived sampler leavesXXunstandardized and uses no affine augmentation\.
3. 3\.Evaluation, filtering, and repeated draws\.Evaluate the target and discard nonfinite outputs or\|y\|\>9\.999×10100\|y\|\>9\.999\\times 10^\{100\}\. Draw up to five fresh mixture batches untilMMvalid rows are available, then shuffle and retainMM\. Table construction allows 20 such calls and requires finite inputs/outputs\. Failed stratified requests retry up to 32 rows from the same source/bin\. Pair\-generation checks useM=256M=256\.
4. 4\.Inputs supplied to the verifier\.Use 256 table rows, pad unused variable columns to 10, and normalize outputs by y~i=\(yi−y¯\)/\(std\(y\)\+10−6\)\.\\widetilde\{y\}\_\{i\}=\(y\_\{i\}\-\\overline\{y\}\)/\(\\operatorname\{std\}\(y\)\+10^\{\-6\}\)\.Compute correlation summaries from 2,048 valid observations and use their first 256 shuffled rows for the table encoder\. Each transformed correlation requires three valid points; mask invalid summaries \(Appendix[C](https://arxiv.org/html/2610.20685#A3)\)\. Observations come from the target; symbolic inputs come from the candidate\.
### B\.7TED\-balanced training draws and validation
1. 1\.Distance coverage and source probabilities\.Draw each of 12 TED bins with probability1/121/12\. Given binii, choose edited or random pairs with probabilitiesqiq\_\{i\}and1−qi1\-q\_\{i\}, respectively \(Table[13](https://arxiv.org/html/2610.20685#A2.T13)\): P\(i,edit\)=qi12,P\(i,random\)=1−qi12\.P\(i,\\mathrm\{edit\}\)=\\frac\{q\_\{i\}\}\{12\},\\qquad P\(i,\\mathrm\{random\}\)=\\frac\{1\-q\_\{i\}\}\{12\}\.Marginal source probabilities are0\.450\.45edited and0\.550\.55random\. Equal bin mass leaves within\-bin distances distributed as in the pool; the last two bins are wider\. The main text’s0\.60\.6boundary indicates the predominant source\.
2. 2\.How the mixture weights were fixed\.The August 28 calibration scan contained 18,343,472 edited and 52,541,662 random rows, with valid TED labels throughout\. For the four mixed\-source bins, use countsEi,RiE\_\{i\},R\_\{i\}to set qi=λEiλEi\+Ri,λ=3\.0244780430884326\.q\_\{i\}=\\frac\{\\lambda E\_\{i\}\}\{\\lambda E\_\{i\}\+R\_\{i\}\},\\qquad\\lambda=3\.0244780430884326\.Other bins use the table’s zero/one choices\. These calibration counts precede the final pool snapshot\.
3. 3\.Row selection, batches, and reproducibility\.Draw bin/source requests independently\. Traverse each source/bin by deterministic permutations without replacement, restarting when exhausted\. Seed 42 and update number fix the global plan; replay category draws on resume\. Use four workers, 32 examples per microbatch, and two accumulation rounds \(global batch 256\)\. Expected counts are256/12256/12per bin, 115\.2 edited, and 140\.8 random\. Contrastive pretraining instead samples sources equally\.
4. 4\.Reserved rows and fixed validation set\.Reserve the first 32 rows per source/bin from stratified training\. Fixed validation contains 32 pairs per bin: 384 total, comprising 173 edited and 211 random pairs\.
##### Bayesian interpretation of the source choice\.
LetZ∈\{edit,random\}Z\\in\\\{\\mathrm\{edit\},\\mathrm\{random\}\\\}be the pair source andI∈\{1,…,12\}I\\in\\\{1,\\ldots,12\\\}its TED bin\. LetE=∑iEi\>0E=\\sum\_\{i\}E\_\{i\}\>0andR=∑iRi\>0R=\\sum\_\{i\}R\_\{i\}\>0be the calibration source totals\. The empirical bin likelihoods areP\(I=i∣Z=edit\)=Ei/EP\(I=i\\mid Z=\\mathrm\{edit\}\)=E\_\{i\}/EandP\(I=i∣Z=random\)=Ri/RP\(I=i\\mid Z=\\mathrm\{random\}\)=R\_\{i\}/R\.
###### Proposition 6\(Bayesian source sampling and calibration across TED bins\)\.
For an edited\-source priorP\(Z=edit\)=ρ∈\(0,1\)P\(Z=\\mathrm\{edit\}\)=\\rho\\in\(0,1\)and any bin of positive mixture probability, Bayes’ rule gives
P\(edit∣i\)=ρEi/EρEi/E\+\(1−ρ\)Ri/R=λEiλEi\+Ri,λ=ρR\(1−ρ\)E\.P\(\\mathrm\{edit\}\\mid i\)=\\frac\{\\rho E\_\{i\}/E\}\{\\rho E\_\{i\}/E\+\(1\-\\rho\)R\_\{i\}/R\}=\\frac\{\\lambda E\_\{i\}\}\{\\lambda E\_\{i\}\+R\_\{i\}\},\\qquad\\lambda=\\frac\{\\rho R\}\{\(1\-\\rho\)E\}\.\(22\)Conversely, anyλ\>0\\lambda\>0corresponds toρ=λE/\(λE\+R\)\\rho=\\lambda E/\(\\lambda E\+R\)\.
Setqi=1q\_\{i\}=1fori=1,2,3i=1,2,3, use this posterior fori=4,5,6,7i=4,5,6,7, and setqi=0q\_\{i\}=0fori=8,…,12i=8,\\ldots,12\. DrawingIIuniformly and then the source with edited probabilityqIq\_\{I\}produces
Q\(I=i\)\\displaystyle Q\(I=i\)=112,\\displaystyle=\\frac\{1\}\{12\},\(23\)Q\(Z=edit\)\\displaystyle Q\(Z=\\mathrm\{edit\}\)=F\(λ\)=112\(3\+∑i=47λEiλEi\+Ri\)\.\\displaystyle=F\(\\lambda\)=\\frac\{1\}\{12\}\\left\(3\+\\sum\_\{i=4\}^\{7\}\\frac\{\\lambda E\_\{i\}\}\{\\lambda E\_\{i\}\+R\_\{i\}\}\\right\)\.IfEi,Ri\>0E\_\{i\},R\_\{i\}\>0in the four mixed bins, every edited marginal in\(3/12,7/12\)\(3/12,7/12\), including0\.450\.45, determines a uniqueλ\>0\\lambda\>0\.
###### Proof\.
Posterior source law\.For a bin of positive mixture mass, the joint and marginal probabilities are
P\(Z=edit,I=i\)\\displaystyle P\(Z=\\mathrm\{edit\},I=i\)=ρEi/E,\\displaystyle=\\rho E\_\{i\}/E,P\(Z=random,I=i\)\\displaystyle P\(Z=\\mathrm\{random\},I=i\)=\(1−ρ\)Ri/R,\\displaystyle=\(1\-\\rho\)R\_\{i\}/R,P\(I=i\)\\displaystyle P\(I=i\)=ρEi/E\+\(1−ρ\)Ri/R\>0\.\\displaystyle=\\rho E\_\{i\}/E\+\(1\-\\rho\)R\_\{i\}/R\>0\.Therefore
P\(edit∣i\)\\displaystyle P\(\\mathrm\{edit\}\\mid i\)=P\(Z=edit,I=i\)P\(I=i\)=ρEi/EρEi/E\+\(1−ρ\)Ri/R\\displaystyle=\\frac\{P\(Z=\\mathrm\{edit\},I=i\)\}\{P\(I=i\)\}=\\frac\{\\rho E\_\{i\}/E\}\{\\rho E\_\{i\}/E\+\(1\-\\rho\)R\_\{i\}/R\}=\[ρR/\(\(1−ρ\)E\)\]Ei\[ρR/\(\(1−ρ\)E\)\]Ei\+Ri=λEiλEi\+Ri,\\displaystyle=\\frac\{\[\\rho R/\(\(1\-\\rho\)E\)\]E\_\{i\}\}\{\[\\rho R/\(\(1\-\\rho\)E\)\]E\_\{i\}\+R\_\{i\}\}=\\frac\{\\lambda E\_\{i\}\}\{\\lambda E\_\{i\}\+R\_\{i\}\},P\(random∣i\)\\displaystyle P\(\\mathrm\{random\}\\mid i\)=RiλEi\+Ri,P\(edit∣i\)\+P\(random∣i\)=1\.\\displaystyle=\\frac\{R\_\{i\}\}\{\\lambda E\_\{i\}\+R\_\{i\}\},\\qquad P\(\\mathrm\{edit\}\\mid i\)\+P\(\\mathrm\{random\}\\mid i\)=1\.The prior–multiplier correspondence is
λ=ρR\(1−ρ\)E⟺λE=ρ\(λE\+R\)⟺ρ=λEλE\+R∈\(0,1\),λ\>0\.\\lambda=\\frac\{\\rho R\}\{\(1\-\\rho\)E\}\\ \\Longleftrightarrow\\ \\lambda E=\\rho\(\\lambda E\+R\)\\ \\Longleftrightarrow\\ \\rho=\\frac\{\\lambda E\}\{\\lambda E\+R\}\\in\(0,1\),\\qquad\\lambda\>0\.In particular, the source\-prior odds areρ/\(1−ρ\)=λE/R\\rho/\(1\-\\rho\)=\\lambda E/R\.
Training marginals\.Under uniform bin sampling and the prescribedqiq\_\{i\},
Q\(I=i,Z=edit\)\\displaystyle Q\(I=i,Z=\\mathrm\{edit\}\)=qi12,\\displaystyle=\\frac\{q\_\{i\}\}\{12\},Q\(I=i,Z=random\)\\displaystyle Q\(I=i,Z=\\mathrm\{random\}\)=1−qi12,\\displaystyle=\\frac\{1\-q\_\{i\}\}\{12\},Q\(I=i\)\\displaystyle Q\(I=i\)=qi\+\(1−qi\)12=112,\\displaystyle=\\frac\{q\_\{i\}\+\(1\-q\_\{i\}\)\}\{12\}=\\frac\{1\}\{12\},∑i=112Q\(I=i\)\\displaystyle\\sum\_\{i=1\}^\{12\}Q\(I=i\)=1\.\\displaystyle=1\.Thus
Q\(Z=edit\)\\displaystyle Q\(Z=\\mathrm\{edit\}\)=∑i=112qi12\\displaystyle=\\sum\_\{i=1\}^\{12\}\\frac\{q\_\{i\}\}\{12\}=112\(∑i=131⏟3\+∑i=47λEiλEi\+Ri\+∑i=8120⏟0\)=F\(λ\)\.\\displaystyle=\\frac\{1\}\{12\}\\left\(\\underbrace\{\\sum\_\{i=1\}^\{3\}1\}\_\{3\}\+\\sum\_\{i=4\}^\{7\}\\frac\{\\lambda E\_\{i\}\}\{\\lambda E\_\{i\}\+R\_\{i\}\}\+\\underbrace\{\\sum\_\{i=8\}^\{12\}0\}\_\{0\}\\right\)=F\(\\lambda\)\.The zero/one choices are imposed source restrictions; the Bayesian posterior is used only in the four mixed bins\.
Existence and uniqueness of calibration\.WithEi,Ri\>0E\_\{i\},R\_\{i\}\>0fori=4,…,7i=4,\\ldots,7,
ddλλEiλEi\+Ri\\displaystyle\\frac\{d\}\{d\\lambda\}\\frac\{\\lambda E\_\{i\}\}\{\\lambda E\_\{i\}\+R\_\{i\}\}=Ei\(λEi\+Ri\)−λEi2\(λEi\+Ri\)2=EiRi\(λEi\+Ri\)2\>0,\\displaystyle=\\frac\{E\_\{i\}\(\\lambda E\_\{i\}\+R\_\{i\}\)\-\\lambda E\_\{i\}^\{2\}\}\{\(\\lambda E\_\{i\}\+R\_\{i\}\)^\{2\}\}=\\frac\{E\_\{i\}R\_\{i\}\}\{\(\\lambda E\_\{i\}\+R\_\{i\}\)^\{2\}\}\>0,F′\(λ\)\\displaystyle F^\{\\prime\}\(\\lambda\)=112∑i=47EiRi\(λEi\+Ri\)2\>0\.\\displaystyle=\\frac\{1\}\{12\}\\sum\_\{i=4\}^\{7\}\\frac\{E\_\{i\}R\_\{i\}\}\{\(\\lambda E\_\{i\}\+R\_\{i\}\)^\{2\}\}\>0\.Each denominator is positive on\(0,∞\)\(0,\\infty\), soFFis continuous there, and
limλ↓0λEiλEi\+Ri\\displaystyle\\lim\_\{\\lambda\\downarrow 0\}\\frac\{\\lambda E\_\{i\}\}\{\\lambda E\_\{i\}\+R\_\{i\}\}=0,\\displaystyle=0,limλ→∞λEiλEi\+Ri\\displaystyle\\lim\_\{\\lambda\\to\\infty\}\\frac\{\\lambda E\_\{i\}\}\{\\lambda E\_\{i\}\+R\_\{i\}\}=1,\\displaystyle=1,limλ↓0F\(λ\)\\displaystyle\\lim\_\{\\lambda\\downarrow 0\}F\(\\lambda\)=312,\\displaystyle=\\frac\{3\}\{12\},limλ→∞F\(λ\)\\displaystyle\\lim\_\{\\lambda\\to\\infty\}F\(\\lambda\)=712\.\\displaystyle=\\frac\{7\}\{12\}\.For any targetτ∈\(3/12,7/12\)\\tau\\in\(3/12,7/12\), these limits provide
0<λ−<λ\+<∞,F\(λ−\)<τ<F\(λ\+\)\.0<\\lambda\_\{\-\}<\\lambda\_\{\+\}<\\infty,\\qquad F\(\\lambda\_\{\-\}\)<\\tau<F\(\\lambda\_\{\+\}\)\.Continuity gives a solution in\(λ−,λ\+\)\(\\lambda\_\{\-\},\\lambda\_\{\+\}\), while
λ1<λ2⟹F\(λ1\)<F\(λ2\)\\lambda\_\{1\}<\\lambda\_\{2\}\\ \\Longrightarrow\\ F\(\\lambda\_\{1\}\)<F\(\\lambda\_\{2\}\)gives uniqueness\. Therefore
∀τ∈\(3/12,7/12\),∃\!λ\>0:F\(λ\)=τ\.\\forall\\tau\\in\(3/12,7/12\),\\quad\\exists\!\\lambda\>0:\\ F\(\\lambda\)=\\tau\.Since3/12<0\.45<7/123/12<0\.45<7/12, the reported target has a unique multiplier\. ∎
For the reported calibration counts,λ≃3\.0244780430884326\\lambda\\simeq 3\.0244780430884326gives the target edited marginal0\.450\.45\. This final marginal follows uniform bin sampling and need not equal the auxiliary source priorρ\\rho\.
Table 13:TED\-bin probabilities, calibrated source choices, and the counts used to determine them\. Every bin has training probability1/121/12; counts describe the August 28 calibration scan\.
## Appendix CVerifier architecture and training
### C\.1Inputs and regression features
The interface supports up to ten variables, at most 512 formula tokens, and at least three finite observations\. It samples up to 256 rows for the table encoder and 2,048 rows for regression summaries\. The table branch standardizesyyby\(y−mean\(y\)\)/\(std\(y\)\+10−6\)\(y\-\\operatorname\{mean\}\(y\)\)/\(\\operatorname\{std\}\(y\)\+10^\{\-6\}\)\. Regression summaries use raw values and their specified transforms\.
For eachxjx\_\{j\}, the 12 target/input transform pairs are
\(logy,logxj\),\\displaystyle\(\\log y,\\log x\_\{j\}\),\\quad\(y,xj\),\(y,xj2\),\(y,xj3\),\(y,xj\),\(y,logxj\),\\displaystyle\(y,x\_\{j\}\),\\ \(y,x\_\{j\}^\{2\}\),\\ \(y,x\_\{j\}^\{3\}\),\\ \(y,\\sqrt\{x\_\{j\}\}\),\\ \(y,\\log x\_\{j\}\),\(y,xj−1\),\(y,xj−2\),\(y,exj\),\(y,sinxj\),\(y,cosxj\),\(y,tanxj\)\.\\displaystyle\(y,x\_\{j\}^\{\-1\}\),\\ \(y,x\_\{j\}^\{\-2\}\),\\ \(y,e^\{x\_\{j\}\}\),\\ \(y,\\sin x\_\{j\}\),\\ \(y,\\cos x\_\{j\}\),\\ \(y,\\tan x\_\{j\}\)\.\(24\)Write thekkth pair as\(gk\(y\),hk\(xj\)\)\(g\_\{k\}\(y\),h\_\{k\}\(x\_\{j\}\)\)\. For each variablejj, letℐjk\\mathcal\{I\}\_\{jk\}contain the rows on which both transformed values are finite and within their domains; the log–log pair, for example, requiresxij\>0x\_\{ij\}\>0andyi\>0y\_\{i\}\>0\. Withui=hk\(xij\)u\_\{i\}=h\_\{k\}\(x\_\{ij\}\)andvi=gk\(yi\)v\_\{i\}=g\_\{k\}\(y\_\{i\}\), we compute the signed Pearson correlation
rjk=∑i∈ℐjk\(ui−u¯\)\(vi−v¯\)∑i∈ℐjk\(ui−u¯\)2∑i∈ℐjk\(vi−v¯\)2,r\_\{jk\}=\\frac\{\\sum\_\{i\\in\\mathcal\{I\}\_\{jk\}\}\(u\_\{i\}\-\\bar\{u\}\)\(v\_\{i\}\-\\bar\{v\}\)\}\{\\sqrt\{\\sum\_\{i\\in\\mathcal\{I\}\_\{jk\}\}\(u\_\{i\}\-\\bar\{u\}\)^\{2\}\}\\sqrt\{\\sum\_\{i\\in\\mathcal\{I\}\_\{jk\}\}\(v\_\{i\}\-\\bar\{v\}\)^\{2\}\}\},where the means are overℐjk\\mathcal\{I\}\_\{jk\}\. This equalssign\(β^jk\)Rjk2\\operatorname\{sign\}\(\\widehat\{\\beta\}\_\{jk\}\)\\sqrt\{R\_\{jk\}^\{2\}\}for a one\-predictor least\-squares regression with an intercept, whereβ^jk\\widehat\{\\beta\}\_\{jk\}is its slope andRjk2R\_\{jk\}^\{2\}its coefficient of determination\. For numerical stability, each transformed vector is divided by its largest absolute value before centering, which leaves its correlation unchanged, and the result is clipped to\[−1,1\]\[\-1,1\]\. A relation is masked if fewer than three valid rows remain, either transformed vector has zero variance, or the correlation is undefined; unused variables are also masked\.
Each valid\(j,k\)\(j,k\)relation produces a token\. Leteout\(gk\)e\_\{\\mathrm\{out\}\}\(g\_\{k\}\),epair\(k\)e\_\{\\mathrm\{pair\}\}\(k\), andevar\(j\)e\_\{\\mathrm\{var\}\}\(j\)be learned 64\-dimensional embeddings for the output form \(yyorlogy\\log y\), the relation identity, and the input variable\. The 12 relation identities are distinct, including the two relations that uselogxj\\log x\_\{j\}\. The descriptor and gated token are
qjk\\displaystyle q\_\{jk\}=\[eout\(gk\);epair\(k\);evar\(j\);rjk\]∈ℝ193,\\displaystyle=\[e\_\{\\mathrm\{out\}\}\(g\_\{k\}\);e\_\{\\mathrm\{pair\}\}\(k\);e\_\{\\mathrm\{var\}\}\(j\);r\_\{jk\}\]\\in\\mathbb\{R\}^\{193\},tjk\\displaystyle t\_\{jk\}=\|rjk\|\(WRqjk\+bR\)∈ℝ768\.\\displaystyle=\|r\_\{jk\}\|\(W\_\{R\}q\_\{jk\}\+b\_\{R\}\)\\in\\mathbb\{R\}^\{768\}\.The projectionWR,bRW\_\{R\},b\_\{R\}is shared across relations\. The signedrjkr\_\{jk\}enters the descriptor, while\|rjk\|\|r\_\{jk\}\|reduces the magnitude of weak\-correlation tokens\. Masked tokens are excluded from the learned attention pooling\. For the valid set𝒱\\mathcal\{V\}, the pooled regression representation is
αjk=exp\(w⊤tjk\+b\)∑\(p,q\)∈𝒱exp\(w⊤tpq\+b\),zR=∑\(j,k\)∈𝒱αjktjk\.\\alpha\_\{jk\}=\\frac\{\\exp\(w^\{\\top\}t\_\{jk\}\+b\)\}\{\\sum\_\{\(p,q\)\\in\\mathcal\{V\}\}\\exp\(w^\{\\top\}t\_\{pq\}\+b\)\},\\qquad z\_\{R\}=\\sum\_\{\(j,k\)\\in\\mathcal\{V\}\}\\alpha\_\{jk\}t\_\{jk\}\.Herew,bw,bare learned attention\-score parameters\. If no relation is valid, the pooled vector is zero\.
The data encoder embeds sign/mantissa/exponent tokens into 64 dimensions, concatenates each padded row, and projects it to width 768\. The formula encoder adds token, tree\-address, and depth embeddings\. Both use six Transformer layers, six attention heads, learned attention pooling, and output projection\. SwiGLU hidden width is 2,048\. Part of its value bias is tied to match the parameter count of the original four\-times\-width feed\-forward block\.
### C\.2Optimization
For matched Stage 1 data/formula embeddings\(ui,vi\)\(u\_\{i\},v\_\{i\}\), the loss is
ℒalign=−12B∑i\[logexp\(ui⊤vi/t\)∑jexp\(ui⊤vj/t\)\+logexp\(vi⊤ui/t\)∑jexp\(vi⊤uj/t\)\],\\mathcal\{L\}\_\{\\mathrm\{align\}\}=\-\\frac\{1\}\{2B\}\\sum\_\{i\}\\left\[\\log\\frac\{\\exp\(u\_\{i\}^\{\\top\}v\_\{i\}/t\)\}\{\\sum\_\{j\}\\exp\(u\_\{i\}^\{\\top\}v\_\{j\}/t\)\}\+\\log\\frac\{\\exp\(v\_\{i\}^\{\\top\}u\_\{i\}/t\)\}\{\\sum\_\{j\}\\exp\(v\_\{i\}^\{\\top\}u\_\{j\}/t\)\}\\right\],\(25\)with temperaturet=1t=1and raw, unnormalized dot products\. The paired expression is the generating target\. Stage 2 initializes both encoders, adds the regression branch and fusion head, and updates all parameters using Equation[9](https://arxiv.org/html/2610.20685#S3.E9)\. The regression head does not clip outputs\.
Table 14:Completed verifier training configuration\. Checkpoints were selected on synthetic validation, not benchmark test scores\.Stage 2 uses AdamW withβ=\(0\.9,0\.95\)\\beta=\(0\.9,0\.95\), weight decay 0\.01, gradient clipping at 1\.0, and microbatches of 32\. Validation is evaluated every 100 updates\. The selected Stage 2 checkpoint has archived validation objective 0\.12612656\.
The bins are\[0,0\.1\),…,\[0\.9,1\.0\),\[1\.0,1\.5\),\[1\.5,∞\)\[0,0\.1\),\\ldots,\[0\.9,1\.0\),\[1\.0,1\.5\),\[1\.5,\\infty\), sampled equally\. Conditional probabilities of drawing an edited pair are
\(1,1,1,0\.9088,0\.7786,0\.5015,0\.2111,0,0,0,0,0\)\.\(1,\\ 1,\\ 1,\\ 0\.9088,\\ 0\.7786,\\ 0\.5015,\\ 0\.2111,\\ 0,\\ 0,\\ 0,\\ 0,\\ 0\)\.Their mean is 0\.45, with complementary random\-pair probabilities\. Validation draws a fixed source mixture with 32 examples per bin, totaling 384 examples\. The reserved source/bin rows and final mixed validation batch are distinct\.
Figure 10:Stage 1 training and validation loss\.Figure 11:Stage 2 training and validation loss\.Figure 12:Stage 1 learning\-rate schedule\.Figure 13:Stage 2 learning\-rate schedule\.
## Appendix DSearch implementation and ablation controls
Algorithm 1L2G\-SR: symbolic search with learned structural feedback1:Observations
𝒟\\mathcal\{D\}, metadata, frozen
VθV\_\{\\theta\}; proposal budget
2:Split
𝒟\\mathcal\{D\}; initialize four islands
3:foreach round in the balanced M/T scheduledo
4:Select island and parent by validation MSE or predicted TED
5:Analyst uses diagnostics and history; generator proposes four formulas
6:For each proposal: validate, fit, simplify, refit, and score by MSE and
VθV\_\{\\theta\}
7:Add valid formulas; deduplicate and prune by both scores
8:endfor
9:returnsimplest valid formula within the validation\-MSE tolerance
Table 15:Search settings shared by TED and matched numerical\-only conditions\.When subtraining exceeds 4,096 rows, fitting observations are sampled by target\-value strata\. Constants are unbounded real values; the fitting budget bounds computation, not coefficients\. Mapped parent parameters provide warm starts\. Linear\-in\-parameter formulas can use a scaled least\-squares initialization\. Supported symbolic derivatives supply gradients, with numerical differentiation as a fallback\.
A ratio above10410^\{4\}between the 95th and 5th percentiles of\|y\|\|y\|, or its maximum and median, activates transformed fitting\. Positive targets use log residuals; otherwise the implementation usesasinh\(y/sy\)\\operatorname\{asinh\}\(y/s\_\{y\}\)\. To screen term removal before refitting, we set each fitted constantθj\\theta\_\{j\}to zero in the current formulaff, givingfj→0f\_\{j\\to 0\}\. We consider the contribution small only when, over allnnsearch observations,
Δi\(j\)\\displaystyle\\Delta\_\{i\}^\{\(j\)\}=fj→0\(xi\)−f\(xi\)max\{\|yi\|,10−6sy\},\\displaystyle=\\frac\{f\_\{j\\to 0\}\(x\_\{i\}\)\-f\(x\_\{i\}\)\}\{\\max\\\{\|y\_\{i\}\|,10^\{\-6\}s\_\{y\}\\\}\},\(26\)1n∑i=1n\(Δi\(j\)\)2\\displaystyle\\sqrt\{\\frac\{1\}\{n\}\\sum\_\{i=1\}^\{n\}\\bigl\(\\Delta\_\{i\}^\{\(j\)\}\\bigr\)^\{2\}\}≤10−4,maxi\|Δi\(j\)\|≤10−3,\\displaystyle\\leq 10^\{\-4\},\\qquad\\max\_\{i\}\\bigl\|\\Delta\_\{i\}^\{\(j\)\}\\bigr\|\\leq 10^\{\-3\},wheresy=max\{mediani\|yi\|,10−6Q0\.75\(\|y\|\),ϵtiny\}s\_\{y\}=\\max\\\{\\operatorname\{median\}\_\{i\}\|y\_\{i\}\|,\\,10^\{\-6\}Q\_\{0\.75\}\(\|y\|\),\\,\\epsilon\_\{\\mathrm\{tiny\}\}\\\}is the robust target scale\. Other proposed edits use the same normalized output change before refitting\. After refitting, the proposal must satisfy, separately on fixed subtraining and validation,
MSEnew≤MSEold\+10−3MSEold\+10−12Var\(y\)\.\\mathrm\{MSE\}\_\{\\mathrm\{new\}\}\\leq\\mathrm\{MSE\}\_\{\\mathrm\{old\}\}\+10^\{\-3\}\\mathrm\{MSE\}\_\{\\mathrm\{old\}\}\+10^\{\-12\}\\operatorname\{Var\}\(y\)\.These checks are untrimmed\. Symbolic\-equivalence proposals use stricter output\-change checks\. The verifier scores only the final accepted effective expression\.
Letmmbe the best validation MSE andσy2\\sigma\_\{y\}^\{2\}the target variance used by final selection\. Eligible candidates satisfy
MSE\(f\)≤m\+max\{10−10max\(σy2,10−30\),10−4m\}\.\\mathrm\{MSE\}\(f\)\\leq m\+\\max\\\{10^\{\-10\}\\max\(\\sigma\_\{y\}^\{2\},10^\{\-30\}\),10^\{\-4\}m\\\}\.Among them, selection minimizes complexity, parameter count, MSE, and then a stable identifier\. Tournament ties are broken uniformly\. Unavailable structural predictions trigger a random\-valid\-candidate fallback for the T tournament\.
The no\-TED control substitutes MSE in the compatibility score field used by comparisons and retention, and labels this substitution in the prompts\. The schedule and tournament sizes remain unchanged\. It performs no TED model loading or prediction; any offline true\-distance computation cannot affect search decisions\.
## Appendix EDetailed completed results
### E\.1Aggregation and reporting
We aggregate completed equations within each domain/seed and then report
m¯=13∑s=13ms,SD\(m\)=12∑s=13\(ms−m¯\)2\.\\bar\{m\}=\\frac\{1\}\{3\}\\sum\_\{s=1\}^\{3\}m\_\{s\},\\qquad\\operatorname\{SD\}\(m\)=\\sqrt\{\\frac\{1\}\{2\}\\sum\_\{s=1\}^\{3\}\(m\_\{s\}\-\\bar\{m\}\)^\{2\}\}\.Accuracy dispersion is in percentage points\. Entries taken from DE preserve its reported precision and aggregation\. Our RESTART reproduction reports sample SD across its own three seeds\.
The task configuration totals 240 equations\. We report the actual evaluated domain counts\.
The float64 evaluator discards⌊0\.05n⌋\\lfloor 0\.05n\\rfloorpoints per equation\. Nonfinite predictions consume this allowance before finite points are ordered by relative error\. Exceeding the allowance makes the equation invalid\. The retained\-set target mean is recomputed for the NMSE denominator, protected by the smallest positive float64 value\. This differs from untrimmed online validation\.
Table 16:Sample standard deviations for the RESTART and SR\-Scientist means in Table[1](https://arxiv.org/html/2610.20685#S4.T1)\. Accuracy standard deviations are in percentage points\.Table[17](https://arxiv.org/html/2610.20685#A5.T17)compares our reproduced RESTART and SR\-Scientist runs with L2G\-SR on successful LLM usage\. We count distinct successful API responses, including responses whose generated expressions are later rejected, and exclude failed requests\. Input and output tokens are the provider\-reported prompt and completion tokens for those responses\. Each mean uses the same 480 completed problem runs per method; duplicate response IDs are removed from the RESTART and L2G\-SR journals, while SR\-Scientist uses its successful\-response counters\.
Table 17:Successful LLM calls and tokens per problem for the Llama3\.1\-8B\-Instruct runs shared by the three methods\.
### E\.2In\-distribution Oscillation results
Table[18](https://arxiv.org/html/2610.20685#A5.T18)reports the in\-distribution results on the two real\-world Oscillation problems\.
Table 18:ID results on Oscillation 1 and 2\.
### E\.3Out\-of\-distribution evaluation
We evaluate how the selected expressions generalize to shifted inputs\.
Table 19:OOD evaluation on LSR\-Synth\. Published baseline rows are retained as reported\. Our reproduced rows show mean±\\pmstandard deviation across three seeds\.Under this protocol, L2G\-SR has the best displayed NMSE and accuracy in every domain for both backbones\.
### E\.4Oscillation out\-of\-distribution results
Table[20](https://arxiv.org/html/2610.20685#A5.T20)reports the OOD results corresponding to the ID comparison in Table[18](https://arxiv.org/html/2610.20685#A5.T18)\. We evaluate the same selected formulas without refitting on the 10,000 observations in each official OOD split\. Metrics are scored in float64 after removing the 500 observations with the largest relative errors\. PointwiseAcc0\.01pt\\mathrm\{Acc\}\_\{0\.01\}^\{\\mathrm\{pt\}\}is the percentage of the 9,500 retained observations whose relative error is at most 0\.01\. All entries are means and sample standard deviations across three seeds\.
Table 20:OOD results on Oscillation 1 and 2\. NMSE \(↓\\downarrow\) and pointwiseAcc0\.01pt\\mathrm\{Acc\}\_\{0\.01\}^\{\\mathrm\{pt\}\}\(↑\\uparrow, %\) are computed after 5% relative\-error trimming\. Entries report mean±\\pmsample standard deviation over three seeds\. Bold and underlined means indicate the best and second\-best displayed values, respectively\.L2G\-SR has the lowest mean OOD NMSE and highest mean pointwise accuracy on both problems\. On Oscillation 2, its pointwise OOD accuracy is91\.24±9\.41%91\.24\\pm 9\.41\\%\.
### E\.5Baseline configurations and RESTART reproduction
For LLMDirect, LLM\-SR, LaSR, SGA, and DE, Table[1](https://arxiv.org/html/2610.20685#S4.T1)uses the Llama3\.1\-8B\-Instruct results reported by DE\([Pang et al\., 2026](https://arxiv.org/html/2610.20685#bib.bib19)\)\. We preserve DE’s reported configurations rather than rerunning these methods\.
Reported baseline parameters\.The imported runs share the following settings:
- •Backbone:Llama3\.1\-8B\-Instruct\.
- •Generation temperature:0\.8\.
- •Maximum output length:8,192 tokens\.
- •Inference system:vLLM on 4 NVIDIA A800\-SXM4\-80GB GPUs\.
LLMDirect\.
- •Hypotheses per prompt:5\.
- •Total LLM\-generated candidates per problem:5\.
- •Execution timeout per hypothesis:30 seconds\.
- •Constant optimizer:SciPy BFGS\.
LLM\-SR\.
- •Equation programs per prompt:4\.
- •Parallel evaluators:4\.
- •Islands:10\.
- •In\-context parents per prompt:4\.
- •Maximum parameters per equation skeleton:10\.
- •Constant optimizer:SciPy BFGS\.
- •Total LLM\-generated candidates per problem:1,000\.
LaSR\.
- •Iterations:25\.
- •Evolutionary cycles per iteration:550\.
- •Populations:10\.
- •Population size:33\.
- •Operators:\+,−,×,÷,∧,exp,log,⋅,sin,cos,tan,\+,\-,\\times,\\div,\\wedge,\\exp,\\log,\\sqrt\{\\cdot\},\\sin,\\cos,\\tan,andcosh\\cosh\.
- •LLM\-operator weights:llm\_mutate=0\.005,llm\_crossover=0\.005, andllm\_gen\_random=0\.005\.
- •Total LLM\-generated candidates per problem:1,000\.
- •Random non\-LLM mutations per problem:\>453,000\>453\{,\}000\.
- •Other PySR parameters:defaults of the evaluated implementation; DE reports no further values\.
SGA\.
- •Feedback objective:MSE\.
- •Continuous\-parameter optimizer:torch\.optim\.Adam\.
- •Differentiable model:PyTorchtorch\.nn\.Module\.
- •Total LLM\-generated candidates per problem:1,000\.
- •Adam hyperparameters:not reported by DE\.
DE\.
- •Islands:4;capacity per island:400;reset interval:50 generations\.
- •Generations:100;offspring per generation:4;maximum LLM\-generated candidates per problem:400\.
- •Selection:fitness\-proportional Boltzmann sampling;initial temperature:0\.5;cooling rate:0\.95;schedule:exponential decay;stagnation\-recovery temperature:2\.0\.
- •Parents per prompt:1 for non\-crossover operators and 2 for crossover\.
- •Maximum refinement rounds per sample:4\.
- •Reflective\-memory update interval:12 generations;breakthrough threshold:0\.1\.
- •Reflection context:3 elite examples and 3 failed examples\.
- •Stagnation window:8 generations;distilled insights per update:3\.
The RESTART row in Table[1](https://arxiv.org/html/2610.20685#S4.T1)uses our reproduction, rather than the original paper’s reported scores\. It evaluates all 240 equations with three seeds \(720 valid task results\)\.
Table 21:Settings for our RESTART reproduction\.The reproduction adapts the released island, refinement, and concept\-library code to the same numerical\-fitting interface used by L2G\-SR\. The 10 islands, E2E\-based refinement, and concept library retain the method’s native roles\. Numerical/E2E initialization uses 0 LLM proposal slots, and E2E calls add computation beyond the 400\-slot budget\.
Generated Python candidates are converted to the shared restricted algebra without executing generated code\. The converter preserves the generated formula structure\. Fitting uses the shared BFGS backend and budgets; our post\-fit expression\-pruning search is not applied to RESTART candidates\. Final selection uses minimum internal\-validation MSE\. The official test arrays are scored only after search completion, without refitting\.
Table 22:Per\-problem search\-budget comparison\. Candidate or proposal counts follow the accounting used by DE and our implementations; the final column records method\-specific computation outside those counts\.LLMDirect is a Best\-of\-5 baseline\. DE, our RESTART reproduction, and L2G\-SR use 40% of the 1,000\-candidate LLM budget assigned to the iterative LLM\-SR, LaSR, and SGA baselines\. LaSR additionally evaluates more than 453 non\-LLM mutations per counted LLM candidate\. RESTART and L2G\-SR match at 400 nominal proposal slots\.
### E\.6Verifier ablation details
Each variant in Table[5](https://arxiv.org/html/2610.20685#S4.T5)uses training seed 42, Stage 2 batch size 256, and 100,000 updates\. Data\-pool snapshots, the 12\-bin sampler, the loss in Equation[9](https://arxiv.org/html/2610.20685#S3.E9), validation composition, and optimization settings match the full verifier\. The fixed validation set contains 173 edited and 211 random pairs, with 32 pairs per TED bin\. Among its 384 pairs, 327 havedstr≤1d\_\{\\mathrm\{str\}\}\\leq 1; the near\-target MAE and RMSE use only those 327 pairs\. Global MAE uses all pairs\.
Without tree address, the formula encoder still receives prefix tokens, but its depth/address embedding contribution is zero in both training stages\. The original position parameters remain allocated, giving the same total parameter count as the full model, although the zero\-gated parameters have no effect\. Formula only reuses the full model’s Stage 1 formula encoder, retains its tree\-address inputs, and trains only that encoder and the fusion head\. Its numerical encoders are absent, so its parameter count is smaller\. Without the correlation branch, the data and formula encoders are initialized from the same full\-model Stage 1 checkpoint, but the signed\-correlation encoder is absent and its fusion slot is fixed to zero\. One\-stage retains all full\-model inputs and parameters, uses no Stage 1 checkpoint, and trains from random initialization for the same 100,000 updates under the Stage 2 objective\.
We select all reported checkpoints by the same validation objective\.Similar Articles
InsightSR: Refining Symbolic Regression Search Spaces via Parallel Semantic and Structural LLM Guidance
InsightSR is a framework that leverages Large Language Models to refine the search space for symbolic regression, improving accuracy and physical consistency through iterative semantic and structural guidance.
Language models guide symbolic equation discovery by controlling search
This paper introduces LLM-PySR, a method where language models guide symbolic equation discovery by controlling search parameters while using numerical symbolic regression for fitting. The approach achieves strong balance of accuracy and complexity across benchmark tasks.
EvoMO-SR: Multiobjective LLM-based Evolution of Symbolic Expressions with substructure guidance
EvoMO-SR is a new LLM-driven symbolic regression framework where a small LLM (Llama-3.1-8B-Instruct) generates equation skeletons whose coefficients are fitted by an external optimizer, using multiobjective survival selection and substructure guidance to control bloating and improve structural recovery.
Towards Reliable and Robust LLM Planning: Symbolic Feedback-Driven Iterative Self-Refinement Framework
This paper proposes a symbolic feedback-driven iterative self-refinement framework to improve the robustness and reliability of large language models in long-horizon planning tasks. The method uses natural language prompting, a symbolic verifier, and a plan recognizer to enhance feasibility and correctness.
Counterexample Guided Learning in the Large using Reasoning Agents
This paper proposes using counterexample-guided learning for LLMs to perform regular-expression induction, where a verifier provides counterexamples to refine candidate expressions. The method significantly improves sample efficiency and success rates on challenging tasks, demonstrating that LLMs can benefit from structured feedback beyond treating it as additional data.