Learning Where to Simulate: Generative Active Sampling for Online PDE Surrogate Training

Pierre Cesar, Sofya Dymchenko, Abhishek Purandare, Bruno Raffin

TL;DR

Training neural networks to approximate complex physics simulations usually involves randomly sampling simulation configurations—a shotgun approach that leaves rare, chaotic edge cases dangerously under-explored. This paper introduces Online Generative Active Sampling (OGAS), an approach that trains a fast diffusion model alongside the physics surrogate to continuously pinpoint and generate the exact simulation setups the network is currently struggling with. The result is a surrogate that handles worst-case physical regimes vastly better than standard approaches, with virtually zero extra training time.

What Problem Does This Paper Address?

Numerical solvers for Partial Differential Equations (PDEs)—used to model everything from turbulent airflow to chemical reactions—are famously computationally expensive. Lately, researchers have been replacing them with deep PDE surrogates: neural networks trained on solver-generated synthetic data to predict how physical systems evolve in a fraction of the time.

To generalize well, a surrogate needs training data covering a massive space of initial conditions and physical parameters (like fluid viscosity). Standard practice is to sample this parameter space uniformly. Under a finite simulation budget, however, uniform sampling wastes compute on boring, near-equilibrium dynamics while starving the model on rare, chaotic regimes. Your surrogate ends up looking great on average, right up until it hits a tough edge case and fails spectacularly.

Active Learning (AL) tries to fix this by letting the model request harder data. Classical "pool-based" AL pauses training in rounds to evaluate a discrete candidate pool of parameters, which creates severe compute bottlenecks and struggles to cover continuous, high-dimensional spaces. Meanwhile, existing continuous "query-synthesis" methods struggle to scale up cleanly. How do we continuously steer solvers toward the surrogate's evolving blind spots in high-dimensional space without stalling the training pipeline?

Methods

The authors operate in an online streaming setup: 56 numerical solvers run concurrently in the background, streaming trajectories directly into a memory buffer for surrogate training rather than saving static datasets to disk.

The OGAS online workflow, showing concurrent solvers streaming states to the surrogate while a conditional DDPM learns to propose challenging new solver parameters.

Instead of picking from a pre-made list of parameters, OGAS directly synthesizes new solver configurations ($\lambda$) using a lightweight Denoising Diffusion Probabilistic Model (DDPM) running asynchronously on an auxiliary GPU:

  1. Zero-Cost Difficulty Signals: As the surrogate trains on a batch, OGAS logs how hard each trajectory was—measured either via scaled training loss (OGAS-Loss) or disagreement between two ensemble models (OGAS-Unc). Because it reuses training batch predictions, acquiring this signal requires zero extra forward passes. These signals are continuously standardized so "high difficulty" adapts as overall loss drops.
  2. Conditional Diffusion: Parameter-difficulty pairs $(\lambda, \tilde{\epsilon})$ feed into a rolling buffer. The fast diffusion model trains on this buffer to learn the distribution of parameters conditioned on difficulty, $p_\phi(\lambda | \tilde{\epsilon})$. When a solver finishes a run and needs new instructions, OGAS asks the diffusion model to generate parameters conditioned on high difficulty values (up to 5 standard deviations above the mean).
  3. Exploration & Debiasing: To avoid tunnel vision, OGAS mixes its generated tough configurations with standard uniform sampling. Furthermore, because the rolling buffer gets skewed by past active sampling decisions ("history bias"), OGAS trains a tiny MLP discriminator to estimate the density ratio between the buffer and a uniform prior, reweighting the diffusion loss so the generator doesn't get stuck in yesterday's hard regimes.

Datasets

Because training is entirely online, data is generated on the fly (budgeted at 10,000 solver runs per experiment) rather than pulled from static benchmarks. Using pseudo-spectral solvers from APEBench, the authors test three 2D periodic PDEs at $256 \times 256$ spatial resolution:

  • Kuramoto–Sivashinsky (KS) and Navier–Stokes Kolmogorov Flow (NS): Chaotic and turbulent fluid dynamics parameterized by viscosity or domain size alongside truncated Fourier series initial conditions (308 continuous parameters).
  • Gray–Scott-$\beta$ (GS): Evolving chemical reaction-diffusion patterns initialized with 8 Gaussian blobs (48 parameters).

Validation is performed on held-out trajectories drawn from space-filling Halton sequences, rolling out 51 timesteps to test generalization beyond the 32-step training horizon. Complementary 1D ablations use KS and Korteweg–de Vries (KdV) equations.

Key Insights and Ideas

  • Compressing the High-Error Tail: OGAS shines by reallocating simulation compute from easy regimes to rare, volatile ones. While average error across uniform space stays roughly steady, extreme failures plummet.
  • Loss Beats Ensemble Uncertainty: Simple training loss (OGAS-Loss) proved much more reliable and less noisy than ensemble disagreement (OGAS-Unc), sparing practitioners the massive memory cost of scaling up model ensembles.
  • Asynchronous Query-Synthesis Eliminates Bottlenecks: Pool-based AL pauses training to run surrogate inference over thousands of candidates—a brutal bottleneck for large Vision Transformers. Running a tiny diffusion model in parameter space alongside training completely sidesteps this stall.

Key Results

Tested across three surrogate backbones—UNet (2.3M parameters), FNO (29.5M), and the scOT transformer (184.3M)—OGAS consistently outperforms uniform/Sobol sampling, online pool-based AL (SBAL, Top-K), and Gaussian-mixture importance sampling (Breed).

Improvement ratios over Uniform sampling across PDEs and surrogate architectures; values above 1.0 indicate lower error.
  • Tail Compression: Across all 2D cells, OGAS-Loss slashes maximum normalized RMSE by an average factor of 1.64× (up to 2.13×), 99th-percentile error by 1.42× (up to 1.93×), and error standard deviation by 1.66× (up to 2.3×).
  • Mean Trade-off: On uniformly sampled validation sets, OGAS-Loss achieves a 0.97× average error ratio—a tiny trade-off on easy averages in exchange for massive tail robustness (and on high-capacity scOT models, even the mean improves).
  • Negligible Overhead: Running asynchronously on a separate GPU, OGAS adds just 23 seconds (~0.2%) to a 3–4.5 hour training run, whereas pool-based SBAL adds 17.6 minutes (~10%) of idle overhead.

Limitations and Future Work

  • Evaluation Bias: Validating on uniformly sampled datasets inherently favors uniform training on mean metrics because difficult regimes occupy a tiny fraction of the test set. Designing fair, domain-informed benchmarks for query-synthesis AL remains an open question.
  • Compute Scale & Solver Speed: To keep their 15,000-GPU-hour budget feasible, the authors used fast pseudo-spectral solvers. Real-world deployment involves massive, slow production solvers where hyperparameter tuning (like concurrent solver counts) will differ.
  • Toward PDE Foundation Models: Scaling OGAS to multi-physics foundation models will require handling heterogeneous solvers with wildly different runtimes, varying parameter dimensionalities, and cross-PDE loss normalization—alongside developing theoretical guarantees for online nonlinear PDE learning.

Summary updated

Abstract

For data-driven PDE surrogates, generalizing across a wide range of initial conditions and physical coefficients requires a training set of numerical simulations that consistently covers the resulting dynamics. Yet uniform sampling of these configuration parameters can leave challenging regimes insufficiently covered, leading to high prediction errors and large error variance in the trained surrogate. To address this sampling imbalance, we introduce the Online Generative Active Sampling (OGAS), which continuously adapts configuration sampling during surrogate training, as an alternative to classical round-based active learning. As the surrogate learns from a stream of simulation data generated online, OGAS trains a fast diffusion model in parallel to sample configuration parameters conditioned on a training difficulty signal, such as loss or uncertainty. This conditional sampler enables OGAS to parametrize subsequent simulations to generate challenging training data by prioritizing configurations with high difficulty values. We evaluate OGAS on 2D PDEs with distinct challenging dynamics—Kuramoto-Sivashinsky, Navier-Stokes, and Gray-Scott—using multiple surrogate architectures and up to 308 configuration parameters. Across the tested PDEs and architectures, OGAS consistently reduces the 99th-percentile prediction error and overall error dispersion compared with uniform sampling, while wall-clock overhead is negligible. Code and experiments are available at \url{https://github.com/melissa-sa/ogas}.
BibTeX
@inproceedings{cesar2026learning,
  author = {Pierre Cesar and Sofya Dymchenko and Abhishek Purandare and Bruno Raffin},
  title = {{Learning Where to Simulate: Generative Active Sampling for Online PDE Surrogate Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Ys4YrFCtvl},
}
Figure