EnfoPath: Energy-Informed Analysis of Generative Trajectories in Flow Matching
Ziyun Li, Ben Dai, Huancheng Hu, Henrik Boström, Soon Hoe Lim
TL;DR
This work proposes kinetic path energy $E=\tfrac{1}{2}\int_0^1 \|v_\theta(x(t),t)\|^2\,dt$ as a trajectory-level diagnostic for flow-based generative samplers, treating each generation as a particle moving through a velocity field. It grounds this metric in a physics-inspired framework and connects it to the Benamou–Brenier formulation of the optimal transport cost when the flow is optimal. Empirically, higher $E$ correlates with stronger semantic content (CLIP score/margin) and with lower data density, indicating that informative samples tend to occupy sparse regions of the data manifold and require greater kinetic cost to reach. This trajectory-centric view provides interpretable insights beyond endpoint metrics and motivates theoretical extensions to stochastic samplers and OT-based analyses.
Abstract
Flow-based generative models synthesize data by integrating a learned velocity field from a reference distribution to the target data distribution. Prior work has focused on endpoint metrics (e.g., fidelity, likelihood, perceptual quality) while overlooking a deeper question: what do the sampling trajectories reveal? Motivated by classical mechanics, we introduce kinetic path energy (KPE), a simple yet powerful diagnostic that quantifies the total kinetic effort along each generation path of ODE-based samplers. Through comprehensive experiments on CIFAR-10 and ImageNet-256, we uncover two key phenomena: ({i}) higher KPE predicts stronger semantic quality, indicating that semantically richer samples require greater kinetic effort, and ({ii}) higher KPE inversely correlates with data density, with informative samples residing in sparse, low-density regions. Together, these findings reveal that semantically informative samples naturally reside on the sparse frontier of the data distribution, demanding greater generative effort. Our results suggest that trajectory-level analysis offers a physics-inspired and interpretable framework for understanding generation difficulty and sample characteristics.
