Self-Guided Diffusion Model for Accelerating Computational Fluid Dynamics

R. Li, Zijie Huang, Haixin Wang, Wan G, Yizhou Sun, Wei Wang · DOI

Abstract

Machine learning methods, such as diffusion models, are widely explored as a promising way to accelerate high-fidelity fluid dynamics computation via a super-resolution process from faster-to-compute low-fidelity input. However, existing approaches usually make impractical assumptions that the low-fidelity data is down-sampled from high-fidelity data. In reality, low-fidelity data is produced by numerical solvers that use a coarser resolution. Solver-generated low-fidelity data usually sacrifices fine-grained details, such as small-scale vortices compared to high-fidelity ones. Our findings show that SOTA diffusion models struggle to reconstruct fine-scale details when faced with solver-generated low-fidelity inputs. To bridge this gap, we propose SG-Diff, a novel diffusion model for reconstruction, where both low-fidelity inputs and high-fidelity targets are generated from numerical solvers. We propose an Importance Weight strategy during training that serves as a form of self-guidance, focusing on intricate fluid details, and a Predictor-Corrector-Advancer SDE solver that embeds physical guidance into the diffusion sampling process. Together, these techniques steer the diffusion model toward more accurate reconstructions. Experimental results on four 2D turbulent flow datasets demonstrate the efficacy of SG-Diff against state-of-the-art baselines.

What Problem Does This Paper Address?

High-fidelity Computational Fluid Dynamics (CFD) simulations—like Direct Numerical Simulation (DNS)—are essential for engineering and science but are computationally agonizing to run. A popular shortcut is to use machine learning to map fast, low-fidelity (LF) simulations to high-fidelity (HF) outputs, a process akin to super-resolution.

However, there is a massive gap between academic benchmarks and real-world application. Most ML models are trained and tested on LF data that is simply an artificially downsampled version of the HF data. In reality, engineers generate LF data by running numerical solvers on coarser grids. This "solver-generated" data loses complex, fine-grained physical details (like small-scale vortices) and has a fundamentally different noise distribution.

Comparison of downsampling methods: Artificially downsampled data (top right) retains more structure than realistic solver-generated data (bottom right), which misses critical fine-scale details.

When state-of-the-art diffusion models face this realistic solver-generated data, they struggle to reconstruct the missing physics. This paper aims to bridge that gap by developing a model that handles the discrepancies between solver-generated low-fidelity inputs and high-fidelity targets.

Methods

The authors propose SG-Diff, a distribution-learning diffusion model trained exclusively on high-fidelity data, using low-fidelity data to guide the generation process during inference. To handle the unique challenges of solver-generated LF data, they introduce two key mechanisms:

  1. Importance Weighting via Wavelets (Training): To force the model to care about tiny, easily lost turbulent structures, the authors use a Discrete Wavelet Transform (DWT) to decompose the fluid fields into frequency subdomains. High-frequency components (representing fine details) are assigned higher weights in the diffusion loss function. This acts as a self-guidance mechanism, forcing the network to focus on the hardest-to-predict physical features.
  2. Predictor-Corrector-Advancer SDE Solver (Inference): To ensure the generated fluid flows actually obey the laws of physics, the authors modify the reverse diffusion sampling process.
  3. Predictor: Guesses the clean HF data.
  4. Corrector: Applies gradient descent on the PDE residual to nudge the prediction toward physical consistency.
  5. Advancer: Moves the process to the next diffusion step.
The SG-Diff pipeline: Training incorporates wavelet-based importance weighting, while inference utilizes a Predictor-Corrector-Advancer loop to ensure physical consistency.

Key Insights and Ideas

  • The Downsampling Fallacy: The authors mathematically prove that the probability distribution of solver-generated LF data diverges significantly from artificially downsampled data. This explains exactly why standard diffusion models fail in real-world CFD pipelines—the noise distributions don't align.
  • The Accuracy vs. Physics Trade-off: Surprisingly, the authors found that too many physical correction steps actually hurt predictive accuracy (L2 loss). They discovered an optimal schedule—applying physical corrections only at specific stages of the diffusion process—which perfectly balances physical consistency and statistical accuracy.
  • Zero-Shot Generalization: Because the importance weighting and residual corrections are training-free mechanisms, SG-Diff generalizes remarkably well. It can accurately upscale LF data generated with entirely different solver configurations without needing to be retrained.

Key Results

  • Superior Accuracy: SG-Diff consistently outperformed 7 diffusion baselines across all datasets. For example, on the Kolmogorov Flow 4x upsampling task, SG-Diff achieved significantly lower L2 loss compared to vanilla diffusion and other SOTA methods.
  • Physical Consistency: SG-Diff achieved PDE residuals orders of magnitude lower than standard posterior sampling methods, closely matching the inherent residuals of the ground-truth HF data.
  • Multi-Scale Excellence: Wavelet analysis demonstrated that SG-Diff is vastly superior at capturing high-frequency details (small-scale vortices) compared to baselines, proving the effectiveness of the DWT importance weighting.
  • Massive Speedups: Running a coarse solver and upscaling with SG-Diff takes a fraction of the time required for a full high-fidelity DNS solver, offering a highly practical pipeline for engineers.

Limitations and Future Work

While SG-Diff is much faster than traditional high-fidelity numerical solvers, it is still slower during inference than direct mapping ML models like CNNs due to the iterative nature of diffusion sampling. Future work may involve integrating fast diffusion sampling techniques to further reduce reconstruction time, pushing the framework closer to real-time application speeds.

Summary updated

BibTeX
@misc{li2025self,
  author = {R. Li and Zijie Huang and Haixin Wang and Wan G and Yizhou Sun and Wei Wang},
  title = {{Self-Guided Diffusion Model for Accelerating Computational Fluid Dynamics}},
  year = {2025},
  eprint = {2504.04375},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.04375},
}
Figure