Abstract
The upcoming exascale era will provide a new generation of physics simulations. These simulations will have a high spatiotemporal resolution, which will impact the training of machine learning models since storing a high amount of simulation data on disk is nearly impossible. Therefore, we need to rethink the training of machine learning models for simulations for the upcoming exascale era. This work presents an approach that trains a neural network concurrently to a running simulation without storing data on a disk. The training pipeline accesses the training data by in-memory streaming. Furthermore, we apply methods from the domain of continual learning to enhance the generalization of the model. We tested our pipeline on the training of a 3d autoencoder trained concurrently to laser wakefield acceleration particle-in-cell simulation. Furthermore, we experimented with various continual learning methods and their effect on the generalization.
Introduction
As physics simulations approach the exascale level, performing $10^{18}$ calculations per second, they generate data volumes that far exceed current storage capacities. In fields like plasma physics, Particle-in-Cell (PIC) simulations are essential for modeling phenomena such as laser-plasma acceleration. Traditionally, these simulations are run to completion, data is saved to disk, and surrogate models are trained offline. However, at exascale, the I/O and storage requirements for this workflow become insurmountable bottlenecks.
To address this, researchers have developed a streaming pipeline that trains machine learning models concurrently with simulations. By feeding data directly from the simulation's memory into the training loop, the need for intermediate disk storage is eliminated. The primary challenge in this "online" setting is catastrophic forgetting: as the simulation evolves, standard neural networks tend to overwrite knowledge of early stages with new data, eventually only accurately representing the final frames.
System Architecture and Methods
The proposed pipeline utilizes the Adios2 library and openPMD-api to stream 3D electric field data from a running PIConGPU simulation directly into a 3D convolutional autoencoder.
To mitigate catastrophic forgetting, the study evaluates several Continual Learning (CL) strategies:
- Online EWC (Elastic Weight Consolidation): A regularization method that penalizes changes to weights identified as critical for previous tasks.
- A-GEM (Average Gradient Episodic Memory): A replay-based method that maintains a small "episodic memory" of past data to constrain gradient updates, ensuring they do not conflict with past knowledge.
The "Encode-Layerwise" Innovation
Standard A-GEM is memory-intensive because it requires storing raw 3D data samples. The authors propose a more efficient "Encode-Layerwise" approach. Instead of raw data, this method stores low-dimensional latent representations (compressed embeddings). Furthermore, it implements a per-layer gradient projection, which proves more effective for the hierarchical nature of convolutional architectures.
Experimental Setup
The pipeline was tested using data from a Laser Wakefield Acceleration (LWFA) simulation. The simulation was treated as a sequence of discrete tasks, where each task corresponded to a new time step of the evolving 3D electric field. The goal was to train an autoencoder that could reconstruct the field across all time steps without forgetting the initial phases of the simulation.
Results and Discussion
The performance of the proposed method was compared against "No Protection" (standard training) and existing CL methods.
| Method | L1-Loss (Lower is better) | SSIM (Higher is better) | Memory Overhead |
|---|---|---|---|
| No Protection | 0.16 | 0.54 | 0 MB |
| Online - EWC | 0.19 | 0.18 | 94 MB |
| A-GEM | 0.11 | 0.59 | 2400 MB |
| Proposed (Encode-Layerwise) | 0.13 | 0.46 | 0.03 MB |
Key Insights
- Latent Replay Efficiency: Storing compressed embeddings allows the model to retain past knowledge with a negligible memory footprint. The proposed method reduced memory overhead by five orders of magnitude compared to standard A-GEM while maintaining competitive reconstruction quality.
- Failure of Pure Regularization: Online EWC performed poorly, resulting in a "blurry mixture" of states. This suggests that for high-fidelity physics streaming, some form of replay buffer is essential.
- Visual Evidence of Forgetting: As shown in the visual results, models without protection completely lose the ability to reconstruct early simulation tasks (e.g., Task 5) as they adapt to later data.
Conclusion
This work demonstrates the feasibility of training high-fidelity surrogate models via in-memory streaming, bypassing the exascale storage bottleneck. While the proposed Encode-Layerwise method offers a superior memory-quality tradeoff, challenges remain in capturing high-frequency oscillatory patterns which the autoencoder tends to smooth out. Future work will focus on scaling this prototype to larger simulations and optimizing architectures for the specific noise profiles of plasma physics data.
Summary updated