Efficient Closure Learning in Dynamical Systems: A Comparison of Data-Assimilated and Embedded Approaches

Rileigh Bandy, Teresa Portone, Mohammad Khalil, Eric Crislip, Kyle NealarXiv 2026 · arXiv

TL;DR

This paper presents a head-to-head comparison between two ways of learning "closure models" for dynamical systems: training a neural network directly inside a simulator (Embedded) versus using data assimilation to infer closure values before training offline (Staged). While embedded training is more accurate, the staged approach is 9x more computationally efficient and significantly more robust, avoiding the numerical instabilities that often plague "in-the-loop" machine learning.

What Problem Does This Paper Address?

In computational science, we often deal with the closure problem: our governing equations are incomplete because they can’t resolve every scale or physical process (like turbulence in fluids or human behavior in epidemiology). We use "closures" to approximate these missing pieces.

Recently, researchers have turned to neural networks to learn these closures from data. However, the standard "Embedded" approach—where the neural network is trained while sitting inside the differential equation solver—is notoriously difficult. Every optimization step requires a full forward simulation, and if the neural network weights take a "bad" step during training, they can make the system numerically stiff or physically impossible, causing the solver to crash. This paper investigates if a "Staged" approach can bypass these headaches without sacrificing too much accuracy.

Methods

The authors compare two distinct workflows:

  1. Embedded Training: Similar to Universal Differential Equations (UDEs), the neural network $\xi_\theta$ is placed directly into the ODE. The optimizer minimizes the difference between the simulated trajectory and noisy observations. This requires differentiating through the ODE solver.
  2. Staged Training: This decouples the physics from the machine learning.
  3. Step 1: Use an Ensemble Kalman Filter (EnKF) and a smoother to perform data assimilation. By treating the unknown closure as a "latent" state variable, they infer what the closure values must have been to produce the observed data.
  4. Step 2: Train a neural network offline to map the system states to these inferred closure values. This is a simple supervised regression task that never calls the simulator.

The study uses a synthetic SIQR model (Susceptible, Infectious, Quarantined, Removed), where the "closure" is a nonlinear, state-dependent rate at which people move into quarantine.

Figure 1: True SIQR system dynamics and closure trajectory used to generate the synthetic observations.

Datasets

The researchers used a synthetic dataset generated from the SIQR equations to ensure they had a "ground truth" for evaluation.

  • Observations: 801 noisy data points over a 200-day period.
  • Splits: 60% training, 20% validation, 20% test.
  • Replicates: 50 independent runs with different noise realizations and data splits to ensure statistical significance.
  • Generalization Scenarios: Three additional "out-of-distribution" parameter sets (Cases 1-3) to test how well the learned closures work in different regimes.

Key Insights and Ideas

  • The Robustness Gap: The most striking finding was that the Embedded approach had a 40% failure rate during training. Intermediate neural network parameters often created "exploding" trajectories or non-physical states that crashed the ODE solver. The Staged approach had a 0% failure rate because the simulator is only used during the initial data assimilation phase.
  • Computational "Heavy Lifting": In the Staged approach, the simulator is a preprocessing step. Once you have the inferred trajectories, you can iterate on your neural network architecture or hyperparameters infinitely without ever calling the expensive physics code again.
  • Accuracy vs. Efficiency Trade-off: Embedded training is "aware" of the full trajectory, allowing it to achieve lower average error. However, the Staged approach produces qualitatively identical results and remains competitive even when generalizing to new scenarios.

Key Results

  • Speedup: The Staged approach required ~9x fewer model evaluations than the Embedded approach.
  • Accuracy: The Embedded approach achieved a lower mean test loss ($3.92 \times 10^2$) compared to the Staged approach ($1.75 \times 10^3$). While the error is higher for Staged, it remains within the same order of magnitude.
  • Reliability: Across 500 total neural network starts (10 per replicate), the Embedded approach failed 215 times. The Staged approach failed zero times.
  • Generalization: Both methods struggled similarly when pushed far outside the training regime (Case 3), but both successfully captured the "quarantine response" in interpolation regimes.

Limitations and Future Work

The authors acknowledge that this study was performed on a relatively low-dimensional, inexpensive synthetic model. In high-dimensional systems (like 3D fluid dynamics), the cost of the Ensemble Kalman Filter might increase, though the authors argue the relative savings over embedded training would likely persist.

Future work includes:

  • Testing these methods on high-fidelity, high-dimensional simulators.
  • Incorporating Uncertainty Quantification (UQ): The EnKF provides an ensemble spread that could be used to train "uncertainty-aware" closures.
  • Optimizing the process-noise estimation in the Staged approach, which currently accounts for the bulk of its computational cost.

Summary updated

Abstract

Increased computing power has transformed computational science and improved predictive capabilities for complex systems, but many phenomena still exceed current simulation capabilities or require rapid evaluations for fast design iterations. Closure models address this challenge by approximating unresolved effects in reduced or incomplete dynamical systems. Data-driven closures offer a flexible mechanism for improving model accuracy and applicability, but approaches that embed the closure within a computational model for construction and training phases can be computationally expensive and cause numerical instabilities in the computational model during training. To avoid the challenges posed by embedded approaches, staged approaches to closure-model learning have been developed. The first stage uses data assimilation to infer state and closure trajectories from observations. The second stage trains a machine learning closure model offline using the assimilated data, thereby avoiding repeated simulator calls during training. In this work, we investigate the cost and accuracy tradeoffs between embedded and staged data-driven closure modeling approaches for a synthetic epidemiological SIQR model with a nonlinear state-dependent quarantine closure. The results illustrate a practical accuracy-efficiency trade-off: for this exemplar, embedded training provides the strongest average accuracy, while the staged approach yields comparable qualitative behavior with a moderate increase in error, substantially fewer model evaluations, and improved optimization robustness.
BibTeX
@misc{bandy2026efficient,
  author = {Rileigh Bandy and Teresa Portone and Mohammad Khalil and Eric Crislip and Kyle Neal},
  title = {{Efficient Closure Learning in Dynamical Systems: A Comparison of Data-Assimilated and Embedded Approaches}},
  year = {2026},
  eprint = {2611.03612},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.03612},
}
Figure