Solver-in-the-Loop: Learning from Differentiable Physics to Interact with Iterative PDE-Solvers
Kiwon Um, Robert Brand, Yun, Fei, Philipp Holl, Nils Thuerey
TL;DR
This work tackles numerical errors in discretized PDE solvers by learning a correction function that interacts with the solver in a differentiable training loop. It formalizes a solver-in-the-loop framework with three interaction modes (NON, PRE, SOL) and demonstrates that long-horizon, differentiable-physics-guided training yields substantial accuracy gains across advection-diffusion, Navier–Stokes, buoyancy-driven flows, and CG solvers. The key finding is that training corrections inside the solver loop, with end-to-end backpropagation through solver steps, produces more accurate and robust corrections than pre-computed or non-interacting approaches, including in 3D flows and long rollout scenarios. The results show large reductions in error, improved frequency content alignment, and substantial runtime speed-ups when deploying the learned corrections, highlighting the practical potential for integrating neural corrections into numerical toolchains for PDEs and even weather prediction scenarios.
Abstract
Finding accurate solutions to partial differential equations (PDEs) is a crucial task in all scientific and engineering disciplines. It has recently been shown that machine learning methods can improve the solution accuracy by correcting for effects not captured by the discretized PDE. We target the problem of reducing numerical errors of iterative PDE solvers and compare different learning approaches for finding complex correction functions. We find that previously used learning approaches are significantly outperformed by methods that integrate the solver into the training loop and thereby allow the model to interact with the PDE during training. This provides the model with realistic input distributions that take previous corrections into account, yielding improvements in accuracy with stable rollouts of several hundred recurrent evaluation steps and surpassing even tailored supervised variants. We highlight the performance of the differentiable physics networks for a wide variety of PDEs, from non-linear advection-diffusion systems to three-dimensional Navier-Stokes flows.
