Source-linked AI summary
Self-Augmented Diffusion Guidance for Physics-Informed Generation
Akira Osaka, Naoya Takeishi, Takehisa Yairi
TL;DR
Standard diffusion models can generate visually plausible physical data that violate governing laws. The paper introduces self-augmented classifier-free guidance conditioned on zero residual, separating constraint evaluation from diffusion training and sampling; experiments show reduced residuals and further gains when combined with existing physics-informed methods.
Problem
Standard diffusion models do not incorporate underlying physical laws, so generated physical samples may be visually plausible but substantially deviate from true dynamics.
Method
The method trains a diffusion model on original positive samples and self-generated negative samples, then guides generation by conditioning on zero residual without evaluating constraint gradients during training or sampling.
Results
The method reduces residuals versus standard diffusion models and further improves physical consistency when combined with existing physics-constrained training and sampling approaches.
Takeaways & Limitations
Separating physics simulation from diffusion training and sampling broadens physics-aware generation to computationally demanding problems.
Takeaways & Limitations
The framework's broader constrained-generation applications remain future work beyond the physical laws studied here.
Abstract
from arXiv · showhide
Diffusion models can be used to generate spatiotemporal signals of physical phenomena, such as time-series images of fluid dynamics. However, a major limitation of standard diffusion models is that they do not incorporate constraints derived from the underlying physical laws. Consequently, generated samples may appear visually plausible while deviating substantially from the true dynamics. In this study, we propose a simple yet effective physics-informed approach based on diffusion guidance with self-generated data augmentation. The proposed method learns the data distribution conditioned on the degree of deviation from the physically correct dynamics and generates samples by explicitly setting the deviation condition to be zero. The method decouples the evaluation of the governing equations from the diffusion model training and sampling processes, avoiding the need to solve the governing equations at every iteration of the denoising process. This design makes the method applicable to problems requiring computationally expensive numerical simulations and enables faster sample generation. Experimental results demonstrate that the proposed model not only significantly reduces the deviations compared with standard diffusion models but also achieves further reductions when combined with existing physics-constrained diffusion methods.
1 Introduction
Standard diffusion models can generate visually plausible physical data that violate governing laws, while existing physics-informed methods impose constraints during training or sampling. The proposed method uses self-augmented classifier-free guidance, explicitly targets zero constraint violation, and remains compatible with existing approaches.
- Standard diffusion models may produce visually plausible samples that are physically inconsistent because they do not explicitly account for underlying physical laws.
- Existing physics-informed methods incorporate governing-equation information during training or sampling, but their constraint handling can leave residual violations insufficiently minimized.
- Coarse spatial and temporal resolutions can make stable PDE residual evaluation impractical, motivating separation of constraint evaluation from diffusion training and sampling.
- The proposed method uses self-generated negative samples and classifier-free guidance to steer generation toward positive samples while setting the constraint condition to zero.
- Unlike prior approaches, the method explicitly samples under zero constraint violation and does not rely on the assumptions required by existing methods.
- The method significantly reduces deviations from physical laws and can be combined with PIDM and CoCoGen for further improvements in physical consistency.
2 Related work
Related work incorporates physical constraints through training objectives, sampling modifications, projections, and guidance. These approaches can require constraint evaluation during training or sampling, motivating a framework that separates expensive physical simulations from diffusion computation.
- Constrained generation research includes methods for constrained domains, constraint-aware training, gradient-guided sampling, and physics-informed generation.
- Physics-aware sampling methods modify denoising states or estimated terminal states through imitation, projection, refinement, or residual-based operations.
- Training-based approaches incorporate physics residuals or additional control terms into diffusion or flow-matching objectives to reduce deviations.
- Existing physics-aware approaches require constraint evaluation during training or sampling, which can substantially increase computational cost for expensive fluid simulations.
- The proposed approach separates physical simulations for constraint evaluation from diffusion training and sampling to avoid a substantial computational-cost increase.
3 Background
Diffusion models learn reverse-time dynamics to generate samples from Gaussian noise, with conditional guidance modifying sampling toward a desired condition. Classifier-free guidance achieves this without training an explicit classifier by learning conditional and unconditional noise estimates in one model.
- Diffusion models learn reverse-time dynamics that generate data from Gaussian noise.The forward process creates noisy intermediate samples, while the learned reverse process approximates the data distribution.
- A noisy sample is formed by adding Gaussian noise with time-dependent variance to a clean sample.The noise variance is denoted by β_t, and the noise is sampled as ϵ ∼ N(0, I).
- The noise-prediction model is trained to estimate the noise added to each noisy sample.The learned reverse process is parameterized by θ, with ϵ_θ(x, t) predicting the added noise.
- 3.2 Diffusion guidance: Classifier guidance uses a classifier gradient to steer diffusion samples toward a condition, but requires training an additional classifier.The estimated noise is modified using ∇_x_t log p_ϕ(c | x_t), with guidance scale w and noise standard deviation σ_t.
- 3.2 Diffusion guidance: Classifier-free guidance avoids an explicit classifier by training the same model with and without the condition and modifying its noise estimate during sampling.This approach can be interpreted as using an implicit classifier.
4 Method
The method uses self-augmentation to pair physically consistent original samples with physically inconsistent generated samples, then trains residual-conditioned classifier-free guidance. Sampling with zero residual targets physically consistent generations while keeping residual evaluation separate from diffusion training and sampling.
- 4.2 Physics-informed classifier-free guidance: The method trains a guidance model on original positive samples and self-generated negative samples with physical deviations.Original data are treated as physically consistent, while augmented data are generated by an ordinary diffusion model and may be visually plausible but physically inconsistent.
- 4.1 Standard diffusion training for data augmentation and constraint evaluation: Original samples satisfy E(x) = 0, whereas generated samples generally have nonzero residuals measured by PDE residuals or deviations from numerical references.The residual function r(x) is used for both deviation types.
- 4.1 Standard diffusion training for data augmentation and constraint evaluation: A standard diffusion model is first trained on the original dataset and sampled to construct the augmentation dataset.The resulting generated samples are evaluated with r(x), and the original and generated samples are combined with their corresponding residuals.
- 4.2 Physics-informed classifier-free guidance: The guidance model learns p_ψ(x | r) using residual-conditioned classifier-free guidance, with residuals randomly replaced by a null condition during training.This allows one model to learn both conditional and unconditional noise estimates.
- 4.2 Physics-informed classifier-free guidance: Sampling with r = 0 is expected to guide generation toward samples with lower physical residuals.The overall procedure trains the base diffusion model, computes residuals for generated samples, trains the guidance model, and samples from p_ψ(· | 0).
- 4.2 Physics-informed classifier-free guidance: Residual evaluation is decoupled from diffusion training and sampling, so classifier-free guidance uses only precomputed residuals.Any required physical simulation is performed independently of the diffusion processes.
- 4.3 Extensibility: The procedure can be iterated by adding guidance-model samples as new negative samples, progressively generating samples with lower residuals.Each iteration retrains the guidance model on the expanded dataset and again conditions sampling on zero residual.
- 4.3 Extensibility: The method can be combined with training- or sampling-constrained approaches without fundamentally changing the diffusion-model structure.This supports plug-and-play integration with methods such as PIDM and CoCoGen.
5 Experiments
Experiments on Darcy flow and time-series fluid data show that the proposed guidance reduces physical residuals, benefits from repeated application, and complements existing physics-informed diffusion methods. Its simulation-free sampling strategy also lowers sampling time relative to gradient-based baselines.
- Darcy flow: The proposed guidance reduces Darcy-flow PDE residuals relative to the standard diffusion baseline.Figure 2 visually demonstrates lower residuals for the proposed guidance model.
- Darcy flow: Repeated guidance further reduces Darcy-flow residuals, shifting residual distributions toward zero after the second application.The mean-residual distribution is evaluated over 8 trials, with 1000 generated samples per trial.
- Darcy flow: The proposed method achieves lower Darcy-flow residuals than PG Diffusion, while combining it with PIDM and CoCoGen achieves the best overall performance.The combined method outperforms the PIDM + CoCoGen baseline.
- Time-series fluid: In the time-series fluid experiment, the proposed guidance models outperform standard diffusion and PG Diffusion baselines.The residual measures deviations from numerically integrated Navier–Stokes reference snapshots.
- Time-series fluid: 1.19 × 10−2 decreases to 1.11 × 10−2 when proposed guidance is applied twice rather than once in the time-series fluid experiment.These are the average mean residuals for Proposed Guidance applied once (1x) and twice (2x), respectively.
- Computational cost: The proposed approach substantially reduces sampling time compared with gradient-based PG Diffusion and CoCoGen.The reduction is attributed to avoiding repeated evaluation of physical residuals and their gradients during sampling.
6 Conclusion
The proposed method improves physical consistency by guiding diffusion with self-generated augmentation and zero-residual conditioning. It reduces residuals relative to standard diffusion models, improves results when combined with existing physics-constrained methods, and applies to rule-constrained generation when consistency can be evaluated.
- The method guides generation toward lower physical-law deviations by conditioning the diffusion model on residuals and setting the residual condition to zero.It uses classifier-free guidance with self-generated data augmentation.
- Experimental results show reduced residuals compared with standard diffusion models and further improvements when combined with physics-constrained training and sampling approaches.
- Repeated application of the method yields additional physical-consistency improvements without evaluating governing equations during diffusion training or sampling.
- The framework applies to constrained generation tasks when consistency with the relevant rules can be evaluated.Potential extensions include robotic control inputs and trajectories subject to operational constraints.
A.1 Dataset
The Darcy flow experiments use paired pressure and permeability fields at 64 × 64 resolution, with normalized inputs and a DDIM-based conditional U-Net. Residual distributions shift toward zero under guidance, including after two applications.
- Dataset: The Darcy flow dataset contains 10000 training samples and 1000 validation samples, each pairing pressure and permeability fields at 64 × 64 resolution.The fields are concatenated into x ∈R2×64×64.
- Dataset: Pressure and permeability channels are independently normalized to [−1, 1] before samples are returned to physical scale for residual evaluation.
- Model: The model uses a U-Net to estimate added noise and receives the residual condition c = [r, 1] ∈R2 through an encoder connected to residual blocks.The same model configuration is used for the first-stage diffusion model and subsequent guidance model.
- Results: Across independent trials, guidance shifts residual distributions toward lower values, with a further shift toward zero after applying the method twice.Figure 9 presents histograms computed from 1000 samples per trial and random seed.
B.2 Generated samples
Generated Darcy flow samples are evaluated using the PDE residual, including comparisons with other physics-informed diffusion methods and nearest training samples. The combined PIDM, CoCoGen, and proposed-guidance setting achieves the largest reduction while producing samples distinct from nearby training examples.
- The residual used to evaluate generated Darcy flow samples is the PDE residual of the Darcy flow equation.
- The proposed method combined with PIDM and CoCoGen achieves the largest residual reduction among the compared physics-informed diffusion settings.
- The comparison with training samples tests whether lower residuals reflect memorization rather than generation of novel physically consistent samples.
- Generated samples from PIDM + CoCoGen with proposed guidance differ from their three nearest training samples by MSE, suggesting novel physics-aware generation.
C.1 Dataset
The time-series dataset consists of vorticity snapshots generated with torch-cfd under specified fluid-dynamics settings. Each sample contains four 64 × 64 snapshots spanning three seconds at one-second intervals.
- Dataset: The dataset contains time-series vorticity snapshots generated using torch-cfd, a PyTorch-based computational-fluid-dynamics library.
- Simulation settings: The simulations use viscosity 1.5 × 10−2, maximum initial velocity 0.4, and computational domain [0, 5] × [0, 5], without external forcing.
- Dataset: Each sample is represented as x ∈R4×64×64, containing four 64 × 64 snapshots spanning three seconds and recorded at one-second intervals.
- Simulation settings: The dataset construction uses an internal integration time step of 0.05 and generates 10000 training samples.
C.2 Implementation details
The experiments use a DDIM-based U-Net diffusion implementation with normalized fluid data and residual-conditioned classifier-free guidance. The zero-residual target is explicitly encoded during sampling, and the guided distributions shift toward lower residuals, with further reductions when guidance is applied twice.
- Model and training: The method uses a DDIM-based U-Net to estimate added noise, with Adam optimization and a cosine noise schedule.The same model configuration is used for the first-stage diffusion model and the subsequent guidance model.
- Data processing: The four vorticity channels are jointly normalized to [−1, 1] and converted back to physical scales before residual evaluation.
- Residual conditioning: The rescaled fluid residual is supplied as a two-component condition vector, while classifier-free guidance uses a null condition during training and a zero-residual condition during sampling.The valid-condition indicator is the second component of the vector; the null condition is used with probability 0.2.
- Residual evaluation: Across all independent trials, proposed guidance shifts residual distributions toward lower values, with a trend toward further reductions when applied twice.Each histogram represents 1000 generated samples from one trial and random seed.
D.2 Generated samples
Generated samples are evaluated by residuals against numerically integrated Navier–Stokes snapshots and compared with training data to assess physical consistency and novelty. The proposed guidance lowers residuals, with PIDM and CoCoGen combined with the guidance achieving the lowest residuals among the evaluated settings.
- Evaluation: Residuals measure deviations between generated samples and snapshots obtained by numerically integrating the Navier–Stokes equations from identical initial states.
- Residual comparison: The proposed guidance reduces residuals relative to the baselines, and its combination with PIDM and CoCoGen achieves the lowest residuals among the adopted settings.
- Novelty analysis: Training-data comparisons test whether lower residuals result from memorizing physically consistent training samples rather than generating novel samples.
- Novelty analysis: Generated PIDM + CoCoGen samples with proposed guidance differ from their three nearest training samples, suggesting novel generation rather than simple reproduction.Nearest neighbors are selected using mean squared error, and the evaluated samples had the lowest residuals among the Section 5.2 settings.
- Visual and distributional comparisons: Residual distributions are reported across six independent trials, while additional figures compare standard and physics-informed diffusion baselines with proposed guidance.