Reinforcement learning closures for underresolved partial differential equations using synthetic data

Lothar Heimbach, Sebastian Kaltenbach, Petr Karnakov, Francis J. Alexander, Petros Koumoutsakos

TL;DR

This paper introduces a novel framework that uses the Method of Manufactured Solutions (MMS) to generate synthetic training data for reinforcement learning (RL) agents to learn closure models for underresolved PDEs. By bypassing the need for computationally expensive fine-grid simulations during training, this approach drastically reduces data acquisition costs and yields closure models that generalize remarkably well to unseen, unforced (homogeneous) physical systems.

What Problem Does This Paper Address?

Partial Differential Equations (PDEs) are essential for modeling complex phenomena like fluid turbulence, climate patterns, and financial markets. However, simulating these systems with high accuracy requires fine spatial grids and tiny time steps to resolve all spatiotemporal scales, leading to prohibitive computational costs.

To save time and resources, scientists often use Coarse-Grid Simulations (CGS). While faster, CGS introduces significant numerical errors because it fails to capture subgrid-scale interactions. "Closure models" are typically added to CGS to mimic these missing physics. Recently, machine learning has been used to build data-driven closure models, but these models suffer from a massive bottleneck: they require enormous amounts of high-resolution, fine-grid simulation (FGS) data just for training, which is itself incredibly expensive to compute.

Methods

The authors tackle this data bottleneck by combining two clever techniques:

  1. Method of Manufactured Solutions (MMS): Instead of running an expensive FGS to get training data, the authors flip the problem. They define an analytical, parameterized mathematical function (the "manufactured solution") and plug it directly into the target PDE. This allows them to analytically compute a custom source or forcing term that makes the chosen solution exactly true. This provides an exact ground-truth baseline completely for free, without running a single fine-grid simulation.
  2. Reinforcement Learning (RL) Closures: They embed an RL agent directly into the coarse-grid simulation environment using the Closure-RL framework. The state consists of the coarse solutions from recent time steps and the PDE parameters. The agent's action is to apply a corrective forcing term at each grid point to counteract the subgrid errors. The agent is trained via Proximal Policy Optimization (PPO) with a reward based on how effectively its action brings the CGS solution closer to the exact MMS solution.
Illustration of the RL framework embedded in the coarse-grid simulation (CGS).

Datasets

The framework does not rely on pre-existing real-world datasets or traditional simulation benchmarks. Instead, the authors generate entirely synthetic datasets by sampling parameters for analytical functions (combinations of trigonometric functions and exponential decay terms). They validate their approach across three distinct mathematical setups:

  • 1D Burgers’ Equation: A fundamental PDE combining advection and diffusion.
  • 2D Burgers’ Equation: A more complex, higher-dimensional extension.
  • 2D Advection Equation: A system modeling the transport of a scalar field.

Key Insights and Ideas

  • Bypassing the Fine-Grid Bottleneck: The most powerful insight is that data-driven models do not inherently need real simulation data to learn how to correct numerical errors. MMS provides a diverse, infinite stream of exact solutions to train the model at zero simulation cost.
  • Inhomogeneous to Homogeneous Generalization: The RL models are trained on inhomogeneous PDEs (systems driven by the artificial MMS forcing terms). Crucially, the authors discovered that these models generalize successfully to homogeneous PDEs (natural systems with no external forcing). This is a major win for out-of-distribution extrapolation.
  • Hybrid Physics-ML Advantage: The RL closure model doesn't try to predict the entire physics from scratch; it only learns to correct the errors of the existing coarse numerical solver. Because the underlying physics solver handles the macro-scale dynamics, the machine learning component generalizes much better than pure end-to-end neural operators (like Fourier Neural Operators).

Key Results

The framework demonstrated excellent error reduction across all test cases:

  • 1D Burgers' Equation: For in-distribution (inhomogeneous) testing, the model achieved a median error reduction of over 80% throughout the simulation, with a cumulative error reduction close to 100%. For out-of-distribution (homogeneous) testing, it maintained a median cumulative error reduction of approximately 80%.
  • 2D Burgers' Equation: Despite a grid spacing twice as large as the 1D case, the RL closure consistently achieved a median error reduction greater than 60% for inhomogeneous settings, and stabilized around 40-60% cumulative error reduction for the unforced homogeneous settings.
  • 2D Advection Equation: The model achieved a median error reduction between 40% and 80%, significantly outperforming standard coarse-grid baselines.
Error reduction and mean squared error (MSE) results for the inhomogeneous 1D Burgers' equation.

Limitations and Future Work

While promising, the authors note a few key limitations:

  • Perfect PDE Knowledge Required: To use MMS, you must have complete analytical knowledge of the underlying PDE. This means the method cannot be directly applied to systems with partially unknown dynamics or uncertain governing equations.
  • Scalability to Higher Dimensions: Although demonstrated on 1D and 2D systems, the computational efficiency and accuracy of the RL agent need further evaluation against highly complex, three-dimensional turbulent flows.
  • Optimization of MMS Selection: The paper relies on human-chosen parameterized functions for MMS. Future work will focus on understanding whether an optimal set of manufactured solutions exists to maximize training robustness and extrapolation power.

Summary updated

BibTeX
@inproceedings{heimbach2026reinforcement,
  author = {Lothar Heimbach and Sebastian Kaltenbach and Petr Karnakov and Francis J. Alexander and Petros Koumoutsakos},
  title = {{Reinforcement learning closures for underresolved partial differential equations using synthetic data}},
  booktitle = {Computer},
  year = {2026},
  doi = {10.1016/j.cma.2026.118767},
}
Figure