Know When the Equation Is Wrong: Structural Uncertainty for LLM-Guided Symbolic Regression under Extrapolation
Organizations: Department of Information Systems, University of Maryland, Baltimore County, Baltimore, MD, USA.
Abstract
Large language models (LLMs) can help discover mathematical equations from data, but most LLM-guided symbolic regression methods focus on a single best equation without quantifying uncertainty over alternative functional forms. This is challenging because distinct equations can fit the observed data similarly while producing substantially different extrapolations. Our experiments on the LLM-SRBench dataset show that standard conformal intervals achieve nominal in-distribution coverage but frequently fail under extrapolation. To tackle this challenge, we introduce LLM-SR-UQ, a framework that retains competing equation structures and uses their disagreement to characterize uncertainty about the underlying functional form. We extend the standard fixed-width conformal approach to quantify structural intervals, which measure disagreement among candidate equations and identify where prediction intervals should widen. Extensive experiments show our framework substantially improves coverage attainment by incorporating structural disagreement while preserving in-distribution coverage. Our approach also shows good generalizability when it is applied to other symbolic-regression methods.
Figures & tables
| NMSE | Coverage | OOD attainment | OOD sharpness | OOD IS | ||||
| Method | Interval | ID | OOD | ID | OOD | IS | ||
| Direct, Llama-8B | split | 2.1e-2 | 2.84 | 0.902 | 0.629 | 0.55 (60/109) | 4.45e-1 | 9.08e-1 |
| Direct, GPT-4o-mini | split | 2.0e-2 | 2.76 | 0.894 | 0.646 | 0.57 (62/109) | 3.83e-1 | 7.94e-1 |
| Ensemble-SINDy | split | 3.2e-7 | 6.3e-2 | 0.899 | 0.365 | 0.26 (28/109) | 2.03e-4 | 5.58e-2 |
| Ensemble-SINDy | structural | 3.2e-7 | 6.3e-2 | 0.900 | 0.762 | 0.62 (68/109) | 9.29e-3 | 1.89e-2 |
| LLM-SR, single best | split | 4.2e-6 | 2.2e-3 | 0.891 | 0.627 | 0.52 (57/109) | 4.82e-3 | 1.54e-2 |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Split | Content | Labels | Role |
|---|---|---|---|
| of the training rows ( ) | yes | fit and score structures | |
| the other ( ) | yes | calibrate intervals | |
| points just beyond the training range | no | measure disagreement (critic only) | |
| benchmark test set, inside the range | yes | final evaluation | |
| benchmark test set, beyond the range | yes | final evaluation |
| untempered | tempered | ||||
|---|---|---|---|---|---|
| Configuration | median | median | median | median | |
| A0 | 109 | 1.0000 | 1.00 | 0.240 | 8.40 |
| A1 | 109 | 1.0000 | 1.00 | 0.227 | 8.40 |
| A2 ( B critic) | 108 | 1.0000 | 1.00 | 0.229 | 8.40 |
| A3 ( B critic) | 107 | 1.0000 | 1.00 | 0.219 | 8.40 |
| A2 (GPT-4o critic) | 107 | 1.0000 | 1.00 | 0.243 | 8.40 |
| Rung | Subset | split | ||
|---|---|---|---|---|
| A0 | evidence degenerate | 86 | 0.58 | 0.86 |
| A0 | some spread | 23 | 0.57 | 0.74 |
| A1 | evidence degenerate | 62 | 0.57 | 0.88 |
| A1 | some spread | 47 | 0.49 | 0.98 |
| Configuration | with ref. | FR@1 | FR@3 | FR@10 | FR@3 FR@1 |
|---|---|---|---|---|---|
| A0 | 105 | 8 | 8 | 8 | 0 |
| A1 | 104 | 12 | 12 | 12 | 0 |
| A2 ( B critic) | 104 | 13 | 14 | 15 | 1 |
| A3 ( B critic) | 103 | 11 | 13 | 13 | 2 |
| A2 (GPT-4o critic) | 103 | 10 | 10 | 10 | 0 |
| A3 (GPT-4o critic) | 104 | 10 | 11 | 12 | 1 |
| Rung | Feedback to proposer | Critic | Isolates |
|---|---|---|---|
| A0 | frozen prompt (problem description only) | — | search + calibration |
| A1 | + mechanical diagnostics (fixed template) | — | plumbing |
| A2 | + critic guidance from point-fit diagnostics | yes | critic from fit alone |
| A3 | + label-free calibration diagnostics (divergence | yes | the claim |
| beyond the data, interval growth) |
| NMSE | OOD | |||||||
| Rung | ID | OOD | cov. | split | FR@1 | params / plateau | ||
| A0 | 3.3e-6 | 2.4e-3 | 0.906 | 0.83 (91/109) | 0.58 | 1.27e-2 | 8/105 | 6.7 / 0.52 |
| A1 | 2.0e-8 | 6.0e-5 | 0.964 | 0.92 (100/109) | 0.53 | 1.12e-3 | 12/104 | 8.2 / 0.42 |
| critic the proposer model (Llama-3.1-8B-Instruct) | ||||||||
| A2 | 9.3e-9 | 2.0e-5 | 0.924 | 0.87 (91/105) | 0.52 | 1.87e-3 | 13/104 | 8.1 / 0.46 |
| A3 | 4.4e-7 | 4.0e-4 | 0.947 | 0.88 (93/106) | 0.56 | 7.73e-3 | 11/103 | 7.4 / 0.48 |
| critic calls | 24 | edits proposed | 72 |
| failed calls | 0 | edits valid | 44 |
| prompt tokens | 39,120 | edits fitted | 44 |
| completion tokens | 10,245 | edits entering buffer | 0 |
| directives proposed | 72 | bans proposed | 111 |
| directives valid | 52 | bans valid | 110 |
| slots trimmed | 19 | proposals under ban | 701 |
| round | leading structure | log-evidence | families |
|---|---|---|---|
| 1 | c0+c1*(Pc2)/(c3+tc4) | 5,496 | 8 |
| 2 | c0+c1Pc2/(c3+tc4)+c5P**c6 | 16,847 | 16 |
| 5 | c0+c1P**c2+c3P**c4 | 16,855 | 24 |
| 6 | c0+c1P**c2+c3Pc4+c5*tc6 | 17,207 | 24 |
| 7 | c0+c1P**c2+c3P**c4+c5softplus(c6t)**c7 | 18,320 | 24 |
| 39 | c0+c1P**c2+c3Pc4+c5*c6c7/(c8+t**c9) | 26,398 | 22 |
| rank | best expression in family | log-evidence | weight | coeffs |
|---|---|---|---|---|
| 1 | c0+c1P**c2+c3Pc4+c5*c6c7/(c8+t**c9) | 26,398 | 0.313 | 10 |
| 2 | c0+c1P**c2+c3tc4+c5*Pc6 | 17,564 | 0.059 | 7 |
| 3 | c0+c1P**c2+c2Pc3/(c4+tc5) | 17,168 | 0.057 | 6 |
| 4 | c0+c1P**c2+c3Pc4+c5*Pc6/(c7+c8*t**c9) | 19,388 | 0.052 | 10 |
| 5 | c0+c1P**c2+c3P**c4+c5softplus(c6t)**c7 | 18,320 | 0.040 | 8 |
| in-distribution ( ) | shifted ( ) | |
|---|---|---|
| NMSE | ||
| of points | of points | |
| coverage | ||
| coverage gap | ||
| mean interval width |
| Symbol | Meaning |
|---|---|
| , | input vector and scalar target of data point |
| , | a structure: the shape of an equation with its coefficients left free; is candidate |
| , | the free coefficients of a structure, and the names they carry in proposals |
| the coefficients of fitted on | |
| fitting split; labelled calibration split; unlabelled probe region just beyond the data (Table 2 ) | |
| the benchmark’s in-distribution and shifted test splits, used only at the end |
Symbolic Regression
Symbolic regression searches data for compact mathematical expressions that balance predictive accuracy with interpretability.
See all 151 papers