alphaFeedback

WorksComputer Science

From Score to Diagnosis: Search-Independent Post-Diagnosis for Symbolic Regression

AI contributions
  • LLMs
View details

Abstract

Symbolic regression (SR) solvers employ diverse search mechanisms, yet most rely on the same low-information scalar fitness. Such scores provide little guidance on why a skeleton fails or how it should be revised. Recent methods develop new methods to address this bottleneck. Their enhanced feedback mechanisms are tightly coupled to their search processes and are difficult to reuse across diverse SR solvers. Instead, we ask whether a shared feedback mechanism can further improve diverse solvers facing the same bottleneck. To this end, we propose PostDiag, a search-independent feedback mechanism, which can be shared to different SR solvers. PostDiag introduces Patch-wise Feature Profiling (PFP) to capture local behavior through patch-wise features of level, trend, and roughness. Based on PFP, PostDiag quantifies Skeleton Expressiveness Risk by comparing the fitted candidate with the observations, and Skeleton Stability Risk by measuring variability of behavior after bootstrap refitting. The Diagnostic Risk Plane (DRP) combines two risks to determine whether a skeleton should be preserved, repaired, simplified, or rewritten, while the patch-wise discrepancies provide evidence for the intervention. An LLM editor then performs the diagnosis-guided intervention, and the validated revision is returned to the original solver through a lightweight adapter. Experiments across multiple LLM-based and GP-based SR solvers show that PostDiag consistently improves accuracy and accelerates convergence.

Introduction

Symbolic regression (SR) discovers compact, interpretable mathematical expressions from observed data, enabling data-driven scientific discovery across physics, biology, chemistry, and engineering [44, 52, 18, 20, 43] (Udrescu & Tegmark 2020). Given observations {(xi,yi)}i=1N\{(x_i, y_i)\}_{i=1}^{N}, SR searches for an expression f:x↦yf : x \mapsto y that explains the underlying relationship. Modern SR solvers employ diverse search strategies to enable efficient and accurate SR: PySR uses multi-population evolutionary search [5]; LLM-SR iteratively refines equations using the code-generation and reasoning capabilities of LLMs [38]; LaSR co-evolves equations with a reusable concept library [10]; and SR-Scientist autonomously integrates data analysis, tool use, and equation refinement [45]. This diversity is valuable because different solvers offer complementary strengths.

Despite their diverse search strategies, most SR solvers rely on the same impoverished search feedback: a scalar fitness score, such as MSE or NMSE. By collapsing the residual landscape into a single value, these scores obscure error geometry and reveal little about where, why, or how a candidate fails. Indeed, similar scores may correspond to fundamentally distinct failure modes (Li et al.; Xiang et al.). This limited feedback leaves even sophisticated search mechanisms poorly informed, resulting in inefficient and misdirected exploration.

Recent methods RESTART and Deliberate Evolution (DE) design new SR solvers that embed structured diagnostics into their search loops, providing clearer directions for candidate refinement than scalar errors alone [32] (Li & Pan 2026). However, their feedback mechanism depend on solver-specific search information, such as search trajectories memory, parent-selection strategy, and operator policy. Thus, feedback mechanisms are tightly coupled to the method’s search process and remain an internal solver capability rather than reusable feedback. This coupling creates an undesirable trade-off: obtaining such enhanced feedback mechanism generally requires adopting the accompanying search framework, rather than retaining the distinctive mechanisms of existing solvers, such as LaSR’s concept–equation co-evolution, SR-Scientist’s autonomous tool-use loop, and PySR’s efficient genetic-programming engine.

This motivates a different question: can richer diagnostic feedback be made reusable across diverse solvers, so that their shared feedback bottleneck can be addressed without sacrificing their distinctive search mechanisms? Rather than introducing another new solver, we pursue a route orthogonal to solver design: constructing a diagnostic feedback mechanism that can be integrated with different SR solvers. Such a mechanism should be search-independent, neither depending on nor altering the solver’s underlying search mechanism; informative, revealing where and how a candidate fails; and solver-compatible, allowing diagnosis-guided revisions to be readily returned to the solver.

To instantiate this view, we propose PostDiag, a search-independent post-diagnostic module for SR. Unlike feedback mechanisms embedded in the search loop, PostDiag takes only candidate skeletons and observed data as input, without relying on solver-specific search mechanisms. It can therefore be integrated with solvers that employ different search mechanisms. For each candidate, PostDiag produces two complementary outputs: an evidence map that reveals where and how the candidate fails, and a risk localization that determines the appropriate intervention. PostDiag first introduces Patchwise Feature Profiling (PFP), which represents local candidate behavior using structured fingerprints of level, trend, and roughness. Rather than compressing diagnostic information into a single global error, discrepancies between these local fingerprints form an interpretable evidence map and support the estimation of Skeleton Expressiveness Risk and Skeleton Stability Risk. The former captures the structural mismatch remaining after coefficient fitting, while stability measures the candidate’s sensitivity to data resampling. The Diagnostic Risk Plane (DRP) uses these two quantities to assign the candidate to one of four intervention regions: preserve, repair, simplify, or rewrite. A conditional LLM then performs the corresponding skeleton intervention, and the revised candidate is returned to the original solver through a lightweight adapter. We integrate the PostDiag with different SR solvers spanning LLM-based and GP-based methods, and evaluate them on the LSR-Synth dataset of LLM-SRBench. The results show that PostDiag improves candidate refinement and accelerates convergence without replacing the solvers’ original search mechanisms. Ablation studies further validate the contribution of each diagnostic component.

Our contributions come in fourfold: (1) We introduce a solver-independent post-diagnostic perspective for SR that separates feedback design from search design, addressing a shared feedback bottleneck without replacing existing solvers. (2) We propose PostDiag, a reusable diagnostic module that takes only a candidate skeleton and observed data as input and returns evidence-supported diagnoses and candidate revisions through lightweight solver adapters. (3) We develop PFP to extract patch-wise diagnostic evidence and DRP to map skeleton adequacy and stability to targeted interventions. (4) We integrate the PostDiag with seven different LLM-based and GP-based SR solvers, demonstrating broad compatibility and consistent convergence improvements.

Related Work

Symbolic regression (SR) spans diverse search and learning paradigms, each contributing distinct inductive biases and capabilities [3, 36, 6, 16]. Genetic-programming methods evolve expression trees through population-based operators [19, 33, 31, 7, 40], with PySR providing efficient multi-population search, complexity control, and constant optimization [5]. Tree-search, reinforcement-learning, and neural methods instead leverage planning, learned generation policies, or pretrained representations [41, 34, 26, 30, 12, 2, 17, 37, 29 Li et al.]. More recently, LLM-based methods have incorporated scientific priors and reasoning: LLM-SR combines program proposal with evolutionary experience [38], LaSR co-evolves equations and a concept library [10], and many SR agent methods performs autonomous tool-assisted optimization [45, 15, 25]. Despite their diverse generation and search mechanisms, these methods share a common feedback bottleneck: candidate behavior is compressed into scalar fitness, which supports ranking but provides little information about failure modes, structural defects, or appropriate interventions.

Deliberate Evolution (DE) [32] augments an MSE-driven evolutionary process with data and residual diagnostics, adaptive search operators, and trajectory-level memory, demonstrating that structured feedback can improve symbolic search beyond reliance on scalar errors alone. However, DE addresses this shared feedback bottleneck by introducing a new end-to-end solver, in which diagnosis is tightly coupled with its parent-selection strategy, operator policy, and trajectory memory. Adopting DE therefore entails replacing the original solving framework, making it difficult to retain solver-specific strengths such as LaSR’s concept–equation co-evolution, SR-Scientist’s agentic closed-loop optimization, or PySR’s efficient genetic-programming engine. Its limitation lies in addressing a common challenge across SR methods through a dedicated solver rather than a capability that existing solvers can readily share.

PostDiag takes a different technical route. Instead of replacing existing solvers, it provides a shared diagnostic interface decoupled from their internal search processes. Given any candidate skeleton produced by the solver and the observation, PostDiag uses Patch-wise Feature Profiling to recover local behavioral information obscured by scalar errors and provide evidence for risk localization and candidate intervention. It can therefore enhance diagnostic feedback across heterogeneous SR solvers while preserving their original search mechanisms and distinctive strengths.

A Search-Independent Post-Diagnosis for SR

Problem Setup

Given a dataset D={(xi,yi)}i=1N\mathcal{D} = \{(\mathbf{x}_i, y_i)\}_{i=1}^{N}, where xi∈Rd\mathbf{x}_i \in\mathbb{R}^{d} and yi∈Ry_i \in\mathbb{R}, we represent a candidate expression as fs(x;θs)f_s(\mathbf{x}; \boldsymbol{\theta}_s). Here, ss denotes the symbolic skeleton and θs\boldsymbol{\theta}_s is its numerical coefficients. PostDiag treats the skeleton ss as the object of diagnosis.

We randomly partition D\mathcal{D} into a disjoint fit set Dfit\mathcal{D}_{\mathrm{fit}} and audit set Daudit\mathcal{D}_{\mathrm{audit}}. The fit set is used to estimate the numerical coefficients of the candidate skeleton, while the audit set is used to evaluate the fitted candidate and produce its diagnosis. This separation prevents coefficient fitting and candidate diagnosis from using the same observations.

Given a candidate skeleton ss and dataset D\mathcal{D}, PostDiag outputs a structured diagnostic report Gs\mathcal{G}_s and a revised skeleton s~\tilde{s}:

PostDiag⁡(s,D)⟶(Gs,s~).\operatorname{PostDiag}(s,\mathcal{D}) \longrightarrow(\mathcal{G}_s,\tilde{s}).

Here, Gs=(cs,Es)\mathcal{G}_s=(c_s,\mathcal{E}_s) contains the candidate’s diagnostic coordinate csc_s on the diagnostic risk plane and supporting evidence Es\mathcal{E}_s, while s~\tilde{s} is the candidate skeleton revised according to the diagnosis.

PostDiag neither generates initial candidates nor prescribes how a solver conducts its search. It diagnoses candidate skeletons supplied by the solver and returns the diagnostic results and revised skeletons through a unified interface. The same diagnostic core can therefore be integrated with different SR solvers through lightweight adapters.

Patch-wise Feature Profiling (PFP)

To support expressiveness and stability estimation without compressing evaluation into a scalar error, PostDiag uses Patch-wise Feature Profiling to construct structured fingerprints on the observation.

We first normalize each input dimension and denote the normalized coordinate of xix_i by x~i\tilde{x}_i. We then construct MM local patches P={Pm⊆Daudit}m=1M\mathcal{P}=\{P_m\subseteq\mathcal{D}_{\mathrm{audit}}\}_{m=1}^{M}. Such patches can be constructed in various ways. We adopt an anchor-kkNN for its simplicity and robustness in multivariate settings. Specifically, we select spatially well-distributed anchors via farthest point sampling [9] and construct each patch from the kk nearest neighbors [4] of an anchor x^m\hat{x}_m:

Pm={(xi,yi)∈Daudit∣x~i is among the k nearest neighbors of x^m}.P_m=\{(x_i,y_i)\in\mathcal{D}_{\mathrm{audit}}\mid\tilde{x}_i\text{ is among the }k\text{ nearest neighbors of }\hat{x}_m\}.

The patches may overlap, reducing sensitivity to neighborhood boundaries, while MM and kk are chosen to cover all audit samples.

Given a patch PmP_m, PFP summarizes the local behavior of ff using three complementary features.

Level. The level is the mean function value within the patch:

μm(f)=1k∑i∈Pmf(xi).(1)\mu_m(f)=\frac{1}{k}\sum_{i\in P_m}f(x_i). \tag*{(1)}

Equivalently, μm(f)\mu_m(f) is the best constant approximation of PmP_m in the least-squares sense, i.e.,

μm(f)=arg⁡min⁡c∈R∑i∈Pm(f(xi)−c)2.\mu_m(f)=\underset{c\in\mathbb{R}}{\arg\min}\sum_{i\in P_m}\left(f(x_i)-c\right)^2.

Thus, μm(f)\mu_m(f) summarizes the zeroth-order behavior of ff on the patch PmP_m.

Trend. The trend captures the direction and magnitude in which PmP_m varies across the normalized inputs. It is defined as the least-squares slope vector of PmP_m on each direction:

βm(f)=arg⁡min⁡β∈Rd∑xi∈Pm[f(xi)−μm(f)−βT(x~i−xˉm)]2,\beta_m(f)=\underset{\beta\in\mathbb{R}^d}{\arg\min}\sum_{x_i\in P_m}\left[f(x_i)-\mu_m(f)-\beta^{\mathsf{T}}(\tilde{x}_i-\bar{x}_m)\right]^2,

where xˉm=1k∑xi∈Pmxi\bar{x}_m=\frac{1}{k}\sum_{x_i\in P_m}x_i is the normalized patch centroid. βm(f)\beta_m(f) summarizes the first-order behavior of ff on the patch PmP_m. We retain βm(f)\beta_m(f) as a dd-dimensional vector to capture trends in multivariate symbolic regression. Estimating local slopes via least squares, rather than endpoint differences, further improves robustness to endpoint anomalies and observation noise.

Roughness. Roughness captures the higher-order local behavior that cannot be explained by a constant level or a linear trend. For each xi∈Pmx_i\in P_m, we can define the local affine approximation use Level and Trend as

f^m(xi)=μm(f)+βm(f)T(x~i−xˉm).\hat{f}_m(x_i)=\mu_m(f)+\beta_m(f)^{\mathsf{T}}(\tilde{x}_i-\bar{x}_m).

We therefore denote the residual between ff and f^\hat{f} on PmP_m as an additional signal:

ρm(f)=1k∑i∈Pm(f(xi)−f^m(xi))2.\rho_m(f)=\sqrt{\frac{1}{k}\sum_{i\in P_m}\left(f(x_i)-\hat{f}_m(x_i)\right)^2}.

Accordingly, if ff is affine within PmP_m, its local behavior is fully explained by the Level and Trend terms, yielding ρm(f)=0\rho_m(f)=0. Local nonlinearity or curvature increases Roughness ρm(f)\rho_m(f).

The local fingerprint of ff on PmP_m is

Φm(f)=(μm(f),βm(f),ρm(f)),\Phi_m(f)=(\mu_m(f),\beta_m(f),\rho_m(f)),

and its complete fingerprint over the Daudit\mathcal{D}_{\mathrm{audit}} is

Φ(f)={Φm(f)}m=1M.\Phi(f)=\{\Phi_m(f)\}_{m=1}^{M}.

By profiling different behaviors over the same patch partition, PFP provides a common basis for structured comparison. Each comparison is tied to a specific input-space patch and further decomposed into level, trend, and roughness features. It therefore reveals not only where behaviors differ, but also how they differ, while reducing reliance on individual pointwise residuals. In the next subsection, we use PFP as a comparison tool to assess skeleton adequacy and stability. Together, these comparisons yield the diagnostic coordinate csc_s and its supporting evidence map Es\mathcal{E}_s.

Diagnostic Risk Plane

PostDiag is designed to diagnose a candidate without depending on or altering the solver’s search mechanism. It therefore cannot rely on solver-specific signals such as search trajectories, visitation statistics, population states, or operator histories, and must infer the appropriate intervention from only the candidate skeleton and observed data. To meet this constraint, we introduce the Diagnostic Risk Plane (DRP), which characterizes each skeleton using two behavior-based risks: Skeleton Expressiveness Risk and Skeleton Stability Risk. The former asks whether the skeleton can represent the observed behavior after coefficient fitting, whereas the latter asks whether the skeleton exhibits consistent behavior when its coefficients are re-estimated from different subset of the fitting data.

Skeleton expressiveness risk. We quantify this risk by a fingerprint-based bias score Bias⁡(s)\operatorname{Bias}(s). Specifically, let θ~s\tilde{\theta}_s denote the coefficients of skeleton ss fitted on Dfit\mathcal{D}_{\mathrm{fit}}, and let f~s(x)=fs(x;θ~s)\tilde{f}_s(x)=f_s(x;\tilde{\theta}_s). We evaluate f~s\tilde{f}_s on Daudit\mathcal{D}_{\mathrm{audit}} and compare its fingerprint with that of the observed responses yaudit\mathbf{y}_{\mathrm{audit}} over the same patches. For each patch PmP_m, we compute

Δμm=∣μm(f~s)−μm(yaudit)∣,Δβm=∥βm(f~s)−βm(yaudit)∥2,Δρm=∣ρm(f~s)−ρm(yaudit)∣.\Delta\mu_m=\left|\mu_m(\tilde{f}_s)-\mu_m(\mathbf{y}_{\mathrm{audit}})\right|,\quad\Delta\beta_m=\left\|\beta_m(\tilde{f}_s)-\beta_m(\mathbf{y}_{\mathrm{audit}})\right\|_2,\quad\Delta\rho_m=\left|\rho_m(\tilde{f}_s)-\rho_m(\mathbf{y}_{\mathrm{audit}})\right|.

The local expressiveness risk is

Bias⁡m(s)=ωμΔμm+ωβΔβm+ωρΔρm,\operatorname{Bias}_m(s)=\omega_\mu\Delta\mu_m+\omega_\beta\Delta\beta_m+\omega_\rho\Delta\rho_m,

and the overall risk is

Bias⁡(s)=1M∑m=1MBias⁡m(s).\operatorname{Bias}(s)=\frac{1}{M}\sum_{m=1}^{M}\operatorname{Bias}_m(s).

A low Bias⁡(s)\operatorname{Bias}(s) indicates that the fitted skeleton reproduces the observed behavior across patches, whereas a high value indicates insufficient expressiveness. The nonnegative weights ωμ\omega_\mu, ωβ\omega_\beta, and ωρ\omega_\rho balance the three features. In practice, we assign a smaller weight to roughness because it is more sensitive to local fluctuations in finite patches.

Skeleton stability risk. Expressiveness alone cannot reveal whether the fitted behavior is reproducible or depends on the particular observations used for coefficient fitting. We characterize this dependence as skeleton stability risk. A stable skeleton should induce similar behavior when refitted on different resamples of the same observations, whereas a fragile skeleton relies on sample-specific coefficient configurations and therefore varies substantially across refits. We therefore quantify skeleton stability risk by the dispersion score Var⁡(s)\operatorname{Var}(s) of the refitted function under different subset of the Dfit\mathcal{D}_{\mathrm{fit}}. Specifically, we generate BB fitting subsets {Db}b=1B\{\mathcal{D}_b\}_{b=1}^{B} by bootstrap resampling [8] of the Dfit\mathcal{D}_{\mathrm{fit}} and refit the coefficients of the same skeleton ss on each subset. This yields

fs(b)(x)=fs(x;θs(b)),b=1,…,Bf_s^{(b)}(x)=f_s(x;\theta_s^{(b)}),\qquad b=1,\ldots,B

. All refitted functions are evaluated on the same audit patches. For each patch PmP_m, we measure the dispersion of the fingerprints produced by the {fs(b)(x)}b=1B\{f_s^{(b)}(x)\}_{b=1}^{B}:

Σμ,m=std⁡b[μm(fs(b))],Σρ,m=std⁡b[ρm(fs(b))],Σβ,m=1B∑b=1B∥βm(fs(b))−β‾m∥2,\Sigma_{\mu,m}=\operatorname{std}_b[\mu_m(f_s^{(b)})],\quad\Sigma_{\rho,m}=\operatorname{std}_b[\rho_m(f_s^{(b)})],\quad\Sigma_{\beta,m}=\frac{1}{B}\sum_{b=1}^{B}\left\|\beta_m(f_s^{(b)})-\overline{\beta}_m\right\|_2,

where β‾m=1B∑b=1Bβm(fs(b))\overline{\beta}_m = \frac{1}{B} \sum_{b=1}^{B} \beta_m\left(f_s^{(b)}\right). The local stability risks of patch PmP_m are

Var⁡m(s)=ωμΣμ,m+ωβΣβ,m+ωρΣρ,m,\operatorname{Var}_m(s) = \omega_\mu\Sigma_{\mu,m} + \omega_\beta\Sigma_{\beta,m} + \omega_\rho\Sigma_{\rho,m},

and the overall stability risks of skeleton ss can be defined as

Var⁡(s)=1M∑m=1MVar⁡m(s).\operatorname{Var}(s) = \frac{1}{M} \sum_{m=1}^{M} \operatorname{Var}_m(s).

A larger Var⁡(s)\operatorname{Var}(s) indicates greater variation in the fitted behavior across resamples and thus higher skeleton stability risk.

Risk localization and diagnostic evidence. Each candidate ss is positioned in the Diagnostic Risk Plane (DRP) by the coordinate cs=(Bias⁡(fs),Var⁡(fs))c_s = \left(\operatorname{Bias}(f_s), \operatorname{Var}(f_s)\right). Meanwhile, the patch-level quantities are retained as the evidence map

Es={(Δμm,Δβm,Δρm,Var⁡m(s))}m=1M.\mathcal{E}_s = \left\{\left(\Delta\mu_m, \Delta\beta_m, \Delta\rho_m, \operatorname{Var}_m(s)\right)\right\}_{m=1}^{M}.

Thus, csc_s provides a compact risk localization for selecting an intervention, while Es\mathcal{E}_s identifies the patches and behavioral features responsible for that diagnosis.

Using thresholds τB\tau_B and τV\tau_V, the DRP distinguishes four diagnostic states, each corresponding to a different failure mode and intervention strategy:

  • SETTLED (Bias⁡≤τB\operatorname{Bias} \leq\tau_B, Var⁡≤τV\operatorname{Var} \leq\tau_V): the skeleton is sufficiently expressive and stable. The intervention is therefore preservation-oriented: the skeleton is either preserved or only minimally refined according to the evidence map.

  • UNDERFIT (Bias⁡>τB\operatorname{Bias} > \tau_B, Var⁡≤τV\operatorname{Var} \leq\tau_V): the skeleton exhibits stable but systematic behavioral discrepancies, indicating missing or incorrect local structure. The candidate should be repaired by adding or replacing local symbolic components guided by the evidence map.

  • OVERFIT (Bias⁡≤τB\operatorname{Bias} \leq\tau_B, Var⁡>τV\operatorname{Var} > \tau_V): the skeleton matches the observations but is unstable under resampling, suggesting redundant or poorly identifiable structure. The candidate should be simplified.

  • MISMATCHED (Bias⁡>τB\operatorname{Bias} > \tau_B, Var⁡>τV\operatorname{Var} > \tau_V): the skeleton is neither expressive nor stable, indicating a more fundamental structural mismatch. The candidate should be rewritten.

The diagnostic coordinate determines what intervention is appropriate, while the evidence map indicates where and how the candidate fails. Both rely only on the candidate skeleton and observed data, enabling targeted diagnosis independent of the solver’s internal search process.

Diagnosis-Guided Intervention and Solver Integration

To reduce overhead, PostDiag first applies a low-cost NMSE-based gate to determine whether a candidate needs structured diagnosis. Candidates with either very low or very high errors are excluded from the PostDiag pipeline. Accurate candidates require no structural intervention, while poor candidates are left to the base solver’s native search mechanism for elimination or regeneration. PostDiag therefore focuses on intermediate candidates, for which more informative feedback is needed to determine an appropriate intervention. NMSE serves only as a coarse screening signal, whereas PFP and DRP provide the evidence and diagnostic decision that guide the intervention.

For each candidate entering the diagnosis pipeline, PostDiag produces Gs=(cs,Es)\mathcal{G}_s = (c_s, \mathcal{E}_s). The risk region determined by csc_s specifies the intervention type, while Es\mathcal{E}_s identifies the patches and behavioral features that motivate the intervention. An LLM-based post-editor receives the original skeleton ss, csc_s, and Es\mathcal{E}_s, and proposes a diagnosis-guided revision s~\tilde{s}. The LLM acts only as a conditional skeleton editor and does not participate in the solver’s candidate generation or search control. Notably, a candidate entering the diagnostic process may still be classified as SETTLED. Although its scalar error is not yet low enough for direct acceptance, the DRP indicates that its skeleton is sufficiently expressive and stable. PostDiag still provides the LLM editor with the original skeleton, the preservation-oriented diagnosis, and the evidence map Es\mathcal{E}_s, but instructs it to either retain the skeleton or make only minor edits supported by the evidence.

CategoryMethod / settingOverall Time (s)Overall NMSEOverall A.01A_{.01}Overall A.001A_{.001}Phys NMSEPhys A.01A_{.01}Phys A.001A_{.001}MatSci NMSEMatSci A.01A_{.01}MatSci A.001A_{.001}Chem NMSEChem A.01A_{.01}Chem A.001A_{.001}Bio NMSEBio A.01A_{.01}Bio A.001A_{.001}
LLM-basedDirect LLM30.57.72E-022.60.87.32E-023.00.86.24E-022.71.33.50E-022.80.91.63E-011.40.0
Direct LLM+PostDiag33.73.23E-024.42.35.22E-025.33.84.34E-034.02.78.76E-033.70.96.03E-024.21.4
SGA320.01.39E-0211.95.99.43E-038.36.18.21E-0312.05.34.92E-0319.47.44.15E-026.94.2
SGA+PostDiag350.22.40E-0318.69.82.66E-0314.49.81.87E-0425.36.78.65E-0424.113.06.52E-0311.18.3
LLM-SR167.51.45E-0322.08.83.66E-0314.48.33.12E-0537.313.31.75E-0427.88.38.15E-0411.15.6
LLM-SR+PostDiag191.72.12E-0431.015.23.48E-0423.512.18.94E-0660.030.75.84E-0528.712.04.02E-0418.19.7
LaSR559.21.06E-0213.47.51.73E-0211.46.82.48E-0314.76.76.90E-0318.511.11.22E-028.34.2
LaSR+PostDiag595.48.62E-0421.412.71.52E-0320.511.44.82E-0529.314.76.45E-0422.214.88.29E-0413.99.7
SR-Scientist648.01.12E-0325.611.92.74E-0317.49.84.47E-0546.721.31.49E-0427.811.17.26E-0415.36.9
SR-Scientist+PostDiag702.21.92E-0435.720.43.11E-0425.815.91.08E-0562.737.36.47E-0538.020.43.54E-0422.211.1
GP-basedPySR8.82.67E-0323.811.44.11E-0321.212.11.70E-0444.018.78.93E-0420.410.25.29E-0312.54.2
PySR+PostDiag10.51.34E-0328.713.21.82E-0324.214.42.25E-0450.717.35.29E-0425.912.02.84E-0318.18.3
gplearn95.51.34E-010.00.08.51E-020.00.02.36E-020.00.06.56E-020.00.04.42E-010.00.0
gplearn+PostDiag101.73.07E-021.00.04.29E-032.30.06.91E-030.00.04.29E-020.90.08.58E-020.00.0

Table 1. ID performance of base solvers and their PostDiag-enhanced variants on LSR-Synth. We report accuracy to tolerance, NMSE and runtime (the mean end-to-end wall-clock seconds per task run, including both SR base solver and PostDiag overhead) over all 129 tasks. All metrics are aggregated over three seeds. AτA_\tau abbreviates Accτ\mathrm{Acc}_\tau.

We apply a lightweight validation before returning the proposed revision. Specifically, we refit the coefficients of s~\tilde{s} on Dfit\mathcal{D}_{\mathrm{fit}} and evaluate its prediction error on Daudit\mathcal{D}_{\mathrm{audit}}. The revision is accepted if it reduces the error; otherwise, it is rejected and s~=s\tilde{s}=s.

The revised skeleton can be integrated into different solvers via lightweight adapters. We consider two common solver families: GP-based and LLM-based solvers. For GP-based solvers, an accepted revision is inserted into the population as a repaired offspring. For LLM-based solvers, it replaces the original candidate, while (s,Gs,s~)(s,\mathcal{G}_s,\tilde{s}) is appended to the prompt as a diagnostic revision record. Additional adapter details are provided in Appendix F. PostDiag leaves candidate generation, selection, and exploration to the base solver, deriving diagnoses solely from the candidate skeleton and observed data without accessing solver-specific search states or histories.

Experiment

Experimental Setup

Dataset. Because PostDiag and most primary baselines use LLMs, we evaluate them on the LSR-Synth subset of LLM-SRBench (Shojaee et al., [39]). Unlike LSR-Transform, which may remain vulnerable to pretraining contamination (Xia et al., [45]), LSR-Synth combines canonical domain terms with newly synthesized terms and filters tasks for solvability, novelty, and scientific plausibility. It contains 129 tasks across physics (44), materials science (25), chemistry (36), and biology (24), each with in-domain and out-of-domain test sets.

Metrics. We evaluate the discovered equations from 3 perspectives: numerical accuracy, accuracy-to-tolerance, and search efficiency. Numerical accuracy is measured by the normalized mean squared error (NMSE) between the predictions of the discovered equation ff and the ground truth:

NMSE⁡(f)=∑i=1Ntest(y^i−yi)2∑i=1Ntest(yi−yˉ)2.\operatorname{NMSE}(f)=\frac{\sum_{i=1}^{N_{\mathrm{test}}}(\hat{y}_i-y_i)^2}{\sum_{i=1}^{N_{\mathrm{test}}}(y_i-\bar{y})^2}.

where y^i\hat{y}_i is the prediction target value and yiy_i is the ground-truth value on xix_i. NMSE normalizes the error by the target variance, making it directly comparable across tasks with different output scales. We further report Acc0.01\mathrm{Acc}_{0.01} following Kamienny et al. [17]; Shojaee et al. [38]; Xia et al. [45] to show the task-level solving accuracy at stringency levels:

Accτ(f)=1(max⁡1≤i≤Ntest∣y^i−yiyi∣≤τ).\mathrm{Acc}_{\tau}(f)=\mathbb{1}\left(\max_{1\leq i\leq N_{\mathrm{test}}}\left|\frac{\hat{y}_i-y_i}{y_i}\right|\leq\tau\right).

We report Accτ\mathrm{Acc}_{\tau} for τ∈{.01,.001}\tau\in\{.01,.001\} Xia et al. [45]; tables use AτA_\tau. Search efficiency is measured by the average per-task search time (in seconds), which reflects the additional computational cost introduced by PostDiag.

Baselines. PostDiag is a search-independent diagnostic module rather than a standalone solver; we therefore compare each base solver with its PostDiag-enhanced version. We evaluate five LLM-based solvers: LLM-SR [38], LaSR [10], SR-Scientist [45], Direct LLM [39], and SGA [28]; and two GP-based solvers, PySR [5] and gplearn [40]. Integration details are in Appendix F.

Configuration of PostDiag. We describe the default configuration of PostDiag used in all experiments. For the data split, each training dataset D\mathcal{D} is randomly partitioned into a fitting set Dtr\mathcal{D}_{\mathrm{tr}} and an audit set Daud\mathcal{D}_{\mathrm{aud}} with a 75%/25% ratio. On Daud\mathcal{D}_{\mathrm{aud}}, PostDiag in the experiments of LSR-Synth constructs M=64M = 64 overlapping anchor-kkNN patches using farthest-point anchors, where k=64k = 64. We suggest that the number of anchors and the neighborhood size should be scaled to the audit-set size to guarantee that every audit sample belongs to at least one patch. For fingerprint discrepancies, the three feature dimensions are combined with weights (ωμ,ωβ,ωρ)=(0.4,0.4,0.2)(\omega_{\mu}, \omega_{\beta}, \omega_{\rho}) = (0.4, 0.4, 0.2); the smaller weight on roughness reflects its higher sensitivity to observation noise on small patches. Skeleton stability is estimated from B=3B = 3 bootstrap refits, each of size ⌊ρ∣Dfit∣⌋\lfloor\rho\lvert\mathcal{D}_{\mathrm{fit}}\rvert\rfloor points drawn with replacement, where ρ=0.7\rho= 0.7. The Diagnostic Risk Plane thresholds are setted as τB=0.25\tau_{B} = 0.25 and τV=0.15\tau_{V} = 0.15 based on preliminary experiments on a small held-out subset of tasks. We use these thresholds transfers across all four benchmark domains without per-domain re-tuning.

Search budget. To evaluate the effectiveness of PostDiag under limited search resources, we adopt low-budget configurations in the main experiments. For each task, LLM-SR is limited to 100 LLM calls; LaSR runs for 20 outer iterations; SR-Scientist runs for 10 outer iterations, each with at most 25 interaction turns; PySR runs for 65 iterations; and gplearn evolves for 100 generations. Direct LLM generates 5 candidates in Low and 10 in High from a single prompt batch; SGA runs 5 rounds (80 generated candidates) in Low and 20 rounds (320 generated candidates) in High. For each pair of a base solver and its PostDiag-augmented variant, we keep the base search budget, internal hyperparameters, LLM backbone, and random seeds identical. The diagnostic and structural intervention costs introduced by PostDiag are not deducted from the base solver’s search budget, but are included in the reported end-to-end runtime. Measured results are aggregated over three random seeds. Table 1 uses Qwen3.5-27B for all LLM-based solvers and for PostDiag interventions on GP solvers; Appendix G reports Qwen3.5-122B-A10B comparison, symbolic accuracy, budget efficiency, and additional backbones, while Appendix E reports OOD results.

Results of Different SR Solvers Integrated with PostDiag

Table 1 compares seven SR solvers with and without PostDiag on LSR-Synth. Across LLM-based solvers, model scales, and domains, PostDiag consistently reduces NMSE and improves Acc0.01\mathrm{Acc}_{0.01}, indicating that stronger LLM backbones do not eliminate the need for structured diagnostic feedback. The improvements also extend to GP-based solvers, although it cannot fully compensate for the gplearn’s limited search capacity. These gains incur additional diagnostic cost from PostDiag, but require no modification to the underlying search mechanisms.

We evaluate all solvers under reduced search budgets to test whether PostDiag improves search efficiency. Larger budgets can mask differences in discovery speed as solvers approach convergence. Despite using far fewer search steps, PostDiag-enhanced solvers match or exceed results reported with much larger budgets. For example, in SR-Scientist [45], the authors report Acc0.01\mathrm{Acc}_{0.01} of 30.49 for LLM-SR and 29.46 for their training-free variant with Qwen3-32B, using 1,000 LLM calls and 40 outer iterations. With Qwen3.5-27B, LLM-SR+PostDiag and SR-Scientist+PostDiag reach 31.0 and 35.7 using only 100 calls and 10 iterations, respectively, indicating improved search efficiency rather than gains from larger budgets.

Diagnostic Fidelity of the PostDiag

To assess whether PostDiag correctly identifies skeleton risks, we manually construct four labeled skeleton–data pair types. Settled pairs use the correct skeleton with varying Gaussian noise; Underfit pairs preserve the main structure and remove or replace one true term; Overfit pairs retain the correct skeleton and add redundant or unstable terms; and Mismatched pairs pair the data with an unrelated skeleton. Without access to these labels, PostDiag estimates Skeleton Bias and Variance via PFP and maps each candidate onto the DRP.

As shown in Figure 2a, the four pair types largely occupy their expected DRP regions. We observe a moderate overlap between underfit and mismatch near the stability boundary. This is expected, since both cases involve structural bias. When this bias is severe, coefficient refitting on resampled subsets may become unstable, making the boundary between an incomplete skeleton and a mismatched skeleton less sharp. Nevertheless, the clear quadrant structure shows that PFP and DRP provide a meaningful risk localization for different skeleton failure modes, yielding feedback with more explicit diagnostic information.

Diagnostic fidelity and component ablation plots

Figure 2. (a) Diagnostic fidelity of PostDiag. PFP-derived bias and variance scores map synthesis skeletons to distinct DRP regions, separating settled, underfit, overfit, and mismatched cases. (b) Component ablation across four base SR solvers. Each point reports pooled Acc0.01\mathrm{Acc}_{0.01} over 129 LSR-Synth tasks and three seeds. Full PostDiag performs best by combining DRP localization with evidence-guided intervention.

Ablation Study

To assess the contribution of different diagnostic signals, we compare three ablated variants with full PostDiag. “NMSE-only” provides only scalar candidate error to the LLM intervention module. “NMSE+DRP” infers skeleton adequacy and stability from NMSE-based signals and places the candidate on the DRP. “Evidence-only” supplies the PFP-based evidence map without DRP localization. “PostDiag” combines the evidence map, DRP localization, and explicit instructions to preserve, repair, simplify, or rewrite the skeleton. We evaluate all variants on LLM-SR, LaSR, SR-Scientist, and PySR. Results in Figure 2b are averaged across the four LSR-Synth domains. Qwen-27B serves as both the backbone for all LLM-based solvers and the intervention model for all four solvers.

As shown in Figure 2b, NMSE-only yields little improvement because the base solvers already rely on scalar fitness, so passing NMSE to the intervention model provides little additional information. NMSE+DRP improves the results, but its gains are limited. Estimating skeleton risk from a scalar NMSE is too coarse to reliably distinguish different failure modes, which can lead to inaccurate DRP localization. Evidence-only produces much larger improvements for LaSR and SR-Scientist, suggesting that these solvers benefit more from detailed information about where and how a candidate fails than from a coarse risk label. For PySR, NMSE+DRP is slightly more effective than Evidence-only, indicating that an explicit intervention operator is useful for guiding its population-based search. Full PostDiag performs best across all solvers, confirming that PFP, the evidence map, and DRP are complementary: PFP localizes risk, the evidence map reveals local defects, and DRP selects the appropriate structural intervention.

Conclusion and Limitations

This work addresses a feedback bottleneck shared by diverse SR solvers: scalar fitness can rank candidates but offers little guidance for structural refinement. Rather than developing a new solver, PostDiag separates feedback design from search design. Using only a candidate skeleton and observed data, it converts patch-wise behavior into expressiveness and stability risks, localized evidence, and targeted interventions. Experiments across LLM-based and GP-based solvers show that PostDiag improves accuracy and accelerates convergence without accessing or redesigning their internal search processes. These results establish post-diagnosis as an orthogonal way to strengthen existing SR solvers while preserving their distinctive search mechanisms.

Despite its search-independent diagnostic core, our current implementation is evaluated only on LLM-based and GP-based solvers, which provide natural interfaces for accepting revised candidates. Solvers without such interfaces, such as reinforcement-learning-based methods [34], may require more substantial adaptation. Future work will extend the diagnostic interface to broader search paradigms and improve the efficiency of diagnosis and intervention.

The Use of Large Language Models (LLMs)

Beyond the use of LLMs in the method described in this paper, LLMs served only as auxiliary tools for generating some of the cartoon characters in Figure 1 and for polishing and refining the manuscript’s language. Their contributions to research conception, experimental design, or manuscript preparation do not warrant authorship or contributor status. All substantive research ideas, methods, and results presented in this work were independently developed or produced by the authors.

Overview of PostDiag, a search-independent post-diagnosis pipeline for symbolic regression

Figure 1. Overview of PostDiag, a search-independent post-diagnosis pipeline for symbolic regression. Given a candidate skeleton ss produced by LLM-based or GP-based SR solver, PostDiag first examines its local behavior via patchwise feature profiling, then reports the diagnostic report (evidence map), and diagnoses the failure type on the diagnostic risk plane, and finally calls a conditional LLM intervention, yielding a diagnosis-driven modification s~\tilde{s} that is returned to the solver.

Dataset Details

Task Composition

We conduct all experiments on LSR-Synth, the synthetic subset of LLM-SRBench (Shojaee et al. [39]). Following the evaluation setting used by SR-Scientist (Xia et al. [45]), the benchmark contains 129 symbolic regression tasks from four scientific domains: 44 in physics, 25 in material science, 36 in chemistry, and 24 in biology.

Representative tasks include damped oscillators, stress–strain relations, chemical kinetics, and population dynamics. Each task provides numerical observations together with the variable names and their scientific meanings. Its ground-truth expression combines established domain-specific terms with novel synthetic terms. Consequently, a solver cannot rely solely on memorized canonical equations and must instead use the observations to search for previously unseen structures. Compared with LSR-Transform, which may be more susceptible to memorization from pretraining, LSR-Synth is therefore better suited to evaluating data-driven equation discovery.

Data Generation and Splits

The construction of LSR-Synth consists of scientific-problem selection, known- and synthetic-term generation, parameter instantiation, numerical solvability and novelty checks, data generation, and expert validation. For each scientific problem, candidate known and synthetic terms are first generated and combined into complete expressions, whose coefficients are instantiated within scientifically meaningful ranges. For the dynamical systems in chemistry, biology, and physics, data are generated through numerical integration using SciPy’s solve_ivp function with the RK45 method. The static stress–strain relationships in material science are evaluated directly over predefined input ranges. Candidates that cannot be solved reliably, produce divergent or degenerate behavior, or are excessively similar to existing tasks are filtered out. The retained expressions and visualizations of their generated data are then cross-checked by domain experts.

Each task contains 5,000 observations. Chemistry, biology, and physics tasks are sampled uniformly over the time interval t∈[0,60]t \in[0,60], whereas material-science tasks cover strain ϵ∈[0,0.6]\epsilon\in[0,0.6] and temperature T∈[273,573]T \in[273,573] K. For time-dependent tasks, the 500 observations with the largest time values form the out-of-distribution (OOD) test set. For material-science tasks, the 500 observations with the largest temperature values form the OOD test set. Of the remaining 4,500 observations, 500 are randomly selected as the in-distribution (ID) test set, and the other 4,000 observations constitute the training set provided to the solver.

Data-Usage Protocol for PostDiag

All diagnosis and intervention operations performed by PostDiag are restricted to the training split and are strictly isolated from both test sets. Under the default configuration described in the main text, the training data for each task are further divided into a fitting set Dtr\mathcal{D}_{\mathrm{tr}} and an audit set Daud\mathcal{D}_{\mathrm{aud}} using a 75%/25% split. Candidate coefficient fitting and bootstrap refitting use only Dtr\mathcal{D}_{\mathrm{tr}}, whereas the PPF fingerprints, skeleton adequacy and stability scores, and evidence maps are computed on Daud\mathcal{D}_{\mathrm{aud}}. The acceptance check for an intervened candidate also uses only the training split.

The ID and OOD test sets are used solely to evaluate the final expression after search terminates. They are never used for candidate generation, diagnosis, structural intervention, rewrite acceptance, or candidate selection. Although an LLM-based base solver may consume the task and variable descriptions supplied by the benchmark, PostDiag itself receives only a candidate skeleton and the numerical observations from the training split.

Base Solver Configurations

Recent progress has led to increasing interest in symbolic regression (SR) ([3, 47, 29, 51, 23, 17, 24, 45, 38]). Unlike conventional predictive models, SR seeks to recover explicit mathematical relationships from observations, making the resulting equations directly interpretable and scientifically testable across domains such as physics, biology, and materials science [50, 22, 13, 11, 14, 49, 48]. A wide variety of symbolic regression methods have been developed in recent years. In this work, we integrate PostDiag with two of the most common SR paradigms: GP-based and LLM-based methods. Across these two families, we select seven widely used SR solvers as base solvers and incorporate PostDiag into each of them. We next describe the search budgets and integration strategies used for these solvers.

Search-Budget Protocol

The low-budget settings used in the main experiments are specified in § 4.1, while the high-budget reference settings are described in Appendix § 13.§ 3. To avoid repetition, this section does not restate the limits on LLM calls, outer iterations, or evolutionary generations. Instead, we report the internal configurations that remain fixed across budget levels and between each base solver and its PostDiag-augmented counterpart. Unless otherwise specified, we build on the official implementation of each method and keep its prompt templates, search operators, coefficient-fitting procedure, and candidate-evaluation protocol unchanged. The detailed integration of PostDiag with each solver is provided in Appendix § 12.

The Low and High settings retain each solver’s native search unit. Within each base/PostDiag pair, the native budget is identical, while PostDiag overhead is included in the reported end-to-end runtime.

SolverLowHighNative budget unit
Direct LLM510generated candidates
SGA5 (80)20 (320)rounds (generated candidates)
LLM-SR1001,000LLM calls
LaSR2040outer iterations
SR-Scientist10×≤2510 \times\leq2540×≤2540 \times\leq25outer iterations ×\times turns
PySR65130iterations
gplearn100200generations

Table 1 (PDF p. 15).

LLM-Based Solvers

Direct LLM. We follow the DataBlind Direct Prompting protocol of LLM-SRBench [39]. The LLM proposes equation skeletons from the scientific context without observing the numerical samples, while the numerical constants in each proposed skeleton are fitted by the benchmark evaluation pipeline. The PostDiag variant retains this direct generator and adds data-driven diagnosis and intervention after candidate evaluation; thus, DataBlind describes the base generator rather than the complete augmented pipeline. Low and High generate 5 and 10 candidates, respectively, from a single prompt batch.

SGA. SGA [28] uses a bilevel procedure in which an LLM proposes discrete scientific hypotheses and simulation-based optimization fits their continuous parameters. Its PostDiag variant attaches diagnostic feedback outside this bilevel loop, preserving the underlying hypothesis generation and continuous parameter optimization. Low uses 5 rounds and High uses 20 rounds, with 16 generated candidate attempts per round; the continuous-parameter optimizer is unchanged across budgets.

LLM-SR. LLM-SR [38] represents candidate equations as Python programs containing placeholders for numerical constants. An LLM proposes program skeletons conditioned on the task description and high-performing programs retrieved from an experience pool, while the numerical constants are fitted using BFGS. We retain the prompt templates, multi-island experience pool, candidate-ranking procedure, and coefficient-optimization pipeline of the official implementation. Apart from the search budgets specified elsewhere, all configurations are shared across LLM backbones and between the base and PostDiag-augmented variants.

LaSR. LaSR [10] maintains an LLM-induced library of natural-language concepts on top of a multi-population genetic-programming search. We use 10 populations with 33 individuals per population and run 550 GP cycles within each outer iteration. The maximum expression size is 30, and the concept library contains at most 20 concepts. The weights assigned to LLM-assisted crossover, mutation, and randomization are all set to 0.02. The symbolic operators and nested constraints follow the PySR configuration described below.

SR-Scientist. SR-Scientist [45] equips an LLM agent with data-analysis and equation-evaluation tools, allowing it to write and execute code while iteratively improving candidate equations. We retain its official tool interfaces, experience buffer, and candidate-evaluation procedure. Each search iteration uses a target MAPE of 0.1% and terminates early when the error reaches 10−4%10^{-4}\%. The LLM backbone and generation settings are held fixed between each base/PostDiag pair.

GP-Based Solvers

PySR. PySR [5] performs island-based genetic programming using a Julia backend, together with expression-complexity regularization and numerical constant optimization. We use 15 populations with 33 individuals per population and run 550 GP cycles within each iteration. The maximum expression size is 50. The binary operator set is {+,−,×,÷,pow⁡}\{+, -, \times, \div, \operatorname{pow}\}, and the unary operator set is {exp⁡,log⁡,⋅,sin⁡,cos⁡}\{\exp, \log, \sqrt{\cdot}, \sin, \cos\}.

gplearn. gplearn [40] implements single-population tree-based genetic programming. We use a population size of 500 and a tournament size of 20. The function set contains addition, subtraction, multiplication, division, sine, cosine, square root, logarithm, absolute value, negation, and inverse. Other parameters, including the parsimony coefficient and the crossover and mutation probabilities, retain the defaults of the official implementation.

LLM Backbones

Model Selection

Our experiments use Qwen3.5-27B and Qwen3.5-122B-A10B as the principal LLM backbones [35]. Qwen3.5-27B is reported in the main table, while Qwen3.5-122B-A10B is reported in the appendix. Qwen3.5-27B is a 27B-parameter dense model, whereas Qwen3.5-122B-A10B adopts a mixture-of-experts architecture with 122B total parameters and approximately 10B active parameters. Although both models belong to the same family, they differ in capacity and architecture, allowing us to evaluate whether PostDiag remains effective across different backbone configurations.

We further report supplementary results with Qwen3.5-9B and gpt-oss-20b [1] in the appendix. Qwen3.5-9B evaluates PostDiag with a smaller model and, together with the two principal Qwen3.5 backbones, provides coverage across different model capacities. The gpt-oss-20b experiments provide complementary evidence from a different model family and help assess whether PostDiag depends on a particular family of LLMs.

Backbone Consistency

For the five LLM-based base solvers, LLM-SR, LaSR, SR-Scientist, Direct LLM, and SGA, each base method and its PostDiag-augmented counterpart use the same LLM backbone. For example, when a base solver uses Qwen3.5-27B, the corresponding PostDiag structural intervention is also performed by Qwen3.5-27B. This avoids confounding the effect of PostDiag with differences in backbone capability and keeps the primary distinction between each pair to whether PostDiag is applied.

For PySR and gplearn, whose original search procedures do not rely on an LLM, the base search remains unchanged. When PostDiag is added, we use Qwen3.5-27B consistently to perform the diagnosed structural interventions.

PostDiag Configuration

Each base solver retains its original configuration. Between a base method and its PostDiag-augmented counterpart, we keep the base search budget, internal hyperparameters, and random seeds fixed so that the comparison focuses on the diagnosis and structural intervention introduced by PostDiag.

For each PostDiag structural intervention, we set the sampling temperature to 0.3 and the maximum completion length to 8,192 tokens. Conditioned on the DRP state and Evidence Map, the model returns a structured preserve-or-revise decision, a revised expression skeleton, and the corresponding edit type. The LLM proposes only the structural revision and does not determine the final numerical coefficients. After parsing and validity checking, the coefficients of the resulting expression are refitted. We use the same PostDiag configuration for all base solvers and LLM backbones.

Compute Resources

Experiments are conducted on a compute cluster equipped with 16 NVIDIA A800 GPUs and 8 NVIDIA H800 GPUs. The LLM backbones are served locally using vLLM. PySR, gplearn, and the diagnostic computation of PostDiag run primarily on CPUs, while GPUs are used mainly for LLM inference. For each base solver, all reported runtime configurations—including Low, Low+PostDiag, and High—use the same GPU type, GPU count, vLLM serving configuration, and server-side concurrency limit. Each method retains its native request-scheduling pattern: LLM-SR issues up to four concurrent requests, whereas the interaction trajectory of SR-Scientist is executed sequentially; the other solvers follow their official implementations.

We report the mean end-to-end wall-clock time per task, measured from the start of the base solver’s search until it returns the final expression. The reported time includes base search, candidate evaluation, and coefficient fitting. For PostDiag-augmented variants, it also includes the overhead of diagnostic computation, coefficient refitting, and additional LLM-based structural intervention. All runtime measurements are averaged over three random seeds.

Out-of-Distribution Performance

LSR-Synth provides an independent out-of-distribution (OOD) test set for each task, with samples extending beyond the training range along a control variable such as time or temperature. The detailed split construction is provided in Appendix § 7. Following SR-Scientist (Xia et al., [45], we report OOD Acc0.01\mathrm{Acc}_{0.01}. After search terminates, the final expression returned by each method is evaluated directly on the OOD test set, without additional search, coefficient refitting, or candidate selection. The OOD data remain unseen throughout search, diagnosis, and structural intervention.

As shown in Table 2, PostDiag generally improves OOD accuracy across different base solvers and LLM backbones. With Qwen3.5-27B, the overall OOD Acc0.01\mathrm{Acc}_{0.01} of LLM-SR increases from 21.2% to 28.9%, while that of SR-Scientist increases from 24.8% to 33.6%. With Qwen3.5-122B-A10B, the overall OOD accuracy of SR-Scientist increases from 40.6% to 43.8%. PySR also improves from 27.1% to 31.0%, suggesting that the extrapolation benefits of PostDiag are not limited to LLM-based solvers. In contrast, gplearn and its PostDiag-augmented variant both obtain zero OOD accuracy, indicating that diagnosis and structural intervention cannot fully compensate for insufficient search capability in the base solver.

Backbone/categoryMethodOverallPhysMatSciChemBio
Qwen3.5-27B
LLM-basedDirect LLM [39]1.00.82.70.90.0
LLM-basedDirect LLM [39]+PostDiag2.32.32.72.81.4
LLM-basedSGA [28]9.66.19.316.75.6
LLM-basedSGA [28]+PostDiag16.312.921.321.39.7
LLM-basedLLM-SR21.212.941.326.96.9
LLM-basedLLM-SR+PostDiag28.920.561.327.812.5
LLM-basedLaSR12.410.616.015.76.9
LLM-basedLaSR+PostDiag19.117.430.718.511.1
LLM-basedSR-Scientist24.816.750.725.012.5
LLM-basedSR-Scientist+PostDiag33.622.764.036.118.1
Qwen3.5-122B-A10B
LLM-basedDirect LLM [39]1.82.31.31.91.4
LLM-basedDirect LLM [39]+PostDiag3.13.82.72.82.8
LLM-basedSGA [28]11.98.312.018.58.3
LLM-basedSGA [28]+PostDiag18.315.221.324.112.5
LLM-basedLLM-SR26.618.953.325.913.9
LLM-basedLLM-SR+PostDiag34.124.266.732.420.8
LLM-basedLaSR14.013.618.715.76.9
LLM-basedLaSR+PostDiag21.720.534.720.412.5
LLM-basedSR-Scientist40.627.378.740.725.0
LLM-basedSR-Scientist+PostDiag48.335.681.350.034.7
GP-based methods
GP-basedPySR27.120.568.015.713.9
GP-basedPySR+PostDiag31.022.774.720.416.7
GP-basedgplearn0.00.00.00.00.0
GP-basedgplearn+PostDiag0.00.00.00.00.0

Table 2. Low-budget OOD Acc⁡0.01\operatorname{Acc}_{0.01} on LSR-Synth. Following the SR-Scientist protocol, only Acc⁡0.01\operatorname{Acc}_{0.01} is reported for OOD evaluation. Each LLM-based method is paired with its PostDiag variant under the same backbone. Overall is pooled over all 129 tasks; OOD samples are used only for post-hoc evaluation.

The gains remain substantial under OOD evaluation, indicating that the benefits of PostDiag are largely preserved on out-of-distribution data. In material science, OOD accuracy is generally higher than the corresponding ID accuracy for both the base and PostDiag-augmented methods.

Details of Integration with Base Solvers

PostDiag is designed to be attached to existing SR solvers through lightweight adapters. We describe the integration recipe for each of the seven representative solvers in this section. The adapters handle representation conversion, diagnostic feedback, and candidate-pool insertion at the solver boundary, while the solver’s core candidate generation, selection, and search-update rules remain unchanged.

Direct LLM [39] generates equation skeletons from the scientific context without observing numerical samples; numerical constants are fitted by the benchmark pipeline. In our PostDiag, generated skeleton is diagnosed and revised. The accepted revisions enter the selected candidate pool, from which the final result is saved. The base generator remains DataBlind, while the augmented candidate evaluation is explicitly data-driven.

SGA [28] alternates LLM-based discrete hypothesis generation with simulation-based continuous parameter optimization. The proposed adapter parses each generated equation into SGA’s trainable PyTorch module, fits its parameters with the unchanged inner optimizer, and adds valid fitted candidates to the candidate pool. PostDiag diagnoses a fitted candidate, proposes a structural revision, and sends the parsed revision through the same module construction, fitting, and evaluation path before it becomes eligible for the selected pool.

LLM-SR [38] treats equation discovery as evolutionary program search, where an LLM proposes candidate skeletons conditioned on in-context examples drawn from a buffer of high-performing programs. PostDiag integrates through this buffer interface: for every newly admitted elite candidate ss, PostDiag produces its diagnostic label and evidence map; the rewritten skeleton s~\tilde{s} together with a brief textual annotation of the diagnosed failure mode is stored. Subsequent prompts draw both score-ranked and diagnosis-annotated examples, biasing the LLM’s next proposals toward the identified failure mode.

LaSR (Graveli et al., 2024) couples LLMs with genetic programming by periodically abstracting high-performing hypotheses into natural-language concepts, which then guide subsequent symbolic mutation. PostDiag integrates at the concept abstraction stage: when LaSR queries the LLM for concept induction, we additionally supply the diagnostic label and evidence map of the input hypotheses, so that the abstracted concepts carry structural failure-mode information. The resulting diagnosis-aware concepts guide the subsequent GP search toward diagnosed structural fixes, while LaSR’s underlying GP kernel remains untouched.

SR-Scientist (Xia et al. [45]) frames equation discovery as an autonomous agent that reads data, writes code to test hypotheses, and iterates on candidates through a tool-use loop that already accepts arbitrary numerical feedback signals. PostDiag integrates as an additional diagnose(candidate) tool that the agent can invoke after any candidate evaluation; the tool returns the structured diagnostic report and evidence map, which are then included in the agent’s next reasoning step. The integration only exposes a new tool endpoint and does not modify SR-Scientist’s control flow.

PySR (Cranmer [5]) performs island-based genetic programming with configurable custom operators and supports external individual injection through its population interface. PostDiag integrates through diagnosis-driven immigration: at the end of each generation, PostDiag diagnoses the best-performing individual. The candidate is revised through diagnosis-guided intervention and injected into the initial population of the next generation as an immigrant, thereby steering the subsequent evolutionary search. Since PySR natively supports the insertion of external individuals, the integration requires only a lightweight adapter that converts Python expressions into expression trees, without modifying its selection, mutation, or crossover operators.

gplearn (Stephens [40]) implements classical tree-based genetic programming and exposes init_method and warm_start for warm-starting the population from previously fitted regressors. PostDiag integrates by feeding the rewritten token s~\tilde{s} as seeded individuals into the warm-started initial population of the next generation. Since gplearn’s tree grammar covers all operators used in PostDiag, the adapter is a thin conversion between our program representation and gplearn’s internal tree encoding, and does not alter gplearn’s selection or reproduction operators.

Across all seven solvers, PostDiag exposes the same standardized output, (Gs,s~)(\mathcal{G}_s, \tilde{s}). With only lightweight implementation changes, it equips each solver with post-diagnosis capabilities while leaving the core search algorithm intact. PostDiag therefore represents a complementary technical direction that is orthogonal to the development of new SR algorithms.

Additional Experimental Results

Unless otherwise specified, we use Qwen3.5-27B as the default experimental backbone, while Qwen3.5-122B-A10B is included to evaluate PostDiag with a stronger model. Since PySR and gplearn do not natively use an LLM, their PostDiag-augmented variants consistently use the default Qwen3.5-27B backbone.

Low-Budget Results with Qwen3.5-122B-A10B

Table 3 reports the counterpart of the main ID comparison using Qwen3.5-122B-A10B. Each base/PostDiag pair retains the same search configuration and random seeds, with the LLM backbone shared between the base solver and the PostDiag intervention.

Method / settingOverallPhysMatSciChemBio
Time (s)NMSEA.01A.001NMSEA.01A.001NMSEA.01A.001NMSEA.01A.001NMSEA.01A.001
Direct LLM (Shojaee et al. [39])35.34.62E-022.81.33.82E-023.00.85.78E-022.71.32.26E-023.71.98.42E-021.41.4
Direct LLM (Shojaee et al. [39])+PostDiag39.39.54E-035.43.48.64E-036.13.82.86E-035.34.06.43E-034.62.82.28E-025.62.8
SGA (Ma et al. [28])368.08.44E-0314.78.85.88E-0312.17.66.17E-0313.38.05.10E-0322.213.02.05E-029.75.6
SGA (Ma et al. [28])+PostDiag406.21.44E-0322.712.71.52E-0320.512.92.06E-0425.310.77.32E-0428.715.73.66E-0315.39.7
LLM-SR201.19.68E-0427.612.72.41E-0321.29.81.91E-0550.726.71.18E-0427.89.35.86E-0415.38.3
LLM-SR+PostDiag231.71.31E-0436.419.92.13E-0428.015.95.82E-0665.338.73.86E-0536.115.72.47E-0422.213.9
LaSR716.38.71E-0315.89.31.47E-0214.47.61.92E-0317.39.35.60E-0319.413.09.45E-0311.16.9
LaSR+PostDiag762.16.76E-0424.513.71.19E-0323.510.63.76E-0533.316.04.96E-0425.017.66.68E-0416.711.1
SR-Scientist833.65.96E-0441.324.31.43E-0329.516.72.03E-0574.750.78.12E-0541.721.34.37E-0427.815.3
SR-Scientist+PostDiag902.21.04E-0448.831.31.76E-0436.422.76.08E-0678.758.73.04E-0550.929.61.82E-0437.520.8

Table 3. Low-budget ID results on LSR-Synth for LLM-based solvers using Qwen3.5-122B-A10B. Metrics and aggregation follow Table 1. Each method is paired with its PostDiag variant under the same backbone and three-seed protocol.

At the Overall level, PostDiag lowers NMSE and improves both accuracy thresholds for all solvers under Qwen3.5-122B-A10B. The stronger backbone therefore continues to benefit from diagnostic feedback, while the final-accuracy gap between Direct LLM and the iterative solvers remains, indicating that the upper of performance still depends on the underlying search procedure.

Symbolic Accuracy

We additionally evaluate whether the final expression is symbolically equivalent to the ground-truth expression. Following LLM-SRBench, we remove fitted parameters and constants before judging equivalence so that the metric measures recovery of the functional structure rather than numerical coefficient matching. We then adopt the more conservative two-stage adjudication procedure of SR-Scientist: GPT-OSS-120B evaluates each pair independently ten times, unanimous decisions are retained, and non-unanimous cases are resolved by human evaluators. Failed runs and invalid final expressions are counted as incorrect. Table 4 reports the pooled symbolic accuracy over all tasks and three seeds.

Base solverBackboneBase SA+PostDiag SAΔ SA
Direct LLMQwen3.5-27B1.551.550.00
Qwen3.5-122B-A10B2.072.58+0.52
SGAQwen3.5-27B3.624.65+1.03
Qwen3.5-122B-A10B3.885.17+1.29
LLM-SRQwen3.5-27B3.885.68+1.81
Qwen3.5-122B-A10B4.396.46+2.07
LaSRQwen3.5-27B1.813.62+1.81
Qwen3.5-122B-A10B2.584.91+2.33
SR-ScientistQwen3.5-27B4.917.24+2.33
Qwen3.5-122B-A10B6.729.56+2.84
PySRN/A4.135.68+1.55
gplearnN/A0.000.000.00

Table 4. Symbolic accuracy (SA) on LSR-Synth. We follow the LLM-SRBench definition and expression preprocessing, together with the SR-Scientist repeated-vote adjudication protocol. Results pool all 129 tasks over three seeds; failed or invalid runs count as incorrect. PostDiag interventions for GP solvers use Qwen3.5-27B. Boldface marks the better value within each base/PostDiag pair.

PostDiag raises pooled SA for most solver–backbone pairs, with gains ranging from 0.52 points for Direct LLM under Qwen3.5-122B-A10B to 2.84 points for SR-Scientist under the same backbone. SGA gains 1.03 and 1.29 percentage points under Qwen3.5-27B and Qwen3.5-122B-A10B, respectively. Direct LLM under Qwen3.5-27B remains at 1.55%, and gplearn remains at 0.00%.

Budget-Efficiency Analysis

We compare PostDiag-augmented solvers against their unaugmented counterparts under the Low and High settings defined in Appendix B.1. The High settings are 10 generated candidates for Direct LLM [39]; 20 rounds, or 320 generated candidate attempts, for SGA [28]; 1,000 LLM calls for LLM-SR; 40 outer iterations for LaSR; 40 outer iterations with at most 25 interaction turns each for SR-Scientist; 130 iterations for PySR; and 200 generations for gplearn. Low+PostDiag retains the same native base-solver budget as Low. We report accuracy to tolerance as the primary criterion, arithmetic mean NMSE, and mean end-to-end wall-clock time per task run. Tables 5, 6, and 7 evaluate solution quality at matched native budgets and compare low-budget PostDiag variants with the corresponding high-budget base solvers.

The Low+PostDiag and High comparisons show that diagnosis and additional search are complementary rather than interchangeable. Direct LLM+PostDiag under Qwen3.5-27B exceeds High in Overall accuracy at similar runtime, whereas under Qwen3.5-122B-A10B it has higher accuracy

Method / settingOverall Time (s)Overall NMSEOverall A.01A_{.01}Overall A.001A_{.001}Phys NMSEPhys A.01A_{.01}Phys A.001A_{.001}MatSci NMSEMatSci A.01A_{.01}MatSci A.001A_{.001}Chem NMSEChem A.01A_{.01}Chem A.001A_{.001}Bio NMSEBio A.01A_{.01}Bio A.001A_{.001}
Direct LLM [39]30.57.72E-022.60.87.32E-023.00.86.24E-022.71.33.50E-022.80.91.63E-011.40.0
Direct LLM [39]+PostDiag33.73.23E-024.42.35.22E-025.33.84.34E-034.02.78.76E-033.70.96.03E-024.21.4
Direct LLM / High45.55.78E-023.41.85.86E-023.01.53.98E-025.32.72.80E-023.71.91.20E-011.41.4
SGA [28]320.01.39E-0211.95.99.43E-038.36.18.21E-0312.05.34.92E-0319.47.44.15E-026.94.2
SGA [28]+PostDiag350.22.40E-0318.69.82.66E-0314.49.81.87E-0425.36.78.65E-0424.113.06.52E-0311.18.3
SGA / High1250.01.70E-0319.910.61.82E-0315.912.12.27E-0422.78.04.33E-0426.913.04.89E-0313.96.9
LLM-SR / Low167.51.45E-0322.08.83.66E-0314.48.33.12E-0537.313.31.75E-0427.88.38.15E-0411.15.6
LLM-SR+PD / Low191.72.12E-0431.015.23.48E-0423.512.18.94E-0660.030.75.84E-0528.712.04.02E-0418.19.7
LLM-SR / High1603.43.65E-0434.113.27.82E-0428.012.91.20E-0553.322.77.21E-0537.011.14.08E-0420.86.9
LaSR / Low559.21.06E-0213.47.51.73E-0211.46.82.48E-0314.76.76.90E-0318.511.11.22E-028.34.2
LaSR+PD / Low595.48.62E-0421.412.71.52E-0320.511.44.82E-0529.314.76.45E-0422.214.88.29E-0413.99.7
LaSR / High1118.48.13E-0315.58.81.36E-0214.47.61.73E-0317.39.35.10E-0319.412.09.30E-039.75.6
SR-Scientist / Low648.01.12E-0325.611.92.74E-0317.49.84.47E-0546.721.31.49E-0427.811.17.26E-0415.36.9
SR-Scientist+PD / Low702.21.92E-0435.720.43.11E-0425.815.91.08E-0562.737.36.47E-0538.020.43.54E-0422.211.1
SR-Scientist / High2547.12.23E-0437.721.24.47E-0426.515.91.31E-0570.748.05.03E-0538.016.72.91E-0423.69.7

Table 5. Budget-efficiency comparison for LLM-based solvers using Qwen3.5-27B. Each method is paired with its PostDiag variant. Low+PostDiag retains the corresponding Low base-solver budget, while High uses the full-budget reference setting. Boldface marks the best value within each solver block; runtime is reported without ranking.

Method / settingOverall Time (s)Overall NMSEOverall A.01A_{.01}Overall A.001A_{.001}Phys NMSEPhys A.01A_{.01}Phys A.001A_{.001}MatSci NMSEMatSci A.01A_{.01}MatSci A.001A_{.001}Chem NMSEChem A.01A_{.01}Chem A.001A_{.001}Bio NMSEBio A.01A_{.01}Bio A.001A_{.001}
Direct LLM [39]35.34.62E-022.81.33.82E-023.00.85.78E-022.71.32.26E-023.71.98.42E-021.41.4
Direct LLM [39]+PostDiag39.95.94E-035.43.48.64E-036.13.82.86E-035.34.06.43E-034.62.82.29E-025.62.8
Direct LLM / High52.71.55E-033.92.13.86E-033.02.33.06E-056.72.71.89E-043.71.99.36E-042.81.4
SGA [28]368.08.44E-0314.78.85.88E-0312.17.66.17E-0313.38.05.10E-0322.213.02.05E-029.75.6
SGA [28]+PostDiag406.21.44E-0322.712.71.52E-0320.512.96.0E-0425.310.77.32E-0428.715.73.65E-0315.39.7
SGA / High1442.07.52E-0426.915.01.43E-0325.014.43.65E-0528.018.73.89E-0434.717.77.79E-0420.89.7
LLM-SR / Low201.19.68E-0427.612.72.41E-0321.29.81.91E-0550.726.71.18E-0427.89.35.86E-0415.38.3
LLM-SR+PD / Low231.71.31E-0436.419.92.13E-0428.015.95.82E-0665.338.73.86E-0536.115.72.47E-0422.213.9
LLM-SR / High1939.22.99E-0439.316.85.15E-0433.314.43.54E-0666.734.74.42E-0537.012.03.59E-0425.09.7
LaSR / Low716.38.71E-0315.89.31.47E-0214.47.61.92E-0317.39.35.60E-0319.413.09.45E-0311.16.9
LaSR+PD / Low762.16.76E-0424.513.71.19E-0323.510.63.76E-0533.316.04.96E-0425.017.66.68E-0416.711.1
LaSR / High1432.65.74E-0319.110.94.16E-0317.48.36.24E-0422.712.03.14E-0322.213.98.04E-0313.99.7
SR-Scientist / Low833.65.96E-0441.324.31.43E-0329.516.72.03E-0574.750.78.12E-0541.721.34.37E-0427.815.3
SR-Scientist+PD / Low902.21.04E-0448.831.31.76E-0436.422.76.08E-0678.758.73.04E-0550.929.61.82E-0437.520.8
SR-Scientist / High3289.49.21E-0548.131.02.33E-0434.121.22.95E-0686.768.04.71E-0647.225.95.75E-0534.718.1

Table 6. Budget-efficiency comparison for LLM-based solvers using Qwen3.5-122B-A10B. Each method is paired with its PostDiag variant. Low+PostDiag retains the corresponding Low base-solver budget, while High uses the full-budget reference setting. Boldface marks the best value within each solver block; runtime is reported without ranking.

Method / settingOverall Time (s)Overall NMSEOverall A.01A_{.01}Overall A.001A_{.001}Phys NMSEPhys A.01A_{.01}Phys A.001A_{.001}MatSci NMSEMatSci A.01A_{.01}MatSci A.001A_{.001}Chem NMSEChem A.01A_{.01}Chem A.001A_{.001}Bio NMSEBio A.01A_{.01}Bio A.001A_{.001}
PySR / Low8.82.67E-0323.811.44.11E-0321.212.11.70E-0444.018.78.93E-0420.410.25.29E-0312.54.2
PySR+PD / Low10.51.34E-0328.713.21.82E-0324.214.42.25E-0550.717.35.29E-0425.912.02.84E-0318.18.3
PySR / High15.51.76E-0328.413.72.61E-0325.815.28.12E-0545.320.06.18E-0425.012.03.66E-0316.76.9
gplearn / Low95.51.34E-010.00.08.51E-020.00.02.36E-020.00.06.56E-020.00.04.42E-010.00.0
gplearn+PD / Low101.73.07E-021.00.04.29E-032.30.09.6E-030.00.04.29E-020.90.08.58E-020.00.0
gplearn / High189.11.12E-010.00.06.73E-020.00.01.92E-020.00.05.31E-020.00.03.77E-010.00.0

Table 7. Budget-efficiency comparison for GP-based solvers. Their native search does not use an LLM; all PostDiag interventions use Qwen3.5-27B. Low+PostDiag retains the corresponding Low base-solver budget, while High uses the full-budget reference setting. Boldface marks the best value within each solver block; runtime is reported without ranking.

but worse NMSE, exposing a metric tradeoff. For SGA under both backbones, Low+PostDiag approaches the High setting’s quality with substantially less end-to-end time, while High retains higher accuracy and lower NMSE. The remaining solvers show similarly method-dependent balances between diagnostic overhead and the benefit of a larger native search budget.

Supplementary Results with Additional LLM Backbones

To examine PostDiag under different backbones, we additionally evaluate Qwen3.5-9B and gpt-oss-20b under the same low-budget protocol. Table 8 reports the ID results for the LLM-based solvers and their PostDiag-augmented variants. All comparisons within a backbone use the same tasks, random seeds, search budgets, coefficient-fitting procedure, and validation protocol.

CategoryMethod / settingOverall Time (s)Overall NMSEOverall A.01Overall A.001Phys NMSEPhys A.01Phys A.001MatSci NMSEMatSci A.01MatSci A.001Chem NMSEChem A.01Chem A.001Bio NMSEBio A.01Bio A.001
Qwen3.5-9B
LLM-basedLLM-SR129.82.36E-0314.05.75.32E-039.83.02.38E-0537.317.34.96E-046.52.82.14E-038.32.8
LLM-basedLLM-SR+PostDiag146.83.93E-0424.010.37.32E-0418.26.81.20E-0546.725.37.15E-0522.28.36.52E-0413.94.2
LLM-basedLaSR382.52.16E-0210.16.52.24E-026.84.54.15E-0314.79.39.40E-0313.09.35.64E-026.92.8
LLM-basedLaSR+PostDiag407.93.27E-0318.610.36.01E-0313.66.16.26E-0536.018.78.86E-0418.512.05.16E-039.76.9
LLM-basedSR-Scientist439.22.00E-0313.74.14.48E-0310.64.56.31E-0533.310.74.12E-047.41.91.86E-038.30.0
LLM-basedSR-Scientist+PostDiag477.25.39E-0422.58.89.84E-0415.96.11.69E-0544.020.01.33E-0421.37.48.76E-0413.94.2
gpt-oss-20b
LLM-basedLLM-SR244.71.31E-0326.19.63.18E-0318.94.52.62E-0552.033.32.03E-0422.23.78.91E-0418.12.8
LLM-basedLLM-SR+PostDiag260.92.39E-0435.415.24.31E-0425.89.18.52E-0668.045.36.47E-0531.58.33.87E-0425.05.6
LLM-basedLaSR395.41.21E-0210.65.41.92E-029.15.33.18E-0313.35.38.20E-0313.07.41.43E-026.92.8
LLM-basedLaSR+PostDiag419.69.53E-0416.89.61.71E-0314.48.35.04E-0518.710.76.83E-0419.411.19.13E-0415.38.3
LLM-basedSR-Scientist134.98.89E-0433.315.52.12E-0324.28.33.82E-0553.329.31.31E-0438.017.66.53E-0422.211.1
LLM-basedSR-Scientist+PostDiag159.11.60E-0441.323.32.68E-0430.317.49.47E-0662.737.35.03E-0545.424.12.81E-0433.318.1

Table 8. Supplementary low-budget ID results for Qwen3.5-9B and gpt-oss-20b. Accuracy to tolerance is the primary criterion; NMSE is a tail-sensitive complementary aggregate. Time is the mean end-to-end wall-clock seconds per task run and is reported only in Overall. Metrics use the same three-seed aggregation as Table 1.

PostDiag Core Editor Prompts

System Prompt

You are a scientist working on symbolic regression. Use risk localization in the Diagnostic Risk Plane and the corresponding diagnostic evidence map to modify the symbolic structure of a candidate equation. Return a preserved or revised equation skeleton.

The input contains the current candidate, diagnostic coordinates, a diagnostic state, and local behavioral evidence. The numerical procedure has already determined the state. Follow its intervention:

- Settled (sufficiently expressive and stable)
  Prefer preserving the current skeleton. Make only small revisions clearly supported by local evidence; avoid unnecessary terms or replacing the main structure.

- Underfit (insufficiently expressive but stable)
  Preserve the main functional form. Check for missing terms, incorrect operators, or unsuitable variable combinations, and make local repairs targeting the main behavioral discrepancies.

- Overfit (sufficiently expressive but unstable)
  Prefer simplifying the skeleton. Check for redundant terms, repeated subexpressions, complex nesting, and structures that may depend on compensating coefficients.

- Mismatched (insufficiently expressive and unstable)
System prompt for the PostDiag core editor

Figure 3. System prompt for the PostDiag core editor.

User Prompt Template

# Current candidate equation
{candidate_function}

# Diagnostic results
Skeleton Expressiveness Risk (Bias): {bias}
Skeleton Stability Risk (Var): {variance}
Diagnostic state: {diagnostic_state}

# Local behavioral evidence
The following evidence is computed on the same local patches of the
audit set:
- Level discrepancy: the absolute difference between the local means of
candidate predictions and observations.
- Trend discrepancy: the norm of the difference between their local
slope vectors.
- Roughness discrepancy: the absolute difference between their
deviations from their respective local linear approximations.
- Instability: local behavioral variation after bootstrap refitting of
the same skeleton. Larger values indicate greater instability.

Patch ID | Level | Trend | Roughness | Instability
{patch_evidence_rows}

# Expression constraints
Input variables: {variables}
Allowed operators and functions: {allowed_operators}
Fitted parameter slots: {parameter_slots}
Expression-size and nesting limits: {structural_constraints}
Input variable ranges: {input_ranges}

# Output requirements
Use the diagnostic state and local evidence to return one preserved or
revised equation. Represent every fitted constant as params[i] and use
only the supplied parameter slots.

Output a single Python code block with the following function signature.
The function body must contain only one return expression:
```python
def equation({signature}, params):
    return ...
User prompt template for the PostDiag core editor

Figure 4. User prompt template for the PostDiag core editor.

References

  1. [1]Sandhini Agarwal, Lama Ahmad, Jason Ai, Sam Altman, Andy Applebaum, Edwin Arbus, Rahul K Arora, Yu Bai, Bowen Baker, Haiming Bao, et al. gpt-oss-120b & gpt-oss-20b model card. arXiv preprint arXiv:2508.10925, 2025.arxiv.org/abs/2508.10925
  2. [2]Luca Biggio, Tommaso Bendinelli, Alexander Neitz, Aurelien Lucchi, and Giambattista Parascandolo. Neural symbolic regression that scales. In International Conference on Machine Learning, pp. 936–945. Pmlr, 2021.
  3. [3]Yuntian Chen, Yingtao Luo, Qiang Liu, Hao Xu, and Dongxiao Zhang. Symbolic genetic algorithm for discovering open-form partial differential equations (sga-pde). Physical Review Research, 4 (2):023174, 2022.DOI
  4. [4]Thomas Cover and Peter Hart. Nearest neighbor pattern classification. IEEE transactions on information theory, 13(1):21–27, 1967.DOI
  5. [5]Miles Cranmer. Interpretable machine learning for science with pysr and symbolicregression. jl. arXiv preprint arXiv:2305.01582, 2023.arxiv.org/abs/2305.01582
  6. [6]Miles Cranmer, Alvaro Sanchez Gonzalez, Peter Battaglia, Rui Xu, Kyle Cranmer, David Spergel, and Shirley Ho. Discovering symbolic models from deep learning with inductive biases. Advances in neural information processing systems, 33:17429–17442, 2020.
  7. [7]Fabricio Olivetti de Franca and Guilherme Seidyo Imai Aldeia. Interaction–transformation evolutionary algorithm for symbolic regression. Evolutionary computation, 29(3):367–390, 2021.DOI
  8. [8]Bradley Efron. Bootstrap methods: another look at the jackknife. In Breakthroughs in statistics: Methodology and distribution, pp. 569–593. Springer, 1992.
  9. [9]Teofilo F Gonzalez. Clustering to minimize the maximum intercluster distance. Theoretical computer science, 38:293–306, 1985.DOI
  10. [10]Arya Grayeli, Atharva Sehgal, Omar Costilla Reyes, Miles Cranmer, and Swarat Chaudhuri. Symbolic regression with a learned concept library. Advances in Neural Information Processing Systems, 37:44678–44709, 2024.arxiv.org/abs/2409.09359
  11. [11]Zelin Guo, Siqi Wang, Yonglin Tian, Jing Yang, Hui Yu, Xiaoxiang Na, Levente Kovács, Li Li, Petros A Ioannou, and Fei-Yue Wang. Sr-llm: An incremental symbolic regression framework driven by llm-based retrieval-augmented generation. Proceedings of the National Academy of Sciences, 122(52):e2516995122, 2025.DOI
  12. [12]Samuel Holt, Zhaozhi Qian, and Mihaela van der Schaar. Deep generative symbolic regression. arXiv preprint arXiv:2401.00282, 2023.arxiv.org/abs/2401.00282
  13. [13]Yuxiao Hu, Qian Li, Xiaodan Shi, Jinyue Yan, and Yuntian Chen. Domain knowledge-enhanced multi-spatial multi-temporal pm2. 5 forecasting with integrated monitoring and reanalysis data. Environment international, 192:108997, 2024.DOI
  14. [14]Yuxiao Hu, Qian Li, Dongxiao Zhang, Jinyue Yan, and Yuntian Chen. Context-alignment: Activating and enhancing llms capabilities in time series. In International Conference on Learning Representations, volume 2025, pp. 90696–90722, 2025.arxiv.org/abs/2501.03747
  15. [15]Yuxiao Hu, Qian Li, Ding Wang, Siheng Chen, Linfeng Zhang, Jinyue Yan, and Yuntian Chen. Beyond equation search: Conjecture-guided discovery with scope and closurebench. arXiv preprint arXiv:2610.18938, 2026a.arxiv.org/abs/2610.18938
  16. [16]Yuxiao Hu, Qian Li, Ding Wang, Yekun Zheng, Jinyue Yan, and Yuntian Chen. Dass: A solver-adaptable dynamic auxiliary search strategy for symbolic regression. arXiv preprint arXiv:2610.16812, 2026b.arxiv.org/abs/2610.16812
  17. [17]Pierre-Alexandre Kamienny, Stéphane d’Ascoli, Guillaume Lamplé, and François Charton. End-to-end symbolic regression with transformers. Advances in Neural Information Processing Systems, 35:10269–10281, 2022.arxiv.org/abs/2204.10532
  18. [18]George Em Karniadakis, Ioannis G Kevrekidis, Lu Lu, Paris Perdikaris, Sifan Wang, and Liu Yang. Physics-informed machine learning. Nature Reviews Physics, 3(6):422–440, 2021.DOI
  19. [19]John R Koza. Genetic programming as a means for programming computers by natural selection. Statistics and computing, 4(2):87–112, 1994.DOI
  20. [20]Mario Krenn, Robert Pollice, Si Yue Guo, Matteo Aldeghi, Alba Cervera-Lierta, Pascal Friederich, Gabriel dos Passos Gomes, Florian Häse, Adrian Jinich, AkshatKumar Nigam, et al. On scientific understanding with artificial intelligence. Nature Reviews Physics, 4(12):761–769, 2022.
  21. [22]Qian Li, Yuxiao Hu, and Yang Cao. Adaptive perona–malik model based on dynamical threshold for image multi–noise removal with details preservation. Computers & Mathematics with Applications, 137:28–43, 2023a.DOI
  22. [23]Qian Li, Yuxiao Hu, Ye Liu, Dongxiao Zhang, Xin Jin, and Yuntian Chen. Discrete point-wise attack is not enough: Generalized manifold adversarial attack for face recognition. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 20575–20584. IEEE, 2023b.arxiv.org/abs/2301.06083
  23. [24]Qian Li, Yuxiao Hu, Yinpeng Dong, Dongxiao Zhang, and Yuntian Chen. Focus on hiders: Exploring hidden threats for enhancing adversarial training. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 24442–24451. IEEE, 2024.arxiv.org/abs/2312.07067
  24. [25]Qian Li, Yuxiao Hu, Qihao Duan, Jinyue Yan, and Yuntian Chen. Learning to design sr solvers: Harness optimization for symbolic regression. arXiv preprint arXiv:2610.16966, 2026.arxiv.org/abs/2610.16966
  25. [26]Wenqiang Li, Weijun Li, Linjun Sun, Min Wu, Lina Yu, Jingyi Liu, Yanjie Li, and Songsong Tian. Transformer-based model for symbolic regression via joint supervised learning. In The Eleventh International Conference on Learning Representations, 2022.
  26. [28]Pingchuan Ma, Tsun-Hsuan Wang, Minghao Guo, Zhiqing Sun, Joshua B Tenenbaum, Daniela Rus, Chuang Gan, and Wojciech Matusik. Llm and simulation as bilevel optimizers: A new paradigm to advance physical scientific discovery. arXiv preprint arXiv:2405.09783, 2024.arxiv.org/abs/2405.09783
  27. [29]Kazem Meidani, Parshin Shojaee, Chandan K Reddy, and Amir Barati Farimani. Snip: Bridging mathematical symbolic and numeric realms with unified pre-training. arXiv preprint arXiv:2310.02227, 2023.arxiv.org/abs/2310.02227
  28. [30]Sebastian Mežnar, Sašo Džeroski, and Ljupčo Todorovski. Efficient generator of mathematical expressions for symbolic regression. Machine Learning, 112(11), 2023.
  29. [31]Alberto Moraglio, Krzysztof Krawiec, and Colin G Johnson. Geometric semantic genetic programming. In International Conference on Parallel Problem Solving from Nature, pp. 21–31. Springer, 2012.DOI
  30. [32]Xinyu Pang, Zhanke Zhou, Xuan Li, Fangrui Lv, Shanshan Wei, Sen Cui, Bo Han, and Changshui Zhang. Deliberate evolution: Agentic reasoning for sample-efficient symbolic regression with llms. arXiv preprint arXiv:2606.04360, 2026.arxiv.org/abs/2606.04360
  31. [33]Tomasz P Pawlak and Krzysztof Krawiec. Competent geometric semantic genetic programming for symbolic regression and boolean function synthesis. Evolutionary computation, 26(2):177–212, 2018.DOI
  32. [34]Brenden K Petersen, Mikel Landajuela Larma, Terrell N Mundhenk, Claudio Prata Santiago, Soo Kyung Kim, and Joanne Taery Kim. Deep symbolic regression: Recovering mathematical expressions from data via risk-seeking policy gradients. In International Conference on Learning Representations, 2021.
  33. [35]Qwen Team. Qwen3.5: Towards native multimodal agents. https://qwen.ai/blog?id=qwen3.5, February 2026. Accessed: 2026-07-22.
  34. [36]Michael Schmidt and Hod Lipson. Distilling free-form natural laws from experimental data. science, 324(5923):81–85, 2009.DOI
  35. [37]Parshin Shojaee, Kazem Meidani, Amir Barati Farimani, and Chandan Reddy. Transformer-based planning for symbolic regression. Advances in Neural Information Processing Systems, 36:45907–45919, 2023.arxiv.org/abs/2303.06833
  36. [38]Parshin Shojaee, Kazem Meidani, Shashank Gupta, Amir Barati Farimani, and Chandan K Reddy. Llm-sr: Scientific equation discovery via programming with large language models. In The Thirteenth International Conference on Learning Representations, 2025a.arxiv.org/abs/2404.18400
  37. [39]Parshin Shojaee, Ngoc-Hieu Nguyen, Kazem Meidani, Amir Barati Farimani, Khoa D Doan, and Chandan K Reddy. Llm-srbench: A new benchmark for scientific equation discovery with large language models. arXiv preprint arXiv:2504.10415, 2025b.arxiv.org/abs/2504.10415
  38. [40]Trevor Stephens. gplearn: Genetic programming in python, with a scikit-learn inspired api, 2024. URL https://github.com/trevorstephens/gplearn. Accessed, pp. 05–22, 2024.
  39. [41]Fangzheng Sun, Yang Liu, Jian-Xun Wang, and Hao Sun. Symbolic physics learner: Discovering governing equations via monte carlo tree search. In The Eleventh International Conference on Learning Representations, 2023.arxiv.org/abs/2205.13134
  40. [43]Silviu-Marian Udrescu, Andrew Tan, Jiahai Feng, Orisvaldo Neto, Tailin Wu, and Max Tegmark. Ai feynman 2.0: Pareto-optimal symbolic regression exploiting graph modularity. Advances in Neural Information Processing Systems, 33:4860–4871, 2020.arxiv.org/abs/2006.10782
  41. [44]Hanchen Wang, Tianfan Fu, Yuanqi Du, Wenhao Gao, Kexin Huang, Ziming Liu, Payal Chandak, Shengchao Liu, Peter Van Katwyk, Andreea Deac, et al. Scientific discovery in the age of artificial intelligence. Nature, 620(7972):47–60, 2023.DOI
  42. [45]Shijie Xia, Yuhan Sun, and Pengfei Liu. Sr-scientist: Scientific equation discovery with agentic ai. arXiv preprint arXiv:2510.11661, 2025.arxiv.org/abs/2510.11661
  43. [47]Hao Xu, Jinglong Lin, Dongxiao Zhang, and Fanyang Mo. Retention time prediction for chromatographic enantioseparation by quantile geometry-enhanced graph neural network. Nature Communications, 14(1):3095, 2023.
  44. [48]Hao Xu, Yuntian Chen, and Dongxiao Zhang. Worth of prior knowledge for enhancing deep learning. Nexus, 1(1), 2024.DOI
  45. [49]Hao Xu, Yuntian Chen, Zhenzhong Zeng, Nina Li, Jian Li, and Dongxiao Zhang. Exploring terrain-precipitation relationships with interpretable ai for advancing future climate projections. Nexus, 2(1), 2025.
  46. [50]Zihan Yu, Jingtao Ding, and Yong Li. Discover network dynamics with neural symbolic regression. Nature Computational Science, pp. 1–13, 2025.DOI
  47. [51]Hengzhe Zhang, Qi Chen, Wolfgang Banzhaf, Mengjie Zhang, et al. Rag-sr: Retrieval-augmented generation for neural symbolic regression. In The Thirteenth International Conference on Learning Representations, 2025a.
  48. [52]Xuan Zhang, Limei Wang, Jacob Helwig, Youzhi Luo, Cong Fu, Yaochen Xie, Meng Liu, Yuchao Lin, Zhao Xu, Keqiang Yan, et al. Artificial intelligence for science in quantum, atomistic, and continuum systems. Foundations and Trends® in Machine Learning, 18(4):385–849, 2025b.

Paper details

vlnc:W_g47sxuy9
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Computer Science

LLMs · View statement →

Looking for related papers…
Contents