Manuscript Offprint

arXiv:2610.17994

Improving Neural Symbolic Regression with a Diverse Prior and Post-training Alignment

David Otte, Jörg K. H. Franke, Frank Hutter

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Symbolic regression is the problem of finding an expression that fits a dataset. Solving it requires searching a combinatorial space of candidate expressions. Neural symbolic regression can amortize that search by training a model once on synthetic data and then predicting expressions for a new dataset. But existing models still underperform genetic programming on real, noisy data. We argue that the deficit lies in the training rather than in the paradigm, and present RASR (Reinforced Amortized Symbolic Regression), a method with two key changes to the training recipe. First, we design a synthetic prior that narrows the gap with real-world data: inputs come from the prior of a tabular foundation model; constants are sampled bottom-up, conditioned on the data; targets carry heteroscedastic and structured noise; and everything is standardized. Second, we split training into two stages. Supervised pre-training maximizes the token-level likelihood of a reference expression. This is followed by reinforcement-learning post-training that aligns the model with its inference-time use by rewarding held-out fit and penalizing expression size. On the black-box track of SRBench 2.0, RASR achieves the best mean test R2R^{2} rank of all evaluated methods. Three RASR variants, trained with different size penalties, make up most of the accuracy-complexity Pareto front. On Strogatz, our method recovers more ground-truth expressions than any baseline, and on Feynman it is competitive with the best-performing methods.

1 INTRODUCTION

Symbolic regression is the task of finding a closed-form mathematical expression that fits a regression dataset. The classical use case is scientific discovery, where the expression itself is the object of interest (Schmidt & Lipson, 2009). Another is general tabular prediction, where the data need not follow an exact law and symbolic regression can still yield models that are interpretable yet expressive. Searching over expressions is difficult, since the space is discrete and grows combinatorially with expression size, and the problem is NP-hard in general (Virgolin & Pissis, 2022). For decades this search has been driven predominantly by genetic programming (Koza, 1994), which is still widely regarded as the state of the art, with PySR (Cranmer, 2023) and Operon (Burlacu et al., 2020) among its strongest modern representatives.

A more recent line of work is neural symbolic regression, where a transformer is trained over many synthetic examples and then predicts expressions for a new dataset directly (Biggio et al., 2021; Kamienny et al., 2022), amortizing a search that classical methods must rerun for every problem. We use the term in this narrow sense of amortized methods, excluding neural methods that train anew on each dataset (Section 2). A similar recipe has reshaped the neighboring field of tabular prediction, where tabular foundation models such as TabPFN (Hollmann et al., 2023; 2025), pre-trained once on a synthetic prior, now match or surpass classical approaches (Erickson et al., 2025). Neural symbolic regression, by contrast, still trails the best search-based systems, particularly on black-box problems (Cava et al., 2021; Aldeia et al., 2025). We argue that this gap is not inherent to the paradigm but stems from how these models are trained.

∗^{*}Work done while at the University of Freiburg.

Figure

Figure 1: Accuracy-complexity trade-off on the black-box track of SRBench 2.0. Mean expression size (log scale) against mean improvability, the relative RMSE gap to the best method on each dataset (%), lower is better). The dashed line marks the Pareto front, and triangles on the border mark methods outside the plotted range. Three of the five methods on the front are our RASR variants, differing only in the expression-size penalty used during post-training, and the default RASR-94M-L attains the best fit of any evaluated method. Figure J.1 shows every method.

Two aspects of that training are at fault. The first is the synthetic prior, the distribution of training samples. Prior work samples inputs from uniform or Gaussian distributions and computes targets without noise, as in NeSymReS and E2E (Biggio et al., 2021; Kamienny et al., 2022), so the tables a model learns from look little like the ones it is applied to. The second is the training objective. Existing methods train almost exclusively with supervised objectives against a reference expression, most commonly token-level cross-entropy. At test time, however, we care more about fit quality and expression size than about the exact token sequence.

We address both in RASR, short for Reinforced Amortized Symbolic Regression. 1^{1} At its core is an encoder-decoder transformer that reads a dataset and generates expressions for it. At inference RASR samples many candidates, refines their constants numerically, and returns the Pareto front of fit quality against expression size, so a user can choose the trade-off. Our main contributions are:

• A diverse, data-realistic synthetic prior whose inputs come from the prior of a tabular foundation model (Qu et al., 2026), whose constants are sampled bottom-up conditioned on the data so that every operator stays in a sensible regime, and whose targets carry heteroscedastic and structured noise, with full standardization throughout (Section 3.1).

• A two-stage training procedure that keeps supervised pre-training as the scalable stage and adds a reinforcement-learning post-training stage, rewarding held-out fit and penalizing expression size directly with group-relative policy optimization (Shao et al., 2024) under a risk-sensitive variant (Jiang et al., 2025) (Section 3.3).

• State-of-the-art results on SRBench 2.0, with the best mean test R2R^{2} rank of all evaluated methods on the black-box track, at modest expression size. Three variants, post-trained with different size penalties, span the accuracy-complexity trade-off and all lie on the Pareto front, which holds only two other methods (Figure 1). On the ground-truth tracks of the original SRBench, RASR attains the highest solution rate of all methods on Strogatz and is close behind the leaders on Feynman (Section 4).

1^{1}Our source code is publicly available at https://github.com/automl/rasr. The weights of our models are hosted on Hugging Face at https://hf.co/collections/davidotte/rasr.

References (40)