Self-Guided Diffusion Model for Accelerating Computational Fluid Dynamics

Ruoyan Li, Zijie Huang, Haixin Wang, Guancheng Wan, Yizhou Sun, Wei Wang

TL;DR

SG-Diff is a novel diffusion-based framework designed to reconstruct high-fidelity fluid dynamics from low-fidelity data generated by actual numerical solvers. By combining a wavelet-based Importance Weighting strategy during training with a physics-informed Predictor-Corrector-Advancer solver during inference, it bridges the gap between idealized downsampled data and the information-poor outputs of coarse-grid simulations.

What Problem Does This Paper Address?

In the quest to accelerate Computational Fluid Dynamics (CFD), researchers often use machine learning to perform "super-resolution"—turning fast, low-fidelity (LF) simulations into accurate, high-fidelity (HF) ones. However, most existing models rely on a flawed assumption: that LF data is simply a downsampled version of HF data.

In the real world, LF data is produced by running a numerical solver on a much coarser grid. As shown in Figure 1, there is a fundamental difference between "integrate then downsample" (artificial) and "downsample then integrate" (real-world solver). Solver-generated LF data loses significantly more information, particularly fine-grained details like small-scale vortices, making it much harder for standard diffusion models to reconstruct the original flow.

Figure 1: Comparison between downsampled (black line) and solver-generated (red line) flow fields. Solver-generated low-fidelity data retain less information, especially for fine- grained high-fidelity details.

Methods

The authors propose SG-Diff, which introduces two main innovations to handle the "information gap" of solver-generated data:

  1. Importance Weight (IW) Strategy (Training): To help the model focus on critical fluid structures, the authors use the Discrete Wavelet Transform (DWT) to decompose the HF flow into frequency subdomains. They assign higher weights in the loss function to high-frequency components (like vortices and sharp transitions). This "self-guidance" forces the model to prioritize the recovery of intricate details that are usually lost in coarse simulations.
  2. Predictor-Corrector-Advancer (PCA) SDE Solver (Inference): During the reverse diffusion process, the model doesn't just guess the next step.
  3. Predictor: Generates an initial HF estimate.
  4. Corrector: Refines this estimate by performing gradient descent steps on the PDE residual (how well the estimate obeys the laws of physics, like the Navier-Stokes equations).
  5. Advancer: Uses the Euler-Maruyama method to move to the next diffusion step.
Figure 2: Training and inference pipeline of SG-Diff. Training with high-fidelity data only, guided by Importance Weight strategy to locate fine-grained high-fidelity details. During inference, low-fidelity data is used as guidance, and the Predictor- Corrector-Advancer solver ensures physical coherence.

Datasets

The model was evaluated on four classic 2D turbulent flow benchmarks, all generated using a pseudo-spectral solver:

  • Taylor Green Vortex: Large-scale vortices breaking down into turbulence.
  • Decaying Turbulence: Natural evolution of turbulence without external forces.
  • Kolmogorov Flow: Turbulence driven by a sinusoidal external force.
  • McWilliams Flow: The emergence of isolated coherent vortices from disorder.

The HF data was generated on a $4096 \times 4096$ grid and downsampled to $256 \times 256$, while LF data was generated directly on $64 \times 64$ or $32 \times 32$ grids.

Key Insights and Ideas

  • The Distribution Gap is Real: The authors mathematically prove (Proposition 3.1) that the probability distribution of solver-generated LF data is further away from the HF distribution than artificially downsampled data is. This explains why SOTA models fail in real-world scenarios.
  • Wavelets as Physical Feature Locators: Instead of heavy attention mechanisms, DWT provides a computationally efficient way to locate physical features in both space and frequency, making it ideal for "physics-aware" loss functions.
  • The Accuracy-Consistency Trade-off: A fascinating finding is the tension between L2 accuracy and physical consistency. While more "Corrector" steps (higher $N$) improve adherence to physical laws (lower PDE residuals), too many steps can actually increase the L2 error. The authors found that a "Start 2, End 2" schedule (applying correction at the beginning and end of the diffusion process) provides the best balance.
L2 Loss vs. number of correction steps N for 8x upsampling.

Key Results

SG-Diff consistently outperformed state-of-the-art baselines (like ResShift and PiRD) across all four datasets:

  • Predictive Accuracy: Achieved significantly lower L2 errors, especially in complex flows like Kolmogorov and McWilliams. For example, in 8x upsampling on Kolmogorov flow, SG-Diff achieved an L2 of 2.78 compared to 3.09 for vanilla diffusion.
  • Physical Consistency: Reconstructed flows had PDE residuals orders of magnitude lower than baselines, indicating they are much more physically plausible.
  • Generalization: The model trained on one solver configuration generalized well to different time steps, domain sizes, and Reynolds numbers without retraining.
  • Efficiency: While slower than direct-mapping CNNs, SG-Diff is significantly faster than running a full High-Fidelity Direct Numerical Simulation (DNS).

Limitations and Future Work

  • Sampling Speed: Like most diffusion models, SG-Diff is relatively slow during inference compared to direct mapping models. The authors suggest exploring faster sampling techniques (like DPM-Solver) in future work.
  • Dimensionality: The current study is limited to 2D flows. Extending this to 3D turbulent flows is a necessary next step for industrial applications.
  • PDE Availability: The method requires knowing the underlying PDE to calculate residuals, which might not be available for all complex engineering systems.

Summary updated

BibTeX
@misc{li2025self,
  author = {Ruoyan Li and Zijie Huang and Haixin Wang and Guancheng Wan 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