Closure Discovery for Coarse-Grained Partial Differential Equations Using Grid-based Reinforcement Learning

Jan-Philipp von Bassewitz, Sebastian Kaltenbach, Petros Koumoutsakos

TL;DR

Closure-RL is a novel framework that uses grid-based Reinforcement Learning to automatically discover "closure models" for under-resolved Partial Differential Equations (PDEs). By embedding a shared Fully Convolutional Network (FCN) across a coarse simulation grid, the framework corrects numerical discretization errors locally, achieving high-accuracy predictions with up to an order-of-magnitude speedup compared to full-scale fine-grid simulations.

What Problem Does This Paper Address?

Many critical real-world phenomena—such as weather patterns, ocean dynamics, and turbulence—are modeled using Partial Differential Equations (PDEs). To capture every spatial and temporal scale accurately, scientists rely on Fine Grid Simulations (FGS). However, FGS is computationally brutal, often requiring trillions of elements and making real-time experimentation or uncertainty quantification impossible.

To save time, researchers resort to Coarse Grid Simulations (CGS). While CGS is fast, it fails to resolve sub-grid scale dynamics, leading to severe numerical errors and unphysical dissipation. Traditionally, scientists fix this by manually adding "closure terms"—mathematical heuristics designed to approximate the missing scale information. Unfortunately, these traditional closures are heavily hand-crafted, domain-specific, and prone to failure. This paper addresses the need for an automated, domain-independent framework to discover these closure terms directly from data.

Methods

The authors introduce Closure-RL, which re-frames closure discovery as a cooperative Multi-Agent Reinforcement Learning (MARL) problem.

Instead of training a single massive agent to control the entire simulation, they place an individual RL agent at every single discretization point on the coarse grid.

  • Shared Central Policy: To avoid the extreme computational cost of training thousands of independent neural networks, all agents share a single central policy parameterized by a Fully Convolutional Network (FCN). A single forward pass through the FCN computes actions for all agents simultaneously.
  • Locality as an Inductive Bias: Because FCNs operate via local convolutional kernels, each agent's "receptive field" is restricted to its immediate spatial neighborhood. This perfectly mirrors traditional numerical schemes (like Taylor series approximations) that rely strictly on local data.
  • Continuous Forcing Actions: At each time step, the agents output a continuous forcing term that is directly injected into the CGS numerical update rule to counteract discretization errors.
  • Local Reward Function: The reward is calculated per grid point, penalizing the squared difference between the corrected CGS state and the downsampled FGS ground truth.
Figure 1: Illustration of the training environment with the agents embedded in the CGS. The reward measures how much the action taken improves the CGS.

Datasets

The framework was evaluated on two classic non-linear fluid dynamics problems:

  1. 2D Advection Equation:
  2. Concentration Profiles: Initial conditions were sampled from the MNIST dataset (for in-distribution training/testing) and the Fashion-MNIST (F-MNIST) dataset (for out-of-distribution testing).
  3. Velocity Fields: Generated using combinations of Taylor-Greene vortices ($D_{Train}^{Vortex}$ and an unseen test distribution $D_{Test}^{Vortex}$).
  4. 2D Viscous Burgers' Equation: Evaluated using randomly generated, incompressible velocity fields.

Key Insights and Ideas

  • The Power of Local Constraints: Restricting the agents' views to local patches prevents overfitting to global structures. This architectural constraint allows the model to generalize remarkably well to entirely unseen physics and out-of-distribution datasets.
  • Emulating Higher-Order Physics: Closure-RL doesn't just patch up a bad simulation; it actually outperforms an Accurate Coarse Grid Simulation (ACGS) running a higher-order analytical numerical scheme on the same grid. This proves the network is learning true sub-grid scale dynamics, not just acting as a simple error filter.
  • RL Actions Align with Analytical Math: Post-hoc analysis revealed that the actions chosen by the RL agents have a high Pearson correlation (0.70 to 0.82) with the theoretically derived exact analytical truncation errors of the numerical schemes. The agents independently "rediscovered" the underlying numerical math.

Key Results

  • Accuracy Improvements: For the advection equation, Closure-RL reduced the relative Mean Absolute Error (MAE) of the CGS by 30% to 58% across both in-distribution and out-of-distribution test cases. For the Burgers' equation, it achieved error reductions of up to 80% during fast-transient phases.
  • Long-Term Stability: When running long rollouts past the training regime (e.g., up to 400 steps when trained only on 100-200 steps), Closure-RL maintained stable, low-error trajectories, whereas standard CGS quickly diverged.
Figure 2: Results of Closure-RL applied to the advection equation. The relative MAEs are computed over 100 simulations with respect to (w.r.t.) the FGS. The shaded regions correspond to the respective standard deviations. The violin plot on the right shows the number of simulation steps until the relative MAE w.r.t. the FGS reaches the threshold of 1%.
  • Substantial Speedups: In the advection experiment, standard FGS took 89.52 ms per step, while Closure-RL took just 2.66 ms—representing more than an order-of-magnitude speedup while preserving fine-scale accuracy.

Limitations and Future Work

  • Cartesian Grid Restriction: The use of standard FCNs limits Closure-RL to regular, structured Cartesian grids. Real-world engineering problems often require complex, irregular geometries. The authors suggest extending this framework to Graph Convolutional Networks (GCNs) to support unstructured meshes.
  • Multi-Grid Complexity: Highly complex simulations leverage multi-grid numerical solvers. The current framework only handles a single coarse-to-fine grid relationship and would need separate reward definitions for multi-tier grid hierarchies.
  • Lack of Hard Physical Constraints: The action space is currently unconstrained. Future iterations could explicitly parameterize or constrain the RL policy to strictly obey physical conservation laws (like conservation of mass or momentum).

Summary updated

BibTeX
@inproceedings{bassewitz2025closure,
  author = {Jan-Philipp von Bassewitz and Sebastian Kaltenbach and Petros Koumoutsakos},
  title = {{Closure Discovery for Coarse-Grained Partial Differential Equations Using Grid-based Reinforcement Learning}},
  booktitle = {CPAL (Proceedings Track)},
  year = {2025},
  url = {https://openreview.net/forum?id=Pve4Pg0A1v},
}
Figure