Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
[ICLR 2025 Oral] This is the official repo for the paper "LLM-SR" on Scientific Equation Discovery and Symbolic Regression with Large Language Models
| Date | Stars |
|---|---|
| 2026-07-31 | 264 |
| 2026-08-02 | 265 |
| 2026-08-06 | 265 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# `LLM-SR`: Scientific Equation Discovery and Symbolic Regression via Programming with LLMs
[](https://arxiv.org/abs/2404.18400)
[](./data/)

Official Implementation of paper [LLM-SR: Scientific Equation Discovery via Programming with Large Language Models](https://arxiv.org/abs/2404.18400) **(ICLR 2025 Oral)**.
## Updates
- Our recent more comprehensive benchmark [LLM-SRBench: A New Benchmark for Scientific Equation Discovery with Large Language Models](https://arxiv.org/abs/2504.10415) **(to appear at ICML 2025 as Oral)** is released following this work to effectively test LLM-based scientific equation discovery methods beyond memorization. Check out the benchmark data on [huggingface](https://huggingface.co/datasets/nnheui/llm-srbench) and evaluation codes [here](https://github.com/deep-symbolic-mathematics/llm-srbench).
## Overview
In this paper, we introduce **LLM-SR**, a novel approach for scientific equation discovery and symbolic regression that leverages strengths of Large Language Models (LLMs). LLM-SR combines **LLMs' scientific knowledge** and **code generation** capabilities with **evolutionary search** to discover accurate and interpretable equations from data. The method represents equations as program skeletons, allowing for flexible hypothesis generation guided by domain-specific priors. Experiments on custom benchmark problems across physics, biology, and materials science demonstrate LLM-SR's superior performance compared to state-of-the-art symbolic regression methods, particularly in out-of-domain generalization. The paper also highlights the limitations of common benchmarks and proposes new, challenging datasets for evaluating LLM-based equation discovery methods.

## Installation
To run the code, create a conda environment and install the dependencies provided in the `requirements.txt` or `environment.yml`:
```
conda create -n llmsr python=3.11.7
conda activate llmsr
pip install -r requirements.txt
```
or
```
conda env create -f environment.yml
conda activate llmsr
```
Note: Requires Python ≥ 3.9
## Datasets
Benchmark datasets studied in this paper are provided in the [data/](./data) directory. For details on datasets and generation settings, please refer to [paper](https://arxiv.org/abs/2404.18400).
## Local Runs (Open-Source LLMs)
### Start the local LLM Server
First, start the local LLM engine from huggingface models by using the `bash run_server.sh` script or running the following command:
```
cd llm_engine
python engine.py --model_path mistralai/Mixtral-8x7B-Instruct-v0.1 \
--gpu_ids [GPU_ID] \
--port [PORT_ID] --quantization
```
* Set `gpu_ids` and `port` parameters based on your server availability
* Change `model_path` to use a different open-source model from Hugging Face
* `quantization` activates efficient inference of LLM with quantization on GPUs
* Control quantization level with `load_in_4bit` and `load_in_8bit` parameters in [engine.py](./llm_engine/engine.py)
### Run LLM-SR on Local Server
After activating the local LLM server, run the LLM-SR framework on your dataset with the `run_llmsr.sh` script or running the following command:
```
python main.py --problem_name [PROBLEM_NAME] \
--spec_path [SPEC_PATH] \
--log_path [LOG_PATH]
```
* Update the `port` id in the url in [sampler.py](./llmsr/sampler.py) to match the LLM server port
* `problem_name` refers to the target problem and dataset in [data/](./data)
* `spec_path` refers to the initial prompt specification file path in [spec/](./specs)
* Available problem names for datasets: `oscillator1`Excerpt of 6,868 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:3d477e30ab754c3b, topic:large-language-models
matched fp:3d477e30ab754c3b, topic:llm-agent