NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Simulation-Based Parallel Training

Lucas Thibaut Meyer, Alejandro Ribes, Bruno Raffin

TL;DR

Training neural networks on numerical simulations typically requires storing massive datasets on disk, creating severe memory and I/O bottlenecks. This paper introduces an online, distributed framework that streams synthetic simulation data directly into model training in parallel, using a small memory buffer and parameter sampling strategy to eliminate the catastrophic forgetting and data biases typical of pure streaming setups.

What Problem Does This Paper Address?

Surrogate modeling and scientific machine learning increasingly rely on supervised training over outputs from complex partial differential equation (PDE) solvers. However, generating and saving these simulation datasets offline poses two major roadblocks:

  1. Massive storage footprint: High-resolution simulations across multiparametric spaces quickly produce tens of terabytes of data, which are prohibitive to store and load.
  2. Representativeness vs. Overfitting: Storing limited or subsampled datasets to save disk space starves neural models of diversity, leading to severe overfitting.

A natural alternative is online generation—streaming simulation outputs directly to the trainer in real time. But naive streaming introduces severe data biases:

  • Intra-simulation bias: Simulators step forward sequentially in time, delivering early time-steps first.
  • Inter-simulation bias: Only a few parameter configurations run concurrently on compute nodes.
  • Memory bias: A trainer can only retain a tiny rolling window of past outputs.

Together, these biases cause catastrophic forgetting, where the network constantly unlearns dynamics as simulation parameters and time steps evolve.

Methods

The authors extend Melissa, an open-source framework designed for large-scale ensemble runs on supercomputers, coupling distributed numerical solvers directly with PyTorch Distributed Data Parallel (DDP) across GPUs without writing files to disk.

To resolve streaming data biases, they implement a two-level mitigation policy:

  • Randomized Parameter Sampling: Instead of sweeping parameters linearly, the framework randomly samples parameters $X$ from the parameter domain prior to launching simulation instances.
  • Dynamic Memory Buffer: A server-side buffer acts as a rolling cache with three parameters:
  • Total capacity $s$ (measured in simulation trajectories).
  • A readiness threshold $s_{\text{ready}}$ (preventing the model from sampling until enough initial diversity is accumulated).
  • A minimum threshold $s_{\text{min}}$ (damping production–consumption rate imbalances between solvers and GPUs).
  • Eviction-on-Selection: Samples selected for a batch are immediately evicted from the buffer. This avoids over-rehearsing stale data while the trainer waits for new solver outputs.
[Parallel Sim Clients]  ===(Stream Steps)===>  [Memory Buffer (s, s_ready, s_min)]
(Randomly sampled X)                             |
                                                 v (Random sample & evict)
                                       [Multi-GPU PyTorch DDP]

Datasets

The authors evaluate their method on the classic chaotic Lorenz-63 system:

$$\frac{dx}{dt} = \sigma(y - z), \quad \frac{dy}{dt} = x(\rho - z) - y, \quad \frac{dz}{dt} = xy - \beta z$$

  • Setup: $\sigma = 10$, $\beta = 8/3$, initial positions $X_0 \sim \mathcal{N}(15, 30)$, and parameter $\rho \in [0, 100]$. The network learns an auto-regressive velocity predictor with an explicit Euler scheme ($f_\theta(X, Y_t) \approx \frac{Y_{t+1} - Y_t}{\Delta t}$).
  • Offline Full: 100 trajectories, 2,000 steps each ($\Delta t = 0.01\text{ s}$), trained for 100 epochs.
  • Offline Restricted: 10 trajectories, trained for 1,000 epochs.
  • Offline Subsampled: 10,000 trajectories sampled every 100 steps, trained for 100 epochs.
  • Online (Streaming / Sampling / Sampling + Buffer): 10,000 trajectories generated on the fly.
  • Validation Dataset: 10 independent trajectories evaluated across the parameter range.
  • Fair comparison constraint: All configurations are trained on an identical budget of ~20,000 batches (batch size 1,024).

Key Insights and Ideas

  • Streaming without buffering fails completely: Pure streaming training shows wild, non-stationary batch statistics and large train-validation divergence due to catastrophic forgetting.
  • A modest buffer recovers i.i.d. behavior: Coupling parameter randomization with a buffer holding only a handful of trajectories ($s=10$, $s_{\text{ready}}=5$, $s_{\text{min}}=3$) realigns batch statistics with those of a globally shuffled offline dataset.
  • Higher diversity beats data caching: In storage-constrained offline settings, reducing trajectory count or temporal frequency causes validation losses nearly an order of magnitude higher than training loss (severe overfitting). Online generation bypasses this constraint entirely by streaming 10,000 distinct trajectories through GPU memory.

Key Results

  • Mitigating Distribution Shifts: The batch mean and standard deviation for the Online (Sampling + Buffer) setup mirror the stable distributions of the Offline (Full) baseline across all 20,000 batches.
  • Overfitting Avoided: The Restricted and Subsampled offline models stagnate at high validation losses ($\sim 10^{-1}$ to $10^{0}$), whereas Online (Sampling + Buffer) validation loss tracks training loss steadily down to $\sim 10^{-2}$.
  • Zero Performance Penalty: The online buffer approach matches the accuracy of the memory-intensive full offline dataset, accurately reconstructing the 3D butterfly attractor trajectories over time.

Limitations and Future Work

  • Toy Problem Scale: The initial validation is limited to a 3-variable ODE system (Lorenz). Demonstrating scaling on large, distributed PDE solvers (such as 3D Navier-Stokes CFD) remains ongoing work.
  • Simple Buffer Policies: Current batch construction relies on uniform random sampling with destructive eviction. Advanced policies—such as reservoir sampling or loss-based prioritized experience replay—could further improve sample efficiency.
  • Passive Feedback: While the architecture allows bidirectional communication, the experiments did not leverage active learning or adaptive experimental design to dynamically steer which simulation parameters to run next.

Summary updated

BibTeX
@inproceedings{meyer2022simulation,
  author = {Lucas Thibaut Meyer and Alejandro Ribes and Bruno Raffin},
  title = {{Simulation-Based Parallel Training}},
  booktitle = {AI4Science @ NeurIPS},
  year = {2022},
  url = {https://openreview.net/forum?id=2TaNePEDNy},
}
Figure