mlsanityData to 7 Oct 2026

In Context Learning and Reasoning for Symbolic Regression with Large Language Models

arXiv 2410.17448 ↗First posted 22 Oct 2024cs.CL cs.AIcited by 7

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

  1. 2024Evaluating LLMs' Mathematical and Coding Competency through Ontology-guided Interventions17 Jan

Other references · 35

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
  4. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  5. 2021Program Synthesis with Large Language Modelscited by 3,509
  6. 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
  7. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
  8. 2023Large Language Models as Optimizerscited by 830
  9. 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 376
  10. 2021Beyond Goldfish Memory: Long-Term Open-Domain Conversationcited by 266
  11. 2019Neural Legal Judgment Prediction in Englishcited by 208
  12. 2018Music Transformercited by 207
23 more
  1. 2023PaperQA: Retrieval-Augmented Generative Agent for Scientific Researchcited by 143
  2. 2023Language Model Crossover: Variation through Few-Shot Promptingcited by 119
  3. 2024LLM-SR: Scientific Equation Discovery via Programming with Large Language Modelscited by 117
  4. 2022Long Time No See! Open-Domain Conversation with Long-Term Persona Memorycited by 107
  5. 2024A Survey on Large Language Model-Based Game Agentscited by 106
  6. 2021SymbolicGPT: A Generative Transformer Model for Symbolic Regressioncited by 101
  7. 2024A Review of Large Language Models and Autonomous Agents in Chemistrycited by 96
  8. 2019Bayesian Symbolic Regressioncited by 77
  9. 2024Symbolic Regression with a Learned Concept Librarycited by 76
  10. 2022Keep Me Updated! Memory Management in Long-term Conversationscited by 62
  11. 2023Deep symbolic regression for physics guided by units constraints: toward the automated discovery of physical lawscited by 55
  12. 2022Deep Symbolic Regression for Recurrent Sequencescited by 53
  13. 2022Less is More: Learning to Refine Dialogue History for Personalized Dialogue Generationcited by 47
  14. 2024Evolving Code with A Large Language Modelcited by 42
  15. 2023Interpretable Machine Learning for Science with PySR and SymbolicRegression.jlcited by 36
  16. 2021Shape-constrained Symbolic Regression -- Improving Extrapolation with Prior Knowledgecited by 27
  17. 2024Can LLMs Master Math? Investigating Large Language Models on Math Stack Exchangecited by 22
  18. 2021Pre-trained Language Models as Prior Knowledge for Playing Text-based Gamescited by 21
  19. 2017Globally Optimal Symbolic Regressioncited by 6
  20. 2020What Types of COVID-19 Conspiracies are Populated by Twitter Bots?cited by 6
  21. 2024LLM as a Complementary Optimizer to Gradient Descent: A Case Study in Prompt Tuningcited by 5
  22. 2020Symbolic Regression using Mixed-Integer Nonlinear Optimizationcited by 4
  23. 2023Active Learning in Symbolic Regression with Physical Constraintscited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 5; 2026: 2.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025DrSR: LLM based Scientific Equation Discovery with Dual Reasoning from Data and Experience
  2. 2023Probabilistic Regular Tree Priors for Scientific Symbolic Reasoning
  3. 2025Symbolic Regression with Multimodal Large Language Models and Kolmogorov Arnold Networks
  4. 2025Iterated Agent for Symbolic Regression
  5. 2025DeepSeek vs. ChatGPT vs. Claude: A Comparative Study for Scientific Computing and Scientific Machine Learning Tasks
  6. 2023A Symbolic Framework for Evaluating Mathematical Reasoning and Generalisation with Transformers
  7. 2024LLMs for Mathematical Modeling: Towards Bridging the Gap between Natural and Mathematical Languages
  8. 2024Interactive Symbolic Regression through Offline Reinforcement Learning: A Co-Design Framework