- The paper introduces a conditional flow matching framework that reconstructs the internal dynamics of granular flows from sparse boundary observations.
- It combines a continuous-time ODE generative model with a sparsity-aware guidance protocol to preserve mass conservation and sharp interfaces.
- The method outperforms deterministic CNN regressors by offering superior reconstruction fidelity and uncertainty quantification under both full and partial observation regimes.
Conditional Flow Matching for Generative Inverse Inference in Granular Flow
This work addresses the longstanding challenge of reconstructing unobservable internal kinematics and mechanics of granular flows, particularly in the setting of gravity-driven flows on inclined planes, from sparse or partial boundary observations. Dense granular media, due to their opaque, highly intermittent nature, present severe barriers to experimental observation beyond boundaries. Conventional numerical methods (DEM, FEM, MPM, SPH) are either computationally prohibitive or fundamentally operate in a forward modeling paradigm, thus ill-suited for direct, non-iterative inverse inference. Deterministic AI-based approaches (e.g., CNN regressors, Neural Operators) are known to yield over-smoothed, mean-field solutions in underdetermined settings and lack credible uncertainty quantification.
The presented methodology leverages a conditional generative model based on Flow Matching (CFM) to capture the conditional distribution of admissible internal states, guided by a differentiable surrogate forward operator and a physics decoder. The pipeline explicitly addresses the unique statistical and physical properties of granular flow—spatial sparsity, sharp mass-void interfaces, and highly chaotic bulk dynamics.
Figure 1: Numerical modeling and dataset construction from DEM simulations and grid-based field averaging support robust mapping between particle-scale and continuum observables.
Generative Modeling Framework
The core of the approach is the integration of a continuous-time, ODE-based generative backbone trained via optimal transport flow matching, which acts as a flexible kinematic prior over velocity fields. This prior is coupled during inference with a differentiable surrogate boundary observation operator (trained as a conditional U-Net), efficiently mapping interior fields to observable boundary data, and integrated with a sparsity-aware, physically calibrated gradient guidance protocol. The latter specifically avoids the pathologies of normalized gradients when confronted with voids, preserving physically-realistic boundaries and mass conservation.
The procedure is closed by a physics decoder for rapid, data-driven inference of stress invariants (mean, deviatoric), and granular temperature, all directly from reconstructed kinematics.
Figure 2: Schematic of the proposed CFM pipeline, showing generative backbone, guidance flow, and physics decoding modules.
Data and Training Protocol
Training data is generated from high-resolution DEM simulations of dense granular avalanches, discretized into boundary-normal slices to yield paired tuples of interior fields and boundary observations. The grid-based averaging strategy enables seamless mapping between particle space and continuum-level observables. Data normalization protocols are tailored to exclude void/background regions, focusing statistics exclusively on active material, which is critical for both network convergence and physically meaningful loss computation.
The generative backbone and auxiliary networks are parameterized as deep, residual U-Nets, with positional and slice-depth conditioning, and trained with AdamW using cosine annealing. The gradient-guided ODE integration is done via explicit Euler discretization, with guidance strength fixed due to normalization-free physical scaling. All evaluations are restricted to active pixels to prevent error dilution.
Results
Unconditional Generation
Initial evaluation demonstrates that FM-based generative synthesis, even without conditional guidance, captures the core statistics of velocity field distributions recorded in DEM simulations, as assessed by empirical CDF alignment for all velocity components. Deviations in extreme tails reflect the mismatch between Gaussian priors and physical hard bounds.
Figure 3: Empirical CDFs of generated vs. DEM velocity components indicate strong distributional alignment.
Full and Partial Observation Reconstruction
The guided generative process is assessed under both idealized (full boundary coverage) and severely restricted (16–17% coverage, highly localized window) settings. For the fully observed regime, reconstructed interior fields, even at maximal depth, retained high spatial correlation (rx​>0.87) and low RMSE relative to DEM ground truth, preserving depth-varying shear structures and flow heads.
Figure 4: Boundary-to-interior field reconstruction with CFM under full observational constraints.
Figure 5: Robust internal reconstructions of vx​ from highly localized partial boundary observations across interior slices.
In the partial observation (ill-posed) regime, accuracy degrades gracefully with depth and coverage loss, but coherent bulk reconstruction persists, with local errors confined to regions of high dynamic intermittency.
Physics Field Inference
The pipeline's physics decoder facilitated end-to-end inference of stress fields (p, q) and granular temperature (T) from reconstructed kinematics under partial observation. Statistically, spatial correlation for p was 0.83 with an RMSE of 1.43 kPa, while q correlations were lower but consistent with higher sensitivity to spatial gradients. The RMSE for T remained in the 10−3 m2/svx​0 regime.
Figure 6: End-to-end recovery of stress and granular temperature fields from partial observations.
Deterministic Baseline Comparison
A deterministic U-Net CNN baseline, trained to directly regress interior fields from boundary data, matched CFM performance under full observation but exhibited catastrophic oversmoothing and substantial error increases under partial observation (vx​1 dropping to 0.39). By contrast, CFM preserved structure and did not revert to trivial means.
Figure 7: CFM outperforms deterministic CNN regression, especially in ill-posed, sparse observation regimes.
Integrated Uncertainty Quantification
CFM readily provides spatially-resolved, epistemic uncertainty estimates by sampling over initial noise. The mean recapitulates ensemble spread, and up to 97.9% of ground-truth pixels fall within predicted confidence intervals (vx​2), with uncertainty naturally increasing with depth from observed boundaries.
Figure 8: Ensemble-based UQ reveals spatial uncertainty propagation into bulk, aligning with underlying physical ambiguity.
Guidance Mechanism Ablation and Sensitivity
Ablation against standard normalized gradient guidance, common in continuous field flow matching, yields stark differences: CFM's absolute, sparsity-aware protocol prevents mass leakage and unphysical oscillations in void regions, directly improving RMSE and maintaining sharp interfaces. Sensitivity studies with respect to observation coverage and resolution (window area and spatial subsampling) reveal the approach is robust down to 11% observation density, provided measurements anchor key flow features.
Figure 9: Sparsity-aware guidance eliminates nonphysical predictions and preserves interface fidelity versus standard normalized guidance.
Figure 10: Quantitative assessment of robustness to partial observation window size and spatial resolution loss.
Temporal Consistency
Reconstructions at varying dynamic stages (vx​3 s, vx​4 s, vx​5 s) confirm temporal stability, with correlation/rmse values preserved through accelerating and quasi-static phases.
Figure 11: Consistent bulk field reconstruction by CFM at earlier avalanche time frames.
Implications and Future Directions
This work establishes conditional generative modeling, implemented via flow matching and physically-guided differentiable surrogate operators, as a robust paradigm for high-fidelity inverse inference in granular mechanics. It advances beyond deterministic regression and forward-model-centric approaches by providing a scalable, uncertainty-aware mechanism to bridge sparse surface data and occluded bulk physics. Notable features include the elimination of hyperparameter sensitivity in the generative guidance protocol, direct connection between kinematics and mechanics, and the demonstrated capacity for uncertainty quantification critical in practical engineering applications.
Practically, the approach enables non-invasive bulk state reconstruction, opening new possibilities for experimental diagnostics, digital twinning, and in-situ monitoring and control of granular and particulate systems where boundary-only sensing is feasible.
Theoretically, it highlights open avenues in integrating generative inference with spatiotemporal constraints, path-dependent rheology, and enforcing additional physical laws (e.g., mass/momentum conservation, hard constraints) in a learnable, differentiable framework. The methodology and protocols—especially the physically scaled, sparsity-aware gradient guidance—generalize naturally to other multiphase or highly intermittent materials and may inspire analogous approaches in turbulence, multiscale material modeling, and beyond.
Conclusion
Conditional flow matching with physically principled gradient guidance and differentiable forward/physics decoding operators enables efficient, credible, and robust generative inversion of granular flow from limited boundary data. The proposed methodology advances the fidelity, reliability, and interpretability of AI-driven inverse inference in complex systems, establishes key protocols for realistic physical regression devoid of overfitting or numerical artifacts, and provides a scalable foundation for future research in generative modeling for scientific machine learning.