Research map / Large language models / Agents, code and math
LLM-SR: Scientific Equation Discovery via Programming with Large Language Models
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Introduces LLM-SR, which treats equations as Python programs proposed by LLMs and refined via an islands-based evolutionary buffer and parameter optimization, evaluated on four new benchmarks designed to avoid LLM recitation.
Problem
Symbolic regression / data-driven equation discovery is combinatorially hard and existing methods ignore domain prior knowledge and use restricted representations such as expression trees; Feynman benchmarks may be memorized by LLMs.
Approach
Represent equations as Python program skeletons with a params vector, have an LLM propose hypotheses using scientific problem descriptions and in-context experience from an islands-based evolutionary buffer, and fit parameters with BFGS or Adam against data.
Key results
- On Oscillation 2, LLM-SR (GPT-3.5) reaches ID NMSE 2.12e-7 and OOD NMSE 3.81e-5, versus PySR ID 0.0002 and OOD 0.0098.
- On E. coli growth, LLM-SR (Mixtral) achieves OOD NMSE 0.0037 while all baselines except E2E-level ones exceed OOD NMSE 1 (PySR 1.0141, uDSR 5.4584).
- LLM-SR converges in roughly 2.5K iterations while search baselines run for 2M+ iterations.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use LLM-SR with Mixtral instead of the strongest reported SR baseline | Symbolic regression on Oscillation 1 · Oscillation 1 ID | NMSE: 0.0003 -> 7.89e-8 | Helped |
| Use LLM-SR with Mixtral instead of the strongest reported SR baseline | Symbolic regression on Oscillation 1 · Oscillation 1 OOD | NMSE: 0.0007 -> 0.0002 | Helped |
| Use LLM-SR with GPT-3.5 instead of the strongest reported SR baseline | Symbolic regression on Oscillation 2 · Oscillation 2 ID | NMSE: 0.0002 -> 2.12e-7 | Helped |
| Use LLM-SR with GPT-3.5 instead of the strongest reported SR baseline | Symbolic regression on Oscillation 2 · Oscillation 2 OOD | NMSE: 0.0015 -> 3.81e-5 | Helped |
| Use LLM-SR with Mixtral instead of the strongest reported SR baseline | Symbolic regression on E. coli growth · E. coli growth ID | NMSE: 0.0376 -> 0.0026 | Helped |
| Use LLM-SR with Mixtral instead of the strongest reported SR baseline | Symbolic regression on E. coli growth · E. coli growth OOD | NMSE: 1.0141 -> 0.0037 | Helped |
| Use LLM-SR with Mixtral instead of the strongest reported SR baseline | Symbolic regression on Stress-Strain · Stress-Strain ID | NMSE: 0.0331 -> 0.0162 | Helped |
| Use LLM-SR with GPT-3.5 instead of the strongest reported SR baseline | Symbolic regression on Stress-Strain · Stress-Strain OOD | NMSE: 0.1304 -> 0.0516 | Helped |
| Add the natural-language scientific problem and variable description (ablation) | LLM-SR on Oscillation 2 · Oscillation 2 | NMSE | Helped |
| Use flexible program representation rather than single-line mathematical expressions (ablation) | LLM-SR on Oscillation 2 · Oscillation 2 | NMSE | Helped |
| Add iterative refinement and the optimization loop (ablation) | LLM-SR on Oscillation 2 · Oscillation 2 ID | NMSE: 1.01e-1 -> 2.12e-7 | Helped |
| Add iterative refinement and the optimization loop (ablation) | LLM-SR on Oscillation 2 · Oscillation 2 OOD | NMSE: 1.81e-1 -> 3.81e-5 | Helped |
Surprising findings
- Feynman benchmark problems reach low error within very few LLM iterations, and Feynman equations show lower perplexity, suggesting LLM recitation.
- Removing the natural language problem specification or program representation hurts performance, and numpy+BFGS slightly beats torch+Adam, attributed to LLMs writing numpy better.
Limitations
- Performance depends on the LLM's training data quality and may carry biases or gaps in scientific domains.
- Iterative LLM queries and parameter optimization may be computationally costly for large-scale problems.
Experimental setup
Datasets: Feynman benchmark Aluminum 6061-T651 stress-strain data (Mendeley)
Benchmarks: Oscillation 1 Oscillation 2 E. coli growth Stress-Strain
Metrics: NMSE perplexity
Baselines: GPlearn PySR DSR uDSR NeSymReS E2E
Builds on: FunSearch PySR DSR uDSR
Closest papers by meaning
- LLM-SRBench: A New Benchmark for Scientific Equation Discovery with Large Language Models (ICML 2025 · similarity 0.95)
- FunctionEvolve: Structure-Guided Symbolic Regression with LLMs (NeurIPS 2026 · similarity 0.90)
- MOOSE-Chem2: Exploring LLM Limits in Fine-Grained Scientific Hypothesis Discovery via Hierarchical Search (NeurIPS 2025 · similarity 0.89)
- FIND: A Framework for Discovering Formulas in Data (AAAI 2025 · similarity 0.88)
- SNIP: Bridging Mathematical Symbolic and Numeric Realms with Unified Pre-training (ICLR 2024 · similarity 0.87)
- Symmetry-Informed Governing Equation Discovery (NeurIPS 2024 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
