CodePDE: An Inference Framework for LLM-driven PDE Solver Generation
- URL: http://arxiv.org/abs/2505.08783v1
- Date: Tue, 13 May 2025 17:58:08 GMT
- Title: CodePDE: An Inference Framework for LLM-driven PDE Solver Generation
- Authors: Shanda Li, Tanya Marwah, Junhong Shen, Weiwei Sun, Andrej Risteski, Yiming Yang, Ameet Talwalkar,
- Abstract summary: Partial differential equations (PDEs) are fundamental to modeling physical systems.<n>Traditional numerical solvers rely on expert knowledge to implement and are computationally expensive.<n>We introduce CodePDE, the first inference framework for generating PDE solvers using large language models.
- Score: 57.15474515982337
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Partial differential equations (PDEs) are fundamental to modeling physical systems, yet solving them remains a complex challenge. Traditional numerical solvers rely on expert knowledge to implement and are computationally expensive, while neural-network-based solvers require large training datasets and often lack interpretability. In this work, we frame PDE solving as a code generation task and introduce CodePDE, the first inference framework for generating PDE solvers using large language models (LLMs). Leveraging advanced inference-time algorithms and scaling strategies, CodePDE unlocks critical capacities of LLM for PDE solving: reasoning, debugging, selfrefinement, and test-time scaling -- all without task-specific tuning. CodePDE achieves superhuman performance across a range of representative PDE problems. We also present a systematic empirical analysis of LLM generated solvers, analyzing their accuracy, efficiency, and numerical scheme choices. Our findings highlight the promise and the current limitations of LLMs in PDE solving, offering a new perspective on solver design and opportunities for future model development. Our code is available at https://github.com/LithiumDA/CodePDE.
Related papers
- AutoNumerics: An Autonomous, PDE-Agnostic Multi-Agent Pipeline for Scientific Computing [5.681456272022905]
We introduce textttAutoNumerics, a framework that autonomously designs, implements, debugs, and verifies numerical solvers for general PDEs directly from natural language descriptions.<n>Experiments on 24 canonical and real-world PDE problems demonstrate that textttAutoNumerics achieves competitive or superior accuracy.
arXiv Detail & Related papers (2026-02-19T18:31:52Z) - Neuro-Symbolic Multitasking: A Unified Framework for Discovering Generalizable Solutions to PDE Families [7.3387140039389385]
Partial Differential Equations (PDEs) are fundamental to numerous scientific and engineering disciplines.<n>Traditional numerical methods, such as the finite element method, need to independently solve each instance within a PDE family.<n>We propose a neuro-assisted multitasking symbolic PDE solver framework for PDE family solving, dubbed NMIPS.
arXiv Detail & Related papers (2026-02-12T06:25:44Z) - OpInf-LLM: Parametric PDE Solving with LLMs via Operator Inference [8.112335572297928]
Large language models (LLMs) have demonstrated strong capabilities in code generation, symbolic reasoning, and tool use.<n>We propose OpInf-LLM, an LLM PDE solving framework based on operator inference.
arXiv Detail & Related papers (2026-02-02T00:04:50Z) - PDE-Agent: A toolchain-augmented multi-agent framework for PDE solving [50.54386756067269]
Solving Partial Differential Equations (PDEs) is a cornerstone of engineering and scientific research.<n>Traditional methods for PDE solving are cumbersome, relying on manual setup and domain expertise.<n>In this work, we frame PDE solving as tool invocation via LLM-driven agents.<n>We introduce PDE-Agent, the first toolchain-augmented multi-agent collaboration framework.
arXiv Detail & Related papers (2025-12-18T06:02:50Z) - PDE-SHARP: PDE Solver Hybrids through Analysis and Refinement Passes [12.096472648029204]
We introduce PDE-SHARP, a framework to reduce computational costs by replacing expensive scientific computation by cheaper LLM inference.<n>PDE-SHARP achieves superior solver accuracy with 60-75% fewer computational evaluations.<n>To generate high-quality solvers, PDE-SHARP requires fewer than 13 solver evaluations on average compared to 30+ for baseline methods.
arXiv Detail & Related papers (2025-10-31T18:38:05Z) - Mechanistic PDE Networks for Discovery of Governing Equations [52.492158106791365]
We present Mechanistic PDE Networks, a model for discovery of partial differential equations from data.<n>The represented PDEs are then solved and decoded for specific tasks.<n>We develop a native, GPU-capable, parallel, sparse, and differentiable multigrid solver specialized for linear partial differential equations.
arXiv Detail & Related papers (2025-02-25T17:21:44Z) - PDE-Controller: LLMs for Autoformalization and Reasoning of PDEs [16.01754287623487]
We present PDE-Controller, a framework that enables large language models to control systems governed by partial differential equations (PDEs)<n>Our approach enables LLMs to transform informal natural language instructions into formal specifications, and then execute reasoning and planning steps to improve the utility of PDE control.<n>Our PDE-Controller significantly outperforms prompting the latest open-source and GPT models in reasoning, autoformalization, and program synthesis.
arXiv Detail & Related papers (2025-02-03T00:03:41Z) - Unisolver: PDE-Conditional Transformers Are Universal PDE Solvers [55.0876373185983]
We present the Universal PDE solver (Unisolver) capable of solving a wide scope of PDEs.
Our key finding is that a PDE solution is fundamentally under the control of a series of PDE components.
Unisolver achieves consistent state-of-the-art results on three challenging large-scale benchmarks.
arXiv Detail & Related papers (2024-05-27T15:34:35Z) - Deep Equilibrium Based Neural Operators for Steady-State PDEs [100.88355782126098]
We study the benefits of weight-tied neural network architectures for steady-state PDEs.
We propose FNO-DEQ, a deep equilibrium variant of the FNO architecture that directly solves for the solution of a steady-state PDE.
arXiv Detail & Related papers (2023-11-30T22:34:57Z) - Solving High-Dimensional PDEs with Latent Spectral Models [74.1011309005488]
We present Latent Spectral Models (LSM) toward an efficient and precise solver for high-dimensional PDEs.
Inspired by classical spectral methods in numerical analysis, we design a neural spectral block to solve PDEs in the latent space.
LSM achieves consistent state-of-the-art and yields a relative gain of 11.5% averaged on seven benchmarks.
arXiv Detail & Related papers (2023-01-30T04:58:40Z) - Meta-PDE: Learning to Solve PDEs Quickly Without a Mesh [24.572840023107574]
Partial differential equations (PDEs) are often computationally challenging to solve.
We present a meta-learning based method which learns to rapidly solve problems from a distribution of related PDEs.
arXiv Detail & Related papers (2022-11-03T06:17:52Z) - Learning differentiable solvers for systems with hard constraints [48.54197776363251]
We introduce a practical method to enforce partial differential equation (PDE) constraints for functions defined by neural networks (NNs)
We develop a differentiable PDE-constrained layer that can be incorporated into any NN architecture.
Our results show that incorporating hard constraints directly into the NN architecture achieves much lower test error when compared to training on an unconstrained objective.
arXiv Detail & Related papers (2022-07-18T15:11:43Z) - Learning time-dependent PDE solver using Message Passing Graph Neural
Networks [0.0]
We introduce a graph neural network approach to finding efficient PDE solvers through learning using message-passing models.
We use graphs to represent PDE-data on an unstructured mesh and show that message passing graph neural networks (MPGNN) can parameterize governing equations.
We show that a recurrent graph neural network approach can find a temporal sequence of solutions to a PDE.
arXiv Detail & Related papers (2022-04-15T21:10:32Z) - A composable autoencoder-based iterative algorithm for accelerating
numerical simulations [0.0]
CoAE-MLSim is an unsupervised, lower-dimensional, local method that is motivated from key ideas used in commercial PDE solvers.
It is tested for a variety of complex engineering cases to demonstrate its computational speed, accuracy, scalability, and generalization across different PDE conditions.
arXiv Detail & Related papers (2021-10-07T20:22:37Z) - Neural-PDE: A RNN based neural network for solving time dependent PDEs [6.560798708375526]
Partial differential equations (PDEs) play a crucial role in studying a vast number of problems in science and engineering.
We propose a sequence deep learning framework called Neural-PDE, which allows to automatically learn governing rules of any time-dependent PDE system.
In our experiments the Neural-PDE can efficiently extract the dynamics within 20 epochs training, and produces accurate predictions.
arXiv Detail & Related papers (2020-09-08T15:46:00Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.