Skip to main content
QUICK REVIEW

[论文解读] LLM-SR: Scientific Equation Discovery via Programming with Large Language Models

Parshin Shojaee, Kazem Meidani|arXiv (Cornell University)|Apr 29, 2024
Scientific Computing and Data Management被引用 4
一句话总结

LLM-SR 提出了一种新颖的框架,通过将方程视为可执行程序,利用大型语言模型(LLMs)发现科学方程,结合科学先验知识与数据驱动的优化。该方法在多个科学领域中发现物理上准确的方程方面,优于传统的符号回归基线模型,展现出更优的域内与域外泛化能力。

ABSTRACT

Mathematical equations have been unreasonably effective in describing complex natural phenomena across various scientific disciplines. However, discovering such insightful equations from data presents significant challenges due to the necessity of navigating extremely large combinatorial hypothesis spaces. Current methods of equation discovery, commonly known as symbolic regression techniques, largely focus on extracting equations from data alone, often neglecting the domain-specific prior knowledge that scientists typically depend on. They also employ limited representations such as expression trees, constraining the search space and expressiveness of equations. To bridge this gap, we introduce LLM-SR, a novel approach that leverages the extensive scientific knowledge and robust code generation capabilities of Large Language Models (LLMs) to discover scientific equations from data. Specifically, LLM-SR treats equations as programs with mathematical operators and combines LLMs' scientific priors with evolutionary search over equation programs. The LLM iteratively proposes new equation skeleton hypotheses, drawing from its domain knowledge, which are then optimized against data to estimate parameters. We evaluate LLM-SR on four benchmark problems across diverse scientific domains (e.g., physics, biology), which we carefully designed to simulate the discovery process and prevent LLM recitation. Our results demonstrate that LLM-SR discovers physically accurate equations that significantly outperform state-of-the-art symbolic regression baselines, particularly in out-of-domain test settings. We also show that LLM-SR's incorporation of scientific priors enables more efficient equation space exploration than the baselines. Code and data are available: https://github.com/deep-symbolic-mathematics/LLM-SR

研究动机与目标

  • 通过将科学先验知识整合到方程发现过程中,解决在高维、非线性假设空间中进行符号回归的挑战。
  • 克服传统符号回归方法忽略特定领域知识、在组合空间中搜索效率低下的局限性。
  • 利用 LLM 的科学推理与代码生成能力,生成有根据的方程骨架,并引导进化搜索。
  • 通过嵌入物理一致性与科学合理性等 LLM 先验知识,提升所发现方程的泛化能力与可解释性。
  • 开发一种可扩展的迭代框架,结合基于 LLM 的假设生成、数据驱动评估以及经验记忆以实现持续优化。

提出的方法

  • 使用数学运算符与符号变量将科学方程表示为可执行的程序骨架,使 LLM 能够将其作为代码进行生成与操作。
  • 采用结构化提示,包含问题描述与变量定义,引导 LLM 生成具有占位系数的科学上合理的方程形式。
  • 使用现成的优化器将每个方程骨架的参数拟合到观测数据上,通过回归指标评估适应度。
  • 维护一个动态的记忆缓冲区,保存高分假设,作为上下文示例,指导 LLM 生成方程的迭代优化。
  • 应用由 LLM 引导的进化搜索策略(变异与交叉),高效探索方程空间,并利用适应度反馈引导向更优解。
  • 在假设生成阶段整合来自 LLM 的科学先验知识,如物理一致性、量纲分析与已知函数形式,以提升搜索效率与准确性。
Figure 1: The LLM-SR framework , consisting of three main steps: (a) Hypothesis Generation , where LLM generates equation program skeletons based on a structured prompt; (b) Data-driven Evaluation , which optimizes the parameters of each equation skeleton hypothesis and assesses its fit to the data;
Figure 1: The LLM-SR framework , consisting of three main steps: (a) Hypothesis Generation , where LLM generates equation program skeletons based on a structured prompt; (b) Data-driven Evaluation , which optimizes the parameters of each equation skeleton hypothesis and assesses its fit to the data;

实验结果

研究问题

  • RQ1LLM 是否能在不完全依赖数据驱动搜索的前提下,有效生成科学上合理的方程骨架?
  • RQ2与传统符号回归相比,LLM 提供的科学先验知识在提升方程发现的准确性与泛化能力方面效果如何?
  • RQ3LLM 生成的方程程序在多种科学领域中,对域内与域外数据的拟合性能,能否显著优于现有基线方法?
  • RQ4经验记忆与迭代优化的整合在提升所发现方程的收敛性与多样性方面发挥多大作用?
  • RQ5在计算成本与模型学习先验可能引入的偏差方面,基于 LLM 的方程发现存在哪些局限性?

主要发现

  • LLM-SR 在三个不同的科学领域中成功发现了物理上准确的方程,展现出对域外数据的强大泛化能力。
  • 与成熟的符号回归基线相比,该框架在域内与域外数据上均实现了显著更优的拟合效果。
  • 整合 LLM 生成的科学先验知识减少了对穷举搜索的依赖,加速了高维方程空间中的收敛。
  • 采用方程即程序的表示方式,实现了有效的代码生成与执行,增强了建模复杂关系的表达力与灵活性。
  • 通过动态记忆保存高分假设,实现经验管理,使后续 LLM 生成的提案质量因上下文学习而提升。
  • 尽管存在计算成本,LLM-SR 展现出通过结合类人推理与数据驱动优化,加速科学发现的潜力。
Figure 2: Example of an input prompt for E. Coli bacterial growth with problem specifications, evaluation and optimization function, and the initial input equation example.
Figure 2: Example of an input prompt for E. Coli bacterial growth with problem specifications, evaluation and optimization function, and the initial input equation example.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。