Flow matching and guidance reshape data shapes during AI generation

Particle Dynamics of Flow Matching and Classifier-Free Guidance from a Stagewise Geometry Perspective

Machine Learning

Summary

Generating data using AI often involves guiding points called particles through a space toward a desired outcome, but understanding how each particle moves in relation to the data's shape has been unclear. The authors studied these particle paths and found that they pass through stages where they are drawn to average positions, then to a broad area covering the data, and finally close to specific clusters. They showed this behavior happens both continuously and when using step-by-step methods. Additionally, they explained how applying guidance in the process affects these paths while keeping the same overall pattern. This work helps clarify how the guided movement of particles works when creating new data.

flow matchingclassifier-free guidancegenerative modelingparticle trajectoriesdata geometrycontinuous dynamicsEuler discretizationconvex hulldata clusterstime schedule

Authors

Jian-Feng Cai, Zhengyi Su, Chao Wang

Abstract

Flow matching, together with classifier-free guidance (CFG), is widely used in generative modeling, yet much of the theoretical understanding remains distribution-wise. Since practical sampling follows individual trajectories, distribution-level guarantees alone do not fully capture how trajectories interact with the data geometry or how guidance reshapes it. To overcome this limitation, we establish a unified stagewise geometric theory of attraction and absorption for both continuous dynamics and explicit Euler discretization. Specifically, with $t\in[0,1]$ running from noise to data, we show that unconditional flow trajectories are successively attracted toward a neighborhood of the global mean, the data convex hull, and a neighborhood of a possibly nonconvex local cluster. Across these stages, the corresponding distance satisfies a common contraction estimate, yielding an ${O}(1-t)$ decay of the distance in the final stage. For CFG, the same structure persists with an extrapolated mean, an inflated conditional convex hull, and, near the target cluster, the restored local geometry of conditional flow matching. We further show that a general time schedule $a(t)$ replaces the $O(1-t)$ decay by $O(1-a(t))$. Together, these results provide a unified particle-level geometric account of flow matching and CFG across continuous and discrete sampling.