betaFeedback

WorksComputer Science

PhysDEM: Physics-Defined Energy-Matching Diffusion for Spatiotemporal Field Generation under Scarce Measurements

Abstract

Generating and predicting spatiotemporal physical fields from scarce measurements is challenging, as observations are insufficient to characterize a distribution over complete fields. This limits conventional data-driven diffusion models that rely on full-field datasets. We introduce PhysDEM, a physics-defined diffusion framework that combines governing equations with spatially sparse observations to generate multiple plausible fields. First, we construct a Gibbs target by reweighting a measurement-conditioned Gaussian reference with PDE residual energy. Second, we derive an exact conditional-mean identity that reduces denoising to supervised learning of the standardized energy-induced mean correction. Third, a physics-displacement probability flow cancels Gaussian reference terms and enables amortized sampling with changing measurements through Gaussian conditioning, without retraining. Experiments on synthetic PDE systems and real-world-informed applications demonstrate that PhysDEM supports coherent field recovery and efficient sampling while maintaining stable diagnostics under tested noise levels, illustrating its practical value for field assessment. To our knowledge, PhysDEM is the first physics-defined diffusion model enabling amortized spatiotemporal field inference without preassembled full-field datasets.

Introduction

Generating and predicting spatiotemporal physical fields is essential for scientific modeling. To address this task, generative artificial intelligence uses neural networks to learn probability distributions over plausible field realizations and generate new fields by sampling from these distributions. Diffusion models, in particular, generate samples from high-dimensional distributions through iterative denoising [19]. Their key strengths include training stability, sample fidelity, distributional coverage [8], and flexible conditioning [19, 16], supporting the generation of spatially detailed field ensembles that represent diverse temporal evolutions and their uncertainty [14, 16].

Most existing diffusion models for physical-field generation are data-driven. Some learn physical patterns implicitly from extensive reanalysis or simulation datasets [14, 16], whereas others explicitly incorporate governing partial differential equations (PDEs) through physics-informed training losses [2, 25] or sampling guidance [10, 11]. Both strategies typically rely on large collections of complete fields for training. This dependence limits their applicability when the available data consist only of scarce measurements, with time series recorded at a handful of spatial locations. These scarce measurements alone are insufficient to characterize a distribution over complete fields.

To address this limitation, we propose a physics-driven diffusion framework for spatiotemporal field generation, in which physics defines the target distribution, and measurements provide constraints. We use the governing equations to define a PDE residual energy and construct a target distribution from which we sample training fields, without requiring a preassembled full-field dataset from real-world measurements or external simulators. Once trained, the model serves as an amortized sampler, using scarce measurements at a handful of spatial locations to rapidly estimate unobserved field values and explore diverse plausible evolutions of complete spatiotemporal fields.

Method family and representativePDRS
Data-trained GANs (e.g., DGMR [15])××××
Physics-informed GANs (e.g., PI-GAN [29])✓✓×✓
Simulation-based flow matching (e.g., FNOPE [13])××✓✓
Data-trained diffusion (e.g., DPS [5])××✓✓
Physics-loss diffusion (e.g., PIDM [2])✓×××
Physics-guided diffusion (e.g., DiffusionPDE [10])✓×✓✓
Learned-physics diffusion (e.g., PHDME [22])××××
Energy-based diffusion samplers (e.g., iDEM [1])×✓××
Physics-defined diffusion (PhysDEM, ours)✓✓✓✓

Table 1. Comparison of spatiotemporal physical generation methods. P: explicit use of prescribed PDE constraints in generative modeling; D: training without requiring a full-field dataset obtained from measurements or forward simulations; R: reuse across different numbers of measurements without retraining; S: full-field inference from spatially sparse measurements.

Specially, we introduce PhysDEM, Physics-Defined Energy-Matching Diffusion, for spatiotemporal field generation under scarce measurements. Our mathematical derivation links the PDE residual energy to target distribution construction, denoiser training, and field sampling. In this framework, we define a Gibbs target distribution by reweighting a Gaussian reference that encodes assumed field variability with the PDE residual energy that promotes physical consistency. We then derive an energy-determined conditional-mean diffusion denoiser that implements energy matching by learning the remaining energy-induced mean correction, aligning denoiser training with the physics-defined target. At inference, scarce measurements update the Gaussian reference and denoiser inputs. The denoiser’s predicted mean correction drives our physics-displacement probability-flow sampler, enabling amortized sampling of plausible complete spatiotemporal fields across measurement configurations without retraining. Our main contributions are as follows:

  • We propose a physics-defined and measurement-constrained Gibbs target distribution that enables denoiser training on internally sampled complete fields without requiring a pre-assembled full-field dataset from real-world measurements or external simulators.

  • We mathematically derive an energy-determined conditional-mean diffusion denoiser through an exact conditional-mean identity, establishing energy matching as supervised learning of the energy-induced mean correction relative to an analytic Gaussian estimate.

  • We develop an amortized physics-displacement probability-flow sampler that analytically cancels Gaussian reference terms and uses the learned normalized correction as its velocity, accommodating changing measurements through Gaussian conditioning without retraining.

Related Work

Spatiotemporal physical field generation. Generative artificial intelligence models support spatiotemporal field generation by learning distributions over plausible field realizations. GANs such as DGMR generate realistic precipitation sequences but rely on large radar archives for training [15]. PI-GAN incorporates governing equations and ensembles of scattered sensor measurements but remains susceptible to discriminator overfitting [29]. FNOPE uses conditional flow matching for function-valued posterior inference but requires paired parameter samples and simulator outputs [13]. In comparison, diffusion offers an alternative based on non-adversarial denoising and flexible conditioning [19], iteratively refining noisy fields according to learned spatiotemporal dependencies to generate spatially detailed, temporally coherent, and diverse fields [14, 16, 17].

Physics-constrained diffusion models. Physical constraints can enter diffusion models through PDE residual penalties during training [2] or guidance during sampling [10, 12]. However, these approaches generally rely on full-field training data obtained from measurements or forward simulations. A learned-physics approach [22] estimates dynamics from observations without fully specified governing equations, but has not been demonstrated for full-field inference from scarce measurements alone. Energy-based diffusion samplers instead learn to sample from prescribed unnormalized densities without precomputed target datasets [24, 1], but their original formulations do not explicitly support reuse across varying measurement counts without retraining. Compared with these state-of-the-art methods, PhysDEM provides a physics-defined diffusion framework that samples its own training fields from a PDE-based target and generates complete fields from scarce measurements while accommodating different measurement counts without retraining (see Table 1).

Preliminaries

Spatiotemporal physical fields and PDE residuals

We consider a physical system on a spatial domain Ω⊂RnΩ\Omega\subset\mathbb{R}^{n_{\Omega}} over [0,T][0,T], where nΩn_{\Omega} is the spatial dimension and TT is the final time. Its possibly vector-valued state field u(ξ,t)u(\xi,t), with ξ∈Ω\xi\in\Omega and t∈[0,T]t \in[0,T], satisfies the first-order evolution equation

∂tu+Nz(u)−qz=0.(1)\partial_t u + \mathcal{N}_z(u) - q_z = 0. \tag*{(1)}

Here ∂t\partial_t denotes differentiation with respect to physical time, Nz\mathcal{N}_z is a spatial differential operator, and qzq_z is the source or forcing term. The static parameter field zz collects unknown, time-independent system parameters on which Nz\mathcal{N}_z and qzq_z depend [20]. We discretize zz and uu on spatial and space–time grids, respectively, using the same symbols for their discrete representations. The complete candidate field is x=(z,u)∈Rdx=(z,u) \in\mathbb{R}^{d}, where dd is the total number of unknown scalar values. We model zz and uu jointly, with their physical coupling encoded through the PDE residual energy.

To incorporate the PDE into the target distribution, we measure how closely each candidate xx satisfies equation (1). Let Rfull(x)∈Rnf\mathcal{R}_{\mathrm{full}}(x) \in\mathbb{R}^{n_f} collect the nfn_f PDE residuals obtained by substituting xx into the discretized PDE at interior grid points. Each entry measures a local discrepancy and vanishes when the corresponding discrete equation is satisfied. Boundary conditions are incorporated into the discrete operators. These residuals form the basis of the PDE residual energy EE in § 4.1.2.

Scarce measurements

We consider time-series measurements at only a handful of spatial locations. For measurement group jj, we assume a linear observation model with additive Gaussian noise:

yj=Ajx+ηj,ηj∼N(0,Γj).(2)y_j = A_j x + \eta_j, \qquad\eta_j \sim\mathcal{N}(0,\Gamma_j). \tag*{(2)}

Here yj∈Rnjy_j \in\mathbb{R}^{n_j} contains the njn_j scalar measurements in group jj, and Aj∈Rnj×dA_j \in\mathbb{R}^{n_j \times d} extracts or averages the corresponding field values. The covariance matrices Γj\Gamma_j are positive definite, and the noise vectors are mutually independent and independent of the field. We collect the measurement operators, values, and noise covariances in the configuration C={(Aj,yj,Γj)}j\mathcal{C} = \{(A_j,y_j,\Gamma_j)\}_j. This model enables the closed-form Gaussian conditioning [26] used in § 4.1.1.

Methodology

PhysDEM comprises three stages: definition of the target distribution, training of a mathematically derived denoiser, and amortized sampling of fields conditioned on inference measurements. Sections 4.1–4.3 present them in order. The overall framework is illustrated in Figure 1.

Figure 1. Overview of our proposed PhysDEM, a physics-defined diffusion framework for spatiotemporal field generation under scarce measurements.

Physics-defined and measurement-constrained target distribution

We define a Gibbs target distribution by reweighting a measurement-conditioned Gaussian reference (§ 4.1.1) using the PDE residual energy EE (§ 4.1.2), thereby encoding physical consistency and measurement constraints in a distribution over complete fields.

Measurement-conditioned Gaussian reference

We first specify a Gaussian base distribution ρ0=N(μ0,C0)\rho_0 = \mathcal{N}(\mu_0,C_0) for xx, encoding assumed field means, variability, and correlations. Its positive-definite covariance C0=blkdiag⁡(Cz,Cu)≻0C_0 = \operatorname{blkdiag}(C_z,C_u) \succ0 has blocks

CzC_z and CuC_u describing spatial correlations in zz and spatiotemporal correlations in uu, respectively. This block structure makes zz and uu independent under ρ0\rho_0 (Appendix § 9.1.1).

For any measurement configuration C\mathcal{C}, we condition ρ0\rho_0 using the linear Gaussian model in equation (2) [3]. The configuration is instantiated with simulated measurements during training and actual measurements at inference. Let AA and yy stack the measurement operators and values, and let Γ=blkdiag⁡(Γj)\Gamma= \operatorname{blkdiag}(\Gamma_j) be the noise covariance. With S=AC0A⊤+ΓS = AC_0A^{\top} + \Gamma denoting the covariance of the noisy measurements under ρ0\rho_0, the conditioned mean and covariance are

μˉC=μ0+C0A⊤S−1(y−Aμ0),CˉC=C0−C0A⊤S−1AC0.(3)\bar{\mu}_{\mathcal{C}} = \mu_0 + C_0 A^{\top}S^{-1}(y-A\mu_0), \qquad\bar{C}_{\mathcal{C}} = C_0 - C_0 A^{\top}S^{-1}AC_0. \tag*{(3)}

These define the measurement-conditioned Gaussian reference, with correlations in C0C_0 allowing measurements to inform unmeasured locations:

ρˉC=N(μˉC,CˉC).(4)\bar{\rho}_{\mathcal{C}} = \mathcal{N}(\bar{\mu}_{\mathcal{C}}, \bar{C}_{\mathcal{C}}). \tag*{(4)}

Physics-tilted Gibbs distribution

The Gaussian reference in equation (4) incorporates measurements but does not enforce the governing PDEs. To reweight it for physical consistency, we define the PDE residual energy

E(x)=λ∥R(x)∥W2=λR(x)⊤WR(x).(5)E(x) = \lambda\lVert R(x) \rVert_W^2 = \lambda R(x)^{\top} W R(x). \tag*{(5)}

Here λ≥0\lambda\ge0 controls the penalty strength, and W∈Rnr×nrW \in\mathbb{R}^{n_r \times n_r} is a fixed positive-definite weighting matrix. The vector R(x)∈RnrR(x) \in\mathbb{R}^{n_r} collects selected, rescaled combinations of Rfull(x)R_{\mathrm{full}}(x) and discrepancies from known initial values when available. Our implementation uses selected space–time Fourier components for the interior residuals (Appendices § 9.2.1 and § 9.2.2).

Reweighting the Gaussian reference by e−E(x)e^{-E(x)} gives the Gibbs target:

πC(x)=ZC−1ρˉC(x)e−E(x),(6)\pi_{\mathcal{C}}(x) = Z_{\mathcal{C}}^{-1}\bar{\rho}_{\mathcal{C}}(x)e^{-E(x)}, \tag*{(6)}

where ZCZ_{\mathcal{C}} normalizes the density. The factor e−E(x)e^{-E(x)} assigns smaller weights to fields with larger residual energy.

We calibrate λ\lambda against a prescribed relative residual tolerance and adjust the static-field component of μ0\mu_0 to target a prescribed expectation of the spatial mean of zz (Appendices § 9.2.3 and § 9.2.4). With calibration fixed, we absorb a quadratic approximation of EE into the Gaussian reference. We linearize R\mathcal{R} at a global expansion point p0∈Rdp_0 \in\mathbb{R}^d, fitted without the measurement likelihood, and let J0∈Rnr×dJ_0 \in\mathbb{R}^{n_r \times d} denote its Jacobian there. The energy Elin(x)=λ∥R(p0)+J0(x−p0)∥W2E_{\mathrm{lin}}(x) = \lambda\|\mathcal{R}(p_0) + J_0(x-p_0)\|_W^2 defines the augmented Gaussian reference ρ~C(x)∝ρ‾C(x)e−Elin(x)\widetilde{\rho}_C(x) \propto\overline{\rho}_C(x)e^{-E_{\mathrm{lin}}(x)}, with mean μ~C\widetilde{\mu}_C and covariance C~C\widetilde{C}_C. Defining the remaining energy as Ecal=E−ElinE_{\mathrm{cal}} = E - E_{\mathrm{lin}} yields the equivalent representation

πC(x)∝ρ~C(x)e−Ecal(x).(7)\pi_C(x) \propto\widetilde{\rho}_C(x)e^{-E_{\mathrm{cal}}(x)}. \tag*{(7)}

Subtracting ElinE_{\mathrm{lin}} avoids double counting and preserves the target in equation 6. Although EcalE_{\mathrm{cal}} may be negative, the combined density remains normalizable (Appendix § 9.2.5). Before training, we fix ρ0\rho_0, EE, and p0p_0. Different measurement configurations then change the Gaussian reference and target distribution while leaving EcalE_{\mathrm{cal}} unchanged.

Energy-determined conditional-mean diffusion denoiser

Training-field generation and Gaussian perturbations. To form training configurations, we sample pseudo-fields approximately from the target without measurement conditioning, whose density is proportional to ρ0(x)e−E(x)\rho_0(x)e^{-E(x)}, and simulate scarce measurements using equation 2. For each resulting configuration CC, preconditioned Crank–Nicolson (pCN) chains generate approximate samples from the corresponding Gibbs target πC\pi_C ([6]). Appendices § 10.7 and § 10.§ 5 describe configuration generation and target sampling, respectively.

We perturb the retained fields to construct denoising examples. For a fixed configuration, write ρ~C=N(μ~,C~)\widetilde{\rho}_C = \mathcal{N}(\widetilde{\mu}, \widetilde{C}), with μ~=μ~C\widetilde{\mu} = \widetilde{\mu}_C and C~=C~C≻0\widetilde{C} = \widetilde{C}_C \succ0. For the ideal construction, let X∼πCX \sim\pi_C denote a random complete-field vector, choose a signal coefficient a∈[0,1]a \in[0,1], and set τ=1−a2\tau= 1-a^2. With independent Gaussian noise ξG∼N(0,Id)\xi_G \sim\mathcal{N}(0,I_d), define

References

  1. [1]Tara Akhound-Sadegh, Jarrid Rector-Brooks, Avishek Joey Bose, Sarthak Mittal, Pablo Lemos, Cheng-Hao Liu, Marcin Sendera, Siamak Ravanbakhsh, Gauthier Gidel, Yoshua Bengio, Nikolay Malkin, and Alexander Tong. Iterated denoising energy matching for sampling from boltzmann densities. In Proceedings of the 41st International Conference on Machine Learning, ICML’24. JMLR.org, 2024.arXiv
  2. [2]Jan-Hendrik Bastek, WaiChing Sun, and Dennis Kochmann. Physics-informed diffusion models. In International Conference on Learning Representations, volume 2025, pp. 3360–3385, 2025.arxiv.org/abs/2403.14404
  3. [3]Bishop, C. M., & Nasrabadi, N. M. (2006). Pattern recognition and machine learning (Vol. 4).
  4. [4]Michael Andrew Christie and Martin J Blunt. Tenth spe comparative solution project: A comparison of upscaling techniques. SPE Reservoir Evaluation & Engineering, 4(04):308–317, 2001.DOI
  5. [5]Hyungjin Chung, Jeongsol Kim, Michael Thompson Mccann, Marc Louis Klasky, and Jong Chul Ye. Diffusion posterior sampling for general noisy inverse problems. In The Eleventh International Conference on Learning Representations, 2023.arxiv.org/abs/2209.14687
  6. [6]Simon L Cotter, Gareth O Roberts, Andrew M Stuart, and David White. Mcmc methods for functions: modifying old algorithms to make them faster. Statistical Science, pp. 424–446, 2013.DOI
  7. [7]Imre Csiszar. I-divergence geometry of probability distributions and minimization problems. The annals of probability, pp. 146–158, 1975.DOI
  8. [8]Dhariwal, P., & Nichol, A. (2021). Diffusion models beat gans on image synthesis. Advances in Neural Information Processing Systems, 34, 8780–8794.
  9. [9]Ivan G Graham, Frances Y Kuo, Dirk Nuyens, Robert Scheichl, and Ian H Sloan. Analysis of circulant embedding methods for sampling stationary random fields. SIAM Journal on Numerical Analysis, 56(3):1871–1895, 2018.arxiv.org/abs/1710.00751
  10. [10]Jiahe Huang, Guandao Yang, Zichen Wang, and Jeong Joon Park. Diffusionpde: Generative pde-solving under partial observation. Advances in Neural Information Processing Systems, 37:130291–130323, 2024.arxiv.org/abs/2406.17763
  11. [11]Christian Jacobsen, Yilin Zhuang, and Karthik Duraisamy. Cocogen: Physically consistent and conditioned score-based generative models for forward and inverse problems. SIAM Journal on Scientific Computing, 47(2):C399–C425, 2025.arxiv.org/abs/2312.10527
  12. [12]Zhonghao Li, Chaoyu Liu, and Qian Zhang. Di-bilps: Denoising induced bidirectional latent-pde-solver under sparse observations. arXiv preprint arXiv:2605.13790, 2026.arXiv
  13. [13]Guy Moss, Leah Muhle, Reinhard Drews, Jakob H Macke, and Cornelius Schröder. Fnope: Simulation-based inference on function spaces with fourier neural operators. Advances in Neural Information Processing Systems, 38:61006–61042, 2025.arxiv.org/abs/2505.22573
  14. [14]Price, I., Sanchez-Gonzalez, A., Alet, F., Andersson, T. R., El-Kadi, A., Masters, D., Ewalds, T., Stott, J., Mohamed, S., Battaglia, P., & al., . et . (2025). Probabilistic weather forecasting with machine learning. Nature, 637(8044), 84–90.
  15. [15]Ravuri, S., Lenc, K., Willson, M., Kangin, D., Lam, R., Mirowski, P., Fitzsimons, M., Athanassiadou, M., Kashem, S., Madge, S., & al., . et . (2021). Skilful precipitation nowcasting using deep generative models of radar. Nature, 597(7878), 672–677.
  16. [16]François Rozet and Gilles Louppe. Score-based data assimilation. Advances in Neural Information Processing Systems, 36:40521–40541, 2023.arxiv.org/abs/2306.10574
  17. [17]Salva Rühling Cachay, Bo Zhao, Hailey Joren, and Rose Yu. Dyffusion: A dynamics-informed diffusion model for spatiotemporal forecasting. Advances in neural information processing systems, 36:45259–45287, 2023.arxiv.org/abs/2306.01984
  18. [18]Igal Sason and Sergio Verdú. $f$-divergence inequalities. *IEEE Transactions on Information Theory*, 62(11):5973–6006, 2016.DOI
  19. [19]Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. *arXiv preprint arXiv:2011.13456*, 2020.arXiv
  20. [20]Andrew M Stuart. Inverse problems: a bayesian perspective. *Acta numerica*, 19:451–559, 2010.DOI
  21. [21]Sean Talts, Michael Betancourt, Daniel Simpson, Aki Vehtari, and Andrew Gelman. Validating bayesian inference algorithms with simulation-based calibration. *arXiv preprint arXiv:1804.06788*, 2018.arXiv
  22. [22]Kaiyuan Tan, Kendra Givens, Peilun Li, and Thomas Beckers. Phdme: Physics-informed diffusion models without explicit governing equations. *arXiv preprint arXiv:2601.21234*, 2026.arXiv
  23. [23]Trost, J. J., Krall, A. L., Baedecker, M. J., Cozzarelli, I. M., Herkelrath, W. N., Jaeschke, J. B., Delin, G. N., Berg, A. M., Bekins, B. A., & Milinic, B. (2018). Data sets from the national crude oil spill fate and natural attenuation research site near bemidji, minnesota, usa (ver. 4.0, july 2025). In US Geological Survey (USGS) Data Release (p. 2756).
  24. [24]Vargas, F., Sussman Grathwohl, W., & Doucet, A. (2023). Denoising diffusion samplers. The Eleventh International Conference on Learning Representations.
  25. [25]Sifan Wang, Zehao Dou, Siming Shan, Tong-Rui Liu, and Lu Lu. Fundiff: Diffusion models over function spaces for physics-informed generative modeling. *Nature Communications*, 2026.DOI
  26. [26]Christopher KI Williams and Carl Edward Rasmussen. *Gaussian processes for machine learning*, volume 2. MIT press Cambridge, MA, 2006.DOI
  27. [27]James T Wilson, Viacheslav Borovitskiy, Alexander Terenin, Peter Mostowsky, and Marc Peter Deisenroth. Pathwise conditioning of gaussian processes. *Journal of Machine Learning Research*, 22(105):1–47, 2021.arxiv.org/abs/2011.04026
  28. [28]Zihui Wu, Yu Sun, Yifan Chen, Bingliang Zhang, Yisong Yue, and Katherine L Bouman. Principled probabilistic imaging using diffusion models as plug-and-play priors. *Advances in Neural Information Processing Systems*, 37:118389–118427, 2024.arxiv.org/abs/2405.18782
  29. [29]Liu Yang, Dongkun Zhang, and George Em Karniadakis. Physics-informed generative adversarial networks for stochastic differential equations. *SIAM Journal on Scientific Computing*, 42(1):A292–A317, 2020.arxiv.org/abs/1811.02033
  30. [30]Jiachen Yao, Abbas Mammadov, Julius Berner, Gavin Kerrigan, Jong Chul Ye, Kamyar Azizzadenesheli, and Animashree Anandkumar. Guided diffusion sampling on function spaces with applications to pdes. In D. Belgrave, C. Zhang, H. Lin, R. Pascanu, P. Koniusz, M. Ghassemi, and N. Chen (eds.), *Advances in Neural Information Processing Systems*, volume 38, Main Conference, pp. 127057–127094. Curran Associates, Inc., 2025. doi: 10.52202/085713-4233.DOI
  31. [31]Bingliang Zhang, Wenda Chu, Julius Berner, Chenlin Meng, Anima Anandkumar, and Yang Song. Improving diffusion inverse problem solving with decoupled noise annealing. In *2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)*, pp. 20895–20905. IEEE, 2025.DOI

Paper details

vlnc:W_zchpsjus
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents