EditSR: Enhancing Neural Symbolic Regression via Edit-based Rectification

arXiv cs.AI Papers

Summary

EditSR proposes a two-layer framework combining a neural symbolic regression model with an edit-based Rectifier to efficiently rectify structural errors in generated expressions, reducing error accumulation and improving recovery of complex symbolic structures with limited extra cost.

arXiv:2606.07915v1 Announce Type: new Abstract: Neural symbolic regression models improve inference efficiency by shifting structural search to pretraining, but their one-pass autoregressive decoding is prone to error accumulation, which may lead to generating structurally incorrect expressions, especially in complex expression generation scenarios. Existing rectification strategies can alleviate this issue, but they often depend on restarting global search, thereby weakening the efficiency advantage of neural models, and remain susceptible to error accumulation. In this paper, we propose EditSR, a two-layer framework that combines a neural symbolic regression model in the first layer with an edit-based Rectifier in the second layer to achieve efficient prediction and post-hoc rectification. Instead of restarting the global search, we maintain rectification efficiency by pretraining the Rectifier. Specifically, we formulate the rectification process as a step-by-step state-transition chain starting from an incorrect expression, and develop a state-transition algorithm to construct supervised rectification chains for training the Rectifier. To ensure syntactic validity throughout rectification, each edit action is restricted to a syntactically valid space so that every edited expression remains parseable. In addition, because each edit decision is conditioned on the current state rather than the history, the Rectifier allows errors made in earlier steps to be rectified by subsequent edits, thereby reducing the risk of error accumulation. Extensive experiments and ablation studies show that EditSR substantially improves symbolic structure recovery with limited extra cost, with more pronounced gains on complex expressions, where one-pass autoregressive decoding is more susceptible to error accumulation.
Original Article
View Cached Full Text

Cached at: 06/09/26, 08:53 AM

# EditSR: Enhancing Neural Symbolic Regression via Edit-based Rectification
Source: [https://arxiv.org/html/2606.07915](https://arxiv.org/html/2606.07915)
###### Abstract

Neural symbolic regression models improve inference efficiency by shifting structural search to pretraining, but their one\-pass autoregressive decoding is prone to error accumulation, which may lead to generating structurally incorrect expressions, especially in complex expression generation scenarios\. Existing rectification strategies can alleviate this issue, but they often depend on restarting global search, thereby weakening the efficiency advantage of neural models, and remain susceptible to error accumulation\. In this paper, we propose EditSR, a two\-layer framework that combines a neural symbolic regression model in the first layer with an edit\-based Rectifier in the second layer to achieve efficient prediction and post\-hoc rectification\. Instead of restarting the global search, we maintain rectification efficiency by pretraining the Rectifier\. Specifically, we formulate the rectification process as a step\-by\-step state\-transition chain starting from an incorrect expression, and develop a state\-transition algorithm to construct supervised rectification chains for training the Rectifier\. To ensure syntactic validity throughout rectification, each edit action is restricted to a syntactically valid space so that every edited expression remains parseable\. In addition, because each edit decision is conditioned on the current state rather than the history, the Rectifier allows errors made in earlier steps to be rectified by subsequent edits, thereby reducing the risk of error accumulation\. Extensive experiments and ablation studies show that EditSR substantially improves symbolic structure recovery with limited extra cost, with more pronounced gains on complex expressions, where one\-pass autoregressive decoding is more susceptible to error accumulation\.

###### keywords:

Symbolic regression , Edit\-based Rectifier , Modular framework , Post\-hoc rectification

\\affiliation

\[label1\]organization=Academy for Advanced Interdisciplinary Studies, Northeast Normal University, city=Changchun, postcode=130024, state=Jilin, country=China\\affiliation\[label2\]organization=Institute of Artificial Intelligence, Beihang University, city=Beijing, postcode=100191, state=Beijing, country=China

\\affiliation

\[label3\]organization=Institute of Applied Physics and Computational Mathematics, city=Beijing, postcode=100094, state=Beijing, country=China\\affiliation\[label4\]organization=National Key Laboratory of Computational Physics, city=Beijing, postcode=100088, state=Beijing, country=China\\affiliation\[label5\]organization=School of Mathematical Sciences, East China Normal University, city=Shanghai, postcode=200241, state=Shanghai, country=China\\affiliation\[label6\]organization=Shanghai Zhangjiang Institute of Mathematics, city=Shanghai, postcode=201203, state=Shanghai, country=China

## 1Introduction

Symbolic regression aims to discover an explicit expression that maps inputs to outputs from sparse and noisy observational datasets\. Unlike conventional regression, which optimizes parameters within a fixed function family, symbolic regression jointly searches over both the expression structure and the parameters, thereby offering greater degrees of freedom\. The generated expressions are parseable, allowing researchers to examine symmetries and invariances, perform differentiation and integration, and directly deploy them in simulators and controllers\. With these properties, symbolic regression is regarded as a powerful tool for scientific discovery\[[55](https://arxiv.org/html/2606.07915#bib.bib41),[64](https://arxiv.org/html/2606.07915#bib.bib42)\]\.

Classical genetic programming approaches perform symbolic regression via population\-based evolution, where the expressions are represented as trees and evolved through mutation and crossover\[[25](https://arxiv.org/html/2606.07915#bib.bib39),[45](https://arxiv.org/html/2606.07915#bib.bib40)\]\. Over the past decades, genetic programming\-based models have been strengthened by advances in complexity control\[[47](https://arxiv.org/html/2606.07915#bib.bib18),[48](https://arxiv.org/html/2606.07915#bib.bib19)\], evolution strategies\[[37](https://arxiv.org/html/2606.07915#bib.bib20),[66](https://arxiv.org/html/2606.07915#bib.bib16),[43](https://arxiv.org/html/2606.07915#bib.bib17)\], and numerical optimizations\[[23](https://arxiv.org/html/2606.07915#bib.bib21),[5](https://arxiv.org/html/2606.07915#bib.bib22)\], which help genetic programming remain a competitive paradigm on modern benchmarks\[[27](https://arxiv.org/html/2606.07915#bib.bib43),[9](https://arxiv.org/html/2606.07915#bib.bib44)\]\. Nevertheless, genetic programming\-based models have long faced efficiency challenges because the search space is highly flexible and grows rapidly with expression depth and the size of the operator set\.

Deep learning represents a new paradigm in symbolic regression\[[29](https://arxiv.org/html/2606.07915#bib.bib15)\]\. A representative deep learning\-based model is Equation Learner \(EQL\), which replaces activation functions with primitive operators so that the resulting network admits a symbolic form, enabling interpretability and gradient\-based training\[[38](https://arxiv.org/html/2606.07915#bib.bib51)\]\. However, such models are often constrained by a predetermined depth, which limits their flexibility\. Another line of deep learning\-based methods leverages reinforcement learning, where the constants, operators, and variables are treated as tokens, with policy gradient updates guiding the expression search\[[46](https://arxiv.org/html/2606.07915#bib.bib53),[44](https://arxiv.org/html/2606.07915#bib.bib54)\]\. Overall, by introducing optimizable agents, deep learning\-based models can improve inference efficiency and reduce sensitivity to hyperparameters\. Moreover, since the optimization process can naturally incorporate structural constraints, the expressions they generate are often simpler\. However, these models still need to search from scratch and cannot accumulate knowledge from historical experience\. Therefore, a trade\-off between efficiency and performance remains\.

Another line of research introduces large\-scale pretraining into symbolic regression, drawing inspiration from machine translation\. In this paradigm, a Transformer\-based architecture is trained on massive corpora of dataset–expression pairs\[[29](https://arxiv.org/html/2606.07915#bib.bib15),[4](https://arxiv.org/html/2606.07915#bib.bib35)\], so that symbolic regression can be formulated as a set\-to\-sequence task that maps datasets directly to expressions\[[67](https://arxiv.org/html/2606.07915#bib.bib56)\]\. As a result, much of the expensive exploration over symbolic structures is absorbed into pretraining, allowing inference to be reduced to a single forward pass\[[19](https://arxiv.org/html/2606.07915#bib.bib57),[68](https://arxiv.org/html/2606.07915#bib.bib58),[30](https://arxiv.org/html/2606.07915#bib.bib55)\]\. Furthermore, by introducing noise during pretraining, these models also demonstrate strong zero\-shot generalization to unseen expression forms and robustness to noisy datasets\.

In summary, the development of symbolic regression reflects sustained efforts to balance search capability with computational efficiency\. Neural models therefore have the potential to offer a practical balance between search capability and computational efficiency\. However, their one\-pass autoregressive decoding paradigm is often limited by error accumulation, thus hindering their ability to generate complex expressions\. Although post\-hoc rectification strategies can alleviate this issue, they often incur substantially higher computational costs, potentially offsetting the speed advantage originally offered by pretraining\[[57](https://arxiv.org/html/2606.07915#bib.bib59),[42](https://arxiv.org/html/2606.07915#bib.bib10)\]\. Therefore, we investigate whether a lightweight post\-hoc rectification module can rectify incorrect predictions from neural symbolic regression models without sacrificing efficiency\.

In recent years, edit\-based generative models have developed rapidly across multiple domains\. In natural language generation, models such as Levenshtein Transformer\[[12](https://arxiv.org/html/2606.07915#bib.bib78)\]and EDITOR\[[72](https://arxiv.org/html/2606.07915#bib.bib79)\]replace one\-pass autoregressive decoding with iterative insertions, deletions, and local rewrites, demonstrating that an imperfect draft can be efficiently improved without full autoregressive regeneration\. Based on the concept of discrete diffusion, subsequent studies further model the generation process itself as a sequence of multi\-step edits\[[52](https://arxiv.org/html/2606.07915#bib.bib80),[51](https://arxiv.org/html/2606.07915#bib.bib32),[13](https://arxiv.org/html/2606.07915#bib.bib82)\]\. A key advantage of these models is that they allow errors to be progressively rectified, analogous to iterative refinement in evolutionary search\. This property is particularly attractive for symbolic regression, because many expression errors are local, while substantial subexpressions are often reusable and need not be re\-explored from scratch\. In addition, edit\-based models support pretraining, which is important for ensuring rectification efficiency\.

To achieve efficient prediction and rectification, we proposeEditSR, which consists of two layers\. The first layer is a neural symbolic regression model\. We instantiate it as NeSymReS\[[4](https://arxiv.org/html/2606.07915#bib.bib35)\], a representative architecture\. Like other one\-pass autoregressive models, NeSymReS cannot recover once an early error distorts the downstream syntactic context\. Therefore, we introduce a Rectifier in the second layer that performs multi\-step edit\-based rectification on incorrect predictions\. The Rectifier is composed of a Tagger and Editor, where the Tagger determines the edit position and the edit action, while the Editor predicts the corresponding edit content\. We define the edit actionsKeep,Replace,Delete,Rewrite, andInsert, which are executed at the subtree level rather than the token level, so that the expression remains syntactically valid after editing\.

The rectification process is organized as a state\-transition chain, where each state corresponds to a parseable expression and each state transition is realized by executing a single edit action\. We construct a set of expressions with diverse error patterns as initial states by applying random corruptions to the target expression, inspired by the widely explored discrete diffusion models\[[2](https://arxiv.org/html/2606.07915#bib.bib28),[51](https://arxiv.org/html/2606.07915#bib.bib32),[35](https://arxiv.org/html/2606.07915#bib.bib30)\], and then use a state\-transition algorithm to map them back to the target, thereby obtaining supervised rectification chains\. The Rectifier is trained on these one\-step transitions, exposing it to a wide variety of error patterns\. During inference, each decision is made by conditioning on the current state rather than the history, which helps mitigate error accumulation and leaves room for later edits to repair earlier errors\.

The main contributions of our work are summarized as follows:

- 1\.We revisit neural symbolic regression models from the perspective of error accumulation and examine whether incorrect predictions can be rectified through a few edits, rather than restarting the global search\.
- 2\.We propose EditSR, a two\-layer framework that combines a neural symbolic regression model in the first layer with a Rectifier in the second layer\. EditSR provides a novel prediction\-and\-rectification mechanism, which preserves the inference efficiency of neural models while rectifying structurally incorrect expressions via syntax\-constrained post\-hoc edits, without reopening the global search process\.
- 3\.We represent rectification as an iterative state\-transition process where each state corresponds to a parseable expression, and each state transition is realized by executing a single edit action\. In our setting, each rectification decision by the Rectifier is conditioned on the current state rather than the history, thereby suppressing error accumulation while allowing errors made in earlier steps to be rectified by subsequent edits\.
- 4\.Through extensive evaluations on mainstream benchmarks and ablation studies, we show that the Rectifier is beneficial for long\-expression generation, where one\-pass autoregressive decoding is more prone to error accumulation\. In addition, the Rectifier improves symbolic structure recovery, as its rectification objective is always directed toward the target expression, rather than merely satisfying a numerical error threshold\.

The remainder of the paper is organized as follows\. Section[2](https://arxiv.org/html/2606.07915#S2)introduces the motivation behind the proposed framework, and Section[3](https://arxiv.org/html/2606.07915#S3)reviews the related work\. Section[4](https://arxiv.org/html/2606.07915#S4)presents the EditSR architecture, and Section[5](https://arxiv.org/html/2606.07915#S5)describes the data\-generation procedure\. The empirical evaluation is reported in Sections[6](https://arxiv.org/html/2606.07915#S6)and[7](https://arxiv.org/html/2606.07915#S7)\. Finally, Section[8](https://arxiv.org/html/2606.07915#S8)presents the conclusion of our work\.

## 2Motivation

In recent years, neural symbolic regression models have become attractive because they amortize much of the structural search during pretraining, reducing inference to a single forward pass\. However, their drawback lies in the mismatch between teacher\-forcing training and free\-running inference\. Early errors then propagate through subsequent autoregressive decoding steps and cannot be self\-rectified\. In symbolic regression, this problem is especially costly because the generated expression represents a tree under strict arity constraints\. Once an early operator or subtree is wrong, the subsequent content is no longer generated in the intended syntactic context\. Therefore, the dominant error pattern is often structural rather than lexical\.

This difference can be understood by contrasting symbolic regression with natural language generation\. In the latter, an early deviation from a reference sentence does not necessarily invalidate the remainder of the output, because multiple continuations may still preserve the intended meaning\. For example, the sentence “Energy cannot be created or destroyed; it can only be transformed from one form to another” may also be expressed as “Energy is not created or destroyed; it can only be transformed between different forms\.” Although the wording deviates from the outset, the subsequent text remains semantically correct\. By contrast, in symbolic regression, an early error can alter the required tree expansion\. As shown in Fig\.[1](https://arxiv.org/html/2606.07915#S2.F1), if the target expression is\(x1\+x2\)⋅sin⁡\(x3\)\(x\_\{1\}\+x\_\{2\}\)\\cdot\\sin\(x\_\{3\}\)but the unary operatorsin\\sinis incorrectly generated as a binary operator such as\+\+, then the following tokens are no longer interpreted under the intended arity pattern and syntactic context\. As a result, what begins as a local mistake can quickly cascade into a global structural deviation\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/example.png)Figure 1:Under autoregressive decoding, two possible outcomes after generating an incorrect token\.If the target expression is\(x1\+x2\)⋅sin⁡\(x3\)\(x\_\{1\}\+x\_\{2\}\)\\cdot\\sin\(x\_\{3\}\), then once the unary operatorsin\\sinis incorrectly generated as the binary operator\+\+\(highlighted in red\), the model either leaves the tree structurally incorrect \(dashed box on the left\) or is forced to close the wrong branch with an irrelevant subtree \(dashed box on the right\)\.Existing post\-hoc rectification strategies have demonstrated that such errors can be mitigated\. However, many of them rely on restarting global search, or performing latent\-space optimization during inference\[[57](https://arxiv.org/html/2606.07915#bib.bib59),[35](https://arxiv.org/html/2606.07915#bib.bib30),[42](https://arxiv.org/html/2606.07915#bib.bib10)\]\. Therefore, the rectification process often introduces substantial additional computational overhead, which weakens the efficiency advantage that neural models originally gained through pretraining\.

Our framework is motivated by a simple observation\. Even when a neural model fails to recover the exact target expression, it often already captures a reusable structure \(as seen in Fig\.[1](https://arxiv.org/html/2606.07915#S2.F1)\), such as correct variables, constants, or subtrees\. This phenomenon becomes more common on complex expressions, where the mismatch is often concentrated in a limited region rather than the whole expression\. Therefore, always restarting the search process from scratch can be inefficient\. A more efficient strategy is to preserve the structurally correct part and rectify only the incorrect part\. Recent edit\-based generative models support this view\. They show that an imperfect prediction can often be improved through a sequence of local insertion, deletion, and replacement operations rather than full regeneration\[[20](https://arxiv.org/html/2606.07915#bib.bib67),[2](https://arxiv.org/html/2606.07915#bib.bib28),[6](https://arxiv.org/html/2606.07915#bib.bib68),[51](https://arxiv.org/html/2606.07915#bib.bib32)\]\. However, in symbolic regression, the extra cost of iterative generation still makes its role relative to autoregressive prediction unclear\[[63](https://arxiv.org/html/2606.07915#bib.bib7),[3](https://arxiv.org/html/2606.07915#bib.bib4)\]\. Therefore, we retain the fast inference capability of autoregressive models and focus on a narrower question: how to perform iterative rectification once an incorrect prediction has already been generated\. This motivates us to introduce the Rectifier, which performs error rectification via edit\-based transitions, and maintains efficiency through pretraining\. Moreover, because each rectification decision is conditioned only on the current state, the Rectifier is less vulnerable to error accumulation and can still rectify earlier errors through subsequent edits\. However, applying edit\-based generation to symbolic regression is challenging\. Unlike natural language, expressions are governed by strict arity constraints, and the rectification objective is directed toward a much less ambiguous target rather than a diverse set of semantically acceptable sentences\. Such challenges prompt us to restrict edits to a strictly syntax\-constrained space and to construct a deterministic rectification chain from an incorrect expression toward the target one, rather than relying on stochastic forward corruption or reverse\-path reconstruction as in diffusion\-style edit models\.

## 3Related work

Iterative generation and edit\-based models\.Iterative generation has been extensively studied in recent years, spanning denoising\-based generation, masked prediction, and edit\-based refinement\[[14](https://arxiv.org/html/2606.07915#bib.bib65),[60](https://arxiv.org/html/2606.07915#bib.bib66),[15](https://arxiv.org/html/2606.07915#bib.bib31),[2](https://arxiv.org/html/2606.07915#bib.bib28),[6](https://arxiv.org/html/2606.07915#bib.bib68)\]\. A common principle underlying these methods is that an initial imperfect output can be progressively improved through a sequence of intermediate states, which has proved effective in a variety of domains\. For example, in natural language generation, DiffusER factorizes the edit process into several coordinated subproblems, including edit position prediction, edit action prediction, and edit content generation, thereby enabling iterative rectification of incorrect predictions even in full noise\[[51](https://arxiv.org/html/2606.07915#bib.bib32)\]\. Edit Flows similarly formulates generation as a sequence of edit actions, while introducing auxiliary alignments to describe how one intermediate sequence is transformed into the next\[[13](https://arxiv.org/html/2606.07915#bib.bib82)\]\. These studies inspire our work because they show how rectification trajectories can be prelearned and executed iteratively during inference, thereby offering an alternative to traditional online search\-based rectification strategies in symbolic regression\.

Genetic programming\-based symbolic regression models\.Genetic programming remains the dominant paradigm for symbolic regression, where expressions are represented as trees and evolved through mutation, crossover, and selection\[[25](https://arxiv.org/html/2606.07915#bib.bib39),[45](https://arxiv.org/html/2606.07915#bib.bib40)\]\. In recent years, several works have addressed more specific bottlenecks\. Some replace unconstrained evolution with more structured search spaces to obtain simpler expressions and more controllable runtime\[[40](https://arxiv.org/html/2606.07915#bib.bib46),[10](https://arxiv.org/html/2606.07915#bib.bib50)\]\. Others incorporate semantic guidance, such as MRGP\[[1](https://arxiv.org/html/2606.07915#bib.bib47)\]and GP\-GOMEA\[[70](https://arxiv.org/html/2606.07915#bib.bib48)\], to bias evolution toward more meaningful updates\. For engineering applications, widely used models such as Eureqa\[[55](https://arxiv.org/html/2606.07915#bib.bib41)\], Operon\[[5](https://arxiv.org/html/2606.07915#bib.bib22)\], and PySR\[[7](https://arxiv.org/html/2606.07915#bib.bib36)\]combine genetic programming with algebraic simplification, constant optimization, and efficient implementations to improve performance and efficiency\. AI Feynman adopts a physics\-inspired strategy, recursively reducing the effective search space by exploiting structural properties such as separability, symmetry, and invariance, and then invoking symbolic regression on the resulting subproblems\[[64](https://arxiv.org/html/2606.07915#bib.bib42)\]\. Overall, by combining evolutionary search with gradient\-based parameter optimization, broad priors, and complexity control, modern genetic programming\-based models remain competitive on mainstream benchmarks\[[27](https://arxiv.org/html/2606.07915#bib.bib43),[9](https://arxiv.org/html/2606.07915#bib.bib44)\]\.

Deep learning\-based symbolic regression models\.Deep learning has become an important tool in symbolic regression because it inherently possesses powerful numerical fitting capabilities and can guide the search by introducing intelligent agents\. Equation Learner \(EQL\) replaces activation functions with primitive operators and encourages sparsity, yielding interpretable expressions\[[38](https://arxiv.org/html/2606.07915#bib.bib51)\]\. EQL÷further improves the training stability of EQL and extends the application scope to control\-oriented problems\[[54](https://arxiv.org/html/2606.07915#bib.bib52)\]\. However, these architectures are often less flexible because the depth and operator layout must be preset\. Reinforcement learning\-based models are able to explore more flexible symbolic structures, which treats expressions as sequences sampled from a policy\. Deep Symbolic Regression \(DSR\) uses a Recurrent Neural Network with risk\-seeking policy gradients and syntax\-constrained sampling, making the generated expressions simpler\[[46](https://arxiv.org/html/2606.07915#bib.bib53)\]\. Sym\-Q\[[62](https://arxiv.org/html/2606.07915#bib.bib11)\]emphasizes expert\-guided symbolic regression by introducing a co\-design mechanism that allows domain experts to intervene during the equation discovery process and inject prior knowledge into the evolving expression\. Recently, symbolic regression models based on Monte Carlo Tree Search \(MCTS\) have improved search efficiency through complementary mechanisms, including GPT\-guided search policies in SR\-GPT\[[33](https://arxiv.org/html/2606.07915#bib.bib98)\], graph\-based equivalence compression and constraint encoding in GSR\[[71](https://arxiv.org/html/2606.07915#bib.bib95)\], and non\-local state\-jumping actions such as mutation and crossover in improved MCTS variants\[[16](https://arxiv.org/html/2606.07915#bib.bib96)\]\. Beyond improving individual search paradigms, recent studies have increasingly explored hybrid frameworks\. Representative models include uDSR\[[30](https://arxiv.org/html/2606.07915#bib.bib55)\], Neural\-Guided Genetic Programming\[[44](https://arxiv.org/html/2606.07915#bib.bib54)\], and Parallel Symbolic Enumeration \(PSE\)\[[53](https://arxiv.org/html/2606.07915#bib.bib97)\], which combine deep learning, genetic programming, and parallel optimization to improve robustness and generalization across diverse application scenarios\.

Overall, deep learning\-based symbolic regression has evolved into increasingly flexible search\-guided frameworks, where neural policies, expert knowledge, MCTS, and hybrid optimization are combined to balance interpretability, search efficiency, and generalization\. However, similar to genetic programming, most of these models still perform problem\-specific searches from scratch, making it difficult to accumulate historical search experience and reuse prior knowledge to further improve efficiency and performance across scenarios\.

Neural symbolic regression models\.The Transformer architecture has recently been introduced into symbolic regression to address the challenge of fast inference\. NeSymReS\[[4](https://arxiv.org/html/2606.07915#bib.bib35)\]and SymbolicGPT\[[67](https://arxiv.org/html/2606.07915#bib.bib56)\]are representative models\. After pretraining, they can directly generate expression skeletons from datasets, but they usually require additional constant optimization\. E2E\[[19](https://arxiv.org/html/2606.07915#bib.bib57)\]and SymFormer\[[68](https://arxiv.org/html/2606.07915#bib.bib58)\]further promote the direct mapping from datasets to parseable expressions\. Multimodal approaches, such as SNIP\[[42](https://arxiv.org/html/2606.07915#bib.bib10)\]and MMSR\[[34](https://arxiv.org/html/2606.07915#bib.bib29)\], represent datasets and symbols as different modalities and perform modality alignment and fusion through contrastive learning to alleviate training instability caused by the lack of token\-level correspondence between datasets and expressions\. ViSymRe\[[32](https://arxiv.org/html/2606.07915#bib.bib26)\]introduces the visual modality as an additional information source, thus enhancing the convergence and generalization capability\. Recent efforts have incorporated large language models into symbolic regression by using them to propose equation\-program skeletons informed by scientific priors, such as LLM\-SR\[[58](https://arxiv.org/html/2606.07915#bib.bib2)\], or to induce reusable natural language concept libraries that guide evolutionary search, such as LaSR\[[11](https://arxiv.org/html/2606.07915#bib.bib90)\], thereby enriching symbolic regression with knowledge beyond data alone\. However, such models may require dedicated evaluation benchmarks, since conventional datasets can be affected by memorization in large language models\[[59](https://arxiv.org/html/2606.07915#bib.bib5)\]\. Several recent works refine either the search objective or the search space itself\. SR4MDL\[[73](https://arxiv.org/html/2606.07915#bib.bib84)\]uses a learned Minimum Description Length \(MDL\) surrogate to reduce the mismatch between numerical fitting and symbolic structure recovery\. ParFam\[[56](https://arxiv.org/html/2606.07915#bib.bib69)\]translates discrete symbolic regression into continuous global optimization over structured parametric families, while its transformer\-guided variant further reduces search cost\. CaMo\[[36](https://arxiv.org/html/2606.07915#bib.bib94)\]emphasizes modular reuse of high\-value substructures in end\-to\-end symbolic regression\.

These models confirm that modern neural symbolic regression increasingly benefits from richer priors and tighter constraints\. Although they differ in architecture, many share a common inference pattern, i\.e\., directly predicting an expression from datasets in a one\-pass autoregressive manner\. Therefore, provided that the interface matches, such models can naturally serve as the first layer of our framework\.

Post\-hoc rectification strategies\.Post\-hoc rectification has been widely studied in generative models\. One representative approach is gradient\-based optimization by perturbing hidden states or by optimizing continuous relaxations during decoding to steer a pretrained generator toward desired outputs, such as PPLM\[[8](https://arxiv.org/html/2606.07915#bib.bib91)\]and COLD\[[50](https://arxiv.org/html/2606.07915#bib.bib92)\]\. Another approach introduces search\-based refinement by explicitly exploring alternative continuations during inference, for example, with MCTS\[[26](https://arxiv.org/html/2606.07915#bib.bib93)\]\. Related ideas have also been explored in symbolic regression\. TPSR incorporates MCTS into Transformer decoding, enabling non\-differentiable feedback, such as fitting error and Complexity, to guide the refinement of candidate expressions\[[57](https://arxiv.org/html/2606.07915#bib.bib59)\]\. SNIP improves symbolic regression through latent space optimization\[[42](https://arxiv.org/html/2606.07915#bib.bib10)\]\. SNR introduces a rectifiable learning framework that combines learned structural priors with reinforcement learning to iteratively adjust incorrect expression structures\[[35](https://arxiv.org/html/2606.07915#bib.bib30)\]\. However, compared with rectification strategies in other fields, the efficiency cost of TPSR, SNIP, and SNR is often more evident, as each refinement round may involve repeated numerical evaluations and constant optimization of candidate expressions\.

## 4Methods

In this section, we introduce the architecture of EditSR as well as its optimization and inference procedures\. Fig\.[2](https://arxiv.org/html/2606.07915#S4.F2)provides an overview\. In EditSR, NeSymReS serves as the fast neural model in the first layer and is extended to support 10 variables, while the second layer consists of the Rectifier\. We definef\(0\)f^\{\(0\)\}as the initial state, i\.e\., an incorrect expression that requires rectification\. Each edit action executed by the Rectifier induces a state transition\. We denote byf\(t\)f^\{\(t\)\}the state reached afterttrectification steps starting fromf\(0\)f^\{\(0\)\}\. A complete rectification process therefore forms a rectification chain

f\(0\)→f\(1\)→⋯→f\(T\)=f∗\.f^\{\(0\)\}\\rightarrow f^\{\(1\)\}\\rightarrow\\cdots\\rightarrow f^\{\(T\)\}=f^\{\*\}\.For each edit, we apply strict syntactic constraints to avoid unclosed subtrees, thereby ensuring that the rectification chain always remains in the space of parseable expressions\.

In the following, we first introduce the syntax\-constrained decoding rule shared by both layers, then describe the first\-layer neural symbolic regression model and the second\-layer Rectifier, and finally present the corresponding optimization and inference procedures\. Table[1](https://arxiv.org/html/2606.07915#S4.T1)summarizes the main symbols used throughout this paper\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/train.png)Figure 2:Training overview of EditSR\.At the top, a neural symbolic regression model in the first layer is trained to map datasets directly to expressions, using the target expressionf∗f^\{\*\}for supervision\. At the bottom, the Rectifier learns a rectification chain fromf\(0\)f^\{\(0\)\}tof∗f^\{\*\}\. Here,z\(t\)z^\{\(t\)\}denotes the edit action at steptt, where KP, RP, and RW are abbreviations for the edit actionsKeep,Replace, andRewrite, respectively\.hhdenotes the dataset encoding, andppdenotes the position associated with the highest\-confidence edit action\. During training,f\(0\)f^\{\(0\)\}is obtained by applying random corruptions tof∗f^\{\*\}, and a deterministic rectification chain fromf\(0\)f^\{\(0\)\}tof∗f^\{\*\}is constructed using a state\-transition algorithm\. The Rectifier is trained on the one\-step state transitionf\(t\)→f\(t\+1\)f^\{\(t\)\}\\rightarrow f^\{\(t\+1\)\}\. The dashed arrows in the figure indicate the supervision targets\.Table 1:Main symbols used in the paper\.SymbolDescription𝒟=\{\(xn,yn\)\}n=1N\\mathcal\{D\}=\\\{\(x\_\{n\},y\_\{n\}\)\\\}\_\{n=1\}^\{N\}Dataset containingNNsampled input\-output pairs\.hhDataset encoding produced by the Set encoder\.f=\(f1,…,fL\)f=\(f\_\{1\},\\ldots,f\_\{L\}\)Prefix expression sequence\. For convenience, we uniformly call it “expression” in the paper\.f∗f^\{\*\}Target expression sequence\.f^\\hat\{f\}Expression predicted by NeSymReS\.f\(t\)f^\{\(t\)\}Expression afterttrectification steps\.f~\(t\)\\tilde\{f\}^\{\(t\)\}Editor context state at steptt\.𝒱\\mathcal\{V\}Vocabulary of tokens, including constant placeholders, operators, and variables\.a​\(v\)a\(v\)Arity of tokenvv,v∈𝒱v\\in\\mathcal\{V\}\.LmaxL\_\{\\max\}Maximum expression sequence length\.𝒵\\mathcal\{Z\}Edit action set, including\{Keep,Replace,Delete,Rewrite,Insert\}\\\{\\textsc\{Keep\},\\textsc\{Replace\},\\textsc\{Delete\},\\textsc\{Rewrite\},\\textsc\{Insert\}\\\}\.p,z,up,\\,z,\\,uEdit position, edit action, edit content\.TTNumber of rectification steps for the supervised rectification chain\.T′T^\{\\prime\}Number of corruption steps applied on the target expression to obtain a rectification initial state\.TmaxT\_\{\\max\}Maximum number of rectification steps during inference\.SSPlaceholder budget used by the Editor\.pθ,pψ,pϕp\_\{\\theta\},\\,p\_\{\\psi\},\\,p\_\{\\phi\}Conditional distribution of NeSymReS, the Tagger, and the Editor\.τrep,τins,τdel,τrew\\tau\_\{\\mathrm\{rep\}\},\\,\\tau\_\{\\mathrm\{ins\}\},\\,\\tau\_\{\\mathrm\{del\}\},\\,\\tau\_\{\\mathrm\{rew\}\}Action\-specific placeholders\.𝒯\\mathcal\{T\}One\-step transition function that maps the current state to the next state\.ℒTagger,ℒEditor,ℒRectifier,ℒbase\\mathcal\{L\}\_\{\\mathrm\{Tagger\}\},\\,\\mathcal\{L\}\_\{\\mathrm\{Editor\}\},\\,\\mathcal\{L\}\_\{\\mathrm\{Rectifier\}\},\\,\\mathcal\{L\}\_\{\\mathrm\{base\}\}Tagger loss, Editor loss, Rectifier loss, and the first\-layer loss\.### 4\.1Syntax\-constrained decoding

Neural symbolic regression models represent expressions as prefix token sequences and model them using left\-to\-right conditional distributions\. We denote a prefix expression sequence byf=\(f1,…,fL\)f=\(f\_\{1\},\\ldots,f\_\{L\}\)over the vocabulary𝒱\\mathcal\{V\}, which contains operator symbols, variables, and a constant placeholder token\. Eachv∈𝒱v\\in\\mathcal\{V\}is assigned an aritya​\(v\)∈\{0,1,2\}a\(v\)\\in\\\{0,1,2\\\}, wherea​\(v\)=0a\(v\)=0for variables or constants,a​\(v\)=1a\(v\)=1for unary operators, anda​\(v\)=2a\(v\)=2for binary operators\.

Syntactic constraints are characterized by the deficit count\. Starting from the root, each token consumes one pending hole and createsa​\(fi\)a\(f\_\{i\}\)new holes\. We define the deficit after reading the firstiitokens as

d0=1,di=di−1−1\+a​\(fi\)for​i=1,…,L\.d\_\{0\}=1,\\qquad d\_\{i\}=d\_\{i\-1\}\-1\+a\(f\_\{i\}\)\\quad\\text\{for \}i=1,\\ldots,L\.\(1\)The sequence is syntactically valid if and only if the deficit never drops below 1 before the end and all holes are exactly filled at termination\. Intuitively,did\_\{i\}is the number of child nodes that remain to be filled after consuming tokenii\.

Based on this, we impose syntax constraints during autoregressive decoding\. Let the current deficit bed\>0d\>0before emitting tokenfif\_\{i\}, and let the remaining token budget beR=Lmax−i\+1R=L\_\{\\max\}\-i\+1\. If tokenv∈𝒱v\\in\\mathcal\{V\}is emitted, the updated deficit is

d′=d−1\+a​\(v\)\.d^\{\\prime\}=d\-1\+a\(v\)\.To keep decoding feasible, the new deficit must admit a valid completion within the remainingR−1R\-1steps\. Since each future token can reduce the deficit by at most 1, we required′≤R−1d^\{\\prime\}\\leq R\-1\. Unlike fixed\-length decoding, we allow the expression to terminate before exhausting the maximum length budget\. Therefore, a token is feasible if the updated deficit satisfies0≤d′≤R−10\\leq d^\{\\prime\}\\leq R\-1\. Ifd′=0d^\{\\prime\}=0, the generated prefix forms a complete expression and decoding terminates immediately; otherwise, decoding continues\. The feasible token set at state\(d,R\)\(d,R\)is therefore defined as

𝒱′​\(d,R\)=\{v∈𝒱:0≤d−1\+a​\(v\)≤R−1\}\.\\mathcal\{V\}^\{\\prime\}\(d,R\)=\\\{v\\in\\mathcal\{V\}:0\\leq d\-1\+a\(v\)\\leq R\-1\\\}\.\(2\)We adopt the same syntax\-constrained feasible\-set restriction in both the first layer for expression prediction and the second layer for edit content generation\.

### 4\.2The first layer: neural symbolic regression model

Architecturally, a standard neural symbolic regression model is divided into two modules\. A permutation\-invariant Set encoder \(such as the standard Transformer encoder\[[69](https://arxiv.org/html/2606.07915#bib.bib63)\], Set Transformer\[[31](https://arxiv.org/html/2606.07915#bib.bib33)\], T\-net variants\[[49](https://arxiv.org/html/2606.07915#bib.bib34)\], or Mix scheme\[[28](https://arxiv.org/html/2606.07915#bib.bib60)\]\) maps a dataset to the dataset encodinghh\. A decoder parameterized byθ\\thetadefines the factorized conditional distribution

pθ​\(f∣h\)=∏i=1Lpθ​\(fi∣f<i,h\),p\_\{\\theta\}\(f\\mid h\)=\\prod\_\{i=1\}^\{L\}p\_\{\\theta\}\(f\_\{i\}\\mid f\_\{<i\},h\),\(3\)wheref<if\_\{<i\}is the generated prefix before stepii\. Generally, the decoder is a standard Transformer decoder\.

Given the target expression sequencef∗f^\{\*\}, the training objective is

ℒbase=−∑i=1Llog⁡pθ​\(fi∗∣f<i∗,h\)\.\\mathcal\{L\}\_\{\\mathrm\{base\}\}=\-\\sum\_\{i=1\}^\{L\}\\log p\_\{\\theta\}\\left\(f^\{\*\}\_\{i\}\\mid f^\{\*\}\_\{<i\},h\\right\)\.\(4\)
During inference, the model performs left\-to\-right syntax\-constrained decoding\. The next token is decoded as

f^i=arg⁡maxv∈𝒱′​\(d^i−1,Ri\)⁡pθ​\(v∣f^<i,h\)\.\\hat\{f\}\_\{i\}=\\arg\\max\_\{v\\in\\mathcal\{V\}^\{\\prime\}\(\\hat\{d\}\_\{i\-1\},R\_\{i\}\)\}p\_\{\\theta\}\\left\(v\\mid\\hat\{f\}\_\{<i\},h\\right\)\.\(5\)Beam search maintains multiple high\-scoring expressions to better balance search quality and computational cost\.

### 4\.3The second layer: Rectifier

In this section, we present the Rectifier in detail, including the roles of the Tagger and Editor, the corresponding training target, and the inference procedure\.

#### 4\.3\.1Tagger

At steptt, the Tagger receives the current statef\(t\)f^\{\(t\)\}and the dataset encodinghh\. Its role is to evaluate, at every position, which edit actions are admissible and then choose one executable position–action pair for the Editor\.

We define the following action space:

𝒵=\{Keep,Replace,Delete,Rewrite,Insert\},\\mathcal\{Z\}=\\\{\\textsc\{Keep\},\\,\\textsc\{Replace\},\\,\\textsc\{Delete\},\\,\\textsc\{Rewrite\},\\,\\textsc\{Insert\}\\\},\(6\)Each action corresponds to a specific behavior:

- 1\.Keep: leaves the token at the selected position unchanged\.
- 2\.Replace: replaces only the token at the selected position while preserving its arity\.
- 3\.Delete: collapses the internal subtree rooted at the selected position into a leaf\.
- 4\.Rewrite: regenerates the internal subtree rooted at the selected position\.
- 5\.Insert: expands the leaf at the selected position into a newly generated internal subtree\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/action.png)Figure 3:Illustration of the four non\-trivial edit actions used by the Rectifier\. From left to right, the columns show examples ofReplace,Delete,Insert, andRewrite\. In each column, the top row indicates the selected edit region in the current expression \(highlighted in red\), and the bottom row shows the resulting expression after applying the corresponding action\.Replacemodifies only the token at the selected position while preserving its arity;Deletecollapses the selected internal subtree into a leaf;Insertexpands a selected leaf into a newly generated subtree; andRewriteregenerates the selected subtree\. TheKeepaction is not shown because it leaves the expression unchanged\.Not every action is admissible at every position\. Let𝒵i\(t\)\\mathcal\{Z\}^\{\(t\)\}\_\{i\}denote the admissible action set at positioniioff\(t\)f^\{\(t\)\}\. We define

𝒵i\(t\)=\{\{Keep,Replace,Insert\},a​\(fi\(t\)\)=0,\{Keep,Replace,Delete,Rewrite\},a​\(fi\(t\)\)\>0,\\mathcal\{Z\}^\{\(t\)\}\_\{i\}=\\begin\{cases\}\\\{\\textsc\{Keep\},\\textsc\{Replace\},\\textsc\{Insert\}\\\},&a\\\!\\left\(f\_\{i\}^\{\(t\)\}\\right\)=0,\\\\\[2\.0pt\] \\\{\\textsc\{Keep\},\\textsc\{Replace\},\\textsc\{Delete\},\\textsc\{Rewrite\}\\\},&a\\\!\\left\(f\_\{i\}^\{\(t\)\}\\right\)\>0,\\end\{cases\}\(7\)wherea​\(⋅\)a\(\\cdot\)denotes the arity\. To provide a more intuitive understanding of the edit actions, Fig\.[3](https://arxiv.org/html/2606.07915#S4.F3)illustrates four representative non\-trivial edits on an example expression tree\.

The Tagger predicts a position\-wise conditional distributionpψ​\(zi=z∣f\(t\),h\)p\_\{\\psi\}\(z\_\{i\}=z\\mid f^\{\(t\)\},h\)over admissible actionsz∈𝒵i\(t\)z\\in\\mathcal\{Z\}^\{\(t\)\}\_\{i\}\. For each position, we retain the admissible action with the highest confidence

z^i\(t\)=arg⁡maxz∈𝒵i\(t\)⁡pψ​\(zi=z∣f\(t\),h\)\.\\hat\{z\}\_\{i\}^\{\(t\)\}=\\arg\\max\_\{z\\in\\mathcal\{Z\}^\{\(t\)\}\_\{i\}\}p\_\{\\psi\}\(z\_\{i\}=z\\mid f^\{\(t\)\},h\)\.\(8\)Ifz^i\(t\)=Keep\\hat\{z\}\_\{i\}^\{\(t\)\}=\\textsc\{Keep\}for all positions, the current rectification terminates\. Otherwise, among all position\-action pairs whose optimal action is notKeep, we select the one with the highest confidence score:

p\(t\)=arg⁡max1≤i≤\|f\(t\)\|z^i\(t\)≠Keep⁡pψ​\(zi=z^i\(t\)∣f\(t\),h\),z\(t\)=z^p\(t\)\(t\)\.p^\{\(t\)\}=\\arg\\max\_\{\\begin\{subarray\}\{c\}1\\leq i\\leq\|f^\{\(t\)\}\|\\\\ \\hat\{z\}\_\{i\}^\{\(t\)\}\\neq\\textsc\{Keep\}\\end\{subarray\}\}p\_\{\\psi\}\\\!\\left\(z\_\{i\}=\\hat\{z\}\_\{i\}^\{\(t\)\}\\mid f^\{\(t\)\},h\\right\),\\qquad z^\{\(t\)\}=\\hat\{z\}\_\{p^\{\(t\)\}\}^\{\(t\)\}\.\(9\)Overall, the Tagger consists of two stages\. It first produces position\-wise action predictions for the current state and subsequently retains the optimal position\-action pair to pass to the Editor\. Algorithm[1](https://arxiv.org/html/2606.07915#alg1)summarizes this process\.

Algorithm 1Tagger prediction algorithm0:Current state

f\(t\)f^\{\(t\)\}, dataset encoding

hh
1:Stage I: predicting actions position\-by\-position\.

2:for

i=1,…,\|f\(t\)\|i=1,\\dots,\|f^\{\(t\)\}\|do

3:Build

𝒵i\(t\)\\mathcal\{Z\}\_\{i\}^\{\(t\)\}by Eq\. \([7](https://arxiv.org/html/2606.07915#S4.E7)\)⊳\\trianglerightConstruct the syntax\-admissible action set

4:Compute

pψ​\(zi=z∣f\(t\),h\)p\_\{\\psi\}\(z\_\{i\}=z\\mid f^\{\(t\)\},h\)for all

z∈𝒵i\(t\)z\\in\\mathcal\{Z\}\_\{i\}^\{\(t\)\}
5:

z^i\(t\)←arg⁡maxz∈𝒵i\(t\)⁡pψ​\(zi=z∣f\(t\),h\)\\hat\{z\}\_\{i\}^\{\(t\)\}\\leftarrow\\arg\\max\_\{z\\in\\mathcal\{Z\}\_\{i\}^\{\(t\)\}\}p\_\{\\psi\}\(z\_\{i\}=z\\mid f^\{\(t\)\},h\)⊳\\trianglerightSelect the action for each position

6:endfor

7:ifAll

z^i\(t\)\\hat\{z\}\_\{i\}^\{\(t\)\}areKeepthen

8:return

\(∅,Keep\)\(\\varnothing,\\textsc\{Keep\}\)⊳\\trianglerightTerminate and return no edit

9:endif

10:Stage II: determining position\-action pair

11:

p\(t\)←arg⁡max1≤i≤\|f\(t\)\|z^i\(t\)≠Keep⁡pψ​\(zi=z^i\(t\)∣f\(t\),h\)p^\{\(t\)\}\\leftarrow\\arg\\max\_\{\\begin\{subarray\}\{c\}1\\leq i\\leq\|f^\{\(t\)\}\|\\\\ \\hat\{z\}\_\{i\}^\{\(t\)\}\\neq\\textsc\{Keep\}\\end\{subarray\}\}p\_\{\\psi\}\\\!\\left\(z\_\{i\}=\\hat\{z\}\_\{i\}^\{\(t\)\}\\mid f^\{\(t\)\},h\\right\)⊳\\trianglerightDetermine the edit position

12:

z\(t\)←z^p\(t\)\(t\)z^\{\(t\)\}\\leftarrow\\hat\{z\}\_\{p^\{\(t\)\}\}^\{\(t\)\}⊳\\trianglerightDetermine the edit action

13:return

\(p\(t\),z\(t\)\)\(p^\{\(t\)\},z^\{\(t\)\}\)

#### 4\.3\.2Editor

Once the Tagger outputs the edit positionp\(t\)p^\{\(t\)\}and the non\-Keepedit actionz\(t\)z^\{\(t\)\}, the Editor is used to predict the edit contentu\(t\)u^\{\(t\)\}\. SinceInsert,Rewrite, andDeleteoperate on subtrees, we denote byI\(t\)​\(p\(t\)\)I^\{\(t\)\}\(p^\{\(t\)\}\)the closed subtree off\(t\)f^\{\(t\)\}rooted at positionp\(t\)p^\{\(t\)\}, and by\|I\(t\)​\(p\(t\)\)\|\|I^\{\(t\)\}\(p^\{\(t\)\}\)\|its span length\.

Each execution of an edit action corresponds to a state transition fromf\(t\)f^\{\(t\)\}tof\(t\+1\)f^\{\(t\+1\)\}\. We define a one\-step transition function𝒯\\mathcal\{T\}:

f\(t\+1\)=𝒯​\(f\(t\),p\(t\),z\(t\),u\(t\)\)\.f^\{\(t\+1\)\}=\\mathcal\{T\}\\\!\\left\(f^\{\(t\)\},p^\{\(t\)\},z^\{\(t\)\},u^\{\(t\)\}\\right\)\.\(10\)This function specifies how the current statef\(t\)f^\{\(t\)\}is transformed tof\(t\+1\)f^\{\(t\+1\)\}by executing actionz\(t\)z^\{\(t\)\}at positionp\(t\)p^\{\(t\)\}\. Specifically,

𝒯​\(f,p,z,u\)=\{\(f<p;u;f≥p\+1\),z∈\{Replace,Insert\},\(f<p;u;f≥p\+\|I​\(p\)\|\),z∈\{Delete,Rewrite\},f,z=Keep,\\mathcal\{T\}\\\!\\left\(f,p,z,u\\right\)=\\begin\{cases\}\(f\_\{<p\};u;f\_\{\\geq p\+1\}\),&z\\in\\\{\\textsc\{Replace\},\\textsc\{Insert\}\\\},\\\\\[3\.0pt\] \(f\_\{<p\};u;f\_\{\\geq p\+\|I\(p\)\|\}\),&z\\in\\\{\\textsc\{Delete\},\\textsc\{Rewrite\}\\\},\\\\\[3\.0pt\] f,&z=\\textsc\{Keep\},\\end\{cases\}\(11\)where\(;\)\(\\,;\\,\)denotes sequence concatenation\. ForInsertandRewrite,uudenotes a syntactically closed subtree\. ForReplaceandDelete,uudegenerates to a single token\.

The Editor is implemented as an infilling decoder that generates tokens only at masked positions\. For each non\-Keepaction, we construct a context statef~\(t\)\\tilde\{f\}^\{\(t\)\}by replacing the region that required edit inf\(t\)f^\{\(t\)\}with one or multiple action\-specific placeholders:

- 1\.Replace:We constructf~\(t\)\\tilde\{f\}^\{\(t\)\}by replacingfp\(t\)\(t\)f^\{\(t\)\}\_\{p^\{\(t\)\}\}inf\(t\)f^\{\(t\)\}with oneτrep\\tau\_\{\\mathrm\{rep\}\}placeholder\.
- 2\.Delete:We constructf~\(t\)\\tilde\{f\}^\{\(t\)\}by replacingI\(t\)​\(p\(t\)\)I^\{\(t\)\}\(p^\{\(t\)\}\)with oneτdel\\tau\_\{\\mathrm\{del\}\}placeholder\.
- 3\.Rewrite:We constructf~\(t\)\\tilde\{f\}^\{\(t\)\}by replacingI\(t\)​\(p\(t\)\)I^\{\(t\)\}\(p^\{\(t\)\}\)withSSconsecutiveτrew\\tau\_\{\\mathrm\{rew\}\}placeholders starting atp\(t\)p^\{\(t\)\}\.
- 4\.Insert:We constructf~\(t\)\\tilde\{f\}^\{\(t\)\}by replacingfp\(t\)\(t\)f^\{\(t\)\}\_\{p^\{\(t\)\}\}withSSconsecutiveτins\\tau\_\{\\mathrm\{ins\}\}placeholders starting atp\(t\)p^\{\(t\)\}\.

To match the two infilling patterns described above, the Editor uses two output heads: a single\-token classification head forReplaceandDelete, and a sequence generation head forRewriteandInsert\. For the actionsReplaceandDelete, the edit content is predicted as

u\(t\)=\{arg⁡maxa​\(v\)=a​\(fp\(t\)\(t\)\)⁡pϕ​\(v∣f~\(t\),h\),z\(t\)=Replace,arg⁡maxa​\(v\)=0⁡pϕ​\(v∣f~\(t\),h\),z\(t\)=Delete\.u^\{\(t\)\}=\\begin\{cases\}\\arg\\max\_\{a\(v\)=a\(f^\{\(t\)\}\_\{p^\{\(t\)\}\}\)\}p\_\{\\phi\}\\\!\\left\(v\\mid\\tilde\{f\}^\{\(t\)\},h\\right\),&z^\{\(t\)\}=\\textsc\{Replace\},\\\\\[6\.0pt\] \\arg\\max\_\{a\(v\)=0\}p\_\{\\phi\}\\\!\\left\(v\\mid\\tilde\{f\}^\{\(t\)\},h\\right\),&z^\{\(t\)\}=\\textsc\{Delete\}\.\\end\{cases\}\(12\)For the actionsRewriteandInsert, the edit content is generated autoregressively\. Theii\-th token is decoded as

ui\(t\)=arg⁡maxv∈𝒱′​\(di−1\(t\),Ri\(t\)\)⁡pϕ​\(v∣u<i\(t\),f~\(t\),h\)\.u\_\{i\}^\{\(t\)\}=\\arg\\max\_\{v\\in\\mathcal\{V\}^\{\\prime\}\(d\_\{i\-1\}^\{\(t\)\},R\_\{i\}^\{\(t\)\}\)\}p\_\{\\phi\}\\\!\\left\(v\\mid u\_\{<i\}^\{\(t\)\},\\tilde\{f\}^\{\(t\)\},h\\right\)\.\(13\)The resulting subtree distribution factorizes as

pϕ​\(u\(t\)∣f~\(t\),h\)=∏i=1\|u\(t\)\|pϕ​\(ui\(t\)∣u<i\(t\),f~\(t\),h\)\.p\_\{\\phi\}\\\!\\left\(u^\{\(t\)\}\\mid\\tilde\{f\}^\{\(t\)\},h\\right\)=\\prod\_\{i=1\}^\{\|u^\{\(t\)\}\|\}p\_\{\\phi\}\\\!\\left\(u\_\{i\}^\{\(t\)\}\\mid u\_\{<i\}^\{\(t\)\},\\tilde\{f\}^\{\(t\)\},h\\right\)\.\(14\)Once the generated tokens form a closed subtree, the generation process terminates\. The remaining placeholder slots are then discarded\.

We implement the Editor with bidirectional and infilling attention, where non\-hole positions attend bidirectionally to all non\-hole tokens, while hole positions attend to all non\-hole tokens and to earlier hole tokens only\. This architecture provides bidirectional context from both sides while maintaining a causal order inside the hole\. Algorithm[2](https://arxiv.org/html/2606.07915#alg2)details how the Editor generatesu\(t\)u^\{\(t\)\}\.

Algorithm 2Editor decoding algorithm\.0:Current state

f\(t\)f^\{\(t\)\}, dataset encoding

hh, edit position

p\(t\)p^\{\(t\)\}, edit action

z\(t\)z^\{\(t\)\}, Editor distribution

pϕp\_\{\\phi\}, vocabulary

𝒱\\mathcal\{V\}, placeholder budget

SS
1:if

z\(t\)=Replacez^\{\(t\)\}=\\textsc\{Replace\}then

2:Set

f~\(t\)←f\(t\)\\tilde\{f\}^\{\(t\)\}\\leftarrow f^\{\(t\)\}; Set

f~p\(t\)\(t\)←τrep\\tilde\{f\}^\{\(t\)\}\_\{p^\{\(t\)\}\}\\leftarrow\\tau\_\{\\mathrm\{rep\}\}⊳\\trianglerightOpen a hole at the selected position

3:Set

𝒜←\{v∈𝒱:a​\(v\)=a​\(fp\(t\)\(t\)\)\}\\mathcal\{A\}\\leftarrow\\\{v\\in\\mathcal\{V\}:a\(v\)=a\(f^\{\(t\)\}\_\{p^\{\(t\)\}\}\)\\\}⊳\\trianglerightRestrict the replacement token to the same arity

4:Set

u\(t\)←arg⁡maxv∈𝒜⁡pϕ​\(u=v∣f~\(t\),h\)u^\{\(t\)\}\\leftarrow\\arg\\max\_\{v\\in\\mathcal\{A\}\}p\_\{\\phi\}\(u=v\\mid\\tilde\{f\}^\{\(t\)\},h\)
5:elseif

z\(t\)=Deletez^\{\(t\)\}=\\textsc\{Delete\}then

6:Set

f~\(t\)←\(f<p\(t\)\(t\);τdel;f≥p\(t\)\+\|I\(t\)​\(p\(t\)\)\|\(t\)\)\\tilde\{f\}^\{\(t\)\}\\leftarrow\(f^\{\(t\)\}\_\{<p^\{\(t\)\}\};\\tau\_\{\\mathrm\{del\}\};f^\{\(t\)\}\_\{\\geq p^\{\(t\)\}\+\|I^\{\(t\)\}\(p^\{\(t\)\}\)\|\}\)⊳\\trianglerightRemove the source subtree and replace it with one hole

7:Set

𝒜←\{v∈𝒱:a​\(v\)=0\}\\mathcal\{A\}\\leftarrow\\\{v\\in\\mathcal\{V\}:a\(v\)=0\\\}⊳\\trianglerightRestrict the output to leaf tokens

8:Set

u\(t\)←arg⁡maxv∈𝒜⁡pϕ​\(u=v∣f~\(t\),h\)u^\{\(t\)\}\\leftarrow\\arg\\max\_\{v\\in\\mathcal\{A\}\}p\_\{\\phi\}\(u=v\\mid\\tilde\{f\}^\{\(t\)\},h\)
9:elseif

z\(t\)∈\{Rewrite,Insert\}z^\{\(t\)\}\\in\\\{\\textsc\{Rewrite\},\\textsc\{Insert\}\\\}then

10:if

z\(t\)=Rewritez^\{\(t\)\}=\\textsc\{Rewrite\}then

11:Set

f~\(t\)←\(f<p\(t\)\(t\);τrew,…,τrew⏟S;f≥p\(t\)\+\|I\(t\)​\(p\(t\)\)\|\(t\)\)\\tilde\{f\}^\{\(t\)\}\\leftarrow\(f^\{\(t\)\}\_\{<p^\{\(t\)\}\};\\underbrace\{\\tau\_\{\\mathrm\{rew\}\},\\ldots,\\tau\_\{\\mathrm\{rew\}\}\}\_\{S\};f^\{\(t\)\}\_\{\\geq p^\{\(t\)\}\+\|I^\{\(t\)\}\(p^\{\(t\)\}\)\|\}\)⊳\\trianglerightOpen a multi\-token hole at the current subtree

12:else

13:Set

f~\(t\)←\(f<p\(t\)\(t\);τins,…,τins⏟S;f≥p\(t\)\+1\(t\)\)\\tilde\{f\}^\{\(t\)\}\\leftarrow\(f^\{\(t\)\}\_\{<p^\{\(t\)\}\};\\underbrace\{\\tau\_\{\\mathrm\{ins\}\},\\ldots,\\tau\_\{\\mathrm\{ins\}\}\}\_\{S\};f^\{\(t\)\}\_\{\\geq p^\{\(t\)\}\+1\}\)⊳\\trianglerightOpen a multi\-token hole at the selected position

14:endif

15:Set

u←\[\]u\\leftarrow\[\\;\],

d←1d\\leftarrow 1
16:for

j←1j\\leftarrow 1to

SSdo

17:Set

R←S−j\+1R\\leftarrow S\-j\+1⊳\\trianglerightTrack the remaining decoding budget

18:Set

uj←arg⁡maxv∈𝒱′​\(d,R\)⁡pϕ​\(uj=v∣u<j,f~\(t\),h\)u\_\{j\}\\leftarrow\\arg\\max\_\{v\\in\\mathcal\{V\}^\{\\prime\}\(d,R\)\}p\_\{\\phi\}\(u\_\{j\}=v\\mid u\_\{<j\},\\tilde\{f\}^\{\(t\)\},h\)⊳\\trianglerightPerform syntax\-constrained autoregressive decoding

19:

u\.append​\(uj\)u\.\\mathrm\{append\}\(u\_\{j\}\)
20:Update

d←d−1\+a​\(uj\)d\\leftarrow d\-1\+a\(u\_\{j\}\)⊳\\trianglerightUpdate the local deficit

21:if

d=0d=0then

22:Break⊳\\trianglerightStop when the generated subtree closes

23:endif

24:endfor

25:Set

u\(t\)←uu^\{\(t\)\}\\leftarrow u
26:endif

27:return

u\(t\)u^\{\(t\)\}

#### 4\.3\.3Training target for Tagger and Editor

The objective of the Rectifier is to learn a state\-transition chain from a given initial statef\(0\)f^\{\(0\)\}to the targetf∗f^\{\*\}\. Therefore, each sampled intermediate statef\(t\)f^\{\(t\)\}is associated with a one\-step supervision label\(p∗\(t\),z∗\(t\),u∗\(t\)\)\\bigl\(p^\{\*\(t\)\},\\,z^\{\*\(t\)\},\\,u^\{\*\(t\)\}\\bigr\), which specifies the edit position, the edit action, and the edit content required to transformf\(t\)f^\{\(t\)\}tof\(t\+1\)f^\{\(t\+1\)\}\.

During training, ensuring the robustness and stable convergence of the Rectifier requires addressing two issues\. One is how to construct initial statesf\(0\)f^\{\(0\)\}with diverse error patterns\. The other is, givenf\(0\)f^\{\(0\)\}, how to construct a deterministic step\-by\-step rectification chain that moves it towardf∗f^\{\*\}through fixed edit positions and edit actions, rather than random edits\.

Inspired by discrete diffusion models\[[51](https://arxiv.org/html/2606.07915#bib.bib32),[13](https://arxiv.org/html/2606.07915#bib.bib82)\], which simulate error distributions by randomly corrupting the target, we sample a corruption depthT′T^\{\\prime\}and then applyT′T^\{\\prime\}random edit actions on the target expression to obtainf\(0\)f^\{\(0\)\}\. Each edit action is randomly drawn from the predefined action space𝒵\\mathcal\{Z\}with equal probability and is required to satisfy the action admissibility constraints at the selected position\.

Next, we describe how to construct the deterministic rectification chain fromf\(0\)f^\{\(0\)\}tof∗f^\{\*\}\. The core question is how to determine the edit position and edit action to define the state transition fromf\(t\)f^\{\(t\)\}tof\(t\+1\)f^\{\(t\+1\)\}\. To keep the notation consistent, for a positionppinf\(t\)f^\{\(t\)\}, we denote byp′p^\{\\prime\}the aligned position inf∗f^\{\*\}\. In Section[4\.3\.2](https://arxiv.org/html/2606.07915#S4.SS3.SSS2), we have definedI\(t\)​\(p\)I^\{\(t\)\}\(p\)as the closed subtree off\(t\)f^\{\(t\)\}rooted atpp, so the corresponding target subtree inf∗f^\{\*\}is denoted byI∗​\(p′\)I^\{\*\}\(p^\{\\prime\}\)\. We propose a state\-transition algorithm \(Algorithm[3](https://arxiv.org/html/2606.07915#alg3)\)\. It first alignsf\(t\)f^\{\(t\)\}withf∗f^\{\*\}according to the tree structure\. The admissible edit actions atppin the state\-transition algorithm follow the same constraints as those of the Rectifier:

- 1\.Replaceis admissible if and only if bothfp\(t\)f^\{\(t\)\}\_\{p\}andfp′∗f^\{\*\}\_\{p^\{\\prime\}\}are leaves, or they have the same arity and all their children already match\.
- 2\.Deleteis admissible if and only iffp\(t\)f^\{\(t\)\}\_\{p\}induces a subtreeI\(t\)​\(p\)I^\{\(t\)\}\(p\), while the alignedfp′∗f^\{\*\}\_\{p^\{\\prime\}\}is a leaf\.
- 3\.Insertis admissible if and only iffp\(t\)f^\{\(t\)\}\_\{p\}is a leaf, while the alignedfp′∗f^\{\*\}\_\{p^\{\\prime\}\}induces a subtreeI∗​\(p′\)I^\{\*\}\(p^\{\\prime\}\), and\|I∗​\(p′\)\|\|I^\{\*\}\(p^\{\\prime\}\)\|does not exceed the generation budgetSSof the Editor\.
- 4\.Rewriteis admissible if and only iffp\(t\)f^\{\(t\)\}\_\{p\}andfp′∗f^\{\*\}\_\{p^\{\\prime\}\}induce two different subtrees,I\(t\)​\(p\)I^\{\(t\)\}\(p\)andI∗​\(p′\)I^\{\*\}\(p^\{\\prime\}\), and\|I∗​\(p′\)\|\|I^\{\*\}\(p^\{\\prime\}\)\|does not exceed the generation budgetSSof the Editor\.

Whenever an action is admissible, we define a cost as follows:

ω​\(z;p,p′\)\\displaystyle\\omega\(z;p,p^\{\\prime\}\)=\{0,z=Replace​and​fp\(t\)=fp′∗,1,z=Replace​and​fp\(t\)≠fp′∗,1\+λ​\|I\(t\)​\(p\)\|,z=Delete,1\+λ​\|I∗​\(p′\)\|,z∈\{Insert,Rewrite\}\.\\displaystyle=\(15\)Here,RewriteandInserthave the same cost\. They operate on the root node and leaf node respectively, and therefore do not compete with each other\.λ\\lambdais a subtree length penalty, which together with the Editor generation budgetSSconstitutes a constraint to encourage the Rectifier to learn multi\-step local rectification, rather than greedily attempting to solve a large discrepancy in one\-stepRewriteorInsert\. Once a subtree exceeds the budgetSS, we introduce an intermediate subtreeI~∗​\(p′\)\\tilde\{I\}^\{\*\}\(p^\{\\prime\}\), where\|I~∗​\(p′\)\|\|\\tilde\{I\}^\{\*\}\(p^\{\\prime\}\)\|does not exceedSS\. It is constructed by retaining the root ofI∗​\(p′\)I^\{\*\}\(p^\{\\prime\}\)and expanding it with as many of its children as permitted by the budget\. The omitted children are replaced by a leaf so that the subtree remains syntactically closed\. The corresponding cost is defined as the bridge cost fromI\(t\)​\(p\)I^\{\(t\)\}\(p\)toI~∗​\(p′\)\\tilde\{I\}^\{\*\}\(p^\{\\prime\}\)plus the remaining cost fromI~∗​\(p′\)\\tilde\{I\}^\{\*\}\(p^\{\\prime\}\)toI∗​\(p′\)I^\{\*\}\(p^\{\\prime\}\)\.

The state\-transition algorithm operates recursively\. Starting from the root position pair\(p=1,p′=1\)\(p=1,p^\{\\prime\}=1\)off\(t\)f^\{\(t\)\}andf∗f^\{\*\}, the algorithm determines the edit positionp∗\(t\)p^\{\*\(t\)\}and edit actionz∗\(t\)z^\{\*\(t\)\}to handle the difference betweenI\(t\)​\(p\)I^\{\(t\)\}\(p\)andI∗​\(p′\)I^\{\*\}\(p^\{\\prime\}\)by comparing two strategies\. The first is to execute a one\-step admissible action atppimmediately\. The second is to defer the edit atppand examine deeper aligned descendant nodes to find a lower\-cost scheme\. Note that the latter strategy requiresfp\(t\)f\_\{p\}^\{\(t\)\}andfp′∗f\_\{p^\{\\prime\}\}^\{\*\}to have the same arity\. If this condition holds but the symbols differ, a unitReplacecost is accumulated atpp\.

Algorithm 3State transition algorithm\.0:Current state

f\(t\)f^\{\(t\)\}, target state

f∗f^\{\*\}, position pair

\(p,p′\)\(p,p^\{\\prime\}\), Editor generation budget

SS, subtree penalty

λ\\lambda, transition function

𝒯\\mathcal\{T\}, cost function

ω\\omega\(Eq\.[15](https://arxiv.org/html/2606.07915#S4.E15)\)

1:StateTransition\(f\(t\),f∗,p,p′\)\(f^\{\(t\)\},f^\{\*\},p,p^\{\\prime\}\)

2:if

I\(t\)​\(p\)=I∗​\(p′\)I^\{\(t\)\}\(p\)=I^\{\*\}\(p^\{\\prime\}\)then

3:return

\(0,∅,∅,∅\)\(0,\\varnothing,\\varnothing,\\varnothing\)⊳\\trianglerightReturn because no edit is needed

4:endif

5:

CostI∗←\+∞\\mathrm\{Cost\}\_\{\\mathrm\{I\}\}^\{\*\}\\leftarrow\+\\infty,

\(pI∗,zI∗,uI∗\)←\(∅,∅,∅\)\(p\_\{\\mathrm\{I\}\}^\{\*\},z\_\{\\mathrm\{I\}\}^\{\*\},u\_\{\\mathrm\{I\}\}^\{\*\}\)\\leftarrow\(\\varnothing,\\varnothing,\\varnothing\)
6:Set

𝒜​\(p,p′\)⊆Zp\(t\)\\mathcal\{A\}\(p,p^\{\\prime\}\)\\subseteq Z\_\{p\}^\{\(t\)\}⊳\\trianglerightBuild an admissible action set at position pair\(p,p′\)\(p,p^\{\\prime\}\)

7:Stage I: execute one admissible action directly atpp\.

8:for

z∈𝒜​\(p,p′\)z\\in\\mathcal\{A\}\(p,p^\{\\prime\}\)\\Keepdo

9:if

z∈\{Replace,Delete\}z\\in\\\{\\textsc\{Replace\},\\textsc\{Delete\}\\\}then

10:

u←f\(p′\)∗u\\leftarrow f^\{\*\}\_\{\(p^\{\\prime\}\)\},

c←ω​\(z;p,p′\)c\\leftarrow\\omega\(z;p,p^\{\\prime\}\)⊳\\trianglerightUse the aligned target token

11:elseif

z∈\{Insert,Rewrite\}z\\in\\\{\\textsc\{Insert\},\\textsc\{Rewrite\}\\\}then

12:if

\|I∗​\(p′\)\|≤S\|I^\{\*\}\(p^\{\\prime\}\)\|\\leq Sthen

13:

u←I∗​\(p′\)u\\leftarrow I^\{\*\}\(p^\{\\prime\}\),

c←ω​\(z;p,p′\)c\\leftarrow\\omega\(z;p,p^\{\\prime\}\)⊳\\trianglerightUse the target subtree directly

14:else

15:

u←I~∗​\(p′\)u\\leftarrow\\tilde\{I\}^\{\*\}\(p^\{\\prime\}\)⊳\\trianglerightUse the budget\-limited subtree

16:

\(crem,\_,\_,\_\)←StateTransition​\(𝒯​\(f\(t\),p,z,u\),f∗,p,p′\)\(c\_\{\\mathrm\{rem\}\},\\\_,\\\_,\\\_\)\\leftarrow\\textsc\{StateTransition\}\(\\mathcal\{T\}\(f^\{\(t\)\},p,z,u\),f^\{\*\},p,p^\{\\prime\}\)⊳\\trianglerightCompute the remaining cost recursively

17:

c←ω​\(z;p,p′\)\+cremc\\leftarrow\\omega\(z;p,p^\{\\prime\}\)\+c\_\{\\mathrm\{rem\}\}
18:endif

19:endif

20:if

c<CostI∗c<\\mathrm\{Cost\}\_\{\\mathrm\{I\}\}^\{\*\}then

21:

CostI∗←c\\mathrm\{Cost\}\_\{\\mathrm\{I\}\}^\{\*\}\\leftarrow c,

\(pI∗,zI∗,uI∗\)←\(p,z,u\)\(p\_\{\\mathrm\{I\}\}^\{\*\},z\_\{\\mathrm\{I\}\}^\{\*\},u\_\{\\mathrm\{I\}\}^\{\*\}\)\\leftarrow\(p,z,u\)⊳\\trianglerightKeep the best direct action

22:endif

23:endfor

24:Stage II: defer the edit atpp, recursively process the aligned child nodes\.

25:

CostII∗←\+∞\\mathrm\{Cost\}\_\{\\mathrm\{II\}\}^\{\*\}\\leftarrow\+\\infty,

\(pII∗,zII∗,uII∗\)←\(∅,∅,∅\)\(p\_\{\\mathrm\{II\}\}^\{\*\},z\_\{\\mathrm\{II\}\}^\{\*\},u\_\{\\mathrm\{II\}\}^\{\*\}\)\\leftarrow\(\\varnothing,\\varnothing,\\varnothing\)
26:if

a​\(f\(p\)\(t\)\)=a​\(f\(p′\)∗\)\>0a\(f^\{\(t\)\}\_\{\(p\)\}\)=a\(f^\{\*\}\_\{\(p^\{\\prime\}\)\}\)\>0then

27:if

f\(p\)\(t\)≠f\(p′\)∗f^\{\(t\)\}\_\{\(p\)\}\\neq f^\{\*\}\_\{\(p^\{\\prime\}\)\}then

28:

c←ω​\(Replace;p,p′\)c\\leftarrow\\omega\(\\textsc\{Replace\};p,p^\{\\prime\}\),

\(p^,z^,u^\)←\(p,Replace,f\(p′\)∗\)\(\\hat\{p\},\\hat\{z\},\\hat\{u\}\)\\leftarrow\(p,\\textsc\{Replace\},f^\{\*\}\_\{\(p^\{\\prime\}\)\}\)⊳\\trianglerightUseReplaceas the fallback

29:else

30:

c←0c\\leftarrow 0,

\(p^,z^,u^\)←\(∅,∅,∅\)\(\\hat\{p\},\\hat\{z\},\\hat\{u\}\)\\leftarrow\(\\varnothing,\\varnothing,\\varnothing\)
31:endif

32:for

j←1j\\leftarrow 1to

a​\(f\(p\)\(t\)\)a\(f^\{\(t\)\}\_\{\(p\)\}\)do

33:

\(cj,p~,z~,u~\)←StateTransition​\(f\(t\),f∗,pj,pj′\)\(c\_\{j\},\\tilde\{p\},\\tilde\{z\},\\tilde\{u\}\)\\leftarrow\\textsc\{StateTransition\}\(f^\{\(t\)\},f^\{\*\},p\_\{j\},p^\{\\prime\}\_\{j\}\)
34:

c←c\+cjc\\leftarrow c\+c\_\{j\}⊳\\trianglerightAccumulate the recursive cost

35:if

p~≠∅\\tilde\{p\}\\neq\\varnothingand

\(p^=∅\(\\hat\{p\}=\\varnothingor

p^=p\)\\hat\{p\}=p\)then

36:

\(p^,z^,u^\)←\(p~,z~,u~\)\(\\hat\{p\},\\hat\{z\},\\hat\{u\}\)\\leftarrow\(\\tilde\{p\},\\tilde\{z\},\\tilde\{u\}\)
37:endif

38:endfor

39:

CostII∗←c\\mathrm\{Cost\}\_\{\\mathrm\{II\}\}^\{\*\}\\leftarrow c,

\(pII∗,zII∗,uII∗\)←\(p^,z^,u^\)\(p\_\{\\mathrm\{II\}\}^\{\*\},z\_\{\\mathrm\{II\}\}^\{\*\},u\_\{\\mathrm\{II\}\}^\{\*\}\)\\leftarrow\(\\hat\{p\},\\hat\{z\},\\hat\{u\}\)
40:endif

41:Stage III: Compare the best direct\-edit plan and the best deferred\-edit plan\.

42:if

CostII∗≤CostI∗\\mathrm\{Cost\}\_\{\\mathrm\{II\}\}^\{\*\}\\leq\\mathrm\{Cost\}\_\{\\mathrm\{I\}\}^\{\*\}then

43:

Cost∗←CostII∗\\mathrm\{Cost\}^\{\*\}\\leftarrow\\mathrm\{Cost\}\_\{\\mathrm\{II\}\}^\{\*\},

\(p∗,z∗,u∗\)←\(pII∗,zII∗,uII∗\)\(p^\{\*\},z^\{\*\},u^\{\*\}\)\\leftarrow\(p\_\{\\mathrm\{II\}\}^\{\*\},z\_\{\\mathrm\{II\}\}^\{\*\},u\_\{\\mathrm\{II\}\}^\{\*\}\)
44:else

45:

Cost∗←CostI∗\\mathrm\{Cost\}^\{\*\}\\leftarrow\\mathrm\{Cost\}\_\{\\mathrm\{I\}\}^\{\*\},

\(p∗,z∗,u∗\)←\(pI∗,zI∗,uI∗\)\(p^\{\*\},z^\{\*\},u^\{\*\}\)\\leftarrow\(p\_\{\\mathrm\{I\}\}^\{\*\},z\_\{\\mathrm\{I\}\}^\{\*\},u\_\{\\mathrm\{I\}\}^\{\*\}\)
46:endif

47:return

\(Cost∗,p∗,z∗,u∗\)\(\\mathrm\{Cost\}^\{\*\},p^\{\*\},z^\{\*\},u^\{\*\}\)

Given the selected edit positionp∗\(t\)p^\{\*\(t\)\}, the corresponding edit contentu∗\(t\)u^\{\*\(t\)\}is defined according to the selected edit actionz∗\(t\)z^\{\*\(t\)\}as follows:

- 1\.Ifz∗\(t\)=Replace, Deletez^\{\*\(t\)\}=\\textsc\{Replace, Delete\}, thenu∗\(t\)=f\(p′⁣∗\(t\)\)∗u^\{\*\(t\)\}=f^\{\*\}\_\{\(p^\{\\prime\*\(t\)\}\)\}\.
- 2\.Ifz∗\(t\)=Insert, Rewritez^\{\*\(t\)\}=\\textsc\{Insert, Rewrite\}, thenu∗\(t\)u^\{\*\(t\)\}is the aligned target subtree atp∗\(t\)p^\{\*\(t\)\}\. Specifically, if\|I∗​\(p′⁣∗\(t\)\)\|≤S\\lvert I^\{\*\}\(p^\{\\prime\*\(t\)\}\)\\rvert\\leq S, thenu∗\(t\)=I∗​\(p′⁣∗\(t\)\)u^\{\*\(t\)\}=I^\{\*\}\(p^\{\\prime\*\(t\)\}\); otherwise,u∗\(t\)=I~∗​\(p′⁣∗\(t\)\)u^\{\*\(t\)\}=\\tilde\{I\}^\{\*\}\(p^\{\\prime\*\(t\)\}\), i\.e\., the budget\-constrained intermediate subtree\.

Note that the state\-transition algorithm does not aim to transformf\(t\)f^\{\(t\)\}intof∗f^\{\*\}in a single step\. Instead, at each non\-terminal state, it determines one supervised triplet\(p∗\(t\),z∗\(t\),u∗\(t\)\)\\bigl\(p^\{\*\(t\)\},z^\{\*\(t\)\},u^\{\*\(t\)\}\\bigr\), which induces a one\-step state transition fromf\(t\)f^\{\(t\)\}tof\(t\+1\)f^\{\(t\+1\)\}throughf\(t\+1\)=𝒯​\(f\(t\),p∗\(t\),z∗\(t\),u∗\(t\)\)f^\{\(t\+1\)\}=\\mathcal\{T\}\\\!\\left\(f^\{\(t\)\},p^\{\*\(t\)\},z^\{\*\(t\)\},u^\{\*\(t\)\}\\right\)\. Repeating this process yields a rectification chain

f\(0\)→f\(1\)→⋯→f\(t\)→⋯→f∗,f^\{\(0\)\}\\to f^\{\(1\)\}\\to\\cdots\\to f^\{\(t\)\}\\to\\cdots\\to f^\{\*\},with the total cost minimized under Eq\.[15](https://arxiv.org/html/2606.07915#S4.E15)\. Algorithm[4](https://arxiv.org/html/2606.07915#alg4)summarizes this process\.

### 4\.4Optimization

The Rectifier loss consists of the Tagger loss and the Editor loss, as follows:

ℒRectifier=ℒTagger\+ℒEditor\.\\mathcal\{L\}\_\{\\mathrm\{Rectifier\}\}=\\mathcal\{L\}\_\{\\mathrm\{Tagger\}\}\+\\mathcal\{L\}\_\{\\mathrm\{Editor\}\}\.\(16\)Here, the Tagger is trained with a position\-wise multi\-class cross\-entropy where the selected positionp∗\(t\)p^\{\*\(t\)\}is supervised by the target actionz∗\(t\)z^\{\*\(t\)\}, while all other positions are supervised asKeep:

ℒTagger\(t\)=\\displaystyle\\mathcal\{L\}\_\{\\mathrm\{Tagger\}\}^\{\(t\)\}=\{\}−log⁡pψ​\(zp∗\(t\)=z∗\(t\)∣f\(t\),h\)\\displaystyle\-\\log p\_\{\\psi\}\\\!\\left\(z\_\{p^\{\*\(t\)\}\}=z^\{\*\(t\)\}\\mid f^\{\(t\)\},h\\right\)\(17\)−∑i≠p∗\(t\)log⁡pψ​\(zi=Keep∣f\(t\),h\),\\displaystyle\\;\-\\sum\_\{i\\neq p^\{\*\(t\)\}\}\\log p\_\{\\psi\}\\\!\\left\(z\_\{i\}=\\textsc\{Keep\}\\mid f^\{\(t\)\},h\\right\),and the total loss on the entire rectification chain is

ℒTagger=∑t=0T−1ℒTagger\(t\)\.\\mathcal\{L\}\_\{\\mathrm\{Tagger\}\}=\\sum\_\{t=0\}^\{T\-1\}\\mathcal\{L\}\_\{\\mathrm\{Tagger\}\}^\{\(t\)\}\.\(18\)
The Editor is supervised directly by the target edit contentu∗\(t\)u^\{\*\(t\)\}, with the one\-step loss

ℒEditor\(t\)=−𝟏​\[z∗\(t\)≠Keep\]​∑j=1\|u∗\(t\)\|log⁡pϕ​\(uj∗\(t\)∣u<j∗\(t\),f~\(t\),h\),\\mathcal\{L\}\_\{\\mathrm\{Editor\}\}^\{\(t\)\}=\-\\mathbf\{1\}\\\!\\left\[z^\{\*\(t\)\}\\neq\\textsc\{Keep\}\\right\]\\sum\_\{j=1\}^\{\|u^\{\*\(t\)\}\|\}\\log p\_\{\\phi\}\\\!\\left\(u\_\{j\}^\{\*\(t\)\}\\mid u\_\{<j\}^\{\*\(t\)\},\\tilde\{f\}^\{\(t\)\},h\\right\),\(19\)and the total loss on the entire rectification chain is

ℒEditor=∑t=0T−1ℒEditor\(t\)\.\\mathcal\{L\}\_\{\\mathrm\{Editor\}\}=\\sum\_\{t=0\}^\{T\-1\}\\mathcal\{L\}\_\{\\mathrm\{Editor\}\}^\{\(t\)\}\.\(20\)For actionsReplaceandDelete, the loss function degenerates into a classification loss\.

Algorithm 4Rectification chain construction algorithm\.0:Initial state

f\(0\)f^\{\(0\)\}, target

f∗f^\{\*\}
1:

t←0t\\leftarrow 0,

𝒞←\[\]\\mathcal\{C\}\\leftarrow\[\\;\]
2:while

f\(t\)≠f∗f^\{\(t\)\}\\neq f^\{\*\}do

3:

\(Cost∗,p∗\(t\),z∗\(t\),u∗\(t\)\)←StateTransition​\(f\(t\),f∗,1,1\)\(\\mathrm\{Cost\}^\{\*\},p^\{\*\(t\)\},z^\{\*\(t\)\},u^\{\*\(t\)\}\)\\leftarrow\\textsc\{StateTransition\}\(f^\{\(t\)\},f^\{\*\},1,1\)⊳\\trianglerightInvoke Algorithm[3](https://arxiv.org/html/2606.07915#alg3)to determine the edit position, action, and content

4:

𝒞←\(𝒞;\(p∗\(t\),z∗\(t\),u∗\(t\)\)\)\\mathcal\{C\}\\leftarrow\(\\mathcal\{C\};\(p^\{\*\(t\)\},z^\{\*\(t\)\},u^\{\*\(t\)\}\)\)
5:

f\(t\+1\)←𝒯​\(f\(t\),p∗\(t\),z∗\(t\),u∗\(t\)\)f^\{\(t\+1\)\}\\leftarrow\\mathcal\{T\}\\\!\\left\(f^\{\(t\)\},p^\{\*\(t\)\},z^\{\*\(t\)\},u^\{\*\(t\)\}\\right\)⊳\\trianglerightExecute the state transition

6:

t←t\+1t\\leftarrow t\+1
7:endwhile

8:return

\(f\(0\),f\(1\),…,f\(T\)\)\(f^\{\(0\)\},f^\{\(1\)\},\\ldots,f^\{\(T\)\}\),

𝒞\\mathcal\{C\}

We train EditSR in two stages\. First, we optimize only the first layer usingℒbase\\mathcal\{L\}\_\{\\mathrm\{base\}\}\(Eq\.[4](https://arxiv.org/html/2606.07915#S4.E4)\) to obtain a strong first\-layer neural model\. After the first layer converges, we freeze its parameters and optimize only the Rectifier by minimizingℒRectifier\\mathcal\{L\}\_\{\\mathrm\{Rectifier\}\}\(Eq\.[16](https://arxiv.org/html/2606.07915#S4.E16)\)\.

In the second stage, we mainly train the Rectifier on artificially constructed rectification chains\. After that, we perform a short fine\-tuning, in which the outputs of the first layer are used as initial states, so that the Rectifier is better aligned with the error patterns encountered during inference\.

### 4\.5Inference

During inference, we apply beam search to the first layer to obtain a set of candidates\{f^i\}i=1B\\\{\\hat\{f\}\_\{i\}\\\}\_\{i=1\}^\{B\}, whereBBis the beam size\. Any candidate that already satisfies the stopping criterion is accepted directly\. Only candidates that fail this check are treated as independent initial states for rectification\.

We adopt a greedy rectification process rather than beam search\. In our framework, evaluating competing states is challenging because different edit actions produce sequences of varying lengths and differing potentials for subsequent rectification\. Furthermore, unlike autoregressive decoding, edit\-based models are not tied to irrevocable decisions since content can be freely rewritten at later steps\. Previous research, such as Levenshtein Transformer\[[12](https://arxiv.org/html/2606.07915#bib.bib78)\], also demonstrates that beam search yields marginal benefits in such scenarios\. Consequently, we employ greedy inference to maintain high computational efficiency\.

Starting from the initial statef\(0\)f^\{\(0\)\}, the Rectifier applies one edit action at each iteration to transform the current statef\(t\)f^\{\(t\)\}to the next state\. Then, we evaluate the numerical error\. The rectification process stops immediately once the error threshold is met\. Otherwise, rectification proceeds until eitherKeepis selected or the step budgetTmaxT\_\{\\max\}is exhausted\. Algorithm[5](https://arxiv.org/html/2606.07915#alg5)outlines a complete rectification process for a given initial state\.

Algorithm 5Rectification algorithm\.0:Dataset

𝒟=\{\(xn,yn\)\}n=1N\\mathcal\{D\}=\\\{\(x\_\{n\},y\_\{n\}\)\\\}\_\{n=1\}^\{N\}, Dataset encoding

hh; initial state

f\(0\)f^\{\(0\)\}; Tagger distribution

pψp\_\{\\psi\}; Editor distribution

pϕp\_\{\\phi\}; maximum rectification steps

TmaxT\_\{\\max\}; stopping threshold

MSEstop\\mathrm\{MSE\}\_\{\\mathrm\{stop\}\}
1:

𝒫←\{f\(0\)\}\\mathcal\{P\}\\leftarrow\\\{f^\{\(0\)\}\\\}
2:for

t=0,1,…,Tmax−1t=0,1,\\ldots,T\_\{\\max\}\-1do

3:Compute

\(p\(t\),z\(t\)\)\(p^\{\(t\)\},z^\{\(t\)\}\)via Algorithm[1](https://arxiv.org/html/2606.07915#alg1)

4:if

z\(t\)=Keepz^\{\(t\)\}=\\textsc\{Keep\}then

5:break⊳\\trianglerightTerminate rectification early

6:endif

7:Compute

u\(t\)u^\{\(t\)\}via Algorithm[2](https://arxiv.org/html/2606.07915#alg2)

8:

f\(t\+1\)←𝒯​\(f\(t\),p\(t\),z\(t\),u\(t\)\)f^\{\(t\+1\)\}\\leftarrow\\mathcal\{T\}\\\!\\left\(f^\{\(t\)\},p^\{\(t\)\},z^\{\(t\)\},u^\{\(t\)\}\\right\)⊳\\trianglerightExecute the state transition

9:

𝒫←𝒫∪\{f\(t\+1\)\}\\mathcal\{P\}\\leftarrow\\mathcal\{P\}\\cup\\\{f^\{\(t\+1\)\}\\\}
10:Apply BFGS to

f\(t\+1\)f^\{\(t\+1\)\}and compute

MSE\(t\+1\)\\mathrm\{MSE\}^\{\(t\+1\)\}⊳\\trianglerightEvaluate the error

11:if

MSE\(t\+1\)≤MSEstop\\mathrm\{MSE\}^\{\(t\+1\)\}\\leq\\mathrm\{MSE\}\_\{\\mathrm\{stop\}\}then

12:return

f\(t\+1\)f^\{\(t\+1\)\}
13:endif

14:endfor

15:return

arg⁡minf∈𝒫⁡MSE​\(f\)\\arg\\min\_\{f\\in\\mathcal\{P\}\}\\mathrm\{MSE\}\(f\)

## 5Data generation

In this section, we present the method used for generating training data\. Each sample is generated in three stages: first, sampling an expression skeleton via a skeleton generator; second, instantiating the skeleton by sampling constants to obtain a parseable expression; and finally, sampling variable values and evaluating the expression to form a dataset\. To improve the model’s generalization, the training set contains 100 million randomly generated skeletons\.

### 5\.1Skeleton generation

Following common practice in symbolic regression\[[4](https://arxiv.org/html/2606.07915#bib.bib35)\], we represent an expression skeleton as a binary tree, where internal nodes are operators and leaf nodes are variables or constants\. To prevent overly large or degenerate structures and to control the diversity of the generated skeletons, we enforce hard limits on the input dimension, the total number of nodes, and the counts of unary operators, binary operators, and constants\. Detailed parameters are presented in Table[7](https://arxiv.org/html/2606.07915#A6.T7)\.

### 5\.2Constant and dataset sampling

For each skeleton, we generate multiple datasets by resampling both the constants and the variables\. Specifically, constants are drawn independently from the distribution in Table[7](https://arxiv.org/html/2606.07915#A6.T7), yielding a parseable expression\. After that, we sampleNNvalues for each variable and compute the corresponding outputs by evaluating the expression\. To make the generated data more robust across different magnitudes, we use a hybrid sampling approach that integrates both linear and logarithmic scales\. Concretely, we first sample two scalars from𝒰​\(−10,10\)\\mathcal\{U\}\(\-10,10\)and sort them to obtain the interval\[a,b\]\[a,b\]\. Then, for each variable, we select one of the following two sampling schemes with equal probability:

- 1\.Linear\-uniform sampling:x∼𝒰​\(a,b\)x\\sim\\mathcal\{U\}\(a,b\)\.
- 2\.Log\-scale sampling:ifaaandbbhave the same sign, we sample the magnitude on a logarithmic scale and keep the sign fixed, i\.e\.,\|x\|∼Log\-​𝒰​\(\|a\|,\|b\|\)\|x\|\\sim\\text\{Log\-\}\\mathcal\{U\}\(\|a\|,\|b\|\)andsign​\(x\)=sign​\(a\)\\mathrm\{sign\}\(x\)=\\mathrm\{sign\}\(a\)\.

During expression evaluation, numerical instabilities may arise from operations such as division, logarithms, or square roots\. If a non\-finite value \(N​a​NNaNorI​n​fInf\) is produced for any sampled point, we replace it with0to keep the generated datasets numerically stable\.

## 6Experimental design

In this section, we describe the experimental design used to evaluate EditSR, including training and testing details, benchmarks, baselines, and metrics\. Together, these settings provide a broad evaluation of EditSR\.

### 6\.1Training details

The parameters during training are provided in Table[8](https://arxiv.org/html/2606.07915#A6.T8)\. In addition to the standard setting, we also randomly add 0–3 distractor variables, as well as noise with levels following𝒰​\(0,0\.1\)\\mathcal\{U\}\(0,0\.1\)\.

### 6\.2Testing details

During testing, EditSR predicts only the expression skeleton, while the constants are optimized afterward by BFGS\. This setting is consistent with the inference pipeline of most neural symbolic regression models \(especially NeSymReS\)\. For large datasets, we adopt the bagging strategy following\[[19](https://arxiv.org/html/2606.07915#bib.bib57)\]\. Specifically, each bag is a subset containing 200 sampled points\. For each test problem, we perform at most 10 bagging runs during evaluation\. This strategy reduces the computational cost on large datasets while preserving the robustness of the test procedure\. Detailed parameter settings are reported in Table[8](https://arxiv.org/html/2606.07915#A6.T8)\.

### 6\.3Benchmarks

We evaluate EditSR on three benchmark categories:

- 1\.Standard benchmarks:We summarize several commonly used benchmarks, including Constant, Koza, Nguyen, Keijzer, Korns, Livermore, Neat and Jin\. The problems in these benchmarks involve at most three variables\.
- 2\.SRBench 1\.0:SRBench 1\.0\[[27](https://arxiv.org/html/2606.07915#bib.bib43)\]is a commonly used benchmark family for symbolic regression\. We utilize two of its widely studied benchmarks: - \(a\)Feynman:A collection of first\-principles physics equations\[[64](https://arxiv.org/html/2606.07915#bib.bib42)\]with sampled datasets, widely used to evaluate symbolic structure recovery and robustness to noise\. - \(b\)ODE\-Strogatz:Nonlinear dynamical\-system datasets derived from coupled first\-order ODEs\. They test recovery of simple governing equations in challenging regimes\[[61](https://arxiv.org/html/2606.07915#bib.bib77)\]\.
- 3\.SRBench 2\.0:SRBench 2\.0\[[17](https://arxiv.org/html/2606.07915#bib.bib1)\]builds upon SRBench 1\.0 by introducing a broader collection of problems\. The benchmark consists of two complementary components: - \(a\)Black\-box:A curated set of black\-box tasks based on SRBench 1\.0\[[27](https://arxiv.org/html/2606.07915#bib.bib43)\]\. Problems that are readily solvable using linear regression are removed so that the benchmark is not skewed toward trivial problems\. - \(b\)Phenomenological & first\-principles:A collection of real\-world scientific discovery problems constructed from experimental observations and physics\-inspired formulations, with realistic levels of noise taken into account\.

Except for the standard benchmarks, for which we manually sample the datasets, all other benchmarks use the officially released datasets\. In Table[6](https://arxiv.org/html/2606.07915#A5.T6), we summarize the statistics of each benchmark\. For all officially released datasets, we follow the public train–test splits\.

### 6\.4Baselines

We compareEditSRwith the following representative baselines:

- 1\.uDSR\[[30](https://arxiv.org/html/2606.07915#bib.bib55)\]: A unified framework that integrates multiple symbolic regression strategies, including recursive problem simplification, risk\-seeking controller, pretraining, genetic programming, and local optimization, yielding strong symbolic regression performance in generating simple expressions\.
- 2\.SR4MDL\[[73](https://arxiv.org/html/2606.07915#bib.bib84)\]: A search\-based framework that introduces the Minimum Description Length \(MDL\) principle into symbolic regression, utilizing a pretrained MDLformer to guide the search process toward parsimonious mathematical forms while balancing numerical fitting and Complexity\.
- 3\.ParFam\[[56](https://arxiv.org/html/2606.07915#bib.bib69)\]: A parametric\-family approach that translates discrete symbolic regression into continuous global optimization over structured function families\. It also proposes a Transformer\-guided variant \(DL\-ParFam\) to accelerate optimization\.
- 4\.RILS\-ROLS\[[21](https://arxiv.org/html/2606.07915#bib.bib70)\]: A metaheuristic method that performs structure search via iterated local search and estimates coefficients in linear components using ordinary least squares, iteratively refining candidate expressions\.
- 5\.TPSR\[[57](https://arxiv.org/html/2606.07915#bib.bib59)\]: A classic post\-hoc rectification strategy that augments a neural symbolic regression model with MCTS during decoding, leveraging non\-differentiable rewards such as error and complexity to guide the underlying Transformer toward globally preferable expressions\.

For all baselines, we follow the parameter settings summarized in Table[9](https://arxiv.org/html/2606.07915#A7.T9)\. For TPSR and SR4MDL, we employ the same bagging strategy as EditSR\.

Table 2:MeanR2R^\{2\}and Complexity results over 10 runs on standard benchmarks, reported as mean±\\pmstandard deviation\. The best and second\-best results are marked inboldandunderlined, respectively\.BenchmarksMetricEditSRuDSRSR4MDLTPSRRILS\-ROLSParFamConstantR2R^\{2\}0\.9975±0\.0014\{\\scriptstyle\\pm 0\.0014\}0\.9538±0\.0458\{\\scriptstyle\\pm 0\.0458\}0\.9847±0\.0058\{\\scriptstyle\\pm 0\.0058\}0\.9533±0\.0389\{\\scriptstyle\\pm 0\.0389\}0\.9785±0\.0185\{\\scriptstyle\\pm 0\.0185\}0\.9710±0\.0270\{\\scriptstyle\\pm 0\.0270\}Complexity11\.92±0\.26\{\\scriptstyle\\pm 0\.26\}31\.71±1\.99\{\\scriptstyle\\pm 1\.99\}17\.14±4\.33\{\\scriptstyle\\pm 4\.33\}30\.62±0\.88\{\\scriptstyle\\pm 0\.88\}21\.71±1\.44\{\\scriptstyle\\pm 1\.44\}84\.21±8\.88\{\\scriptstyle\\pm 8\.88\}JinR2R^\{2\}0\.9812±0\.0007\{\\scriptstyle\\pm 0\.0007\}0\.9475±0\.0005\{\\scriptstyle\\pm 0\.0005\}0\.8762±0\.0692\{\\scriptstyle\\pm 0\.0692\}0\.9845±0\.0269\{\\scriptstyle\\pm 0\.0269\}0\.9344±0\.0054\{\\scriptstyle\\pm 0\.0054\}0\.9124±0\.0225\{\\scriptstyle\\pm 0\.0225\}Complexity12\.28±0\.10\{\\scriptstyle\\pm 0\.10\}38\.17±1\.15\{\\scriptstyle\\pm 1\.15\}20\.67±1\.20\{\\scriptstyle\\pm 1\.20\}27\.22±2\.26\{\\scriptstyle\\pm 2\.26\}19\.39±0\.54\{\\scriptstyle\\pm 0\.54\}81\.67±16\.66\{\\scriptstyle\\pm 16\.66\}KeijzerR2R^\{2\}0\.9853±0\.0004\{\\scriptstyle\\pm 0\.0004\}0\.9259±0\.0218\{\\scriptstyle\\pm 0\.0218\}0\.9550±0\.0106\{\\scriptstyle\\pm 0\.0106\}0\.9895±0\.0056\{\\scriptstyle\\pm 0\.0056\}0\.9841±0\.0053\{\\scriptstyle\\pm 0\.0053\}0\.9416±0\.0052\{\\scriptstyle\\pm 0\.0052\}Complexity14\.31±0\.22\{\\scriptstyle\\pm 0\.22\}18\.18±3\.05\{\\scriptstyle\\pm 3\.05\}18\.07±1\.39\{\\scriptstyle\\pm 1\.39\}32\.86±1\.30\{\\scriptstyle\\pm 1\.30\}19\.48±2\.16\{\\scriptstyle\\pm 2\.16\}74\.36±22\.65\{\\scriptstyle\\pm 22\.65\}KornsR2R^\{2\}0\.6278±0\.0573\{\\scriptstyle\\pm 0\.0573\}0\.5481±0\.0411\{\\scriptstyle\\pm 0\.0411\}0\.8716±0\.1572\{\\scriptstyle\\pm 0\.1572\}0\.3138±0\.0173\{\\scriptstyle\\pm 0\.0173\}0\.5354±0\.0337\{\\scriptstyle\\pm 0\.0337\}0\.5782±0\.0379\{\\scriptstyle\\pm 0\.0379\}Complexity15\.82±0\.26\{\\scriptstyle\\pm 0\.26\}68\.80±6\.79\{\\scriptstyle\\pm 6\.79\}22\.69±2\.20\{\\scriptstyle\\pm 2\.20\}35\.71±1\.85\{\\scriptstyle\\pm 1\.85\}15\.58±3\.52\{\\scriptstyle\\pm 3\.52\}113\.38±50\.49\{\\scriptstyle\\pm 50\.49\}KozaR2R^\{2\}1\.0000±0\.0000\{\\scriptstyle\\pm 0\.0000\}1\.0000±0\.0000\{\\scriptstyle\\pm 0\.0000\}0\.9991±0\.0008\{\\scriptstyle\\pm 0\.0008\}0\.9974±0\.0002\{\\scriptstyle\\pm 0\.0002\}0\.9996±0\.0002\{\\scriptstyle\\pm 0\.0002\}0\.9996±0\.0006\{\\scriptstyle\\pm 0\.0006\}Complexity15\.67±0\.58\{\\scriptstyle\\pm 0\.58\}18\.56±6\.31\{\\scriptstyle\\pm 6\.31\}22\.56±2\.50\{\\scriptstyle\\pm 2\.50\}20\.67±4\.67\{\\scriptstyle\\pm 4\.67\}14\.44±0\.51\{\\scriptstyle\\pm 0\.51\}46\.22±8\.28\{\\scriptstyle\\pm 8\.28\}LivermoreR2R^\{2\}0\.9978±0\.0014\{\\scriptstyle\\pm 0\.0014\}0\.9355±0\.0091\{\\scriptstyle\\pm 0\.0091\}0\.9413±0\.0193\{\\scriptstyle\\pm 0\.0193\}0\.9573±0\.0236\{\\scriptstyle\\pm 0\.0236\}0\.9204±0\.0188\{\\scriptstyle\\pm 0\.0188\}0\.9341±0\.0101\{\\scriptstyle\\pm 0\.0101\}Complexity10\.33±0\.78\{\\scriptstyle\\pm 0\.78\}20\.29±0\.65\{\\scriptstyle\\pm 0\.65\}17\.85±1\.51\{\\scriptstyle\\pm 1\.51\}29\.83±0\.69\{\\scriptstyle\\pm 0\.69\}15\.94±0\.17\{\\scriptstyle\\pm 0\.17\}88\.08±27\.06\{\\scriptstyle\\pm 27\.06\}NeatR2R^\{2\}0\.9985±0\.0003\{\\scriptstyle\\pm 0\.0003\}0\.8903±0\.0044\{\\scriptstyle\\pm 0\.0044\}0\.9631±0\.0527\{\\scriptstyle\\pm 0\.0527\}0\.9975±0\.0008\{\\scriptstyle\\pm 0\.0008\}0\.9477±0\.0384\{\\scriptstyle\\pm 0\.0384\}0\.8848±0\.0209\{\\scriptstyle\\pm 0\.0209\}Complexity11\.62±0\.22\{\\scriptstyle\\pm 0\.22\}21\.04±4\.94\{\\scriptstyle\\pm 4\.94\}63\.83±20\.97\{\\scriptstyle\\pm 20\.97\}26\.58±1\.94\{\\scriptstyle\\pm 1\.94\}19\.50±0\.50\{\\scriptstyle\\pm 0\.50\}89\.29±14\.82\{\\scriptstyle\\pm 14\.82\}NguyenR2R^\{2\}1\.0000±0\.0000\{\\scriptstyle\\pm 0\.0000\}1\.0000±0\.0000\{\\scriptstyle\\pm 0\.0000\}0\.9873±0\.0128\{\\scriptstyle\\pm 0\.0128\}0\.9992±0\.0005\{\\scriptstyle\\pm 0\.0005\}0\.9994±0\.0004\{\\scriptstyle\\pm 0\.0004\}0\.9999±2\.4​e−05\{\\scriptstyle\\pm 2\.4e\-05\}Complexity15\.00±0\.00\{\\scriptstyle\\pm 0\.00\}12\.06±2\.82\{\\scriptstyle\\pm 2\.82\}46\.64±2\.81\{\\scriptstyle\\pm 2\.81\}23\.79±1\.47\{\\scriptstyle\\pm 1\.47\}13\.48±0\.19\{\\scriptstyle\\pm 0\.19\}72\.95±16\.32\{\\scriptstyle\\pm 16\.32\}

### 6\.5Metrics

Recent analyses of symbolic regression benchmarks emphasize that performance should be read as a multi\-objective profile rather than as a single scalar score\. Therefore, we report four complementary metrics to assess EditSR:

- 1\.Noise robustnessmeasures the capability of the model to reconstruct correct expressions when the datasets are contaminated by noise\. We corrupt the clean target values with additive Gaussian noise as follows: y~i=yi\+σ⋅std​\(𝐲\)⋅ϵi,ϵi∼𝒩​\(0,1\),\\tilde\{y\}\_\{i\}=y\_\{i\}\+\\sigma\\cdot\\mathrm\{std\}\(\\mathbf\{y\}\)\\cdot\\epsilon\_\{i\},\\qquad\\epsilon\_\{i\}\\sim\\mathcal\{N\}\(0,1\),\(21\)whereyiy\_\{i\}denotes the original target value,y~i\\tilde\{y\}\_\{i\}is the corresponding corrupted target,std​\(𝐲\)\\mathrm\{std\}\(\\mathbf\{y\}\)is the standard deviation of the target values, andσ\\sigmacontrols the noise intensity\.
- 2\.R2R^\{2\}measures goodness\-of\-fit on the dataset, R2=1−∑i=1n\(yi−y^i\)2∑i=1n\(yi−y¯\)2\.R^\{2\}=1\-\\frac\{\\sum\_\{i=1\}^\{n\}\(y\_\{i\}\-\\hat\{y\}\_\{i\}\)^\{2\}\}\{\\sum\_\{i=1\}^\{n\}\(y\_\{i\}\-\\overline\{y\}\)^\{2\}\}\.\(22\)We treat a prediction as an accurate solution whenR2≥0\.999R^\{2\}\\geq 0\.999\. The Accuracy solution rate is defined as the proportion of problems for which the predicted expression attainsR2≥0\.999R^\{2\}\\geq 0\.999\.
- 3\.Complexityis quantified by the total number of nodes in the expression tree\. When multiple expressions achieve similar fitting performance, the one with lower complexity is considered more desirable\.
- 4\.Symbolic solutionmeasures structural consistency between the predicted and target expressions, following the criterion introduced in SRBench\[[27](https://arxiv.org/html/2606.07915#bib.bib43)\]: ###### Definition 1\. A predicted expressionf^\\hat\{f\}is defined as a symbolic solution to a problem with target expressionffiff^\\hat\{f\}cannot be simplified to a constant and one of the following conditions is met: \(i\)f=f^\+αf=\\hat\{f\}\+\\alphafor some constantα\\alpha; or \(ii\)f=f^/βf=\\hat\{f\}/\\betafor some nonzero constantβ\\beta\. Accordingly, theSymbolic solution ratedenotes the percentage of problems whose predicted expressions satisfy this criterion\.

## 7Results

In this section, we first report EditSR’s evaluation results across benchmarks to clarify which metrics it is competitive on and whether it achieves the desired balance across them\. Finally, the ablation studies analyze why the Rectifier is effective and under which conditions it is most beneficial\.

### 7\.1Results on standard benchmarks

In this section, we evaluate EditSR on the standard benchmarks\. Following\[[41](https://arxiv.org/html/2606.07915#bib.bib6)\], we sample 200 points for each problem to form the dataset\. This protocol covers a diverse set of sampling settings, including uniform sampling, equally spaced sampling, narrow ranges, and wide ranges, which provide a sufficiently broad test of models’ robustness\. Moreover, according to\[[41](https://arxiv.org/html/2606.07915#bib.bib6)\], the training and test sets are sampled independently from different ranges\. This means that the benchmark naturally contains both interpolation and extrapolation cases, so we do not treat extrapolation as a separate evaluation scenario\.

Table[2](https://arxiv.org/html/2606.07915#S6.T2)reports the meanR2R^\{2\}and Complexity results\. EditSR remains in the leading group in meanR2R^\{2\}across most benchmarks, often ranking first or second\. Concurrently, it usually generates simpler expressions\. TPSR attains the highest meanR2R^\{2\}on Jin and Keijzer, but typically does so with higher Complexity\. SR4MDL also returns simple expressions on several benchmarks, which is consistent with its objective of aligning search with symbolic rather than purely numerical fitting\. ParFam is flexible but often generates complex expressions when faced with difficult problems\. Overall, the results demonstrate that when EditSR improvesR2R^\{2\}, this benefit is usually not accompanied by an increase in Complexity\.

Fig\.[4](https://arxiv.org/html/2606.07915#S7.F4)reports the Accuracy solution rate and Symbolic solution rate on the standard benchmarks\. EditSR is one of the most stable models across these benchmarks, as its Symbolic solution rate usually stays close to its Accuracy solution rate on the same benchmark\. This phenomenon indicates that EditSR primarily improves structural recovery, as expected, since the Rectifier always edits an incorrect expression toward the target symbolic structure\. Some baselines still achieve strong results on particular metrics and benchmarks\. On the Accuracy solution rate, TPSR performs best on Jin and Keijzer, and also stays near the top on Nguyen\. uDSR also remains close to EditSR on Constant, Koza, and Nguyen\. On the Symbolic solution rate, uDSR is the best baseline on Constant and matches EditSR on Koza, while SR4MDL and RILS\-ROLS give relatively strong results on Jin and Korns\. However, for most baselines, the Symbolic solution rate falls clearly below the Accuracy solution rate, indicating that a good numerical fit does not translate into equally reliable symbolic structure recovery\. By contrast, EditSR more consistently keeps the two metrics close across benchmarks\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/accuracy_solution_rate_stand_benchmark.png)\(a\)Accuracy solution rate
![Refer to caption](https://arxiv.org/html/2606.07915v1/symbolic_solution_rate_stand_benchmark.png)\(b\)Symbolic solution rate

Figure 4:Accuracy solution rate and Symbolic solution rate results on standard benchmarks\.The results are the mean of 10 runs, and the error bars denote the standard deviation\.To measure inference efficiency, we report the test time of models on the standard benchmarks\. As shown in Table[3](https://arxiv.org/html/2606.07915#S7.T3), EditSR has the lowest test time in this comparison, which is consistent with the design choice of shifting most rectification effort to pretraining\. RILS\-ROLS is the next most efficient baseline, whereas search\-heavy or repeatedly optimized models require substantially more time before returning a final expression\. TPSR, as another post\-hoc rectification model, incurs much longer runtime than EditSR\. This result highlights a practical limitation of traditional rectification strategies based on restarting global search, i\.e\., they dilute the efficiency advantage of the neural model, which we will discuss further in the ablation studies\.

Table 3:Mean test time on standard benchmarks\.ModelTest Time \(s\)EditSR17\.03uDSR77\.99SR4MDL765\.03ParFam367\.18RILS\-ROLS26\.46TPSR174\.24Noise robustness is a critical metric for assessing whether a symbolic regression model is suitable for real\-world problems, as observed data, constrained by factors such as sensor precision and statistical errors, are rarely noise\-free\. Fig\.[5](https://arxiv.org/html/2606.07915#S7.F5)shows the empirical cumulative distribution function \(ECDF\) ofR2R^\{2\}at the 0, 0\.001, 0\.01, and 0\.1 noise levels\. Each curve shows the proportion of problems withR2R^\{2\}below a given threshold\. As expected, the curves of all models move away from the high\-R2R^\{2\}region as noise increases\. Even so, EditSR remains among the more right\-shifted distributions at all noise levels, which means that a relatively large proportion of problems still reaches highR2R^\{2\}\. SR4MDL and ParFam place a visible proportion of problems nearR2≈1R^\{2\}\\\!\\approx\\\!1at the 0\.001 noise level, but their curves rise earlier as noise increases\. uDSR, TPSR, and RILS\-ROLS degrade less sharply than several other baselines, but they still show a clearer leftward shift than EditSR, especially at the 0\.1 noise level\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/ecdf_r2_noise0.png)\(a\)Noise level0\.
![Refer to caption](https://arxiv.org/html/2606.07915v1/ecdf_r2_noise0001.png)\(b\)Noise level0\.0010\.001\.
![Refer to caption](https://arxiv.org/html/2606.07915v1/ecdf_r2_noise01.png)\(c\)Noise level0\.010\.01\.
![Refer to caption](https://arxiv.org/html/2606.07915v1/ecdf_r2_noise1.png)\(d\)Noise level0\.10\.1\.

Figure 5:ECDF of meanR2R^\{2\}on standard benchmarks\.The results show the mean over 10 runs under Gaussian noise levels of 0, 0\.001, 0\.01, and 0\.1, respectively\.In real\-world scientific discovery scenarios, observational datasets often contain measured variables unrelated to the governing equations, which poses a practical challenge for symbolic regression\. Therefore, we evaluate the models’ robustness to irrelevant variables on the standard benchmarks\. For each problem, we appendk∈\{1,2,3\}k\\in\\\{1,2,3\\\}distractor variables to both the training and test sets\. Each distractor is sampled independently, but it reuses the marginal range of a randomly selected genuine variable from the same problem, so the perturbation remains distributionally plausible\. We pool all standard benchmarks except Korns, where all models perform poorly, and report the aggregate results\. Table[4](https://arxiv.org/html/2606.07915#S7.T4)reports three metrics: Accuracy solution rate, Symbolic solution rate, and distractor usage rate\. The distractor usage rate measures whether the predicted expression contains at least one variable that does not appear in the target expression\. As the number of distractors increases, the task overall becomes harder\. TPSR and uDSR achieve strong Accuracy solution rates, especially fork=2k=2andk=3k=3, but they also rely more heavily on distractors, which is accompanied by a clearer degradation in their Symbolic solution rates\. By contrast, EditSR maintains the strongest Symbolic solution rate across all settings while using substantially fewer distractors than the baselines, indicating that its robustness relies less on absorbing spurious inputs into the expression\. Several baselines remain competitive in terms of the Accuracy solution rate, so the distractors do not reduce the task to random search\. However, EditSR more consistently preserves symbolic structure recovery under feature perturbations\. In scientific discovery tasks, this behavior is desirable because a high\-quality symbolic model should remain dependent on the relevant variables that actually support the governing relation rather than merely matching the observed responses numerically\.

Table 4:Distractor robustness results\. For each model and distractor count, we report the mean and standard deviation across 10 runs of Accuracy solution rate \(ASR\), Symbolic solution rate \(SSR\), and distractor usage rate \(DUR\)\. The best and second\-best results in each column are marked inboldandunderlined, respectively\.ModelMetricNo\. distractors123EditSRASR \(%\)77\.94±\\pm3\.8972\.06±\\pm2\.5565\.69±\\pm2\.25DUR \(%\)2\.45±\\pm3\.064\.41±\\pm2\.9413\.73±\\pm2\.25SSR \(%\)61\.76±\\pm5\.8855\.88±\\pm3\.8948\.53±\\pm4\.41uDSRASR \(%\)71\.17±\\pm0\.7870\.27±\\pm1\.3564\.86±\\pm2\.70DUR \(%\)29\.19±\\pm1\.3538\.20±\\pm2\.8145\.41±\\pm1\.35SSR \(%\)58\.56±\\pm3\.1251\.80±\\pm2\.0646\.40±\\pm2\.06SR4MDLASR \(%\)66\.23±\\pm1\.8966\.07±\\pm2\.0960\.59±\\pm2\.09DUR \(%\)23\.87±\\pm5\.3244\.29±\\pm3\.4564\.38±\\pm3\.62SSR \(%\)20\.17±\\pm2\.7517\.35±\\pm0\.7916\.44±\\pm1\.37TPSRASR \(%\)73\.83±\\pm2\.8176\.13±\\pm3\.9071\.62±\\pm1\.35DUR \(%\)70\.50±\\pm0\.7868\.65±\\pm0\.0078\.20±\\pm0\.78SSR \(%\)9\.91±\\pm4\.7513\.06±\\pm2\.0613\.06±\\pm0\.78RILS\-ROLSASR \(%\)74\.89±\\pm2\.8572\.15±\\pm2\.8570\.32±\\pm0\.79DUR \(%\)7\.76±\\pm2\.098\.68±\\pm4\.8118\.76±\\pm4\.40SSR \(%\)28\.77±\\pm1\.3728\.31±\\pm2\.0926\.48±\\pm2\.09ParFamASR \(%\)66\.76±\\pm1\.3562\.40±\\pm5\.2655\.01±\\pm5\.57DUR \(%\)44\.14±\\pm0\.7822\.14±\\pm5\.6855\.28±\\pm3\.90SSR \(%\)13\.66±\\pm1\.567\.01±\\pm2\.616\.38±\\pm0\.12

### 7\.2Results on SRBench 1\.0

In this section, we report the results on SRBench 1\.0, including Feynman and ODE\-Strogatz benchmarks, to analyze whether the symbolic structure recovery advantage observed for EditSR on standard benchmarks extends to physical equations\. Each experiment is repeated 10 times\. In addition to the baselines defined earlier, we include several widely used models reported in SRBench 1\.0 so that the comparison covers a broader set of established symbolic regression approaches\. For a fair comparison, all models are evaluated under the same dataset splitting scheme\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/x1.png)\(a\)Feynman benchmark\.
![Refer to caption](https://arxiv.org/html/2606.07915v1/x2.png)\(b\)ODE\-Strogatz benchmark\.

Figure 6:Results on Feynman and ODE\-Strogatz benchmarks\.Models are ordered from top to bottom by their Accuracy solution rate and Symbolic solution rate\. Each point summarizes the mean result of 10 runs, and the error bars denote 95% bootstrap confidence intervals\.The results on the Feynman benchmark under three noise levels are reported in Fig\.[6\(a\)](https://arxiv.org/html/2606.07915#S7.F6.sf1)\. For the Accuracy solution rate, EditSR remains close to 80% at all noise levels, and shows only a limited drop at higher noise levels\. Operon and RILS\-ROLS are also strong on the Accuracy solution rate, demonstrating similar noise robustness\. By contrast, AIFeynman, MRGP, uDSR, and ParFam decline more clearly as the noise level increases\. The same phenomenon is observed for the Symbolic solution rate\. EditSR exceeds 50% consistently across noise levels\. RILS\-ROLS is the closest baseline, but it still falls short of EditSR\. Operon, GP\-GOMEA, AIFeynman, and uDSR achieve outstanding Symbolic solution rates at the 0 noise level, but decrease more as noise increases\. In addition, the Complexity results show that EditSR does not achieve the above advantage by increasing expression complexity, but instead remains within a relatively low complexity range\. Overall, EditSR maintains a favorable balance among the three reported metrics on the Feynman benchmark\. At the same time, its performance degrades only modestly as the noise level increases, which may be related to the noise perturbations introduced during training\. Such behavior is particularly relevant in scientific discovery scenarios\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/black_r2.png)\(a\)
![Refer to caption](https://arxiv.org/html/2606.07915v1/black_complexity.png)\(b\)
![Refer to caption](https://arxiv.org/html/2606.07915v1/first_principles_r2.png)\(c\)
![Refer to caption](https://arxiv.org/html/2606.07915v1/first_principles_complexity.png)\(d\)

Figure 7:MeanR2R^\{2\}and Complexity results on Black\-box and Phenomenological & first\-principles benchmarks\.Each point corresponds to the mean over 10 runs for each problem\. In each rain\-cloud plot, the cloud shows the distribution density, the embedded box summarizes the median and interquartile range, and the points show the individual problem results\.Overall, the results across these two benchmarks suggest that EditSR maintains a favorable balance among the Accuracy solution rate, Symbolic solution rate, and Complexity\. Although some baselines outperform EditSR on specific metrics or noise levels, they usually incur one of three trade\-offs: they produce substantially more complex expressions, their Symbolic solution rate falls more sharply than their Accuracy solution rate as noise increases, or their confidence intervals are visibly wider\. By contrast, EditSR remains competitive across all three metrics and shows a comparatively stable profile across noise levels\. This balance is desirable in scientific discovery scenarios because a useful expression should be accurate, structurally reasonable, simple, and stable, rather than strong on only one metric\.

The results on the ODE\-Strogatz benchmark \(Fig\.[6\(b\)](https://arxiv.org/html/2606.07915#S7.F6.sf2)\) are lower than those on the Feynman benchmark for most models, including EditSR\. This result may be partly attributable to the fact that the ODE\-Strogatz benchmark is built from dynamical systems and uses narrower sampling ranges\. Even so, EditSR remains among the strongest models on both Accuracy solution rate and Symbolic solution rate\. On the Accuracy solution rate, several baselines, including RILS\-ROLS, uDSR, GP\-GOMEA, SR4MDL, Operon, and SBP\-GP, are competitive at the 0 noise level, but their results drop more as the noise level increases\. In contrast, EditSR changes less across all noise levels and is among the strongest models at the 0\.1 noise level\. Moreover, the expressions predicted by EditSR remain simple\. On the Symbolic solution rate, EditSR also achieves competitive results, with RILS\-ROLS as the closest competing baseline\. uDSR, GP\-GOMEA, and SR4MDL all outperform most baselines at the 0 noise level, but they exhibit weaker robustness and degrade rapidly in noise scenarios\. Taken together, these results suggest that EditSR remains relatively robust on this benchmark family\. Even when the dataset is sparse and more challenging than the training setting, its performance remains comparatively stable\.

### 7\.3Results on SRBench 2\.0

In this section, we report results on the Phenomenological & first\-principles and Black\-box benchmarks\. We report two metrics evaluated on SRBench 2\.0,R2R^\{2\}and Complexity, to facilitate a fair comparison\. The distributions shown below are based on the mean over 10 runs\. For high\-dimensional problems, we adopt the feature selection strategy suggested in SRBench 2\.0 and compress the dimensionality to three\.

As shown in Figs\.LABEL:fig:srbench\_black\_r2andLABEL:fig:srbench\_black\_complexity, EditSR exhibits one of the strongest trade\-offs betweenR2R^\{2\}and Complexity on the Black\-box benchmark\. In the meanR2R^\{2\}distribution, EditSR results fall in the mid\-to\-high range, with many problems concentrated around 0\.4–1\.0\. RILS\-ROLS reaches similarly strong, and sometimes higher,R2R^\{2\}on some problems, but its Complexity distribution is less concentrated and more often extends to complex expressions\. By contrast, the Complexity of EditSR stays clustered in a relatively low range\. Overall, the Black\-box benchmark remains challenging, as none of the models show anR2R^\{2\}distribution concentrated near perfection\. However, EditSR more consistently avoids the combination of very low meanR2R^\{2\}and very high Complexity, which makes its overall trade\-off comparatively favorable on this benchmark\.

Figs\.LABEL:fig:srbench\_firstprinciples\_r2andLABEL:fig:srbench\_firstprinciples\_complexityshow that, on the Phenomenological & first\-principles benchmark, EditSR can generate simple expressions for most problems while achieving a robustR2R^\{2\}distribution\. Its meanR2R^\{2\}values are concentrated in the upper range, with most problems above 0\.95\. RILS\-ROLS and TPSR reach higher meanR2R^\{2\}on some problems, but they often generate longer expressions or exhibit significant performance fluctuations across different problems\. Overall, this benchmark remains challenging for all models because the datasets are noisy and often extremely sparse\. Under this scenario, several candidate expressions can remain numerically plausible simultaneously, thereby weakening the signal for local rectification\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/r2_NeSymReS_vs_EditSR.png)\(a\)MeanR2R^\{2\}distribution
![Refer to caption](https://arxiv.org/html/2606.07915v1/complexity_NeSymReS_vs_EditSR.png)\(b\)Mean Complexity distribution
![Refer to caption](https://arxiv.org/html/2606.07915v1/accuracy_solution_rate_NeSymReS_vs_EditSR.png)\(c\)Accuracy solution rate
![Refer to caption](https://arxiv.org/html/2606.07915v1/symbolic_solution_rate_NeSymReS_vs_EditSR.png)\(d\)Symbolic solution rate

Figure 8:Ablation results of the Rectifier on the Feynman benchmark\.Results are averaged over 5 runs, with standard deviation shown when applicable\.
### 7\.4Ablation studies

In this section, we analyze the Rectifier’s role\. Specifically, we investigate the sources of its performance improvements and the scenarios in which they are most significant\. Finally, we analyze the Rectifier’s sensitivity to the first layer to examine whether it can adapt to different error patterns through fine\-tuning\. We conduct the ablation experiments on the Feynman benchmark because it spans a broad range of difficulties, from simple to complex expressions and from low\-dimensional to high\-dimensional scenarios\. Each experiment is repeated 5 times\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/accuracy_solution_rate_by_true_complexity.png)\(a\)Accuracy solution rate\.
![Refer to caption](https://arxiv.org/html/2606.07915v1/symbolic_solution_rate_by_true_complexity.png)\(b\)Symbolic solution rate\.

Figure 9:Effect of the Rectifier across complexity levels\.Error bars denote standard deviation over 5 runs\. Problems are grouped into 5 buckets according to target expression complexity\.#### 7\.4\.1Rectifier ablation analysis

In this section, we evaluate the benefits of the proposed Rectifier by comparing the outputs of NeSymReS with those of EditSR \(NeSymReS \+ Rectifier\)\. To analyze the necessity of fine\-tuning, two versions of the Rectifier are developed: one fine\-tuned and one not fine\-tuned\. The latter is designated as EditSR′\.

As shown in Fig\.[8](https://arxiv.org/html/2606.07915#S7.F8), adding the Rectifier leads to consistent gains across the reported metrics\. The largest gains occur in the Accuracy solution rate and the Symbolic solution rate\. TheR2R^\{2\}and Complexity distributions further suggest that NeSymReS often returns overly simple expressions that fail to satisfyR2≥0\.999R^\{2\}\\geq 0\.999, indicating that it may stop with structurally incomplete expressions on harder problems\. Therefore, the Complexity distribution of EditSR is somewhat higher, which does not mean that EditSR is more inclined to generate complex expressions; rather, it reflects that EditSR can address cases that NeSymReS does not fully generate due to early stopping\. Moreover, we observe that NeSymReS fails on many problems, as indicated byR2<0\.95R^\{2\}<0\.95, whereas EditSR noticeably reduces the number of such failures, suggesting that the Rectifier can help recover a subset of difficult cases\. Importantly, EditSR′already outperforms NeSymReS on multiple metrics, indicating that training on artificially constructed rectification chains is sufficient to endow the Rectifier with a basic ability to repair local structural errors\. However, the additional gains of EditSR over EditSR′show that such pretraining alone is not sufficient to match the error patterns encountered during inference fully, so fine\-tuning is still indispensable\.

To study how the Rectifier’s benefit changes with problem difficulty, we divide the benchmark into five groups based on the complexity of the target expressions\. Fig\.[9](https://arxiv.org/html/2606.07915#S7.F9)reports the Accuracy solution rate and Symbolic solution rate for NeSymReS, EditSR′and EditSR in each group\. Both metrics decrease as complexity increases for all models, confirming that longer expression generation remains harder\. In the very low and low complexity groups, NeSymReS and EditSR are still relatively close\. However, from the medium complexity group onward, NeSymReS declines more clearly, even dropping to 0% Symbolic solution rate in the very high complexity group\. In contrast, EditSR maintains higher levels of both Accuracy solution rate and Symbolic solution rate\. Overall, the gap between NeSymReS and EditSR becomes progressively larger as complexity increases, which suggests that the Rectifier is particularly useful for generating long expressions\. This phenomenon is consistent with the intuition that generating long expressions is more prone to errors during one\-pass autoregressive decoding\.

#### 7\.4\.2Rectification step budget analysis

In this section, we examine the internal behavior of the rectification process, focusing on the sensitivity of the rectification step budgetTmaxT\_\{\\max\}and how the expression evolves after being edited\. These statistics help clarify how many steps are typically needed during inference\.

Fig\.[10](https://arxiv.org/html/2606.07915#S7.F10)reports the distribution of the number of edit steps required by successful rectification cases\. Successful rectification usually requires only 4–6 edit steps, whereas long edit steps are rare\. This observation supports two conclusions\. First, the expressions predicted by NeSymReS are often not far from the target expressions, which is consistent with our core assumption: even when the prediction is imperfect, it retains partial structural information, so only a few edits are often sufficient, rather than restarting the search process from scratch in every case\. Second, the benefit of long rectification chains is limited\. As the number of edit steps increases, the rectification process is more likely to deviate from the correct trajectory, thus making it harder to reach the target expression\. Therefore, during inference, we typically set the rectification step budgetTmaxT\_\{\\max\}to 10\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/edit_steps_ratio.png)Figure 10:Distribution of effective edit steps used by the Rectifier\.The results are first averaged across the beams, and then across 5 runs\.In Fig\.[11](https://arxiv.org/html/2606.07915#S7.F11), we track how the normalized edit distance111The normalized edit distance was first proposed by\[[39](https://arxiv.org/html/2606.07915#bib.bib49)\]to evaluate the discrepancy between two expressions\.betweenf\(t\)f^\{\(t\)\}andf∗f^\{\*\}changes with the rectification steps\. Here, the normalized edit distance is defined as

E​Dnorm​\(f\(t\),f∗\)=ED​\(f\(t\),f∗\)max⁡\(\|f\(t\)\|,\|f∗\|\),ED\_\{\\mathrm\{norm\}\}\\\!\\left\(f^\{\(t\)\},f^\{\*\}\\right\)=\\frac\{\\mathrm\{ED\}\\\!\\left\(f^\{\(t\)\},f^\{\*\}\\right\)\}\{\\max\\\!\\left\(\\left\|f^\{\(t\)\}\\right\|,\\left\|f^\{\*\}\\right\|\\right\)\},\(23\)whereED​\(⋅,⋅\)\\mathrm\{ED\}\(\\cdot,\\cdot\)denotes the token\-level edit distance, and\|⋅\|\|\\cdot\|denotes the sequence length\. The distribution moves downward as the edit step increases, with the median distance dropping from 0\.64 at step 1 to nearly 0 at step 7, and the spread narrowing thereafter\. Therefore, the aggregate trend is favorable, although some problems still fail to converge\. In addition, some cases still fail to converge after the rectification step budget is exhausted, and a few even move farther from the target expression, further showing that a larger rectification step budget is not always better; rather, it is a trade\-off between cost and benefit\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/avg_norm_edit_distance_by_edit_step.png)Figure 11:Change in normalized edit distance over rectification steps\.Boxplots summarize the distribution of the mean normalized edit distance at each edit step, with 30% of individual problems randomly sampled and overlaid as points\.To better understand how the Rectifier behaves in practice, we analyze both the relative frequency and the effect of different edit actions\. The former indicates which edit actions are most often selected during rectification, while the latter quantifies how much each action movesf\(t\)f^\{\(t\)\}towardf∗f^\{\*\}via normalized edit distance\. Fig\.[12\(a\)](https://arxiv.org/html/2606.07915#S7.F12.sf1)shows thatInsertis the most frequent action, followed byRewrite, whereasReplaceandDeleteare much less common\. This phenomenon matches the error profile observed earlier: NeSymReS more often produces structurally incomplete expressions than redundant ones\. As shown in Fig\.[12\(b\)](https://arxiv.org/html/2606.07915#S7.F12.sf2),Inserthas the largest median reduction in normalized edit distance, suggesting that adding missing operators, constants, variables, or local subtrees is often the most effective rectification\.Rewritealso contributes, but with a broader distribution\. By contrast,Replaceis infrequent and has a smaller median effect, suggesting that single\-token replacements are usually insufficient for the dominant error patterns\.Delete, despite being rare, still yields a positive rectification effect\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/action_usage_proportion.png)\(a\)Frequency of different edit actions\.
![Refer to caption](https://arxiv.org/html/2606.07915v1/distance_change.png)\(b\)Distribution of the reduction in normalized edit distance resulting from different actions\.

Figure 12:Action frequency and effectiveness of the Rectifier\.The results treat all repeated runs as independent instances, rather than averaging them\.
#### 7\.4\.3Robustness to the first layer

In this section, we examine whether the Rectifier remains effective when the first\-layer error pattern shifts\. To this end, we construct a family of NeSymReS variants by training them with different dropout rates\{0\.1,0\.2,0\.3\}\\\{0\.1,0\.2,0\.3\\\}\. For each converged NeSymReS variant, we fine\-tune the Rectifier on rectification chains constructed from its predictions as initial states\. In this controlled robustness experiment, dropout remains active during inference so that the forward passes induce additional perturbations\. For each setting, we report the Complexity, Symbolic solution rate and Accuracy solution rate results\.

As shown in Table[5](https://arxiv.org/html/2606.07915#S7.T5), the small performance fluctuations across dropout levels indicate that, after sufficient fine\-tuning, the Rectifier is robust to these induced shifts in first\-layer error patterns\. Its final performance appears to depend more strongly on its own optimization quality than on differences in the upstream neural model\. This observation is encouraging for practical adaptation, because it suggests that the Rectifier may be adapted to closely related neural models through interface alignment and Rectifier fine\-tuning, without necessarily retraining the entire symbolic regression system\. We further discuss the corresponding assumptions in[B](https://arxiv.org/html/2606.07915#A2)\.

Table 5:Effect of the Rectifier under different first\-layer error patterns\.Results are reported as mean±\\pmstandard deviation over 5 runs\.DropoutAccuracy solution rate \(%\)Symbolic solution rate \(%\)Complexity0\.179\.38±\\pm1\.8460\.11±\\pm2\.0311\.68±\\pm0\.210\.276\.11±\\pm2\.1056\.78±\\pm1\.2711\.96±\\pm0\.410\.378\.06±\\pm1\.7359\.17±\\pm2\.5011\.77±\\pm0\.52
#### 7\.4\.4Convergence analysis of fine\-tuning

We analyze the convergence behavior of EditSR during fine\-tuning\. Using the predictions of NeSymReS as the initial states of the supervised rectification chains, we fine\-tune the Rectifier for 5 epochs and evaluate it on the validation set every 0\.5 epoch\. The Tagger is evaluated using action\-prediction accuracy, while the Editor is evaluated by content\-prediction accuracy for each edit action\. Concretely, for a mini\-batch of sizeB​SBS, letn∈\{1,…,B​S\}n\\in\\\{1,\\dots,BS\\\}index the samples in the batch, and letLn\(t\)L\_\{n\}^\{\(t\)\}denote the length of the current expression of thenn\-th sample at rectification steptt\. The Tagger action\-prediction accuracy is computed by:

AccTagger\(t\)=∑n=1B​S∑i=1Ln\(t\)𝟏​\[z^n,i\(t\)=zn,i∗\(t\)\]∑n=1B​SLn\(t\),\\mathrm\{Acc\}\_\{\\mathrm\{Tagger\}\}^\{\(t\)\}=\\frac\{\\sum\_\{n=1\}^\{BS\}\\sum\_\{i=1\}^\{L\_\{n\}^\{\(t\)\}\}\\mathbf\{1\}\\\!\\left\[\\hat\{z\}\_\{n,i\}^\{\(t\)\}=z\_\{n,i\}^\{\*\(t\)\}\\right\]\}\{\\sum\_\{n=1\}^\{BS\}L\_\{n\}^\{\(t\)\}\},wherez^n,i\(t\)\\hat\{z\}\_\{n,i\}^\{\(t\)\}andzn,i∗\(t\)z\_\{n,i\}^\{\*\(t\)\}are the predicted and target edit actions at positionii, respectively\. For the Editor, the content\-prediction accuracy is computed separately for each edit action\. Let

ℬz\(t\)=\{n∈\{1,…,B​S\}:zn∗\(t\)=z\}\\mathcal\{B\}\_\{z\}^\{\(t\)\}=\\\{\\,n\\in\\\{1,\\dots,BS\\\}:z\_\{n\}^\{\*\(t\)\}=z\\,\\\}denote the subset of samples in the batch whose target edit action iszz\. Then the corresponding Editor accuracy is defined as

AccEditor\(t\)​\(z\)=∑n∈ℬz\(t\)𝟏​\[𝐮^n\(t\)=𝐮n∗\(t\)\]\|ℬz\(t\)\|,\\mathrm\{Acc\}\_\{\\mathrm\{Editor\}\}^\{\(t\)\}\(z\)=\\frac\{\\sum\_\{n\\in\\mathcal\{B\}\_\{z\}^\{\(t\)\}\}\\mathbf\{1\}\\\!\\left\[\\hat\{\\mathbf\{u\}\}\_\{n\}^\{\(t\)\}=\\mathbf\{u\}\_\{n\}^\{\*\(t\)\}\\right\]\}\{\|\\mathcal\{B\}\_\{z\}^\{\(t\)\}\|\},where𝐮^n\(t\)\\hat\{\\mathbf\{u\}\}\_\{n\}^\{\(t\)\}and𝐮n∗\(t\)\\mathbf\{u\}\_\{n\}^\{\*\(t\)\}are the predicted and target edit contents, respectively\. ForDeleteandReplace, the edit content degenerates to a single token, whereas forInsertandRewrite, it corresponds to a generated subtree\.

As shown in Fig\.[13](https://arxiv.org/html/2606.07915#S7.F13), the Tagger converges smoothly and reaches more than 90% validation accuracy in later stages\. The Editor branches show a similar trend\. The single\-token actions,DeleteandReplace, reach high accuracy quickly\. The subtree\-generation actions,InsertandRewrite, are slightly harder but remain around 90% accuracy\. Overall, these curves indicate stable convergence within a few fine\-tuning epochs\. Moreover, we observe that all accuracy curves start above 60%, which suggests that the large\-scale pretraining of the Rectifier has already established a strong initialization and endowed it with the basic rectification capability before fine\-tuning for a specific neural model\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/tagger_acc_val_acc_curve_step.png)\(a\)Tagger
![Refer to caption](https://arxiv.org/html/2606.07915v1/delete_val_acc_curve_step.png)\(b\)Deleteof Editor
![Refer to caption](https://arxiv.org/html/2606.07915v1/replace_val_acc_curve_step.png)\(c\)Replaceof Editor
![Refer to caption](https://arxiv.org/html/2606.07915v1/rewrite_val_acc_curve_step.png)\(d\)Rewriteof Editor
![Refer to caption](https://arxiv.org/html/2606.07915v1/insert_val_acc_curve_step.png)\(e\)Insertof Editor

Figure 13:Validation accuracy curves of the Rectifier during fine\-tuning\.The Rectifier is fine\-tuned for 5 epochs and evaluated on the validation set every 0\.5 epoch\.
#### 7\.4\.5Successful and failed case analysis

Fig\.[14](https://arxiv.org/html/2606.07915#S7.F14)contrasts four successful rectification trajectories with two failure cases to help clarify the regime where EditSR is most beneficial\. In successful cases, the target expressions are structurally nontrivial, and the initial predictions already contain the main variable scaffold or part of the symbolic structure\. Rectification is not strictly monotonic at the level of individual edits\. Some intermediate actions temporarily increase the normalized edit distance\. This behavior is natural for multi\-step structural rectifications\. Since each decision is conditioned on the current state rather than the whole edit history, the Rectifier is not forced to preserve a myopic locally best trajectory at every step\. Instead, it can use an intermediate edit to expose a more suitable context for the subsequent step, and then recover the target structure through later rectifications\. To more clearly analyze the scenarios where the Rectifier demonstrates advantages, we present additional successful rectification cases in[H](https://arxiv.org/html/2606.07915#A8)\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/II.13.34.png)
![Refer to caption](https://arxiv.org/html/2606.07915v1/I.32.5.png)
![Refer to caption](https://arxiv.org/html/2606.07915v1/II.11.20.png)
![Refer to caption](https://arxiv.org/html/2606.07915v1/III.10.19.png)
![Refer to caption](https://arxiv.org/html/2606.07915v1/I.34.1.png)
![Refer to caption](https://arxiv.org/html/2606.07915v1/I.32.17.png)

Figure 14:Representative successful and failed rectification cases of EditSR\.Each subplot shows the normalized edit distance betweenf\(t\)f^\{\(t\)\}andf∗f^\{\*\}across rectification steps, together with the selected edit action and the corresponding intermediate state\. The first four cases show the dominant regime in which the first\-layer prediction already provides a plausible structural scaffold, and the Rectifier recovers missing powers, factors, denominator terms, or function arguments through a short sequence of bounded edits\. The last two cases illustrate the applicability boundary of bounded rectification\. Although some edits still reduce part of the discrepancy, the large distance between the first\-layer prediction and the target expression limits the Rectifier’s capability to fully recover the correct symbolic form within the available rectification step budget\.In failure cases, the first\-layer prediction is already too far from the target expression, so the remaining discrepancy is no longer concentrated in a local region\. Under this condition, bounded rectification within a limited step budget may improve part of the structure but is less likely to recover the target expression fully\. Even so, these cases remain consistent with our assumption: EditSR is most beneficial when the first\-layer prediction is structurally plausible but locally incomplete, which is also the regime where restarting the global search would be unnecessarily expensive\.

### 7\.5EditSR vs TPSR

In this section, we compare EditSR with TPSR on the Feynman benchmark, where TPSR is a representative post\-hoc rectification strategy that enhances neural models using MCTS\. Our purpose is to evaluate, based on the same NeSymReS backbone, the rectification effectiveness and runtime cost of the two methods\.

As shown in Fig\.[15](https://arxiv.org/html/2606.07915#S7.F15), TPSR can rectify part of the errors left by NeSymReS by reopening the search process, but it usually requires much higher computational cost\. EditSR achieves higherR2R^\{2\}results across more problems while requiring substantially less time than TPSR\. This result supports our motivation: once NeSymReS has produced a plausible prediction, a short learned sequence of syntax\-constrained local edits can be more efficient than reopening an online search\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/accuracy_time_tradeoff.png)Figure 15:R2R^\{2\}versus test time for EditSR and TPSR\.The results represent the mean over 5 runs\. Overall, EditSR occupies one of the strongest trade\-off regions, achieving comparable or better performance on most problems while requiring substantially less time\.

## 8Conclusion

In this paper, we introduce EditSR to alleviate error accumulation in neural symbolic regression models\. Instead of treating an incorrect prediction as a failed endpoint that requires restarting the search, EditSR regards post\-hoc rectification as an edit\-based state\-transition chain, in which an incorrect prediction can be step\-by\-step rectified toward the target expression\. By shifting the major burden of rectification from inference to pretraining, EditSR preserves the efficiency advantage of neural models and avoids repeatedly reopening global search after an incorrect prediction has been generated\. In addition, because each rectification decision is conditioned on the current state rather than the history, errors introduced at earlier steps are not irrevocably inherited and can be rectified by subsequent edits, thereby helping suppress error accumulation\. Extensive evaluations on mainstream benchmarks show that the advantage of EditSR is more significant in long expression generation, where one\-pass autoregressive decoding is more susceptible to error accumulation\. Moreover, EditSR maintains a competitive balance amongR2R^\{2\}, Symbolic solution rate, and Complexity, as its rectification objective always moves toward the correct symbolic structure rather than merely satisfying a numerical error threshold\.

Limitations:Shifting computationally intensive components to pretraining is one of the Rectifier’s primary advantages\. Therefore, the robustness of the Rectifier is grounded in training on artificially constructed rectification chains whose initial states are obtained by applying random corruptions to target expressions\. Although random corruptions broaden the coverage of error patterns during training, the rectification effect under more severe out\-of\-distribution shifts remains to be validated\. In addition, the Rectifier is currently limited by the finite exploration capabilities of the first layer, so some extremely complex problems may remain unresolved when relying on the Rectifier alone \(as discussed in Section[7\.4\.5](https://arxiv.org/html/2606.07915#S7.SS4.SSS5)\)\. Enhancing the global exploration capability of the first layer, or coupling the Rectifier with stronger search\-based models, is a promising direction for future work\.

Future work:One worthwhile direction is to develop a tighter collaboration scheme between the Rectifier and models with stronger global search capabilities, such as genetic programming methods or deep learning\-based symbolic regression models\. Such exploratory models can generate diverse candidate expressions across a wider search space, and the Rectifier then refines promising candidates through local edits\. This strategy may alleviate the dependence of the Rectifier on the exploration capabilities of the first layer and improve convergence on extremely complex problems that are difficult to resolve by rectification alone\. More importantly, it may extend the role of post\-hoc rectification from a follow\-up module to a more general component within hybrid symbolic regression pipelines\.

## Acknowledgments

This work was supported by Major Program of the National Key R&D Program of China \(No\.2023YFA1009002, No\.2023YFA1009000, No\.2023YFA1009004\), and the National Natural Science Foundation of China \(No\.12292980 and No\.12292984\)\.

## References

- \[1\]I\. Arnaldo, K\. Krawiec, and U\. O’Reilly\(2014\)Multiple regression genetic programming\.InProceedings of the 2014 annual conference on genetic and evolutionary computation,pp\. 879–886\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p2.1)\.
- \[2\]J\. Austin, D\. D\. Johnson, J\. Ho, D\. Tarlow, and R\. Van Den Berg\(2021\)Structured denoising diffusion models in discrete state\-spaces\.Advances in neural information processing systems34,pp\. 17981–17993\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p8.1),[§2](https://arxiv.org/html/2606.07915#S2.p4.1),[§3](https://arxiv.org/html/2606.07915#S3.p1.1)\.
- \[3\]Z\. Bastiani, R\. M\. Kirby, J\. Hochhalter, and S\. Zhe\(2025\)Diffusion\-based symbolic regression\.arXiv preprint arXiv:2505\.24776\.Cited by:[§2](https://arxiv.org/html/2606.07915#S2.p4.1)\.
- \[4\]L\. Biggio, T\. Bendinelli, A\. Neitz, A\. Lucchi, and G\. Parascandolo\(2021\)Neural symbolic regression that scales\.InInternational conference on machine learning,pp\. 936–945\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p4.1),[§1](https://arxiv.org/html/2606.07915#S1.p7.1),[§3](https://arxiv.org/html/2606.07915#S3.p5.1),[§5\.1](https://arxiv.org/html/2606.07915#S5.SS1.p1.1)\.
- \[5\]B\. Burlacu, G\. Kronberger, and M\. Kommenda\(2020\)Operon c\+\+ an efficient genetic programming framework for symbolic regression\.InProceedings of the 2020 genetic and evolutionary computation conference companion,pp\. 1562–1570\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p2.1),[§3](https://arxiv.org/html/2606.07915#S3.p2.1)\.
- \[6\]H\. Chang, H\. Zhang, L\. Jiang, C\. Liu, and W\. T\. Freeman\(2022\)Maskgit: masked generative image transformer\.InProceedings of the IEEE/CVF conference on computer vision and pattern recognition,pp\. 11315–11325\.Cited by:[§2](https://arxiv.org/html/2606.07915#S2.p4.1),[§3](https://arxiv.org/html/2606.07915#S3.p1.1)\.
- \[7\]M\. Cranmer\(2024\)PySR: high\-performance symbolic regression in python and julia\.Astrophysics Source Code Library,pp\. ascl–2409\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p2.1)\.
- \[8\]S\. Dathathri, A\. Madotto, J\. Lan, J\. Hung, E\. Frank, P\. Molino, J\. Yosinski, and R\. Liu\(2019\)Plug and play language models: a simple approach to controlled text generation\.arXiv preprint arXiv:1912\.02164\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p7.1)\.
- \[9\]F\. O\. de Franca, M\. Virgolin, M\. Kommenda, M\. Majumder, M\. Cranmer, G\. Espada, L\. Ingelse, A\. Fonseca, M\. Landajuela, B\. Petersen,et al\.\(2024\)SRBench\+\+: principled benchmarking of symbolic regression with domain\-expert interpretation\.IEEE transactions on evolutionary computation\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p2.1),[§3](https://arxiv.org/html/2606.07915#S3.p2.1)\.
- \[10\]F\. O\. de Franca and G\. S\. I\. Aldeia\(2021\)Interaction–transformation evolutionary algorithm for symbolic regression\.Evolutionary computation29\(3\),pp\. 367–390\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p2.1)\.
- \[11\]A\. Grayeli, A\. Sehgal, O\. Costilla\-Reyes, M\. Cranmer, and S\. Chaudhuri\(2024\)Symbolic regression with a learned concept library\.Advances in Neural Information Processing Systems37,pp\. 44678–44709\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p5.1)\.
- \[12\]J\. Gu, C\. Wang, and J\. Zhao\(2019\)Levenshtein transformer\.Advances in neural information processing systems32,pp\. 11179–11189\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p6.1),[§4\.5](https://arxiv.org/html/2606.07915#S4.SS5.p2.1)\.
- \[13\]M\. Havasi, B\. Karrer, I\. Gat, and R\. T\. Chen\(2025\)Edit flows: flow matching with edit operations\.arXiv preprint arXiv:2506\.09018\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p6.1),[§3](https://arxiv.org/html/2606.07915#S3.p1.1),[§4\.3\.3](https://arxiv.org/html/2606.07915#S4.SS3.SSS3.p3.4)\.
- \[14\]J\. Ho, A\. Jain, and P\. Abbeel\(2020\)Denoising diffusion probabilistic models\.Advances in neural information processing systems33,pp\. 6840–6851\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p1.1)\.
- \[15\]E\. Hoogeboom, D\. Nielsen, P\. Jaini, P\. Forré, and M\. Welling\(2021\)Argmax flows and multinomial diffusion: learning categorical distributions\.Advances in neural information processing systems34,pp\. 12454–12465\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p1.1)\.
- \[16\]Z\. Huang, D\. Z\. Huang, T\. Xiao, D\. Ma, Z\. Ming, H\. Shi, and Y\. Wen\(2025\)Improving monte carlo tree search for symbolic regression\.arXiv preprint arXiv:2509\.15929\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p3.1)\.
- \[17\]G\. S\. Imai Aldeia, H\. Zhang, G\. Bomarito, M\. Cranmer, A\. Fonseca, B\. Burlacu, W\. G\. La Cava, and F\. O\. de França\(2025\)Call for action: towards the next generation of symbolic regression benchmark\.InProceedings of the Genetic and Evolutionary Computation Conference Companion,pp\. 2529–2538\.Cited by:[Table 6](https://arxiv.org/html/2606.07915#A5.T6.1.1.2.1.1),[Table 6](https://arxiv.org/html/2606.07915#A5.T6.1.6.1.1.1),[item 3](https://arxiv.org/html/2606.07915#S6.I1.i3.p1.1)\.
- \[18\]Y\. Jin, W\. Fu, J\. Kang, J\. Guo, and J\. Guo\(2019\)Bayesian symbolic regression\.arXiv preprint arXiv:1910\.08892\.Cited by:[Table 6](https://arxiv.org/html/2606.07915#A5.T6.1.3.1.1.1)\.
- \[19\]P\. Kamienny, S\. d’Ascoli, G\. Lample, and F\. Charton\(2022\)End\-to\-end symbolic regression with transformers\.Advances in Neural Information Processing Systems35,pp\. 10269–10281\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p4.1),[§3](https://arxiv.org/html/2606.07915#S3.p5.1),[§6\.2](https://arxiv.org/html/2606.07915#S6.SS2.p1.1)\.
- \[20\]T\. Karras, M\. Aittala, T\. Aila, and S\. Laine\(2022\)Elucidating the design space of diffusion\-based generative models\.Advances in neural information processing systems35,pp\. 26565–26577\.Cited by:[§2](https://arxiv.org/html/2606.07915#S2.p4.1)\.
- \[21\]A\. Kartelj and M\. Djukanović\(2023\)RILS\-rols: robust symbolic regression via iterated local search and ordinary least squares\.Journal of Big Data10\(1\),pp\. 71\.Cited by:[item 4](https://arxiv.org/html/2606.07915#S6.I2.i4.p1.1)\.
- \[22\]M\. Keijzer\(2003\)Improving symbolic regression with interval arithmetic and linear scaling\.InEuropean conference on genetic programming,pp\. 70–82\.Cited by:[Table 6](https://arxiv.org/html/2606.07915#A5.T6.1.3.1.1.1)\.
- \[23\]M\. Kommenda, M\. Affenzeller, G\. Kronberger, and S\. M\. Winkler\(2013\)Nonlinear least squares optimization of constants in symbolic regression\.InInternational Conference on Computer Aided Systems Theory,pp\. 420–427\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p2.1)\.
- \[24\]M\. F\. Korns\(2011\)Accuracy in symbolic regression\.InGenetic Programming Theory and Practice IX,pp\. 129–151\.Cited by:[Table 6](https://arxiv.org/html/2606.07915#A5.T6.1.3.1.1.1)\.
- \[25\]J\. R\. Koza\(1994\)Genetic programming as a means for programming computers by natural selection\.Statistics and computing4\(2\),pp\. 87–112\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p2.1),[§3](https://arxiv.org/html/2606.07915#S3.p2.1)\.
- \[26\]K\. Kumagai, I\. Kobayashi, D\. Mochihashi, H\. Asoh, T\. Nakamura, and T\. Nagai\(2016\)Human\-like natural language generation using monte carlo tree search\.InProceedings of the INLG 2016 Workshop on Computational Creativity in Natural Language Generation,pp\. 11–18\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p7.1)\.
- \[27\]W\. La Cava, B\. Burlacu, M\. Virgolin, M\. Kommenda, P\. Orzechowski, F\. O\. de França, Y\. Jin, and J\. H\. Moore\(2021\)Contemporary symbolic regression methods and their relative performance\.Advances in neural information processing systems2021\(DB1\),pp\. 1\.Cited by:[Table 6](https://arxiv.org/html/2606.07915#A5.T6.1.4.1.1.1),[Table 6](https://arxiv.org/html/2606.07915#A5.T6.1.5.1.1.1),[§1](https://arxiv.org/html/2606.07915#S1.p2.1),[§3](https://arxiv.org/html/2606.07915#S3.p2.1),[item 2](https://arxiv.org/html/2606.07915#S6.I1.i2.p1.1),[item 3a](https://arxiv.org/html/2606.07915#S6.I1.i3.I1.i1.p1.1),[item 4](https://arxiv.org/html/2606.07915#S6.I3.i4.p1.1)\.
- \[28\]F\. Lalande, Y\. Matsubara, N\. Chiba, T\. Taniai, R\. Igarashi, and Y\. Ushiku\(2023\)A transformer model for symbolic regression towards scientific discovery\.arXiv preprint arXiv:2312\.04070\.Cited by:[§4\.2](https://arxiv.org/html/2606.07915#S4.SS2.p1.2)\.
- \[29\]G\. Lample and F\. Charton\(2019\)Deep learning for symbolic mathematics\.arXiv preprint arXiv:1912\.01412\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p3.1),[§1](https://arxiv.org/html/2606.07915#S1.p4.1)\.
- \[30\]M\. Landajuela, C\. S\. Lee, J\. Yang, R\. Glatt, C\. P\. Santiago, I\. Aravena, T\. Mundhenk, G\. Mulcahy, and B\. K\. Petersen\(2022\)A unified framework for deep symbolic regression\.Advances in Neural Information Processing Systems35,pp\. 33985–33998\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p4.1),[§3](https://arxiv.org/html/2606.07915#S3.p3.1),[item 1](https://arxiv.org/html/2606.07915#S6.I2.i1.p1.1)\.
- \[31\]J\. Lee, Y\. Lee, J\. Kim, A\. Kosiorek, S\. Choi, and Y\. W\. Teh\(2019\)Set transformer: a framework for attention\-based permutation\-invariant neural networks\.InInternational conference on machine learning,pp\. 3744–3753\.Cited by:[§4\.2](https://arxiv.org/html/2606.07915#S4.SS2.p1.2)\.
- \[32\]D\. Li, J\. Yin, J\. Xu, X\. Li, and J\. Zhang\(2026\)ViSymRe: vision multimodal symbolic regression\.Neural Networks,pp\. 109017\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p5.1)\.
- \[33\]Y\. Li, W\. Li, L\. Yu, M\. Wu, J\. Liu, W\. Li, and M\. Hao\(2025\)Discovering mathematical formulas from data via gpt\-guided monte carlo tree search\.Expert Systems with Applications281,pp\. 127591\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p3.1)\.
- \[34\]Y\. Li, J\. Liu, M\. Wu, L\. Yu, W\. Li, X\. Ning, W\. Li, M\. Hao, Y\. Deng, and S\. Wei\(2025\)MMSR: symbolic regression is a multi\-modal information fusion task\.Information Fusion114,pp\. 102681\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p5.1)\.
- \[35\]J\. Liu, W\. Li, L\. Yu, M\. Wu, L\. Sun, W\. Li, and Y\. Li\(2023\)SNR: symbolic network\-based rectifiable learning framework for symbolic regression\.Neural networks165,pp\. 1021–1034\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p8.1),[§2](https://arxiv.org/html/2606.07915#S2.p3.1),[§3](https://arxiv.org/html/2606.07915#S3.p7.1)\.
- \[36\]J\. Liu, M\. Wu, L\. Yu, W\. Li, W\. Li, Y\. Li, M\. Hao, Y\. Deng, and S\. Wei\(2025\)CaMo: capturing the modularity by end\-to\-end models for symbolic regression\.Knowledge\-Based Systems309,pp\. 112747\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p5.1)\.
- \[37\]S\. Luke and L\. Panait\(2002\)Lexicographic parsimony pressure\.InProceedings of the 4th Annual Conference on Genetic and Evolutionary Computation,pp\. 829–836\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p2.1)\.
- \[38\]G\. Martius and C\. H\. Lampert\(2016\)Extrapolation and learning equations\.arXiv preprint arXiv:1610\.02995\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p3.1),[§3](https://arxiv.org/html/2606.07915#S3.p3.1)\.
- \[39\]Y\. Matsubara, N\. Chiba, R\. Igarashi, and Y\. Ushiku\(2022\)SRSD: rethinking datasets of symbolic regression for scientific discovery\.InNeurIPS 2022 AI for Science: Progress and Promises,Cited by:[footnote 1](https://arxiv.org/html/2606.07915#footnote1)\.
- \[40\]T\. McConaghy\(2011\)FFX: fast, scalable, deterministic symbolic regression technology\.InGenetic Programming Theory and Practice IX,pp\. 235–260\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p2.1)\.
- \[41\]J\. McDermott, D\. R\. White, S\. Luke, L\. Manzoni, M\. Castelli, L\. Vanneschi, W\. Jaskowski, K\. Krawiec, R\. Harper, K\. De Jong,et al\.\(2012\)Genetic programming needs better benchmarks\.InProceedings of the 14th annual conference on Genetic and evolutionary computation,pp\. 791–798\.Cited by:[§7\.1](https://arxiv.org/html/2606.07915#S7.SS1.p1.1)\.
- \[42\]K\. Meidani, P\. Shojaee, C\. K\. Reddy, and A\. B\. Farimani\(2023\)Snip: bridging mathematical symbolic and numeric realms with unified pre\-training\.arXiv preprint arXiv:2310\.02227\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p5.1),[§2](https://arxiv.org/html/2606.07915#S2.p3.1),[§3](https://arxiv.org/html/2606.07915#S3.p5.1),[§3](https://arxiv.org/html/2606.07915#S3.p7.1)\.
- \[43\]A\. Moraglio, K\. Krawiec, and C\. G\. Johnson\(2012\)Geometric semantic genetic programming\.InInternational Conference on Parallel Problem Solving from Nature,pp\. 21–31\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p2.1)\.
- \[44\]T\. Mundhenk, M\. Landajuela, R\. Glatt, C\. P\. Santiago, B\. K\. Petersen,et al\.\(2021\)Symbolic regression via deep reinforcement learning enhanced genetic programming seeding\.Advances in Neural Information Processing Systems34,pp\. 24912–24923\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p3.1),[§3](https://arxiv.org/html/2606.07915#S3.p3.1)\.
- \[45\]M\. O’Neill\(2009\)Riccardo poli, william b\. langdon, nicholas f\. mcphee: a field guide to genetic programming: lulu\. com, 2008, 250 pp, isbn 978\-1\-4092\-0073\-4\.Springer\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p2.1),[§3](https://arxiv.org/html/2606.07915#S3.p2.1)\.
- \[46\]B\. K\. Petersen, M\. Landajuela, T\. N\. Mundhenk, C\. P\. Santiago, S\. K\. Kim, and J\. T\. Kim\(2019\)Deep symbolic regression: recovering mathematical expressions from data via risk\-seeking policy gradients\.arXiv preprint arXiv:1912\.04871\.Cited by:[Table 6](https://arxiv.org/html/2606.07915#A5.T6.1.3.1.1.1),[§1](https://arxiv.org/html/2606.07915#S1.p3.1),[§3](https://arxiv.org/html/2606.07915#S3.p3.1)\.
- \[47\]R\. Poli and N\. F\. McPhee\(2008\)Parsimony pressure made easy\.InProceedings of the 10th annual conference on Genetic and evolutionary computation,pp\. 1267–1274\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p2.1)\.
- \[48\]R\. Poli\(2003\)A simple but theoretically\-motivated method to control bloat in genetic programming\.InEuropean Conference on Genetic Programming,pp\. 204–217\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p2.1)\.
- \[49\]C\. R\. Qi, H\. Su, K\. Mo, and L\. J\. Guibas\(2017\)Pointnet: deep learning on point sets for 3d classification and segmentation\.InProceedings of the IEEE conference on computer vision and pattern recognition,pp\. 652–660\.Cited by:[§4\.2](https://arxiv.org/html/2606.07915#S4.SS2.p1.2)\.
- \[50\]L\. Qin, S\. Welleck, D\. Khashabi, and Y\. Choi\(2022\)Cold decoding: energy\-based constrained text generation with langevin dynamics\.Advances in Neural Information Processing Systems35,pp\. 9538–9551\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p7.1)\.
- \[51\]M\. Reid, V\. J\. Hellendoorn, and G\. Neubig\(2022\)Diffuser: discrete diffusion via edit\-based reconstruction\.arXiv preprint arXiv:2210\.16886\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p6.1),[§1](https://arxiv.org/html/2606.07915#S1.p8.1),[§2](https://arxiv.org/html/2606.07915#S2.p4.1),[§3](https://arxiv.org/html/2606.07915#S3.p1.1),[§4\.3\.3](https://arxiv.org/html/2606.07915#S4.SS3.SSS3.p3.4)\.
- \[52\]M\. Reid and G\. Neubig\(2022\)Learning to model editing processes\.InFindings of the Association for Computational Linguistics: EMNLP 2022,pp\. 3822–3832\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p6.1)\.
- \[53\]K\. Ruan, Y\. Xu, Z\. Gao, Y\. Liu, Y\. Guo, J\. Wen, and H\. Sun\(2026\)Discovering physical laws with parallel symbolic enumeration\.Nature Computational Science6\(1\),pp\. 53–66\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p3.1)\.
- \[54\]S\. Sahoo, C\. Lampert, and G\. Martius\(2018\)Learning equations for extrapolation and control\.InInternational conference on machine learning,pp\. 4442–4450\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p3.1)\.
- \[55\]M\. Schmidt and H\. Lipson\(2009\)Distilling free\-form natural laws from experimental data\.science324\(5923\),pp\. 81–85\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p1.1),[§3](https://arxiv.org/html/2606.07915#S3.p2.1)\.
- \[56\]P\. Scholl, K\. Bieker, H\. Hauger, and G\. Kutyniok\(2025\)ParFam–\(neural guided\) symbolic regression via continuous global optimization\.InThe Thirteenth International Conference on Learning Representations,Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p5.1),[item 3](https://arxiv.org/html/2606.07915#S6.I2.i3.p1.1)\.
- \[57\]P\. Shojaee, K\. Meidani, A\. Barati Farimani, and C\. Reddy\(2023\)Transformer\-based planning for symbolic regression\.Advances in Neural Information Processing Systems36,pp\. 45907–45919\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p5.1),[§2](https://arxiv.org/html/2606.07915#S2.p3.1),[§3](https://arxiv.org/html/2606.07915#S3.p7.1),[item 5](https://arxiv.org/html/2606.07915#S6.I2.i5.p1.1)\.
- \[58\]P\. Shojaee, K\. Meidani, S\. Gupta, A\. B\. Farimani, and C\. K\. Reddy\(2024\)Llm\-sr: scientific equation discovery via programming with large language models\.arXiv preprint arXiv:2404\.18400\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p5.1)\.
- \[59\]P\. Shojaee, N\. Nguyen, K\. Meidani, A\. B\. Farimani, K\. D\. Doan, and C\. K\. Reddy\(2025\)Llm\-srbench: a new benchmark for scientific equation discovery with large language models\.arXiv preprint arXiv:2504\.10415\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p5.1)\.
- \[60\]Y\. Song, J\. Sohl\-Dickstein, D\. P\. Kingma, A\. Kumar, S\. Ermon, and B\. Poole\(2020\)Score\-based generative modeling through stochastic differential equations\.arXiv preprint arXiv:2011\.13456\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p1.1)\.
- \[61\]S\. H\. Strogatz\(2001\)Nonlinear dynamics and chaos: with applications to physics, biology, chemistry, and engineering \(studies in nonlinearity\)\.Vol\.1,Westview press\.Cited by:[item 2b](https://arxiv.org/html/2606.07915#S6.I1.i2.I1.i2.p1.1)\.
- \[62\]Y\. Tian, W\. Zhou, M\. Viscione, H\. Dong, D\. S\. Kammer, and O\. Fink\(2025\)Interactive symbolic regression with co\-design mechanism through offline reinforcement learning\.Nature Communications16\(1\),pp\. 3930\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p3.1)\.
- \[63\]R\. T\. Tymkow, B\. D\. Schnapp, M\. Valipour, and A\. Ghodshi\(2025\)Symbolic\-diffusion: deep learning based symbolic regression with d3pm discrete token diffusion\.arXiv preprint arXiv:2510\.07570\.Cited by:[§2](https://arxiv.org/html/2606.07915#S2.p4.1)\.
- \[64\]S\. Udrescu and M\. Tegmark\(2020\)AI feynman: a physics\-inspired method for symbolic regression\.Science advances6\(16\),pp\. eaay2631\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p1.1),[§3](https://arxiv.org/html/2606.07915#S3.p2.1),[item 2a](https://arxiv.org/html/2606.07915#S6.I1.i2.I1.i1.p1.1)\.
- \[65\]N\. Q\. Uy, N\. X\. Hoai, M\. O’Neill, R\. I\. McKay, and E\. Galván\-López\(2011\)Semantically\-based crossover in genetic programming: application to real\-valued symbolic regression\.Genetic Programming and Evolvable Machines12\(2\),pp\. 91–119\.Cited by:[Table 6](https://arxiv.org/html/2606.07915#A5.T6.1.3.1.1.1)\.
- \[66\]N\. Q\. Uy, N\. X\. Hoai, M\. O’Neill, R\. I\. McKay, and E\. Galván\-López\(2011\)Semantically\-based crossover in genetic programming: application to real\-valued symbolic regression\.Genetic Programming and Evolvable Machines12\(2\),pp\. 91–119\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p2.1)\.
- \[67\]M\. Valipour, B\. You, M\. Panju, and A\. Ghodsi\(2021\)Symbolicgpt: a generative transformer model for symbolic regression\.arXiv preprint arXiv:2106\.14131\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p4.1),[§3](https://arxiv.org/html/2606.07915#S3.p5.1)\.
- \[68\]M\. Vastl, J\. Kulhánek, J\. Kubalík, E\. Derner, and R\. Babuška\(2024\)Symformer: end\-to\-end symbolic regression using transformer\-based architecture\.IEEE Access12,pp\. 37840–37849\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p4.1),[§3](https://arxiv.org/html/2606.07915#S3.p5.1)\.
- \[69\]A\. Vaswani, N\. Shazeer, N\. Parmar, J\. Uszkoreit, L\. Jones, A\. N\. Gomez, Ł\. Kaiser, and I\. Polosukhin\(2017\)Attention is all you need\.Advances in neural information processing systems30\.Cited by:[§4\.2](https://arxiv.org/html/2606.07915#S4.SS2.p1.2)\.
- \[70\]M\. Virgolin, T\. Alderliesten, C\. Witteveen, and P\. A\. Bosman\(2021\)Improving model\-based genetic programming for symbolic regression of small expressions\.Evolutionary computation29\(2\),pp\. 211–237\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p2.1)\.
- \[71\]Z\. Xiang, K\. Ashen, X\. Qian, and X\. Qian\(2025\)Graph\-based symbolic regression with invariance and constraint encoding\.InThe Thirty\-ninth Annual Conference on Neural Information Processing Systems,Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p3.1)\.
- \[72\]W\. Xu and M\. Carpuat\(2021\)EDITOR: an edit\-based transformer with repositioning for neural machine translation with soft lexical constraints\.Transactions of the Association for Computational Linguistics9,pp\. 311–328\.Cited by:[§1](https://arxiv.org/html/2606.07915#S1.p6.1)\.
- \[73\]Z\. Yu, J\. Ding, Y\. Li, and D\. Jin\(2024\)Symbolic regression via mdlformer\-guided search: from minimizing prediction error to minimizing description length\.arXiv preprint arXiv:2411\.03753\.Cited by:[§3](https://arxiv.org/html/2606.07915#S3.p5.1),[item 2](https://arxiv.org/html/2606.07915#S6.I2.i2.p1.1)\.

## Appendix ADetails of Tagger and Editor

The Tagger and Editor share the same dataset encodinghh, but they play different roles in the rectification loop\. The Tagger is responsible for predicting the edit position and action\. Given the current statef\(t\)f^\{\(t\)\}, it encodes the whole sequence with bidirectional self\-attention, fuseshhthrough cross\-attention, and predicts a position\-wise distribution over the admissible actions in𝒵=\{Keep,Replace,Delete,Rewrite,Insert\}\\mathcal\{Z\}=\\\{\\textsc\{Keep\},\\textsc\{Replace\},\\textsc\{Delete\},\\textsc\{Rewrite\},\\textsc\{Insert\}\\\}\. After masking out inadmissible actions according to syntactic constraints, the highest\-confidence non\-Keepposition–action pair is selected and passed to the Editor\. The Editor adopts bidirectional and infilling self\-attention: visible context tokens attend to each other bidirectionally, while tokens inside the hole are generated autoregressively with access to both left and right context\. ForReplaceandDelete, the prediction degenerates to a single token\. Fig\.[16](https://arxiv.org/html/2606.07915#A1.F16)illustrates both modules and their interaction in one\-step rectification\.

![Refer to caption](https://arxiv.org/html/2606.07915v1/Tagger_Editor.png)Figure 16:Architecture illustration of Tagger and Editor\.The example illustrates aRewritestep\. Left: the Tagger takes the current statef\(t\)f^\{\(t\)\}as input and processes it with Transformer blocks using bidirectional self\-attention and cross\-attention to the dataset encodinghh\. An action\-prediction head then outputs a position\-wise distribution over admissible edit actions\. The position whose best non\-Keepaction has the highest confidence is selected for editing\. Right: the Editor receives the context statef~\(t\)\\tilde\{f\}^\{\(t\)\}, where the positions requiring edit are replaced by action\-specific placeholders\. It uses bidirectional and infilling self\-attention, together with cross\-attention tohh, to generate the edit content\.
## Appendix BRectifier adaptation assumptions

In the proposed framework, the Rectifier is decoupled from the first layer\. When an incorrect expression has been predicted by the first layer, the rectification loop only requires the current parseable expression statef\(t\)f^\{\(t\)\}and a dataset encodinghh\. It does not depend on the internal hidden states, decoding trajectory, or search history of the first\-layer neural model\. This decoupled design is an advantage of EditSR, because replacing the first layer does not require redesigning the Tagger and Editor\. However, in practice, this adaptation route relies on several assumptions\. First, the neural model should output expressions in a representation that can be aligned with the syntax constraints used by the Rectifier, such as the prefix\-style tree representation\. Second, the vocabularies and constant conventions should either match directly or be convertible to a common representation, so that the edit actions remain well defined\. Provided that the above conditions are met, the Rectifier may be deployed\.

Once a new neural symbolic regression model has converged, the practical adaptation step is to construct rectification chains from its predictions and fine\-tune only the Rectifier, while keeping the neural model itself unchanged\. Therefore, the main additional cost lies in learning the model\-specific error distribution, rather than retraining the full symbolic regression system\. This property is particularly attractive in scenarios where the pretrained neural model has already absorbed substantial pretraining cost and only incremental performance gains are still desired\. Our ablation studies show that, after fine\-tuning, the Rectifier remains stable across NeSymReS variants trained under different dropout configurations, indicating that it can accommodate related shifts in first\-layer error patterns\. Therefore, the current evidence suggests the practical feasibility of adapting the Rectifier across widely compatible first\-layer error patterns after interface alignment and fine\-tuning\. Broader cross\-architecture validation remains a meaningful direction for future work\.

## Appendix CWhy rectification decisions are conditioned on the current state

In our framework, the supervised signal is defined on one\-step state transitions\. For each sampled intermediate statef\(t\)f^\{\(t\)\}, the state\-transition algorithm constructs a target triplet\(p∗\(t\),z∗\(t\),u∗\(t\)\)\(p^\{\*\(t\)\},z^\{\*\(t\)\},u^\{\*\(t\)\}\)that specifies how to move fromf\(t\)f^\{\(t\)\}tof\(t\+1\)f^\{\(t\+1\)\}towardf∗f^\{\*\}\. Therefore, the learning objective of the Rectifier is not to imitate a particular historical trajectory, but to learn how to act on the expression that is currently observed\. Furthermore, since the initial states of the artificially constructed rectification chains are obtained by applying random corruptions to the target expression, the Rectifier is exposed to a wide variety of local and global error patterns\. Conditioning on the current state allows these heterogeneous error patterns to be mapped into a unified training format, i\.e\., regardless of how a state was reached, the Rectifier only needs to decide what edit should be executed\. In this sense, the current state\-based modeling approach enlarges the effective coverage of the rectification chains, because different edit histories that lead to comparable states can share the same type of supervision\.

From the inference perspective, conditioning on the current state makes the rectification loop more flexible\. After each edit, the Tagger and the Editor re\-evaluate the updated parseable expression, rather than rigidly adhering to a fixed path determined by earlier decisions\. Therefore, previously generated content is not irrevocable\. A subtree introduced earlier can still be deleted, replaced, or rewritten later if it proves inconsistent with the target structure\. Moreover, because the state\-transition chain always remains in the space of syntactically valid expressions, later edits are performed on a stable structural object rather than on a partially broken one\. Therefore, EditSR is less vulnerable to error accumulation than standard autoregressive generation\.

## Appendix DIllustration of supervised rectification\-chain construction

To further clarify how the state\-transition algorithm constructs the supervised rectification chain, we provide a concrete example under the cost function in Eq\. \([15](https://arxiv.org/html/2606.07915#S4.E15)\)\. Throughout this example, all edit positionspprefer to the prefix positions in the current statef\(t\)f^\{\(t\)\}\. We useλ=0\.1\\lambda=0\.1and the generation budget55of the Editor\.

Consider the current state

f\(0\)=\[sub,mul,x1,x2,mul,mul,x3,x5,x6\],f^\{\(0\)\}=\[\\texttt\{sub\},\\texttt\{mul\},x\_\{1\},x\_\{2\},\\texttt\{mul\},\\texttt\{mul\},x\_\{3\},x\_\{5\},x\_\{6\}\],and the target expression

f∗=\[add,mul,x1,x2,mul,mul,x3,x4,mul,x5,x6\]\.f^\{\*\}=\[\\texttt\{add\},\\texttt\{mul\},x\_\{1\},x\_\{2\},\\texttt\{mul\},\\texttt\{mul\},x\_\{3\},x\_\{4\},\\texttt\{mul\},x\_\{5\},x\_\{6\}\]\.In tree form, these correspond to

f\(0\)=sub​\(mul​\(x1,x2\),mul​\(mul​\(x3,x5\),x6\)\),f^\{\(0\)\}=\\texttt\{sub\}\\\!\\Big\(\\texttt\{mul\}\(x\_\{1\},x\_\{2\}\),\\texttt\{mul\}\\big\(\\texttt\{mul\}\(x\_\{3\},x\_\{5\}\),x\_\{6\}\\big\)\\Big\),and

f∗=add​\(mul​\(x1,x2\),mul​\(mul​\(x3,x4\),mul​\(x5,x6\)\)\)\.f^\{\*\}=\\texttt\{add\}\\\!\\Big\(\\texttt\{mul\}\(x\_\{1\},x\_\{2\}\),\\texttt\{mul\}\\big\(\\texttt\{mul\}\(x\_\{3\},x\_\{4\}\),\\texttt\{mul\}\(x\_\{5\},x\_\{6\}\)\\big\)\\Big\)\.
At the root, the current subtree and the target subtree have the same arity\. Since the current root is an internal node,Insertis not executable\. Since the aligned target at the root is also an internal subtree rather than a leaf,Deleteis not admissible\. Since the current subtree does not yet match the target subtree,Keepis excluded\. Therefore, the admissible candidates atp=1p=1reduce toReplaceandRewrite\. Since the current node has child nodes, the deferred\-edit plan is available\. Therefore, the state\-transition algorithm compares a direct\-edit plan with a deferred\-edit plan\.

One possible plan is to apply a root\-levelRewrite\. However, the full target subtree rooted atp′=1p^\{\\prime\}=1has prefix length1111, which exceeds the generation budgetSS\. The algorithm first constructs a budget\-limited intermediate subtree

I~∗​\(1\)=\[add,mul,x1,x2,x3\],\\tilde\{I\}^\{\*\}\(1\)=\[\\texttt\{add\},\\texttt\{mul\},x\_\{1\},x\_\{2\},x\_\{3\}\],which corresponds toadd​\(mul​\(x1,x2\),x3\)\\texttt\{add\}\(\\texttt\{mul\}\(x\_\{1\},x\_\{2\}\),x\_\{3\}\)\. According to Eq\. \([15](https://arxiv.org/html/2606.07915#S4.E15)\), the corresponding root\-levelRewritehas cost

1\+λ​\|I~∗​\(1\)\|=1\+0\.1×5=1\.5\.1\+\\lambda\|\\tilde\{I\}^\{\*\}\(1\)\|=1\+0\.1\\times 5=1\.5\.After thisRewrite, the state becomes

\[add,mul,x1,x2,x3\]\.\[\\texttt\{add\},\\texttt\{mul\},x\_\{1\},x\_\{2\},x\_\{3\}\]\.The remaining mismatch is then concentrated at the second child\. Atp=5p=5, the current node is the leafx3x\_\{3\}, while the aligned target is the subtree

mul​\(mul​\(x3,x4\),mul​\(x5,x6\)\),\\texttt\{mul\}\\big\(\\texttt\{mul\}\(x\_\{3\},x\_\{4\}\),\\texttt\{mul\}\(x\_\{5\},x\_\{6\}\)\\big\),whose prefix length is7\>S7\>S\. Since the current node is a leaf, the deferred\-edit plan is not available because there are no child nodes to recurse into\. We therefore only consider direct\-edit actions atp=5p=5\. Since the current node is a leaf,DeleteandRewriteare not executable\. Since the aligned target is a subtree rather than a leaf,Replaceis not admissible\. Since the current token does not match the target subtree,Keepis excluded\. Therefore, the only admissible action atp=5p=5isInsert\. The algorithm then inserts the budget\-limited intermediate subtree

\[mul,mul,x3,x4,x5\],\[\\texttt\{mul\},\\texttt\{mul\},x\_\{3\},x\_\{4\},x\_\{5\}\],with cost

1\+λ×5=1\.5\.1\+\\lambda\\times 5=1\.5\.A further insertion is still required at the leaf aligned with\[mul,x5,x6\]\[\\texttt\{mul\},x\_\{5\},x\_\{6\}\], with cost

1\+λ×3=1\.3\.1\+\\lambda\\times 3=1\.3\.Therefore, the total cost of this direct\-edit plan is

1\.5\+1\.5\+1\.3=4\.3\.1\.5\+1\.5\+1\.3=4\.3\.
Alternatively, the algorithm may defer the repair to descendant nodes\. Since the root symbols differ while the arities agree, a root\-levelReplaceatp=1p=1, namelysub→add\\texttt\{sub\}\\rightarrow\\texttt\{add\}, is admissible and has cost11\. The left subtreemul​\(x1,x2\)\\texttt\{mul\}\(x\_\{1\},x\_\{2\}\)already matches the target subtree and therefore contributes zero cost\. The remaining mismatch is entirely located in the right subtree,

mul​\(mul​\(x3,x5\),x6\)vs\.mul​\(mul​\(x3,x4\),mul​\(x5,x6\)\)\.\\texttt\{mul\}\\big\(\\texttt\{mul\}\(x\_\{3\},x\_\{5\}\),x\_\{6\}\\big\)\\quad\\text\{vs\.\}\\quad\\texttt\{mul\}\\big\(\\texttt\{mul\}\(x\_\{3\},x\_\{4\}\),\\texttt\{mul\}\(x\_\{5\},x\_\{6\}\)\\big\)\.At the root of this right subtree, the current node and the aligned target have the same token and the same arity\. Since this node has child nodes, the deferred\-edit plan remains available\. Therefore, the algorithm continues to recurse into its descendants rather than editing this matched internal node directly\.

The first mismatch is then reached atp=8p=8, where the current token is the leafx5x\_\{5\}and the aligned target is the leafx4x\_\{4\}\. Since the current node is a leaf, the deferred\-edit plan is not available because there are no child nodes to recurse into\. We therefore only consider direct\-edit actions atp=8p=8\. Since the current node is a leaf,DeleteandRewriteare not executable\. Since the aligned target is also a leaf rather than a subtree,Insertis not admissible\. Since the current token does not match the target token,Keepis excluded\. Therefore, the only admissible action atp=8p=8isReplace, whose cost is11\.

The second mismatch is reached atp=9p=9, where the current token is the leafx6x\_\{6\}and the aligned target is the subtree\[mul,x5,x6\]\[\\texttt\{mul\},x\_\{5\},x\_\{6\}\]\. Since this node is also a leaf, the deferred\-edit plan is no longer available\. According to the same feasibility analysis, onlyInsertis admissible at this position, with cost

1\+λ×3=1\.3\.1\+\\lambda\\times 3=1\.3\.Therefore, the total cost of this deferred\-edit plan is

Since this cost is lower than4\.34\.3, the state\-transition algorithm selects the first edit of this deferred\-edit plan\. The first one\-step supervision label is

\(p∗\(0\),z∗\(0\),u∗\(0\)\)=\(1,Replace,\[add\]\)\.\\bigl\(p^\{\*\(0\)\},z^\{\*\(0\)\},u^\{\*\(0\)\}\\bigr\)=\\bigl\(1,\\textsc\{Replace\},\[\\texttt\{add\}\]\\bigr\)\.
After applying this edit, the next state becomes

f\(1\)=\[add,mul,x1,x2,mul,mul,x3,x5,x6\]\.f^\{\(1\)\}=\[\\texttt\{add\},\\texttt\{mul\},x\_\{1\},x\_\{2\},\\texttt\{mul\},\\texttt\{mul\},x\_\{3\},x\_\{5\},x\_\{6\}\]\.When the state\-transition algorithm is invoked again onf\(1\)f^\{\(1\)\}, the first unresolved mismatch is reached atp=8p=8\. Since the current node is a leaf and has no child nodes, the deferred\-edit plan is unavailable\. According to the same feasibility analysis as above, onlyReplaceis admissible at this position\. Therefore, the state\-transition algorithm emits

\(p∗\(1\),z∗\(1\),u∗\(1\)\)=\(8,Replace,\[x4\]\)\.\\bigl\(p^\{\*\(1\)\},z^\{\*\(1\)\},u^\{\*\(1\)\}\\bigr\)=\\bigl\(8,\\textsc\{Replace\},\[x\_\{4\}\]\\bigr\)\.Applying this edit gives

f\(2\)=\[add,mul,x1,x2,mul,mul,x3,x4,x6\]\.f^\{\(2\)\}=\[\\texttt\{add\},\\texttt\{mul\},x\_\{1\},x\_\{2\},\\texttt\{mul\},\\texttt\{mul\},x\_\{3\},x\_\{4\},x\_\{6\}\]\.
When the state\-transition algorithm is invoked onf\(2\)f^\{\(2\)\}, the only remaining mismatch is reached atp=9p=9\. Since the current node is a leaf and has no child nodes, the deferred\-edit plan is unavailable\. According to the same feasibility analysis as above, onlyInsertis admissible at this position\. Therefore, the state\-transition algorithm emits

\(p∗\(2\),z∗\(2\),u∗\(2\)\)=\(9,Insert,\[mul,x5,x6\]\)\.\\bigl\(p^\{\*\(2\)\},z^\{\*\(2\)\},u^\{\*\(2\)\}\\bigr\)=\\bigl\(9,\\textsc\{Insert\},\[\\texttt\{mul\},x\_\{5\},x\_\{6\}\]\\bigr\)\.Applying this edit gives

f\(3\)=\[add,mul,x1,x2,mul,mul,x3,x4,mul,x5,x6\]=f∗\.f^\{\(3\)\}=\[\\texttt\{add\},\\texttt\{mul\},x\_\{1\},x\_\{2\},\\texttt\{mul\},\\texttt\{mul\},x\_\{3\},x\_\{4\},\\texttt\{mul\},x\_\{5\},x\_\{6\}\]=f^\{\*\}\.
The complete supervised rectification chain is therefore

f\(0\)→p∗\(0\)=1Replacef\(1\)→p∗\(1\)=8Replacef\(2\)→p∗\(2\)=9Insertf\(3\)=f∗\.f^\{\(0\)\}\\;\\xrightarrow\[p^\{\*\(0\)\}=1\]\{\\textsc\{Replace\}\}\\;f^\{\(1\)\}\\;\\xrightarrow\[p^\{\*\(1\)\}=8\]\{\\textsc\{Replace\}\}\\;f^\{\(2\)\}\\;\\xrightarrow\[p^\{\*\(2\)\}=9\]\{\\textsc\{Insert\}\}\\;f^\{\(3\)\}=f^\{\*\}\.
This example shows that the one\-step supervision label at each non\-terminal state is determined by minimizing the total cost over admissible executable plans\. Although the state\-transition algorithm is recursive, its practical overhead remains limited because the action admissibility constraints exclude most infeasible actions at each state, while the deferred\-edit plan becomes unavailable immediately once the current node is a leaf\.

## Appendix EStatistics of the benchmarks

Table[6](https://arxiv.org/html/2606.07915#A5.T6)summarizes the benchmark statistics, including the number of problems, the number of samples, and the split schemes\. For all officially released datasets, we adopt the training\-test split schemes specified in their original publications\.

Table 6:Benchmark statistics, where the number of samples and the complexity are averages over problems\.BenchmarkNo\. ProblemsMax\. DimensionNo\. SamplesTraining splitComplexityNatural noiseStandard benchmarks\[[65](https://arxiv.org/html/2606.07915#bib.bib71),[22](https://arxiv.org/html/2606.07915#bib.bib72),[24](https://arxiv.org/html/2606.07915#bib.bib73),[46](https://arxiv.org/html/2606.07915#bib.bib53),[18](https://arxiv.org/html/2606.07915#bib.bib74)\]913200Independent sampling for training and testing11\.49NoFeynman\[[27](https://arxiv.org/html/2606.07915#bib.bib43)\]120910,00075%16\.57NoODE\-Strogatz\[[27](https://arxiv.org/html/2606.07915#bib.bib43)\]14240075%13\.36NoPhenomenological & first\-principles\[[17](https://arxiv.org/html/2606.07915#bib.bib1)\]1244875%9\.17YesBlack\-box\[[17](https://arxiv.org/html/2606.07915#bib.bib1)\]1251438775%∼\\simNo
## Appendix FMain parameters

Table[7](https://arxiv.org/html/2606.07915#A6.T7)describes the parameters used by the skeleton generator\. Note that even if constants or exponents are sampled from a single distribution, they induce a broader distribution after composition, such asx3×x2=x6x^\{3\}\\times x^\{2\}=x^\{6\}\. In Table[8](https://arxiv.org/html/2606.07915#A6.T8), we list the key architectural and inference parameters used in the current implementation\.

Table 7:Hyperparameters of the skeleton generator and operator sampling weights\.DescriptionValueVariable set\{x1,⋯,x10\}\\\{x\_\{1\},\\cdots,x\_\{10\}\\\}Max number of unary operators55Max number of binary operatorsd\+5d\+5Max number of constants33Max length3030Constant distribution𝒰​\(−10,10\)\\mathcal\{U\}\(\-10,10\)Sampling weight of binary operatorsadd: 1,sub: 0\.5,mul: 1,div: 0\.5Sampling weight of unary operatorsabs: 0\.1,pow2: 1,pow3: 1,pow5: 0\.1,sqrt: 1,sin: 0\.5,cos: 0\.5,tan: 0\.1,arcsin: 0\.1,log: 0\.5,exp: 0\.5Table 8:Key rectifier hyperparameters in the current implementation\.HyperparameterDescriptionValueTrainTraining and validation set sizes−\-100,000,000 and 1,000Epochs−\-30 for training NeSymReS, 30 for training the Rectifier, and 5 for fine\-tuningModel dimensions−\-512Heads−\-8Learning rate−\-0\.0001 with cosine decayBatch size−\-200Set encoder layers−\-4Decoder layers−\-8Tagger / Editor layers−\-4T′T^\{\\prime\}Number of corruption steps𝒰​\{1,2,…,20\}\\mathcal\{U\}\\\{1,2,\.\.\.,20\\\}LmaxL\_\{\\max\}Maximum prefix expression length50SSPlaceholder budget of the Editor5λ\\lambdaSubtree length penalty in Eq\.[15](https://arxiv.org/html/2606.07915#S4.E15)0\.1InferenceBBeam size of NeSymReS30TmaxT\_\{\\max\}Maximum number of rectification iterations10M​S​EstopMSE\_\{\\mathrm\{stop\}\}Error threshold for early stopping1e\-5Initial sampling range of constant for BFGS−\-𝒰​\(0,10\)\\mathcal\{U\}\(0,10\)Number of BFGS restarts−\-10
## Appendix GMain parameters for baselines

The main hyperparameters of the baseline models used for comparison in our experiments, including ParFam, uDSR, TPSR, SR4MDL, and RILS\-ROLS, are summarized in Table[9](https://arxiv.org/html/2606.07915#A7.T9)\. For all other parameters, we use the default values provided in the public implementations\.

Table 9:The main parameters for baselines\.BaselinesHyperparameter setsParFam\{iterate:True,time\_limit:1000,time\_mode:auto,\\\{\\textit\{iterate\}:\\text\{True\},\\ \\textit\{time\\\_limit\}:1000,\\ \\textit\{time\\\_mode\}:\\text\{auto\},
functions:\[’sin’,’cos’,’exp’,’log’,’sqrt’,’tan’,’abs’,’asin’,’acos’\],pass\_functions:True,\\textit\{functions\}:\[\\text\{'sin'\},\\text\{'cos'\},\\text\{'exp'\},\\text\{'log'\},\\text\{'sqrt'\},\\text\{'tan'\},\\text\{'abs'\},\\text\{'asin'\},\\text\{'acos'\}\],\\ \\textit\{pass\\\_functions\}:\\text\{True\},
\}\\\}uDSR\{function\_set:\[’add’,’sub’,’mul’,’div’,’sin’,’cos’,’exp’,’log’,’poly’\]\\\{\\textit\{function\\\_set\}:\[\\text\{'add'\},\\text\{'sub'\},\\text\{'mul'\},\\text\{'div'\},\\text\{'sin'\},\\text\{'cos'\},\\text\{'exp'\},\\text\{'log'\},\\text\{'poly'\}\]
batch\_size:500,n\_samples:200,000\}\\textit\{batch\\\_size\}:500,\\textit\{n\\\_samples\}:200,000\\\}TPSR\{backbone\_model:e2e in benchmarking and NeSymReS in ablation studies,search\_algorithm:MCTS,tree\_search\_mode:best,\\\{\\textit\{backbone\\\_model\}:\\text\{e2e in benchmarking and NeSymReS in ablation studies \},\\textit\{search\\\_algorithm\}:\\text\{MCTS\},\\textit\{tree\\\_search\\\_mode\}:\\text\{best\},
width:3,horizon:200,rollout:3\\textit\{width\}:3,\\textit\{horizon\}:200,\\textit\{rollout\}:3\}SR4MDL\{search\_method:MCTS,n\_iter:10,000,\\\{\\textit\{search\\\_method\}:\\text\{MCTS\},\\textit\{n\\\_iter\}:10,000,
tokenizer\_range:\[−100,100\],tokenizer\_precision:4,\\textit\{tokenizer\\\_range\}:\[\-100,100\],\\textit\{tokenizer\\\_precision\}:4,
binary\_operators:\[’mul’,’div’,’add’,’sub’\],\\textit\{binary\\\_operators\}:\[\\text\{'mul'\},\\text\{'div'\},\\text\{'add'\},\\text\{'sub'\}\],
unary\_operators:\[’sqrt’,’cos’,’sin’,’pow2’,’pow3’,’exp’,’inv’,\\textit\{unary\\\_operators\}:\[\\text\{'sqrt'\},\\text\{'cos'\},\\text\{'sin'\},\\text\{'pow2'\},\\text\{'pow3'\},\\text\{'exp'\},\\text\{'inv'\},
’arcsin’,’arccos’,’log’\\text\{'arcsin'\},\\text\{'arccos'\},\\text\{'log'\}\],
leaf:\[’1’,’2’,π\]\}\\textit\{leaf\}:\[\\text\{'1'\},\\text\{'2'\},\\pi\]\\\}RILS\-ROLSmax\_fit\_calls:10,000,max\_time:5000,complexity\_penalty:0\.001,verbose:False\\textit\{max\\\_fit\\\_calls\}:10,000,\\textit\{max\\\_time\}:5000,\\textit\{complexity\\\_penalty\}:0\.001,\\textit\{verbose\}:\\text\{False\}
## Appendix HAdditional successful repair cases

TableLABEL:tab:successful\_rectification\_caseslists representative cases where the initial prediction from NeSymReS fails to recover the exact symbolic structure, but EditSR successfully rectifies it\.

Table 10:Representative cases of successful rectification\.NameTrue expressionNeSymReSR2R^\{2\}EditSRR2R^\{2\}I\.10\.7x1−x22x32\+1\\displaystyle\\frac\{x\_\{1\}\}\{\\sqrt\{\-\\frac\{x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+1\}\}0\.60​x1​x22x32\+x1\\displaystyle\\frac\{0\.60x\_\{1\}x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+x\_\{1\}0\.9998x1−x22x32\+1\\displaystyle\\frac\{x\_\{1\}\}\{\\sqrt\{\-\\frac\{x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+1\}\}0\.9999I\.11\.19x1​x4\+x2​x5\+x3​x6\\displaystyle x\_\{1\}x\_\{4\}\+x\_\{2\}x\_\{5\}\+x\_\{3\}x\_\{6\}x1​x4\+x2​x5\+x3\+4\.10​x6x5\\displaystyle x\_\{1\}x\_\{4\}\+x\_\{2\}x\_\{5\}\+x\_\{3\}\+\\frac\{4\.10x\_\{6\}\}\{x\_\{5\}\}0\.7755x1​x4\+x2​x5\+x3​x6\\displaystyle x\_\{1\}x\_\{4\}\+x\_\{2\}x\_\{5\}\+x\_\{3\}x\_\{6\}0\.9999I\.13\.4x1​\(x22\+x32\+x42\)2\\displaystyle\\frac\{x\_\{1\}\\left\(x\_\{2\}^\{2\}\+x\_\{3\}^\{2\}\+x\_\{4\}^\{2\}\\right\)\}\{2\}0\.46​x12​x4\+x1​x2​x3\+6\.83\\displaystyle 0\.46x\_\{1\}^\{2\}x\_\{4\}\+x\_\{1\}x\_\{2\}x\_\{3\}\+6\.830\.9092x1​\(x2​x4\+x322\+\(−x2\+x4\)22\)\\displaystyle x\_\{1\}\\left\(x\_\{2\}x\_\{4\}\+\\frac\{x\_\{3\}^\{2\}\}\{2\}\+\\frac\{\\left\(\-x\_\{2\}\+x\_\{4\}\\right\)^\{2\}\}\{2\}\\right\)0\.9999I\.15\.1x1​x2−x22x32\+1\\displaystyle\\frac\{x\_\{1\}x\_\{2\}\}\{\\sqrt\{\-\\frac\{x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+1\}\}0\.58​x1​x23x32\+x1​x2\\displaystyle\\frac\{0\.58x\_\{1\}x\_\{2\}^\{3\}\}\{x\_\{3\}^\{2\}\}\+x\_\{1\}x\_\{2\}0\.99971\.00​x1​x2−x22x32\+1\.00\\displaystyle\\frac\{1\.00x\_\{1\}x\_\{2\}\}\{\\sqrt\{\-\\frac\{x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+1\.00\}\}0\.9999I\.16\.6x2\+x31\+x2​x3x12\\displaystyle\\frac\{x\_\{2\}\+x\_\{3\}\}\{1\+\\frac\{x\_\{2\}x\_\{3\}\}\{x\_\{1\}^\{2\}\}\}−0\.04​x12​x22x32​\(0\.71−x2\)2\+x1−0\.04\\displaystyle\-\\frac\{0\.04x\_\{1\}^\{2\}x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\\left\(0\.71\-x\_\{2\}\\right\)^\{2\}\}\+x\_\{1\}\-0\.040\.9138x1−\(x1−x2\)​\(x1−x3\)x1\+x2​x3x1\\displaystyle x\_\{1\}\-\\frac\{\\left\(x\_\{1\}\-x\_\{2\}\\right\)\\left\(x\_\{1\}\-x\_\{3\}\\right\)\}\{x\_\{1\}\+\\frac\{x\_\{2\}x\_\{3\}\}\{x\_\{1\}\}\}0\.9999I\.27\.61x3x2\+1x1\\displaystyle\\frac\{1\}\{\\frac\{x\_\{3\}\}\{x\_\{2\}\}\+\\frac\{1\}\{x\_\{1\}\}\}0\.44​x1​x2x3\\displaystyle 0\.44\\sqrt\{\\frac\{x\_\{1\}x\_\{2\}\}\{x\_\{3\}\}\}0\.9113x2x3\+x2x1\\displaystyle\\frac\{x\_\{2\}\}\{x\_\{3\}\+\\frac\{x\_\{2\}\}\{x\_\{1\}\}\}0\.9999I\.30\.3x1​sin2⁡\(x2​x32\)sin2⁡\(x22\)\\displaystyle\\frac\{x\_\{1\}\\sin^\{2\}\{\\left\(\\frac\{x\_\{2\}x\_\{3\}\}\{2\}\\right\)\}\}\{\\sin^\{2\}\{\\left\(\\frac\{x\_\{2\}\}\{2\}\\right\)\}\}2\.26​x1x22​\(−0\.20​x2\+0\.02​x3\+1\)\\displaystyle\\frac\{2\.26x\_\{1\}\}\{x\_\{2\}^\{2\}\\left\(\-0\.20x\_\{2\}\+0\.02x\_\{3\}\+1\\right\)\}0\.4402x1​\(1−cos⁡\(x2​x3\)\)1−cos⁡\(x2\)\\displaystyle\\frac\{x\_\{1\}\\left\(1\-\\cos\{\\left\(x\_\{2\}x\_\{3\}\\right\)\}\\right\)\}\{1\-\\cos\{\\left\(x\_\{2\}\\right\)\}\}0\.9999I\.32\.5x12​x226​π​x3​x43\\displaystyle\\frac\{x\_\{1\}^\{2\}x\_\{2\}^\{2\}\}\{6\\pi x\_\{3\}x\_\{4\}^\{3\}\}0\.12​x12​x22π​x3​x42\\displaystyle\\frac\{0\.12x\_\{1\}^\{2\}x\_\{2\}^\{2\}\}\{\\pi x\_\{3\}x\_\{4\}^\{2\}\}0\.93030\.17​x12​x22π​x3​x43\\displaystyle\\frac\{0\.17x\_\{1\}^\{2\}x\_\{2\}^\{2\}\}\{\\pi x\_\{3\}x\_\{4\}^\{3\}\}0\.9999I\.48\.2x1​x32−x22x32\+1\\displaystyle\\frac\{x\_\{1\}x\_\{3\}^\{2\}\}\{\\sqrt\{\-\\frac\{x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+1\}\}x1​\(x2\+x32\)\\displaystyle x\_\{1\}\\left\(x\_\{2\}\+x\_\{3\}^\{2\}\\right\)0\.9999x1​x32−x22x32\+1\\displaystyle\\frac\{x\_\{1\}x\_\{3\}^\{2\}\}\{\\sqrt\{\-\\frac\{x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+1\}\}0\.9999I\.6\.22​e−x222​x122​π​x1\\displaystyle\\frac\{\\sqrt\{2\}e^\{\-\\frac\{x\_\{2\}^\{2\}\}\{2x\_\{1\}^\{2\}\}\}\}\{2\\sqrt\{\\pi\}x\_\{1\}\}0\.19​sin⁡\(2\.34x1​x2\)\\displaystyle 0\.19\\sin\{\\left\(\\frac\{2\.34\}\{x\_\{1\}x\_\{2\}\}\\right\)\}0\.11302\.78​2​e−x222​x12π2​x1\\displaystyle\\frac\{2\.78\\sqrt\{2\}e^\{\-\\frac\{x\_\{2\}^\{2\}\}\{2x\_\{1\}^\{2\}\}\}\}\{\\pi^\{2\}x\_\{1\}\}0\.9999II\.11\.17x1​\(1\+x5​x6​cos⁡\(x4\)x2​x3\)\\displaystyle x\_\{1\}\\left\(1\+\\frac\{x\_\{5\}x\_\{6\}\\cos\{\\left\(x\_\{4\}\\right\)\}\}\{x\_\{2\}x\_\{3\}\}\\right\)x1\+2\.00​x5​x6​cos⁡\(x4\)x2​x3\\displaystyle x\_\{1\}\+\\frac\{2\.00x\_\{5\}x\_\{6\}\\cos\{\\left\(x\_\{4\}\\right\)\}\}\{x\_\{2\}x\_\{3\}\}0\.9030x1\+x1​x5​x6​cos⁡\(x4\)x2​x3\\displaystyle x\_\{1\}\+\\frac\{x\_\{1\}x\_\{5\}x\_\{6\}\\cos\{\\left\(x\_\{4\}\\right\)\}\}\{x\_\{2\}x\_\{3\}\}0\.9999II\.13\.23x1−x22x32\+1\\displaystyle\\frac\{x\_\{1\}\}\{\\sqrt\{\-\\frac\{x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+1\}\}0\.60​x1​x22x32\+x1\\displaystyle\\frac\{0\.60x\_\{1\}x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+x\_\{1\}0\.9998x1−x22x32\+1\\displaystyle\\frac\{x\_\{1\}\}\{\\sqrt\{\-\\frac\{x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+1\}\}0\.9999II\.13\.34x1​x2−x22x32\+1\\displaystyle\\frac\{x\_\{1\}x\_\{2\}\}\{\\sqrt\{\-\\frac\{x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+1\}\}1\.11​x1​x22x32\+x1​x2\\displaystyle\\frac\{1\.11x\_\{1\}x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+x\_\{1\}x\_\{2\}0\.9987x1​x2−x22x32\+1\\displaystyle\\frac\{x\_\{1\}x\_\{2\}\}\{\\sqrt\{\-\\frac\{x\_\{2\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+1\}\}0\.9999II\.36\.38x1​x2x3​x4\+x1​x5​x8x3​x4​x6​x72\\displaystyle\\frac\{x\_\{1\}x\_\{2\}\}\{x\_\{3\}x\_\{4\}\}\+\\frac\{x\_\{1\}x\_\{5\}x\_\{8\}\}\{x\_\{3\}x\_\{4\}x\_\{6\}x\_\{7\}^\{2\}\}1\.14​x1​x2x3​x4\+0\.12​x1​x5​x6x3​x4\\displaystyle\\frac\{1\.14x\_\{1\}x\_\{2\}\}\{x\_\{3\}x\_\{4\}\}\+\\frac\{0\.12x\_\{1\}x\_\{5\}x\_\{6\}\}\{x\_\{3\}x\_\{4\}\}0\.8020x1​\(x2\+x5​x8x6​x72\)x3​x4\\displaystyle\\frac\{x\_\{1\}\\left\(x\_\{2\}\+\\frac\{x\_\{5\}x\_\{8\}\}\{x\_\{6\}x\_\{7\}^\{2\}\}\\right\)\}\{x\_\{3\}x\_\{4\}\}0\.9999II\.6\.11x2​cos⁡\(x3\)4​π​x1​x42\\displaystyle\\frac\{x\_\{2\}\\cos\{\\left\(x\_\{3\}\\right\)\}\}\{4\\pi x\_\{1\}x\_\{4\}^\{2\}\}0\.16​x2​cos⁡\(x3\)π​x1​x4\\displaystyle\\frac\{0\.16x\_\{2\}\\cos\{\\left\(x\_\{3\}\\right\)\}\}\{\\pi x\_\{1\}x\_\{4\}\}0\.9035x2​cos⁡\(x3\)4​π​x1​x42\\displaystyle\\frac\{x\_\{2\}\\cos\{\\left\(x\_\{3\}\\right\)\}\}\{4\\pi x\_\{1\}x\_\{4\}^\{2\}\}0\.9999II\.6\.15a3​x2​x6​x42\+x524​π​x1​x35\\displaystyle\\frac\{3x\_\{2\}x\_\{6\}\\sqrt\{x\_\{4\}^\{2\}\+x\_\{5\}^\{2\}\}\}\{4\\pi x\_\{1\}x\_\{3\}^\{5\}\}8\.10​x2​x6π​x1​x35​\(x4\+x5\)\\displaystyle\\frac\{8\.10x\_\{2\}x\_\{6\}\}\{\\pi x\_\{1\}x\_\{3\}^\{5\}\\left\(x\_\{4\}\+x\_\{5\}\\right\)\}0\.78680\.75​x2​x6​x42\+x52π​x1​x35\\displaystyle\\frac\{0\.75x\_\{2\}x\_\{6\}\\sqrt\{x\_\{4\}^\{2\}\+x\_\{5\}^\{2\}\}\}\{\\pi x\_\{1\}x\_\{3\}^\{5\}\}0\.9999II\.6\.15b3​x2​sin⁡\(x3\)​cos⁡\(x3\)4​π​x1​x43\\displaystyle\\frac\{3x\_\{2\}\\sin\{\\left\(x\_\{3\}\\right\)\}\\cos\{\\left\(x\_\{3\}\\right\)\}\}\{4\\pi x\_\{1\}x\_\{4\}^\{3\}\}0\.12​x2​cos⁡\(x3\)x1​x43\\displaystyle\\frac\{0\.12x\_\{2\}\\cos\{\\left\(x\_\{3\}\\right\)\}\}\{x\_\{1\}x\_\{4\}^\{3\}\}0\.80190\.24​x2​sin⁡\(x3\)​cos⁡\(x3\)x1​x43\\displaystyle\\frac\{0\.24x\_\{2\}\\sin\{\\left\(x\_\{3\}\\right\)\}\\cos\{\\left\(x\_\{3\}\\right\)\}\}\{x\_\{1\}x\_\{4\}^\{3\}\}0\.9999III\.4\.321ex1​x22​π​x3​x4−1\\displaystyle\\frac\{1\}\{e^\{\\frac\{x\_\{1\}x\_\{2\}\}\{2\\pi x\_\{3\}x\_\{4\}\}\}\-1\}6\.12​x3​x4x1​x2\\displaystyle\\frac\{6\.12x\_\{3\}x\_\{4\}\}\{x\_\{1\}x\_\{2\}\}0\.99871ex1​x22​π​x3​x4−1\\displaystyle\\frac\{1\}\{e^\{\\frac\{x\_\{1\}x\_\{2\}\}\{2\\pi x\_\{3\}x\_\{4\}\}\}\-1\}0\.9999III\.8\.54sin2⁡\(2​π​x1​x2x3\)\\displaystyle\\sin^\{2\}\{\\left\(\\frac\{2\\pi x\_\{1\}x\_\{2\}\}\{x\_\{3\}\}\\right\)\}sin2⁡\(2​π​x1​x2​\(x3\+10\.49\)\)\\displaystyle\\sin^\{2\}\{\\left\(2\\pi x\_\{1\}x\_\{2\}\\left\(x\_\{3\}\+10\.49\\right\)\\right\)\}\-0\.9971sin2⁡\(2​π​x1​x2x3\)\\displaystyle\\sin^\{2\}\{\\left\(\\frac\{2\\pi x\_\{1\}x\_\{2\}\}\{x\_\{3\}\}\\right\)\}0\.9999test\_183​x2​x52x32\+3​x428​π​x1\\displaystyle\\frac\{\\frac\{3x\_\{2\}x\_\{5\}^\{2\}\}\{x\_\{3\}^\{2\}\}\+3x\_\{4\}^\{2\}\}\{8\\pi x\_\{1\}\}x2​x4x1​x3​x5\\displaystyle\\frac\{x\_\{2\}x\_\{4\}\}\{x\_\{1\}x\_\{3\}x\_\{5\}\}\-0\.07460\.12​x2​x52x1​x32\+0\.12​x42x1\\displaystyle\\frac\{0\.12x\_\{2\}x\_\{5\}^\{2\}\}\{x\_\{1\}x\_\{3\}^\{2\}\}\+\\frac\{0\.12x\_\{4\}^\{2\}\}\{x\_\{1\}\}0\.9999test\_52​π​x132x2​\(x3\+x4\)\\displaystyle\\frac\{2\\pi x\_\{1\}^\{\\frac\{3\}\{2\}\}\}\{\\sqrt\{x\_\{2\}\\left\(x\_\{3\}\+x\_\{4\}\\right\)\}\}x1​\(3\.83−0\.46​x42​\(1−0\.87​x2\)2x2​x3\)\\displaystyle x\_\{1\}\\left\(3\.83\-\\frac\{0\.46x\_\{4\}^\{2\}\\left\(1\-0\.87x\_\{2\}\\right\)^\{2\}\}\{x\_\{2\}x\_\{3\}\}\\right\)0\.79682​π​x132x2​\(x3\+x4\)\\displaystyle\\frac\{2\\pi x\_\{1\}^\{\\frac\{3\}\{2\}\}\}\{\\sqrt\{x\_\{2\}\\left\(x\_\{3\}\+x\_\{4\}\\right\)\}\}0\.9999test\_9−32​x14​x32​x42​\(x3\+x4\)5​x25​x55\\displaystyle\-\\frac\{32x\_\{1\}^\{4\}x\_\{3\}^\{2\}x\_\{4\}^\{2\}\\left\(x\_\{3\}\+x\_\{4\}\\right\)\}\{5x\_\{2\}^\{5\}x\_\{5\}^\{5\}\}−4\.63​x1​x32​x42x52​\(0\.87−x2\)2\\displaystyle\-\\frac\{4\.63x\_\{1\}x\_\{3\}^\{2\}x\_\{4\}^\{2\}\}\{x\_\{5\}^\{2\}\\left\(0\.87\-x\_\{2\}\\right\)^\{2\}\}0\.4848−6\.40​x14​x32​x42​\(x3\+x4\)x25​x55\\displaystyle\-\\frac\{6\.40x\_\{1\}^\{4\}x\_\{3\}^\{2\}x\_\{4\}^\{2\}\\left\(x\_\{3\}\+x\_\{4\}\\right\)\}\{x\_\{2\}^\{5\}x\_\{5\}^\{5\}\}0\.9999

Similar Articles

Deep Divide-and-Reduce in Symbolic Regression

arXiv cs.LG

This paper introduces DDRSR, a method that broadens expression decomposition and reduction in symbolic regression, avoiding brute-force sub-structure searches and providing theoretical correctness, with empirical advantages over prior approaches.

Language models guide symbolic equation discovery by controlling search

arXiv cs.AI

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.