In Context Learning and Reasoning for Symbolic Regression with Large Language Models
On the map: LLM reasoning → Mathematical reasoning
Abstract (arXiv)
Large Language Models (LLMs) are transformer-based machine learning models that have shown remarkable performance in tasks for which they were not explicitly trained. Here, we explore the potential of LLMs to perform symbolic regression -- a machine-learning method for finding simple and accurate equations from datasets. We prompt GPT-4 and GPT-4o models to suggest expressions from data, which are then optimized and evaluated using external Python tools. These results are fed back to the LLMs, which propose improved expressions while optimizing for complexity and loss. Using chain-of-thought prompting, we instruct the models to analyze data, prior expressions, and the scientific context (expressed in natural language) for each problem before generating new expressions. We evaluated the workflow in rediscovery of Langmuir and dual-site Langmuir's model for adsorption, along with Nikuradse's dataset on flow in rough pipes, which does not have a known target model equation. Both the GPT-4 and GPT-4o models successfully rediscovered equations, with better performance when using a scratchpad and considering scientific context. GPT-4o model demonstrated improved reasoning with data patterns, particularly evident in the dual-site Langmuir and Nikuradse dataset. We demonstrate how strategic prompting improves the model's performance and how the natural language interface simplifies integrating theory with data. We also applied symbolic mathematical constraints based on the background knowledge of data via prompts and found that LLMs generate meaningful equations more frequently. Although this approach does not outperform established SR programs where target equations are more complex, LLMs can nonetheless iterate toward improved solutions while following instructions and incorporating scientific context in natural language.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Placed in Mathematical reasoning, one of 17 directions in LLM reasoning. Builds on 36 of its 103 references that are in the map. First posted on arXiv 22 Oct 2024.
Builds on
36 of 103 references.
Closest ancestors · 1
Same direction, newest first
Other references · 35
- 2023GPT-4 Technical Reportcited by 18,132
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2023Large Language Models as Optimizerscited by 830
- 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 376
- 2021Beyond Goldfish Memory: Long-Term Open-Domain Conversationcited by 266
- 2019Neural Legal Judgment Prediction in Englishcited by 208
- 2018Music Transformercited by 207
23 more
- 2023PaperQA: Retrieval-Augmented Generative Agent for Scientific Researchcited by 143
- 2023Language Model Crossover: Variation through Few-Shot Promptingcited by 119
- 2024LLM-SR: Scientific Equation Discovery via Programming with Large Language Modelscited by 117
- 2022Long Time No See! Open-Domain Conversation with Long-Term Persona Memorycited by 107
- 2024A Survey on Large Language Model-Based Game Agentscited by 106
- 2021SymbolicGPT: A Generative Transformer Model for Symbolic Regressioncited by 101
- 2024A Review of Large Language Models and Autonomous Agents in Chemistrycited by 96
- 2019Bayesian Symbolic Regressioncited by 77
- 2024Symbolic Regression with a Learned Concept Librarycited by 76
- 2022Keep Me Updated! Memory Management in Long-term Conversationscited by 62
- 2023Deep symbolic regression for physics guided by units constraints: toward the automated discovery of physical lawscited by 55
- 2022Deep Symbolic Regression for Recurrent Sequencescited by 53
- 2022Less is More: Learning to Refine Dialogue History for Personalized Dialogue Generationcited by 47
- 2024Evolving Code with A Large Language Modelcited by 42
- 2023Interpretable Machine Learning for Science with PySR and SymbolicRegression.jlcited by 36
- 2021Shape-constrained Symbolic Regression -- Improving Extrapolation with Prior Knowledgecited by 27
- 2024Can LLMs Master Math? Investigating Large Language Models on Math Stack Exchangecited by 22
- 2021Pre-trained Language Models as Prior Knowledge for Playing Text-based Gamescited by 21
- 2017Globally Optimal Symbolic Regressioncited by 6
- 2020What Types of COVID-19 Conspiracies are Populated by Twitter Bots?cited by 6
- 2024LLM as a Complementary Optimizer to Gradient Descent: A Case Study in Prompt Tuningcited by 5
- 2020Symbolic Regression using Mixed-Integer Nonlinear Optimizationcited by 4
- 2023Active Learning in Symbolic Regression with Physical Constraintscited by 3
Built on by
Citing papers per year: 2025: 5; 2026: 2.
7 papers.
- 2026Think like a Scientist: Physics-guided LLM Agent for Equation Discoverycited by 13
- 2025Knowledge Integration for Physics-informed Symbolic Regression Using Pre-trained Large Language Modelscited by 7
- 2025Large Language Models for Extrapolative Modeling of Manufacturing Processescited by 4
- 2025Automated Model Discovery via Multi-modal & Multi-step Pipelinecited by 3
- 2025Data-driven Discovery of Digital Twins in Biomedical Researchcited by 2
- 2025Can Test-time Computation Mitigate Reproduction Bias in Neural Symbolic Regression?cited by 1
- 2026LLM-driven design of physics-constrained constitutive models: two agents are better than onecited by 0
- 2026LLM-driven design of physics-constrained constitutive models: two agents are better than one22 May 2026
- 2026Think like a Scientist: Physics-guided LLM Agent for Equation Discovery12 Feb 2026
- 2025Automated Model Discovery via Multi-modal & Multi-step Pipeline30 Sep 2025
- 2025Knowledge Integration for Physics-informed Symbolic Regression Using Pre-trained Large Language Models3 Sep 2025
- 2025Data-driven Discovery of Digital Twins in Biomedical Research29 Aug 2025
- 2025Can Test-time Computation Mitigate Reproduction Bias in Neural Symbolic Regression?28 May 2025
- 2025Large Language Models for Extrapolative Modeling of Manufacturing Processes15 Feb 2025
Similar, not cited
Close in wording, no citation either way
- 2025DrSR: LLM based Scientific Equation Discovery with Dual Reasoning from Data and Experience
- 2023Probabilistic Regular Tree Priors for Scientific Symbolic Reasoning
- 2025Symbolic Regression with Multimodal Large Language Models and Kolmogorov Arnold Networks
- 2025Iterated Agent for Symbolic Regression
- 2025DeepSeek vs. ChatGPT vs. Claude: A Comparative Study for Scientific Computing and Scientific Machine Learning Tasks
- 2023A Symbolic Framework for Evaluating Mathematical Reasoning and Generalisation with Transformers
- 2024LLMs for Mathematical Modeling: Towards Bridging the Gap between Natural and Mathematical Languages
- 2024Interactive Symbolic Regression through Offline Reinforcement Learning: A Co-Design Framework