Flow matching geometry explains guided sampling particle behavior

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

Machine Learning

Summary

Generative models often use methods like flow matching and classifier-free guidance to create new data, but understanding how individual sample paths behave has been difficult. The authors offer a new geometric viewpoint showing how these sampling paths move closer to certain data features over time, like average points and clusters. They explain this movement both in continuous and step-by-step sampling processes, revealing the stages that particles go through when transforming from noise to real data. This helps link high-level distribution ideas to the actual paths particles take during sampling.

What this means in practice

  • For machine learning engineers: Improve the design and tuning of generative samplers by understanding how guided sampling trajectories interact with data geometry over time.
  • For computer graphics developers: Enhance generative image or shape synthesis processes by exploiting stagewise particle behavior for more accurate sample guidance.

A theory result. No direct application yet.

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.