Source-linked AI summary

Recursive Flow Matching

Jiahe Huang, Sihan Xu, Sharvaree Vadgama, Rose Yu

arXiv:2605.26535v1cs.LGcs.AIcs.CVmath.NA

TL;DR

Scientific emulation needs high physical accuracy without the computational cost of conventional multi-step generation. RecFM aligns recursively scaled trajectories across discretization regimes, matching multi-step solver performance in one- or few-step settings while achieving substantial speedups. Its benefits are strongest on deterministic physics tasks, while extension to high-complexity real-world video remains challenging.

  • Problem

    Scientific forecasting must balance physical fidelity with computational cost because existing numerical and generative methods remain expensive or lose accuracy when inference steps are reduced.

  • Method

    RecFM recursively models trajectories at multiple traversal scales and enforces consistency by aligning states corresponding to the same point along the flow.

  • Results

    RecFM matches multi-step solver performance in one- or few-step scientific emulation, with up to a 20× speedup over diffusion-based VideoPDE and over 15% lower MSE than vanilla flow matching.

  • Takeaways & Limitations

    RecFM offers a potentially efficient approach for real-time scientific emulation by combining high fidelity with one- or few-step generation.

  • Takeaways & Limitations

    Extending RecFM to high-complexity real-world video remains challenging because natural videos contain semantic and temporal variation beyond standard flow-matching trajectories.

Abstract

from arXiv · show

Generative models have emerged as a powerful paradigm for solving physics systems and modeling complex spatiotemporal dynamics. However, achieving high physical accuracy without incurring high computational cost remains a fundamental challenge, as existing approaches face a critical speed-fidelity trade-off. In this work, we introduce Recursive Flow Matching (RecFM), a generative framework for forecasting complex spatiotemporal dynamics. RecFM enforces self-consistency to align trajectories across discretization scales, reducing discretization errors and improving performance across metrics for physics-based tasks. To our knowledge, this is the first method to achieve high-fidelity one- and few-step (2-4 step) dynamic generation for scientific systems with performance comparable to state-of-the-art multi-step solvers. Across challenging scientific benchmarks, RecFM achieves up to a 20$\times$ speedup over leading diffusion-based emulators while improving predictive accuracy. Furthermore, RecFM reduces mean squared error by over 15% compared to vanilla flow matching, offering a scalable and efficient solution for real-time scientific emulation.

1 Introduction

Scientific forecasting requires methods that balance physical fidelity with computational efficiency. RecFM addresses this speed–accuracy challenge by aligning recursively scaled trajectories and achieves efficient, accurate few-step emulation.

  • Traditional numerical solvers provide high-fidelity physical predictions but are computationally expensive for real-time or large-scale deployment.
  • Diffusion-based models often require tens to hundreds of sequential denoising steps, creating substantial computational overhead for time-dependent simulations.
  • Flow matching reduces function evaluations, but aggressive inference-step reduction can degrade accuracy and stability, especially during long-term rollouts.
  • RecFM recursively models trajectories at different traversal scales and aligns states corresponding to the same point along the path.
  • RecFM enforces cross-scale consistency to stabilize one- or few-step predictions and provides a unified framework for explicit-PDE and data-driven dynamics.

2 Background

Flow matching learns a continuous probability path between data and noise by regressing a velocity field. Self-consistency and trajectory design aim to make this path stable and traversable across discretization scales.

  • Flow matching trains continuous normalizing flows by regressing a time-dependent vector field that defines a probability path between data and a tractable noise distribution.
  • Conditional flow matching uses per-sample regression, with the optimal-transport path linearly interpolating states and producing a constant target velocity x1 − x0.
  • The transport trajectory influences sampling efficiency and stability because its geometry approximates the underlying system dynamics.
  • Existing trajectory methods do not consistently maintain consistency across discretization scales, compromising accuracy and physical fidelity.
  • Self-consistency requires intermediate flow-map compositions to agree with direct mappings, allowing one large step or multiple smaller steps to preserve the same endpoint.

3 Recursive Flow Matching

RecFM builds a family of time-rescaled trajectories through shared spatial states and trains their velocities for cross-scale consistency. This design supports stable one- and multi-step ODE sampling while theoretically reducing truncation error.

  • 3.2 RecFM Algorithm: RecFM models primary and secondary trajectories that pass through the same interpolated state at correspondingly aligned times.The velocity network is conditioned on time and scale, representing the trajectory family in one model.
  • 3.1 Physics Intuition: The pendulum-inspired construction attenuates secondary trajectory velocities by scale factors α(i), providing supervision for consistency across trajectories.The primary target is x1 − x0, while secondary targets are α(i)(x1 − x0).
  • 3.2 RecFM Algorithm: The training objective aggregates supervision across all recursive scales and enforces consistency with the primary trajectory.This extends vanilla flow matching, which learns only a single trajectory between noise and data.
  • 3.2 RecFM Algorithm: RecFM supports one-step generation with a first-order Euler update and multi-step generation through K discretized ODE updates.The one-step case uses h = 1, while the multi-step procedure uses step sizes hk over t0 = 1 to tK = 0.
  • 3.3 Theoretical results: Theorem 3.1 states that recursive trajectories and cross-scale consistency accelerate RecFM convergence by reducing the K-step Euler truncation error.The analysis relates consistency regularization to constrained trajectory acceleration.
  • 3.3 Theoretical results: RecFM uses multiple (τ, α) conditions as supervisory signals for the same direction at one spatial point, functioning as conditioning-space data augmentation.The construction follows the marginal distribution described by Theorem B.2.

4 Related Work

Related work spans physics-informed neural solvers, probabilistic generative models for spatiotemporal systems, and methods that accelerate diffusion or flow-based inference. These approaches target physical fidelity, uncertainty modeling, or reduced sampling cost through distinct formulations.

  • Neural PDE Solvers and Physics-Informed Learning: Physics-informed learning embeds physical laws or functional mappings into neural architectures for solving boundary-value and operator-learning problems.Examples include PINNs, Fourier Neural Operators, DeepONet, and equivariant neural fields.
  • Probabilistic Generative Modeling for Spatiotemporal Physics Systems: Probabilistic generative models provide a framework for learning physics-based systems while quantifying and calibrating uncertainty.Examples include DiffusionPDE, FunDPS, VideoPDE, and DYffusion.
  • Accelerated Inference and Consistency-Based Models: Inference-acceleration methods reduce diffusion or flow sampling costs through efficient samplers, rectified one-step paths, or interval self-consistency.The passage cites EDM, Rectified Flow, and Shortcut Model as representative approaches.

5 Experiments

RecFM is evaluated on three nonlinear physics datasets using one- and two-step inference against stochastic, iterative, dynamics-informed, and generative baselines. Across benchmarks, it combines high forecasting fidelity and calibration with reduced rollout cost, while its advantage is strongest on deterministic PDE tasks.

  • 5 Experiments: Three benchmarks cover Sea Surface Temperature, Navier-Stokes Flow, and Helmholtz Staircase dynamics with diverse nonlinear and spectral behavior.SST uses a 60 × 60 regional grid; Navier-Stokes uses a 221×42 grid with three channels; Helmholtz uses 1024 × 256 grids with two pressure channels.
  • 5 Experiments: Models are evaluated across different temporal horizons using autoregressive rollouts for long-range Navier-Stokes and Helmholtz trajectories.SST predicts 7 days from a 1-day input; Navier-Stokes reconstructs 64 steps and Helmholtz reconstructs 49 steps, generating 16 and 7 frames per autoregressive application, respectively.
  • 5 Experiments: RecFM is compared with stochastic, iterative, dynamics-informed, VideoPDE, and vanilla flow-matching baselines, while PDE-residual-dependent and primarily static-generation methods are excluded from primary comparisons.VideoPDE provides a state-of-the-art generative backbone comparison, and Vanilla FM uses the same architecture without the recursive feature.
  • 5.3 Forecasting Results: 20× speedup over VideoPDE accompanies improved predictive accuracy and calibration across the evaluated benchmarks.The speedup reflects total rollout runtime and the reduced number of inference steps required by RecFM.
  • 5.3 Forecasting Results: 10× lower error than VideoPDE is achieved on the Helmholtz Staircase equation, whose rollout predictions closely match ground truth while the baseline misses circular wave propagation.Figure 3 compares two channels across dataset timesteps and displays absolute-error rows, including an enlarged view of Step 48.
  • 5.3 Forecasting Results: Over 15% lower MSE and substantially better SSR are achieved than vanilla flow matching using only 1-2 inference steps instead of approximately 5.Multi-step RecFM does not consistently outperform single-step variants because errors can accumulate over successive iterations.
  • 5.3 Forecasting Results: RecFM’s advantage is more pronounced on deterministic PDE tasks than on stochastic SST data, consistent with the more deterministic nature of few-step flow matching.The evaluation uses CRPS, MSE, and SSR, with SSR calibrated at an ideal value of 1.0.
  • 5.4 Ablation Studies: RecFM converges faster than VideoPDE during training and maintains lower validation error throughout optimization.Training progress is measured by NFE, the total number of vector-field evaluations during optimization.

6 Conclusion and Discussion

RecFM aligns generative trajectories across sampling regimes to improve consistency in scientific dynamics generation. It matches multi-step solver performance in one- or few-step regimes, but extending the framework to realistic video remains an open challenge.

  • 6 Conclusion and Discussion: RecFM enforces consistency among generative trajectories across different sampling regimes.The framework’s central design aligns trajectories across scales rather than relying on a single discretized trajectory.
  • 6 Conclusion and Discussion: One- or few-step RecFM matches multi-step solver performance across scientific benchmarks while yielding notable speedups.The reported results motivate consistency-based approaches for real-time scientific emulation.
  • 6 Conclusion and Discussion: Scaling RecFM to high-complexity real-world video remains challenging because natural videos contain rich semantic and temporal variations beyond standard flow-matching trajectories.Preliminary image-generation results are promising, but realistic video scaling remains an open problem.

A Dataset Details

The evaluation covers simulated physical systems and a real-world climate benchmark, with datasets representing fluid flow, acoustic scattering, and sea-surface temperature dynamics. The implementations preserve relevant physical fields, channels, grids, and boundary constraints.

  • Boundary conditions are supplied as extra constraints to each model for datasets that include them.
  • Sea Surface Temperature: The SST benchmark contains daily sea-surface temperature fields over the eastern tropical Pacific, split into 1982–2019 training, 2020 validation, and 2021 testing data.
  • Navier-Stokes Flow: Navier-Stokes models incompressible channel flow past four random circular obstacles on a 221 × 42 grid, with velocity and pressure channels.
  • Navier-Stokes Flow: Navier-Stokes inputs are interpolated to 220 × 40 and outputs upsampled to 221 × 42 for metric computation.

B Additional Theorems and Corollaries

The theoretical results establish that RecFM’s secondary trajectories preserve the intended marginal distributions and support self-consistent few-step sampling. The analysis also links consistency regularization to reduced trajectory curvature and explains why depth 2 is preferred empirically.

  • Trajectory Convergence: At the primary optimum, the learned velocity equals E[x1 − x0 | xt = x] and generates the correct marginal path pt.
  • Trajectory Convergence: The secondary velocity satisfies vθ∗(xt, τ, α) = αvθ∗(xt, t, 1) with τ = t/α, while Lcons = 0 at the optimum.
  • Marginal Preservation: The secondary trajectory induced at fixed α preserves the marginal distribution of (1 − ατ)x0 + ατx1 under the stated Lipschitz assumption.
  • Error Analysis: Consistency loss constrains time variation in the velocity field, reducing trajectory curvature and tightening the global discretization-error bound.
  • Consistent Few-Step Sampling: The family indexed by α provides self-consistent few-step samplers whose valid interpolant marginal is independent of discretization granularity.
  • Inference Steps: RecFM performs best with one- or two-step Navier-Stokes generation, while additional steps can accumulate errors.
  • Recursion Depth: RecFM with D = 2 achieves strong one-step results, whereas D = 3 is slightly worse and requires more memory; therefore D = 2 is adopted by default.

C.3 Additional Training Dynamics and Convergence

RecFM converges faster during training and maintains lower validation error than Vanilla FM as the number of function evaluations increases.

  • RecFM converges faster than Vanilla FM and maintains consistently lower validation MSE versus NFE during training.

D Architecture and Implementation Details

RecFM uses an HV-DiT backbone with a removed input mask channel and integrates through the learned velocity field. Training accounts for recursive multi-scale supervision, while additional visualizations cover Helmholtz and Navier-Stokes rollouts.

  • Architecture: RecFM adopts the HV-DiT backbone from VideoPDE, removes its input mask channel, and operates directly on the learned velocity field.
  • Training: Recursive training requires D forward/backward gradient evaluations per iteration, offset by reducing total training iterations by factor D.
  • Hyperparameters: Table 4 provides the Navier-Stokes RecFM architecture and hyperparameters, including the D = 2 configuration.
  • Visualizations: Additional visualizations include multiple Helmholtz timesteps and a representative Navier-Stokes rollout.

F Physics-Informed Evaluation

RecFM is evaluated on physics-informed forecasting tasks using accuracy, calibration, energy, and PDE-residual measures. Across these evaluations, it is reported to maintain stable dynamics and outperform iterative alternatives with substantially fewer inference steps.

  • Physics-informed forecasting: RecFM achieves higher accuracy than PBFM while requiring only 1–2 inference steps instead of the original 20-step setting.PBFM’s iterative refinement limits efficiency and accuracy relative to RecFM.
  • Physics-informed forecasting: RecFM maintains stable Navier–Stokes dynamics with lower overall kinetic-energy error and no noticeable error accumulation.KE Accuracy measures relative agreement with ground-truth energy, with values closer to 1 indicating better physical fidelity.
  • Physics-informed forecasting: The Helmholtz Staircase evaluation uses PDE residuals, where values closer to zero indicate better adherence to the governing wave equation.The residual is computed for ∂2U/∂t2 + ω2U = 0.
  • Physics-informed forecasting: RecFM produces visually accurate predictions while more faithfully preserving underlying physical dynamics through few-step generation.The paper attributes this result to RecFM’s few-step nature.
  • Self-consistency mechanisms: RecFM and Shortcut Models both enforce self-consistency, but RecFM uses cross-scale coherence while Shortcut Models use spatial composition.Their constraints become locally equivalent only in an infinitesimal limit, while regularizing trajectory curvature through complementary mechanisms.
  • Physics-informed forecasting: RecFM outperforms the Shortcut Model on 1-step Helmholtz Staircase generation despite careful hyperparameter tuning.The paper notes that Shortcut Models are primarily designed for static image generation, making dynamic extensions more challenging.

I Recursive Flow Matching for Image Generation

RecFM-XL is also evaluated for ImageNet-1k image generation under classifier-free guidance and different sampling regimes. It achieves strong FID with relatively few sampling steps and can perform better at 16 steps than at 128.

  • Image generation results: FID < 3 is achieved by RecFM-XL within 16 sampling steps on ImageNet-1k with CFG = 1.5.The comparison reports Fréchet Inception Distance across generative baselines.
  • Image generation results: RecFM-XL is competitive with DiT and SiT while requiring fewer training epochs and inference steps.The comparison is reported under the sampling regimes summarized in Table 9.
  • Sampling behavior: RecFM-XL performs better with 16 inference steps than with 128, consistent with a training objective emphasizing few-step generation.The paper attributes limited gains from additional steps to this objective.
Loading 2605.26535v1…