In-Context Symbolic Regression: Leveraging Large Language Models for Function Discovery

Matteo Merler, Katsiaryna Haitsiukevich, Nicola Dainese, Pekka Marttinen
4/29/2024
cs.CLcs.LG

No official code found. Best implementation: merlerm/In-Context-Symbolic-Regression (18 stars, MIT, last commit 2024-09-26).

Abstract

State of the art Symbolic Regression (SR) methods currently build specialized models, while the application of Large Language Models (LLMs) remains largely unexplored. In this work, we introduce the first comprehensive framework that utilizes LLMs for the task of SR. We propose In-Context Symbolic Regression (ICSR), an SR method which iteratively refines a functional form with an LLM and determines its coefficients with an external optimizer. ICSR leverages LLMs' strong mathematical prior both to propose an initial set of possible functions given the observations and to refine them based on their errors. Our findings reveal that LLMs are able to successfully find symbolic equations that fit the given data, matching or outperforming the overall performance of the best SR baselines on four popular benchmarks, while yielding simpler equations with better out of distribution generalization.

View on arXivView PDF

Code Implementations(1)

MIT

Official code implementation for the ACL 2024 Student Research Workshop paper "In-Context Symbolic Regression: Leveraging Large Language Models for Function Discovery"

181PythonJul 12, 20242 years agoMIT
large-language-modelssymbolic-regression

Similar Papers

Cite this paper

@article{merler2024incontext,
  title  = {In-Context Symbolic Regression: Leveraging Large Language Models for Function Discovery},
  author = {Matteo Merler and Katsiaryna Haitsiukevich and Nicola Dainese and Pekka Marttinen},
  year   = {2024},
  eprint = {2404.19094},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.19094v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2404.19094.svg)](https://codeofpaper.com/paper/2404.19094)

Discussion