In Context Learning and Reasoning for Symbolic Regression with Large Language Models
This paper demonstrates that Large Language Models, when guided by strategic chain-of-thought prompting, scientific context, and external optimization tools, can effectively perform symbolic regression to rediscover known physical laws and discover new equations from data.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are a detective trying to solve a mystery. You have a pile of clues (data) scattered on a table, and you know there is a simple rule or formula that explains how all these clues fit together. Your job is to find that rule.
This paper is about teaching a super-smart AI (specifically, a Large Language Model like GPT-4) to act as that detective. The specific mystery they are solving is called Symbolic Regression.
The Problem: The "Black Box" vs. The "Equation"
Usually, when computers analyze data, they use "black box" models (like deep neural networks). These are great at predicting the future, but they are like a magic 8-ball: you put data in, and an answer comes out, but you have no idea why or what the rule is.
Scientists, however, want the Equation. They want to know the actual formula, like , because it explains how the universe works. Finding these formulas automatically from data is hard. It's like trying to guess a secret password by randomly typing letters until you get it right.
The Solution: The AI Detective with a "Thinking Cap"
The authors tried a new approach: instead of just asking the AI to guess the formula, they gave it a thinking process.
Here is how they did it, using some everyday analogies:
1. The "Scratchpad" (The Thinking Cap)
In the old days, if you asked an AI to solve a math problem, it would just spit out an answer. Often, it would guess the answer confidently but get the numbers wrong (this is called "hallucinating").
In this study, the researchers told the AI: "Don't just give me the answer. Show me your work first."
They gave the AI a digital "scratchpad." Before writing the final equation, the AI had to write down its thoughts:
- "Hmm, as pressure goes up, the loading goes down. That looks like an inverse relationship."
- "Wait, this looks like the Langmuir model I've seen before, but maybe it needs two parts."
This is like asking a student to show their work on a math test. It forces the AI to slow down, reason through the data patterns, and catch its own mistakes before it commits to a final answer.
2. The "Coach" (The Feedback Loop)
The AI doesn't get it right the first time. So, the researchers set up a game of "Hot and Cold."
- Guess: The AI suggests a formula.
- Check: A separate, very precise computer program (Python/SciPy) tests the formula against the real data to see how close it is.
- Coach: The computer tells the AI: "Your formula is close, but it's too complicated. Try simplifying it," or "You missed a variable."
- Retry: The AI uses that feedback to write a better formula.
They repeat this loop, like a coach helping an athlete refine their technique, until the AI finds the perfect equation.
3. The "Context Clue" (The Background Info)
Sometimes, the data alone isn't enough. The researchers also gave the AI a "cheat sheet" in plain English.
- Example: "This data is about nitrogen sticking to mica. Pressure is the input, and loading is the output."
- Why it helps: This stops the AI from suggesting silly things (like a formula that says loading goes down when pressure goes up, which violates physics). It guides the AI to think like a scientist, not just a pattern matcher.
The Results: Did it Work?
The team tested this on three different "mysteries":
- The Langmuir Model (Adsorption): This is a classic chemistry problem. The AI successfully rediscovered the famous equation, especially when it used the scratchpad and the background context. It was like the AI remembering a high school physics lesson and applying it perfectly.
- The Dual-Site Model: This was harder. The "right" answer was complex, but there were many "almost right" simple answers. The AI struggled a bit here, but the scratchpad helped it realize that the simple answers were physically impossible (like predicting negative amounts of gas).
- The Nikuradse Dataset (Pipe Flow): This was the "Boss Level." It's a massive dataset about water flowing through rough pipes, and nobody knows the exact perfect formula yet. The AI didn't find the "perfect" answer (a specialized math program did that), but it found a very good answer much faster and cheaper than the specialized program. It was like a generalist detective solving a case that usually requires a specialist, using a few clever tricks.
The Big Takeaway
The paper shows that we don't need to build complex, specialized software to find scientific formulas anymore. We can just talk to a smart AI, give it the data, tell it the scientific context in plain English, and ask it to "think out loud" on a scratchpad.
In short: They turned the AI from a "guessing machine" into a "reasoning scientist" by giving it a notebook to think in and a coach to guide it. This makes scientific discovery more accessible, cheaper, and easier to understand.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.