FunctionEvolve: Structure-Guided Symbolic Regression with LLMs

Zeyu Xia, Jun Zhu, Dong Yan

TL;DR

FunctionEvolve is a novel framework for symbolic regression that bridges the gap between Large Language Models (LLMs) and traditional genetic programming by making mathematical expression trees explicitly visible to the LLM. By combining semantic LLM guidance with structure-aware coefficient optimization, it achieves state-of-the-art exact formula recovery on synthetic benchmarks while requiring up to 15x fewer LLM calls than previous methods.

What Problem Does This Paper Address?

Symbolic Regression (SR) aims to uncover the explicit mathematical laws governing physical data. Traditional approaches use Genetic Programming (GP) to evolve Abstract Syntax Trees (ASTs), but random mutations struggle to navigate massive search spaces efficiently.

Recently, researchers have turned to LLMs to inject scientific priors and semantic guidance into the search. However, current LLM-driven systems are "structure-blind": they treat mathematical equations as flat text strings or code blocks. This leads to three major bottlenecks:

  1. Destructive Mutations: Text-level edits often overwrite useful parent subexpressions instead of making precise local adjustments.
  2. Blind Selection: Parent selection mechanisms lack explicit structural awareness, leading to a waste of the search budget on redundant equation shapes.
  3. Brittle Fitting: Standard numerical optimizers treat equations as black boxes. If a correct equation skeleton gets poorly fitted constants, it scores poorly and is discarded prematurely.

Methods

FunctionEvolve addresses these bottlenecks by organizing the entire evolutionary loop around explicit, visible AST structures.

Figure 1: FunctionEvolve initializes candidate expressions from task context and then iteratively selects, mutates, optimizes, and evaluates them over an evolving expression database.

The framework consists of four main components:

  • Generator: Uses the LLM to extract domain-specific knowledge from the task context and initialize a diverse pool of structured seed expressions.
  • Selector: Rather than picking parents greedily based on raw error, the Selector provides the LLM with a structural summary table (including tree depth, parameter counts, and operator types). This allows the LLM to maintain algebraic diversity and avoid overfitting.
  • Mutator: Combines deterministic, rule-based tree edits (adding or deleting nodes) with LLM-guided local refinements. The LLM receives an annotated AST and proposes precise ADD (attaching new terms/factors) or SUBST (replacing a specific mismatched subtree) operations.
Figure 2: AST rule add/del and LLM-guided local mutation generate offspring from selected parents.
  • Structure-Aware Optimizer: Instead of black-box optimization, the framework exploits the equation's structure. It uses Variable Projection (VARPRO) to analytically solve for linear parameters via Ordinary Least Squares (OLS), leaving global (DE/CMA-ES) and local (L-BFGS) optimizers to handle only the lower-dimensional nonlinear subspace. Finally, it "snaps" exponents to stable rational values and simplifies redundant terms.
Figure 3: Structure-aware optimizer pipeline: variable projection, DE/CMA-ES global exploration, L-BFGS local refinement, parameter snapping, and symbolic simplification.

Datasets

The authors evaluated FunctionEvolve on two primary benchmarks:

  1. LLM-SRBench (Synthetic Subset): A 129-task benchmark spanning Chemistry, Biology, Physics, and Materials Science. Its synthetic nature minimizes the risk of the LLM simply memorizing formulas from its pretraining data.
  2. AI-Feynman: A classic physics benchmark consisting of 120 equations (100 original + 20 bonus tasks).

Key Insights and Ideas

  • Structure Visibility Empowers LLMs: LLMs are remarkably good at mathematical reasoning when given explicit structural context (like annotated ASTs) rather than raw text strings. It allows them to act as surgical mutators rather than blind rewriters.
  • Decoupling Constants from Skeletons: Separating linear parameters from nonlinear parameters via variable projection is a game-changer. It ensures that a structurally perfect equation skeleton isn't discarded simply because its constants haven't been fine-tuned yet.
  • Benchmark Auditing Reveals Hidden Flaws: Through a rigorous audit, the authors discovered that the Materials Science subset of LLM-SRBench suffers from severe collinearity (strain $\epsilon$ and temperature $T$ collapse to a single dimension: $T \approx 273 + 500\epsilon$). This makes multiple structurally distinct equations numerically identical, exposing a critical flaw in how we evaluate symbolic regression benchmarks.

Key Results

FunctionEvolve achieved massive performance leaps over existing baselines:

  • LLM-SRBench: Paired with Claude Opus 4.6, FunctionEvolve recovered 107 out of 129 exact symbolic forms. This yields a Symbolic Accuracy of 82.9% at top-50 (a 4.5x improvement over same-backbone baselines) and 55.8% at top-1 (a 3.6x improvement over the strongest previously published method, PiT-PO).
  • AI-Feynman: The framework achieved a 100% exact recovery rate (120/120 tasks) at top-1.
  • Efficiency: FunctionEvolve averaged just 66.86 LLM calls per task—representing a 15x reduction in LLM requests compared to LLM-SR, making it substantially cheaper to run.

Limitations and Future Work

  • Sensitivity to Noise: Exact symbolic recovery remains highly sensitive to observation noise. When evaluated under 1% and 5% noise, FunctionEvolve's exact recovery rate dropped significantly, indicating that noisy real-world data will require uncertainty-aware scoring mechanisms.
  • Future Directions: The authors suggest extending structure-guided evolution to dynamical systems that lack closed-form solutions, scaling to larger candidate-variable sets, and developing more realistic, non-degenerate scientific benchmarks.

Summary updated

BibTeX
@inproceedings{xia2026functionevolve,
  author = {Zeyu Xia and Jun Zhu and Dong Yan},
  title = {{FunctionEvolve: Structure-Guided Symbolic Regression with LLMs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=x9ZPbfgvX4},
}
Figure