← Latest papers
🤖 machine learning

SciML Agents: Write the Solver, Not the Solution

This paper introduces a new paradigm where LLMs act as SciML agents to generate numerical solver code rather than directly predicting solutions, supported by two new ODE benchmarks and demonstrating that with guided prompting and fine-tuning, models can reliably select appropriate solvers and produce numerically valid results.

Original authors: Saarth Gaonkar, Xiang Zheng, Haocheng Xi, Rishabh Tiwari, Kurt Keutzer, Dmitriy Morozov, Michael W. Mahoney, Amir Gholami

Published 2026-04-15
📖 5 min read🧠 Deep dive

Original authors: Saarth Gaonkar, Xiang Zheng, Haocheng Xi, Rishabh Tiwari, Kurt Keutzer, Dmitriy Morozov, Michael W. Mahoney, Amir Gholami

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

The Big Idea: The Architect vs. The Bricklayer

Imagine you have a very difficult physics problem, like figuring out exactly how a rocket will fly through the atmosphere or how a virus spreads through a city.

For the last few years, scientists have been trying to teach AI (Neural Networks) to act like a Bricklayer. They try to train the AI to memorize the answer or "guess" the shape of the solution directly. The problem? Sometimes the AI guesses wrong, or it gets confused when the situation changes slightly. It's like trying to build a skyscraper by guessing where every brick goes without a blueprint.

This paper proposes a different approach. Instead of teaching the AI to be the bricklayer, they teach the AI to be the Architect.

The goal isn't for the AI to solve the math itself. The goal is for the AI to write the code that calls upon decades of human mathematical wisdom (proven numerical algorithms) to solve the problem correctly. The AI's job is to look at the problem description and say, "Okay, this is a tricky situation. I need to use Solver A with Settings B, not Solver C."

The Challenge: The "Tricky" Problems

The researchers realized that while AI is great at writing code that looks correct (syntax), it often fails at making the right scientific choices.

Imagine you are a chef.

  • Old AI: You ask it to make soup. It writes a recipe that says "Boil water, add salt." The recipe is grammatically correct, but if you try to make it, the soup is inedible because it missed a crucial step.
  • The New Problem: Some physics problems look scary on the surface. They have huge numbers that suggest they are "stiff" (a technical term meaning the math is unstable and requires a very careful, slow approach).
  • The Trap: A naive AI sees the huge numbers and panics, thinking, "This is a stiff problem! I must use the slow, heavy-duty solver!" But if you actually did the math, those huge numbers cancel each other out, and the problem is actually simple and fast. The AI failed because it was pattern matching (seeing big numbers = hard) instead of reasoning (doing the algebra).

The Solution: Two New "Tests" for AI

To see if AI can actually be a good "Architect," the team created two new tests:

  1. The "Gotcha" Test (Diagnostic Dataset):
    They created problems that look like they are impossible (stiff) but are actually simple if you simplify the math first. It's like a magic trick where a giant elephant turns out to be a balloon if you look closely.

    • Result: Older AI models fell for the trick. Newer models (like Qwen3 and GPT-4.1) could "think" through the trick, simplify the math, and pick the right tool.
  2. The "Marathon" Test (ODE-1000 Benchmark):
    They created 1,000 different physics problems, from simple springs to complex fluid dynamics. They asked the AI to write the code to solve them all.

    • Result: They measured two things: Did the code run? (Syntax) and Did the answer make sense scientifically? (Accuracy).

The Findings: How to Make AI Work

The paper found three major things:

1. The "Guide" Matters (Prompting)
If you just ask an AI, "Solve this," it might guess. But if you give it a guided prompt—essentially a checklist that says, "First, simplify the equation. Second, check if the numbers are huge. Third, decide if it's stiff"—the AI performs dramatically better.

  • Analogy: It's the difference between telling a student, "Do the math," and saying, "Show your work, check your units, and then solve." The second instruction gets a better grade.

2. Size and Age Matter

  • Newer, Smarter Models: The latest AI models (like Qwen3) are so good at following instructions that they can solve these problems perfectly just by being given a good checklist. They don't need extra training.
  • Older or Smaller Models: These models are a bit dumber or older. They struggle with the checklist. However, if you fine-tune them (train them specifically on 1,000 examples of these problems), they become experts.
  • Analogy: A new, smart intern (New Model) needs clear instructions to do a great job. An older, less experienced worker (Old Model) needs to be trained specifically on the job to do it well.

3. The "Thinking" Mode
Some newer models have a "thinking mode" where they talk to themselves before answering. The paper found that forcing the AI to "think" (write out its reasoning steps) before writing the code significantly reduced errors. It stopped the AI from guessing and forced it to do the math.

The Bottom Line

This paper shows that we don't need to reinvent the wheel. We don't need AI to learn how to solve physics from scratch. Instead, we should use AI as a smart interface that translates human language ("Here is a rocket problem") into the correct, proven mathematical code.

  • If you have a smart, new AI: Just give it good instructions (prompts), and it will write the perfect code.
  • If you have a smaller/older AI: You need to train it a bit (fine-tuning) to make it reliable.

The future of scientific computing isn't AI replacing the math; it's AI becoming the conductor that knows exactly which instrument (solver) to play to make the music (the solution) sound right.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →