AutoPDE: Reliable Agentic PDE Solving via Explicitly Represented Solver Strategies

Huanshuo Dong, Keyao Zhang, Hong Wang, Zhezheng Hao, Zhiwei Zhuang, Ziyan Liu, Jiacong Wang, Gengyuan Liu, Xin JinarXiv 2026

TL;DR

AutoPDE is an LLM-based coding agent designed to solve partial differential equations (PDEs) by explicitly managing the underlying mathematical solver strategy as an independent, inspectable object. Unlike traditional code agents that jump straight from a PDE specification to code, AutoPDE separates strategy from implementation, allowing it to diagnose and correct high-level numerical errors based on empirical evidence. This approach achieves a 54.5% pass rate on the PDE Agent Bench, outperforming the strongest baseline by 14.2 percentage points.

What Problem Does This Paper Address?

When engineers and scientists build numerical solvers for PDEs, writing syntactically correct code is only half the battle. The real challenge lies in designing a sound numerical solver strategy—making the right choices regarding discretization, stabilization, linear solvers, and resolution control to match the specific algebraic structure of the PDE.

Recent LLM-based coding agents can generate and debug code, but they treat the solver strategy as an implicit byproduct of the implementation details. If a solver fails due to a fundamental mathematical mismatch (for example, applying a Conjugate Gradient solver to an indefinite Helmholtz system, or omitting stabilization in a convection-dominated problem), standard agents attempt local code patches. They fail to realize that the underlying numerical strategy itself is broken.

Figure 1: Three ways to build a PDE solver. (a) Traditional numerical practice: a human expert applies numerical-analysis knowledge to derive an explicit solver strategy (discretization, stabilization, solver configuration), implements it, and on failure revises the strategy rather than only the code. (b) LLM code / PDE agent: a general code agent writes solver.py directly from the PDE specification; the solver strategy remains implicit inside the generated code, so when the solve fails the agent can only patch the code, not the underlying numerical decision. (c) AutoPDE (ours): AutoPDE first runs an explicit PDE-analysis and numerical-method-selection stage, maintains the solver strategy as a first-class object alongside solver.py, and on failure revises the strategy using numerical evidence, recovering the (a)-style feedback loop while keeping the full process automated.

Methods

To bridge this gap, the authors introduce AutoPDE, an agent that maintains an explicit, auditable Solver Strategy Record throughout the entire solving process. Before writing a single line of code, AutoPDE executes a three-stage workflow:

  1. PDE Analysis: The agent inspects the problem specification to determine the equation family, linearity, boundary conditions, and dominant physical mechanisms, documenting these in a DIAGNOSIS card.
  2. Numerical Method Selection: Guided by the diagnosis, the agent queries a text-based PDE Skill Library (covering 10 core equation families) to select an appropriate variational formulation, finite-element space, stabilization technique, and linear solver/preconditioner combination, saving these to a METHOD card.
  3. Adaptive Tuning: Once an initial script (solver.py) is generated, AutoPDE runs low-cost pilot solves to measure empirical error and wall-clock time. It uses a rule-based profiling guide to iteratively adjust mesh resolution ($h$), polynomial degree ($p$), time steps ($dt$), or solver tolerances until the solution satisfies the target accuracy and runtime budgets.

The architecture decouples high-level mathematical reasoning from low-level code generation and refinement, mimicking the workflow of a human expert.

The architecture and iterative workflow of AutoPDE.

Datasets

The authors evaluated AutoPDE using PDE Agent Bench, a comprehensive benchmark suite containing 191 cases across eight challenging classical PDE families:

  • Heat equation
  • Convection–diffusion
  • Stokes
  • Navier–Stokes
  • Helmholtz
  • Biharmonic
  • Linear elasticity
  • Reaction–diffusion

An additional 50-case Poisson dataset was used as a supplementary sanity check. Each case provides specific accuracy and runtime constraints, and solutions are evaluated against high-fidelity reference oracle solutions.

Key Insights and Ideas

  • Algorithm Choice Beats Mesh Refinement: A common pitfall for naive agents is trying to fix high errors by simply refining the mesh resolution ($N$). For delicate regimes like convection-dominated transport, a poor baseline strategy (like first-order upwind) hits an error ceiling that refinement cannot cheaply overcome. Choosing a superior algorithm (like fifth-order WENO) yields drastically better accuracy at a fraction of the computational cost.
  • The Danger of "Implicit" Consistency: Analysis of baseline agents revealed they often included correct keywords (like "SUPG stabilization") because they copied textbook templates, yet still failed. This happened because their choices for mesh size, polynomial degree, and stabilization parameters were internally inconsistent. AutoPDE avoids this by explicitly constraining these parameters together during the strategy phase.
  • Flattening Backbone Dependence: Remarkably, AutoPDE achieved the exact same overall pass rate (54.5%) regardless of whether it used Claude Opus 4.6 or GPT 5.1 as its underlying LLM. This indicates that structured scaffolding and explicit strategy representation can compensate for variations in raw code-generation capabilities.

Key Results

  • Superior Pass Rate: AutoPDE achieved an overall pass rate of 54.5% on PDE Agent Bench, outperforming the best non-strategy-explicit baseline (OpenHands on GPT 5.1) by 14.2 percentage points.
  • Robustness Across Families: While baseline agents completely collapsed to a 0% pass rate on highly sensitive problem types like convection-diffusion or Stokes equations, AutoPDE maintained non-trivial pass rates across all eight equation families.

Limitations and Future Work

Currently, AutoPDE’s benchmark and skill library are tightly coupled to the FEniCSx / dolfinx finite-element stack. All experiments evaluated the agent within this single ecosystem. The authors note that extending AutoPDE to support other major computational mathematics libraries (such as Firedrake or deal.II) and alternative numerical paradigms (like finite-difference or spectral methods) is a vital next step for making the tool generally applicable.

Summary updated

BibTeX
@misc{dong2026autopde,
  author = {Huanshuo Dong and Keyao Zhang and Hong Wang and Zhezheng Hao and Zhiwei Zhuang and Ziyan Liu and Jiacong Wang and Gengyuan Liu and Xin Jin},
  title = {{AutoPDE: Reliable Agentic PDE Solving via Explicitly Represented Solver Strategies}},
  year = {2026},
  eprint = {2606.10752},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.10752},
}

Loading related content...

Figure