Evolving Explanations: Complexity-Adaptive Refinement of Faithful Explanations for Symbolic Regression
Authors: Elisabeth Mayrhuber, Ting Hu, Stephan Winkler
Organizations: Bioinformatics Research Group, University of Applied Sciences Upper Austria · Computer Vision Lab, TU Wien, Vienna, Austria · Machine Intelligence and Biocomputing Laboratory, Queen’s University, Kingston, Canada
Natural-language explanations generated by large language models (LLMs) for machine learning models often seem fluent but are not necessarily faithful to the underlying model. We formalize this mismatch as a faithfulness gap and propose a complexity-adaptive refinement framework for symbolic regression that iteratively generates and validates explanations until numerical agreement with the target expression is achieved. The approach follows a two-stage pipeline: an explainer LLM produces textual descriptions at increasing levels of detail, while an independent validator LLM extracts a symbolic expression that is compared against the original model. This process is framed as a discrete search over explanation space, where complexity is minimized subject to a faithfulness constraint. We evaluate the method on real-world and synthetic datasets, with a total of 250 runs across varying model complexities. The explanation refinement loop achieves an overall pass rate of 84.0%, with most explanations converging at low complexity levels and only a small fraction requiring detailed descriptions. Our results demonstrate that faithful explanations can be obtained with minimal necessary complexity by explicitly closing the explanation loop through symbolic validation.
Figures & tables
Level
Description
c0
Overall trend and direction of effects
c1
Individual terms and directional influence
c2
Relative magnitude of effects
c3
Nonlinearities and interactions
c4
Full term-by-term mathematical interpretation
Table 1: Hierarchy of explanation complexity levels defining progressively richer semantic descriptions of a symbolic expressions.
Figure 1: Proposed workflow for evolutionary explanation generation.
Dataset
Type
Complexity
Motivation / Reference
Diabetes
Real-world
Low
Linear or near-linear structure; early convergence [ 6 ]
Friedman #1
Synthetic
Medium
Standard nonlinear benchmark with interactions [ 7 ]
Friedman #2
Synthetic
High
Strong nonlinearities; stress test for explanations [ 7 ]
Synthetic Polynomial
Synthetic
Medium
Known ground truth enables faithfulness verification [ 9 ]
Synthetic Trigonometric
Synthetic
High
Interaction-heavy trigonometric structure [ 9 ]
Table 2: Overview of datasets used for evaluation.
Dataset
SR R2
Nodes
Pass (%)
Median c∗
Runtime (s)
Diabetes (linear)
0.40–0.45
9–13
80.0
1
311
Friedman #1
0.70–0.79
12–17
62.0
2
529
Friedman #2
0.997
3
100.0
1
143
Synthetic polynomial
0.990
7
88.0
2
332
Synthetic trigonometric
0.12–0.30
5–17
90.0
1
267
Overall
–
–
84.0
1
316
Table 3: Benchmark results for n=50 runs per dataset (10 SR fits × 5 LLM runs). c∗ : minimum explanation complexity achieving δ≤τ . Pass: fraction of runs converging within c≤4 . Ranges in SR R2 and nodes reflect variation across the 10 independent PySR fits; single values indicate all fits converged to the same expression. The runtime reflects the average runtime per dataset on commodity hardware.
Figure 2: Cumulative pass rate for every data set and complexity level, showing that Friedman #2 converging at c2 latest and Friedman#1 having the smallest cumulative pass rate.
Figure 3: Pass rate (%) for each combination of SR expression complexity tier (rows) and explanation complexity level (columns). Darker cells indicate that more faithful explanations could be generated. Simple expressions achieve high pass rates already at c1 , while complex expressions require higher complexity levels before convergence, confirming that c∗ scales with SR model complexity.
Figure 4: Distribution of the minimum complexity level needed for each test run.
Figure 5: Minimum needed explanation for different SR expression complexity, showing only a small direct relationship between model and explanation complexity.
Figure 6: SR variance (blue) versus LLM variance (orange) showing that the LLM is the bottleneck in 4 out of 5 cases.
Figure 7: Runtime for all complexity levels and datasets on commodity hardware.
Figure 8: Success rates of faithful LLM explanation generation where green show the runs that converged at the first validation try, yellow the explanations that needed more than one validation attempt and red did not converge at all.
Genetic Programming and its variants, such as grammatical evolution, are widely used in Symbolic Regression to derive mathematical expressions from multivariate data. In addition to predictive accuracy, models are appreciated for their potential to provide interpretability, offering explicit equations that relate input variables to outcomes. However, achieving interpretability and plausibility remains challenging, as evolved models may be complex or scientifically inconsistent. In this study, we explore whether Large Language Models, can assist in improving the explainability of Symbolic Regression models generated by evolutionary computation methods. Building upon our previous work on estimating body fat percentage using grammar-based Genetic Programming , we investigate the use of LLMs as post-processing tools to analyze and rank evolved expressions according to their interpretability and medical plausibility. Four symbolic expressions are analysed by three LLMs over three repeated runs, and the resulting interpretations and rankings are assessed by a panel of three clinicians. Across the three LLMs, comparative model-ranking outputs received more favorable clinician assessments than isolated term-level interpretations. However, the LLMs also produced physiologically and mathematically questionable explanations, indicating that they are better suited to comparative auditing under expert oversight than to autonomous validation.\blfootnote{The present work is an extended version of a paper submitted into a journal.
Jorge López-Varela, J. Ignacio Hidalgo, José-Manuel Muñoz +6
Computer Architecture Department, Universidad Complutense de Madrid, Spain. · Bioinspired Intelligence Ltd., Pozuelo de Alarc´on, Spain · Universidad Aut´onoma de Baja California, M´exico +7
Symbolic regression searches for an equation that explains observed data. Numerical error is commonly used to guide the search, but it alone can favor an accurate surrogate over a candidate with the right structure. We propose L2G-SR, a framework for LLM-based symbolic regression that guides search with a learned structural verifier. We construct structural supervision signal using tree edit distance (TED), accounting for commutative operators and alternative expression forms. A verifier first aligns numerical observations with the formulas, then learns to score a candidate's structural similarity to the target formula. At search time, the target formula is hidden and the verifier complements numerical error in parent selection. An analyst then uses verifier feedback and diagnostic tools to propose revisions, which a generator converts into refined expressions. On LLM-SRBench, L2G-SR achieves state-of-the-art numerical fit, equation level accuracy and TED across the evaluated LLM backbones and domains. L2G-SR demonstrates the value of learned structural guidance for LLM-based symbolic regression.
Symbolic regression (SR) seeks to discover parsimonious mathematical laws from observational data, yet conventional approaches often struggle with the vast combinatorial search space of physically meaningful expressions. We present InsightSR, a framework that embeds Large Language Models (LLMs) as a guiding layer around the PySR genetic programming engine. Rather than relying on LLMs to generate expressions directly, InsightSR uses LLMs to progressively transform the search space itself through two complementary pathways: a Semantic Seed Pathway that proposes dimensionally consistent functional skeletons, and a Structural Feature Pathway that recommends nonlinear feature transformations. These transformations accumulate over iterations, broadening the input space and shifting the symbolic search from constructing deep expression trees over raw variables to assembling shallow trees over a rich, semantically informed feature set. A post-generation feedback loop evaluates candidates, categorizes features by their empirical utility, and refines the guidance for the next iteration, transforming the discovery process from open-ended generation into iterative, self-correcting refinement. Across three benchmarks, InsightSR achieves a 95% exact recovery rate on the Feynman benchmark and 80.18% accuracy on the LLM-SRBench LSR-Transform task, substantially outperforming state-of-the-art genetic programming and neural-symbolic methods while maintaining strong out-of-distribution generalization on real-world datasets.