Machine Learning Techniques for Data Reduction of CFD Applications

Jaemoon Lee, Ki Sung Jung, Qian Gong, Xiao Li, Scott Klasky, Jacqueline Chen, Anand Rangarajan, Sanjay RankaarXiv 2024

TL;DR

High-fidelity computational fluid dynamics (CFD) simulations generate massive datasets that are incredibly challenging to store and analyze. This paper introduces GBATC (Guaranteed Block Autoencoder with Tensor Correction Network), a machine learning-based compression framework that achieves up to a 600x reduction in data size. Crucially, it combines deep learning with a PCA-based residual correction mechanism to guarantee strict error bounds on both primary simulation data and downstream physical quantities of interest.

What Problem Does This Paper Address?

Exascale supercomputers running Direct Numerical Simulations (DNS) for turbulent combustion or hypersonic flows generate overwhelming amounts of data. Scientists must track dozens or hundreds of chemical species across space and time, making it physically and financially impossible to store raw data at high frequencies.

While lossy compression is an obvious solution, standard scientific compressors (like SZ) typically compress scalar fields independently, failing to exploit the rich interspecies and spatiotemporal correlations inherent in physics simulations. Furthermore, domain scientists require strict error guarantees. Downstream calculations—such as computing highly nonlinear chemical production rates (Quantities of Interest, or QoIs)—can amplify tiny compression errors into massive, unphysical inaccuracies.

Methods

The authors propose the Guaranteed Block Autoencoder with Tensor Correction Network (GBATC) framework. The pipeline consists of three main pillars:

  1. Spatiotemporal Blocking & 3D Autoencoder: Instead of treating chemical species independently, the data is sliced into 3D blocks ($K$ consecutive time steps $\times N \times N$ spatial patches) across all $S$ chemical species. A 3D convolutional autoencoder (AE) compresses these blocks, capturing spatial structures and temporal dynamics simultaneously (see Figure 1).
  2. Tensor Correction Network: To refine the AE's lossy reconstruction, the authors introduce an overcomplete neural network that learns a reverse point-wise mapping from the reconstructed tensors back to the original tensors. This step significantly reduces reconstruction error without requiring any extra latent variables to be stored—only the static network weights need to be saved.
  3. Guaranteed Error Bounding via PCA: To turn a deep learning model into a reliable scientific tool, the framework computes the residual (error) between the original and reconstructed data. It applies Principal Component Analysis (PCA) to these residuals. If a block's error exceeds a user-defined threshold, the residual is projected onto the PCA basis, and the top coefficients are saved alongside the compressed data to guarantee a strict $\ell_2$ error bound during decompression.
Fig. 3: Guaranteed Block Autoencoder with Tensor Correction Network (GBATC). The AE processes 3D blocks through convolutional layers with S channels and further compresses the block with a fully connected layer as described in Figure 1. After getting the reconstructed data, we convert the block into a set of vectors. The vectors represent S species data for the specific temporal and spatial points and they are corrected by the tensor correction network. The network learns a mapping from the reconstructed data back to the original data, and it is overcomplete as compression is performed by the AE.

Datasets

The method was evaluated on a combustion simulation dataset generated by Sandia National Laboratories' S3D compressible reacting DNS code. Specifically, it models the autoignition of a fuel-lean n-heptane/air mixture across a 2D grid of $640 \times 640$ over 50 time steps. The dataset tracks 58 distinct chemical species, creating a highly complex, high-dimensional tensor field.

Key Insights and Ideas

  • Exploiting Multi-Dimensionality Pays Off: Traditional scientific compressors compress each scalar field in isolation. By treating the data as a unified spatiotemporal tensor, GBATC exploits the fact that chemical species don't evolve randomly—their concentrations are deeply correlated by underlying chemical pathways.
  • The Power of "Nonlinear + Linear": Deep learning (nonlinear) handles the heavy lifting of massive dimensionality reduction, while PCA (linear) acts as a mathematical safety net, efficiently catching and fixing the remaining errors to provide strict user-defined guarantees.
  • Protecting the "Minor" Details: In combustion, minor species (radicals with tiny concentrations) trigger ignition. Standard compressors often wipe them out as noise. GBATC's tensor correction network preserves these subtle but critical chemical signatures, ensuring downstream QoI calculations remain physically valid.

Key Results

  • Massive Compression Gains: For a target Normalized Root Mean Square Error (NRMSE) of $10^{-3}$ (the standard threshold recommended by domain experts), GBATC achieves a 600x compression ratio. In comparison, the state-of-the-art SZ3 compressor only manages a 150x compression ratio for the same error bound.
  • Superior Downstream Accuracy: When calculating the net production rate of chemical species, the data compressed via GBATC yielded significantly lower errors than SZ-compressed data at identical compression ratios.
Fig. 4: Comparison of a block-based GAE with SZ when the QoIs are O(N) with only PD guarantees: (a) PD error versus compression ratio, (b) QoI error versus compression ratio. Our approach has high compression ratios because it utilizes the entire tensor along with spatiotemporal relationships.

Limitations and Future Work

  • Separate Training Phases: Currently, the 3D autoencoder and the tensor correction network are trained separately. The authors note that integrating them into a single, end-to-end trainable architecture is an important next step.
  • Temporal Scaling: The current evaluation focuses on a specific window of the simulation ($t = 1.5$ to $2.0$ ms). Future work will test the framework across the entire simulation timeline ($t = 0$ to $3.0$ ms) to see how it handles the abrupt physical transitions during early low-temperature and late high-temperature ignition phases.

Summary updated

BibTeX
@misc{lee2024machine,
  author = {Jaemoon Lee and Ki Sung Jung and Qian Gong and Xiao Li and Scott Klasky and Jacqueline Chen and Anand Rangarajan and Sanjay Ranka},
  title = {{Machine Learning Techniques for Data Reduction of CFD Applications}},
  year = {2024},
  eprint = {2404.18063},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.18063},
}
Figure