Deep generative models, particularly Flow Matching frameworks, have emerged as powerful tools for synthesizing complex physical systems. However, standard architectures remain purely statistically driven and agnostic to the underlying governing equations, often violating fundamental physical constraints during inference. Existing zero-shot approaches designed to enforce these constraints typically rely on rigid algebraic projections. While effective for sparse boundary conditions, applying such discrete geometric corrections to dense, full-domain PDEs may disrupt the probability path, \rev{potentially deviating from the learned manifold and introducing substantial computational overhead}. To address these challenges, we introduce Energy-Guided Transport, a novel training-free framework that formulates non-linear physical constraints as a smooth potential energy landscape. Rather than interrupting the ODE integration, our method applies a continuous dissipative force directly to the intermediate generative states, steering them toward the physical manifold. By evaluating this force implicitly via reverse-mode automatic differentiation, our framework preserves the natural dynamics of the flow while maintaining an efficient O(N) algorithmic complexity. We extensively evaluate our framework across various 1D and 2D physical systems, including the chaotic Navier-Stokes equations. Our method achieves stable generation without structural divergence, significantly improves the stability-accuracy trade-off compared to state-of-the-art methods, and substantially accelerates inference with respect to exact projection strategies. Code available at: https://github.com/ispamm/Projection-free-energy-guided-flow-matching.
Figures & tables
Figure 1: Conceptual comparison of generative probability flows. (a) Algebraic projections interrupt continuous integration, potentially displacing trajectories from the learned data manifold. (b) Our dissipative guidance smoothly steers the trajectory along the data manifold towards the physical equilibrium.
Figure 2: Qualitative evaluation on the 1D Burgers’ equation (Full-PDE Stress Test). Spatiotemporal velocity fields u(x,t) generated from the same initial conditions. Explicit algebraic projections (PCFM) can be sensitive to solver step sizes under non-linear shock dynamics, leading to numerical instabilities and high-frequency artifacts. In comparison, continuous Energy-Guided Transport provides smooth updates along the trajectory, accurately resolving sharp shockfronts while maintaining distributional fidelity.
Figure 3: Qualitative evaluation on 2D Navier-Stokes vorticity fields. While all guided frameworks attempt to satisfy the underlying physical constraints, (c) ECI and (d) DiffusionPDE tend to introduce noticeable structural blurring and dampen the vorticity intensity. In contrast, our proposed (b) EGT better preserves the macroscopic structural coherence and the sharp gradients of the flow, offering a closer approximation to the (a) Ground Truth dynamics.
Table 1: Quantitative comparison across PDE datasets (White Noise Prior). Panel A shows performance with weak constraints (BC/IC only). Panel B shows the stress test constrained by the Full PDE. For each dataset, we report Success Rate ( SR , %), average inference speed ( Spd , sec/sample), Sample MSE ( MSE ), and physical residual ( Phys ). DNC (Did Not Complete) denotes trajectories that encountered numerical divergence or memory exhaustion (NaN/OOM). Best results are highlighted in bold , and second-best are underlined (excluding the unguided Vanilla baseline). Values marked with † fall below the discrete ground-truth stencil precision limit (stencil overfitting/waterbed effect). See Appendix I for an analysis of the Waterbed Effect.
Table 2: Quantitative comparison across PDE datasets using the Smooth Kernel prior. Note † : Evaluation on the 2D Navier-Stokes equations is omitted as the smooth kernel base distribution is currently not formulated for this specific environment. Values marked with † fall below the discrete ground-truth stencil precision limit (stencil overfitting/waterbed effect); see Appendix I . Best results are highlighted in bold , and second-best are underlined (excluding the unguided Vanilla).
Figure 4: Impact of the number of ODE integration steps ( N ) on the 1D Burgers’ equation (Full-PDE guidance). The dual-axis plot tracks Physical Residual MAE (red) and Sample MSE (blue). EGT stabilizes at low step counts ( N≈50 ).
Appendix figures & tables20 assets
Supplementary material from the paper’s appendix.
Appendix
Constraint Type
Analytical Form h(u)=0
Spatial Scope
Linearity / Landscape
Generative Impact
Initial/Boundary
B(u)−g(x,t)=0
∂Ω∪{t=0}
Typically Linear (Convex)
Anchors the domain; ensures uniqueness.
Macroscopic
∫Ωudx−C=0
Global ( Ω )
Strictly Linear (Convex)
Enforces global invariants; blind to local topology.
Full PDE
∂tu+N(u)=0
Microscopic ( ∀x,t )
System-Dependent
Dictates true local dynamics; implicitly ensures global conservation.
Appendix
Table 3: Theoretical taxonomy of physical constraints in generative modeling. The structural linearity of the physical operator dictates the convexity of the resulting energy landscape. This topological property drastically impacts the computational feasibility of applying exact algebraic corrections during the inference process.
Figure 5: Qualitative 2D visual comparison of standard samples drawn from different generative functional prior distributions p0(u) , visualized as spatial maps over the domain [0,1]×[0,1] . Panel a) shows white noise, characterized by uncorrelated pixels that create local high-frequency content. Panels b) and c) show functional smooth kernel priors (Gaussian Random Fields), highlighting how the characteristic length scale ℓ dictates the typical size and smoothness of initial functional structures.
PDE System
Prior Type
Layers
Modes
Channels
Batch Size
Steps
Heat 1D
White / Smooth
4
32
64
256
20k
RD 1D
White / Smooth
4
32
64
256
20k
Burgers 1D
White / Smooth
4
32
64
256
20k
Navier-Stokes 2D
White
2
16
32
24
500k
Appendix
Table 4: Architectural and optimization hyperparameters for the 7 pre-training environments.
Figure 6: Comparison of guidance scheduling profiles γ(t) as a function of the probability flow time t∈[0,1] . While traditional ’Late Guidance’ schedules (Linear, Parabolic, Cosine) monotonically increase to apply maximum physical correction at the terminal state, our proposed ’Transient’ Sine schedule peaks at t=0.5 and decays to zero at t=1 . This mitigates numerical instabilities caused by evaluating non-linear physical operators on sharp fluid structures during the final stages of the generative process.
Shared Parameter
Heat (1D)
RD (1D)
Burgers (1D)
Navier-Stokes (2D)
ODE Solver Scheme
Forward Euler
Forward Euler
Forward Euler
Forward Euler
NFE (Steps)
100
200
200
100
Base Flow Prior
White / Smooth
White / Smooth
White / Smooth
White
Appendix
Table 5: Shared integration hyperparameters across all physical systems. NFE denotes the Number of Function Evaluations (forward integration steps).
Dataset
IC Error
BC Error
Mass Error
PDE Error (Scaled)
PDE Error (Raw)
Partial Phys (MAE)
Full Phys (MAE)
Heat Equation
0.00e0
-
1.32e-7
3.57e-5
9.04e-3
5.44e-8
3.53e-5
Reaction-Diff.
0.00e0
0.00e0
1.90e-3
3.07e-7
5.03e-3
8.30e-4
3.04e-7
Burgers’ Eq.
0.00e0
5.99e-9
4.70e-3
6.24e-5
6.24e-1
1.56e-3
6.05e-5
Navier-Stokes
0.00e0
0.00e0
1.43e-7
6.98e-6
2.86e-2
1.66e-9
6.63e-6
Appendix
Table 6: Intrinsic physical residuals of the Ground Truth simulated datasets. These values represent the numerical precision limit (lower bound) dictated by grid discretization. To maintain strict consistency with our main evaluations, we report the global mean absolute error (MAE) computed using both the Partial and Full generative configurations. ( Note: The Heat equation dataset is evaluated exclusively on Initial Conditions, hence the absence of BC error ).
Metric
Vanilla
EGT (Ours)
Hybrid EGT (Ours)
PCFM
ProFlow
DiffPDE
ECI
D-Flow
PART 1: PARTIAL/BOUNDARY GUIDANCE
Prior: White Noise
Success Rate ( ↑ )
100%
100%
100%
0.2%
100%
100%
100%
100%
Raw PDE Residual ( ↓ )
0.354
0.399
0.483
DNC
0.402
0.318
0.473
5.676
Physical Res. MAE ( ↓ )
0.256
0.051
0.019
DNC
0.189
0.026
0.013
0.085
IC Error ( ↓ )
0.433
0.015
3.1e-5
DNC
0.270
4.3e-3
2.2e-20
0.011
Appendix
Table 7: Comprehensive evaluation metrics for the 1D Heat Equation . The table compares zero-shot guidance performance across Partial (Boundary/IC) and Full-PDE tasks using both White Noise and Smooth Gaussian priors. ↓ indicates lower is better, ↑ indicates higher is better. All physical metrics are averaged over the test set. Instances with a success rate lower than 100% are marked as DNC. Best results are in bold , second-best are underlined (excluding Vanilla).
Metric
Vanilla
EGT (Ours)
Hybrid EGT (Ours)
PCFM
ProFlow
DiffPDE
ECI
D-Flow
PART 1: PARTIAL/BOUNDARY GUIDANCE
Prior: White Noise
Success Rate ( ↑ )
100%
100%
100%
100%
100%
100%
100%
100%
Raw PDE Residual ( ↓ )
0.955
1.247
1.441
1.266
0.949
1.128
1.205
4.370
Physical Res. MAE ( ↓ )
0.102
0.051
0.013
1.2e-8 †
0.134
0.059
0.049
0.083
IC Error ( ↓ )
0.175
0.167
0.166
0.187
0.184
8.1e-3
6.0e-20
0.174
Appendix
Table 8: Comprehensive evaluation metrics for the 1D Burgers’ Equation . The table compares zero-shot guidance performance across Partial (Boundary/IC) and Full-PDE tasks using both White Noise and Smooth Gaussian priors. ↓ indicates lower is better, ↑ indicates higher is better. All physical metrics are averaged over the test set. Instances with a success rate lower than 100% are marked as DNC. † indicates values that artificially fall below the discrete ground-truth stencil precision limit (stencil overfitting/waterbed effect).
Metric
Vanilla
EGT (Ours)
Hybrid EGT (Ours)
PCFM
ProFlow
DiffPDE
ECI
D-Flow
PART 1: PARTIAL/BOUNDARY GUIDANCE
Prior: White Noise
Success Rate ( ↑ )
100%
100%
100%
100%
100%
100%
100%
100%
Raw PDE Residual ( ↓ )
0.086
0.222
0.423
0.716
7.3e+3
0.184
1.185
4.258
Physical Res. MAE ( ↓ )
0.200
0.075
8.5e-3
1.1e-8 †
1.2e+3
0.043
0.054
0.739
IC Error ( ↓ )
0.181
0.024
5.5e-6
1.4e-44
4.5e+5
7.8e-3
1.5e-20
2.0e+2
Appendix
Table 9: Comprehensive evaluation metrics for the 1D Reaction-Diffusion Equation . The table compares zero-shot guidance performance across Partial (Boundary/IC) and Full-PDE tasks using both White Noise and Smooth Gaussian priors. ↓ indicates lower is better, ↑ indicates higher is better. All physical metrics are averaged over the test set. Instances with a success rate lower than 100% are marked as DNC.. † indicates values that artificially fall below the discrete ground-truth stencil precision limit (stencil overfitting/waterbed effect).
Metric
Vanilla
EGT (Ours)
Hybrid EGT (Ours)
PCFM
ProFlow
DiffPDE
ECI
D-Flow
PART 1: PARTIAL/BOUNDARY GUIDANCE
Prior: White Noise
Success Rate ( ↑ )
100%
100%
100%
100%
100%
100%
100%
14.2%
Raw PDE Residual ( ↓ )
0.063
0.060
0.060
0.075
0.057
0.070
0.071
DNC
Physical Res. MAE ( ↓ )
0.291
0.010
1.4e-4
1.2e-10 †
0.197
0.124
3.8e-5
DNC
IC Error ( ↓ )
0.136
1.7e-4
2.4e-8
0.0
0.063
0.025
8.9e-17
DNC
Appendix
Table 10: Comprehensive evaluation metrics for the 2D Navier-Stokes Equations . The table evaluates zero-shot guidance performance across Partial (Boundary/IC) and Full-PDE tasks using a White Noise prior. ↓ indicates lower is better, ↑ indicates higher is better. All physical metrics are averaged over the test set. Instances with a success rate lower than 100% are marked as DNC. † indicates values that artificially fall below the discrete ground-truth stencil precision limit (stencil overfitting/waterbed effect).
Benchmark
Model
Diagnostic Metric
Mean ± Std ↓
Burgers 1D
Vanilla
Gradient Wasserstein Dist.
5.855e-1 ± 2.577e-1
DiffusionPDE
Gradient Wasserstein Dist.
4.441e-1 ± 2.239e-1
ECI
Gradient Wasserstein Dist.
3.819e-1 ± 2.327e-1
Ours (Pure EGT)
Gradient Wasserstein Dist.
6.870e-1 ± 3.010e-1
Ours (Hybrid EGT)
Gradient Wasserstein Dist.
8.399e-1 ± 3.687e-1
Navier–Stokes 2D
Vanilla
Energy Spectrum L1 Error
9.630e-2 ± 13.06e-2
Appendix
Table 11: Macroscopic physical diagnostics on 1D Burgers and 2D Navier–Stokes (White Noise, Full-PDE).
Model
Metric
Std NS (100)
Std NS (1000)
Std Burgers (100)
Std Burgers (1000)
Ours (EGT)
Sample MSE
2.292e-1
2.321e-1
9.750e-2
1.208e-1
Ours (EGT)
Physical MAE
3.000e-4
3.000e-4
5.000e-4
6.000e-4
ECI
Sample MSE
3.746e-1
4.020e-1
7.380e-2
9.500e-2
ECI
Physical MAE
6.000e-4
6.000e-4
1.000e-4
1.000e-4
DiffusionPDE
Sample MSE
2.448e-1
2.297e-1
9.700e-2
1.147e-1
DiffusionPDE
Physical MAE
6.000e-4
8.000e-4
4.000e-4
4.000e-4
Appendix
Table 12: Variance convergence analysis comparing standard deviations across 100 and 1,000 generated samples (White Noise, Full-PDE).
Model
Burgers (Sample MSE) ↓
Burgers (Phys MAE) ↓
NS (Sample MSE) ↓
NS (Phys MAE) ↓
Vanilla
0.163 ± 9.82e-3
4.54e-3 ± 2.18e-4
0.541 ± 1.43e-2
6.78e-3 ± 9.76e-5
DiffusionPDE
0.139 ± 1.04e-2
1.71e-3 ± 5.89e-5
0.547 ± 1.70e-2
3.72e-3 ± 7.40e-5
ECI
0.127 ± 6.12e-3
2.05e-4 ± 4.98e-6
0.620 ± 3.06e-2
1.81e-3 ± 4.52e-5
Ours (EGT)
0.146 ± 9.13e-3
6.04e-4 ± 1.20e-5
0.528 ± 1.42e-2
1.49e-3 ± 2.50e-5
Appendix
Table 13: Seed-to-seed variability across 5 independent random seeds ( 100 samples per seed, White Noise, Full-PDE).
Figure 7: Impact of the guidance scale γ . Both dual-axis plots simultaneously track the Physical Residual MAE (physics) and Sample MSE (fidelity) on 1D Burgers’ (a) and 2D Navier-Stokes (b).
Figure 8: Evaluation of ODE integration steps N . Both environments demonstrate that EGT stabilizes quickly. Note that for 2D Navier-Stokes (b), the y-axis for the Sample MSE is strictly logarithmic to accommodate the severe error variance at highly constrained integration budgets.
Figure 9: Impact of the temporal guidance scheduler γ(t) . Both “Late Guidance” and “Transient” schedules systematically prevent trajectory collapse by allowing the base neural prior to establish macroscopic coherent structures before rigid physical constraints are fully applied.
Figure 10: Pareto frontiers of distributional stability (Sample MSE) versus physical accuracy (Physical MAE), with inference speed (sec/sample) encoded via the colormap. EGT consistently dominates Vanilla and DiffusionPDE while operating 40 – 80× faster than ECI.
Method ( γ Ablation)
Speed (s) ↓
Phys MAE ↓
Sample MSE ↓
Method (Scheduler Ablation)
Speed (s) ↓
Phys MAE ↓
Sample MSE ↓
Vanilla
0.13
5.53e-3
2.17e-1
Vanilla
0.13
5.53e-3
2.17e-1
ECI
9.30
1.99e-4
1.66e-1
ECI
9.30
1.99e-4
1.66e-1
DiffusionPDE
0.63
1.27e-3
1.88e-1
DiffusionPDE
0.63
1.27e-3
1.88e-1
EGT ( γ=10 )
0.23
3.47e-3
1.52e-1
EGT (Sine)
0.23
1.76e-3
1.44e-1
EGT ( γ=25 )
0.23
1.54e-3
1.46e-1
EGT (Cosine)
0.23
6.11e-4
1.37e-1
EGT ( γ=50 )
0.23
4.24e-4
1.41e-1
EGT (Linear)
0.23
6.21e-4
1.37e-1
Appendix
Table 14: Guidance strength ( γ ) and scheduler Pareto ablation on the 1D Burgers system. EGT provides a controllable trade-off between physical accuracy and distributional fidelity while maintaining a constant sub-second runtime ( 0.23 s/sample).
Method ( γ Ablation)
Speed (s) ↓
Phys MAE ↓
Sample MSE ↓
Method (Scheduler Ablation)
Speed (s) ↓
Phys MAE ↓
Sample MSE ↓
Vanilla
0.13
7.38e-3
1.12e-1
Vanilla
0.13
7.38e-3
1.12e-1
ECI
8.80
1.95e-3
2.80e-2
ECI
8.80
1.95e-3
2.80e-2
DiffusionPDE
0.63
6.90e-1
9.40e+1
DiffusionPDE
0.63
6.90e-1
9.40e+1
EGT ( γ=10 )
0.26
4.67e-3
6.56e-2
EGT (Sine)
0.27
3.91e-3
4.82e-2
EGT ( γ=25 )
0.26
3.88e-3
4.98e-2
EGT (Cosine)
0.27
2.30e-2
6.14e-2
EGT ( γ=50 )
0.26
3.56e-3
4.25e-2
EGT (Linear)
0.27
2.21e-2
5.78e-2
Appendix
Table 15: Guidance strength ( γ ) and scheduler Pareto ablation on the 1D Heat system.
Model
Burgers (Sample MSE) ↓
Burgers (Phys MAE) ↓
NS (Sample MSE) ↓
NS (Phys MAE) ↓
Vanilla (Pure FFM)
2.04e-1 ± 1.33e-1
5.10e-3 ± 2.50e-3
5.60e-1 ± 2.34e-1
7.50e-3 ± 1.40e-3
Vanilla (Refined)
2.01e-1 ± 1.31e-1
1.54e-4 ± 1.00e-4
5.40e-1 ± 2.34e-1
3.96e-3 ± 1.42e-3
DiffusionPDE (Refined)
1.53e-1 ± 1.15e-1
1.16e-4 ± 2.22e-5
5.41e-1 ± 2.30e-1
4.42e-4 ± 5.49e-4
ECI (Refined)
1.16e-1 ± 9.50e-2
1.18e-4 ± 1.80e-5
6.20e-1 ± 4.02e-1
3.16e-5 ± 1.17e-5
Ours (Pure EGT)
1.89e-1 ± 1.21e-1
1.90e-3 ± 6.00e-4
5.47e-1 ± 2.32e-1
1.60e-3 ± 3.00e-4
Ours (Hybrid EGT)
1.89e-1 ± 1.18e-1
1.50e-4 ± 2.90e-5
5.47e-1 ± 2.32e-1
2.90e-5 ± 7.00e-6
Appendix
Table 16: Ablation study applying identical post-hoc terminal refinement across baselines on 1D Burgers and 2D Navier–Stokes (White Noise, Full-PDE).
Generative models excel at synthesizing high-fidelity samples from complex data distributions, but they often violate hard constraints arising from physical laws or task specifications. A common remedy is to project intermediate samples onto the feasible set at each sampling step. However, repeated projection can disrupt the learned sampling dynamics because this feasible set is defined for clean samples rather than noisy intermediate states. Thus, recent studies first estimate clean samples and then project them to the feasible set, but this increases algorithmic complexity and accumulates errors across steps. To address these issues, this paper proposes Chance-constrained Flow Matching (CCFM), a training-free method that formulates constraint enforcement during sampling as stochastic optimization while retaining the hard-constraint feasibility guarantee of projection-based methods. By avoiding direct projection of noisy intermediate states onto the clean-sample feasible set, CCFM mitigates the distributional distortion. Unlike approaches that first estimate and project clean samples, CCFM avoids complex multi-stage procedures. Experiments show that CCFM outperforms current state-of-the-art constrained generative models in modeling complex physical systems governed by partial differential equations, molecular docking problems, and physics-informed motion generation, delivering superior feasibility and fidelity.
Jinhao Liang, Yixuan Sun, Anirban Samaddar +2
University of Virginia · Argonne National Laboratory
We present a generative modeling framework for synthesizing physically feasible two-dimensional incompressible flows under arbitrary obstacle geometries and boundary conditions. Whereas existing diffusion-based flow generators either ignore physical constraints, impose soft penalties that do not guarantee feasibility, or specialize to fixed geometries, our approach integrates three complementary components: (1) a boundary-conditioned diffusion model operating on velocity fields; (2) a physics-informed training objective incorporating a divergence penalty; and (3) a projection-constrained reverse diffusion process that enforces exact incompressibility through a geometry-aware Helmholtz-Hodge operator. We derive the method as a discrete approximation to constrained Langevin sampling on the manifold of divergence-free vector fields, providing a connection between modern diffusion models and geometric constraint enforcement in incompressible flow spaces. Experiments on analytic Navier-Stokes data and obstacle-bounded flow configurations demonstrate significantly improved divergence, spectral accuracy, vorticity statistics, and boundary consistency relative to unconstrained, projection-only, and penalty-only baselines. Our formulation unifies soft and hard physical structure within diffusion models and provides a foundation for generative modeling of incompressible fields in robotics, graphics, and scientific computing.
Deep generative models are used to solve partial differential equations and model distributions of physical system states, but ensuring that the generated samples satisfy the governing laws remains challenging. Projection-based flow-matching methods enforce physics by correcting the flow from an unconstrained noise distribution. These corrections shift the generated samples away from the distribution of target solutions, especially in high noise regions. To address this limitation, we propose Source Anchoring for Physical Consistency (SAPC), a Functional Flow Matching method that encodes the physical constraints into the source noise before generation begins. We evaluate SAPC on five systems governed by partial differential equations, covering six tasks with linear and non-linear dynamics, and compare results against five baselines and the unconstrained backbone. Anchoring the source reduces the need for large corrections that drive samples onto admissible but off-distribution states, and SAPC reproduces the target distributions most accurately on every evaluated task, while matching the constraint precision of the best projection-based baselines. Ablation experiments show that this gain arises from pairing source projection with a matched training objective that regresses toward the projected source. These results identify the source distribution as a key design choice for physically consistent generative modelling.
Giulia Romoli, Filippo Ruffini, Paolo Soda
Department of Diagnostics and Intervention, Ume˚a University, Sweden · Unit of Artificial Intelligence and Computer Systems, Universit`a Campus Bio-Medico di Roma, Italy