Table of Contents
Fetching ...

Explicit Flow Matching: On The Theory of Flow Matching Algorithms with Applications

Gleb Ryzhakov, Svetlana Pavlova, Egor Sevriugov, Ivan Oseledets

TL;DR

Explicit Flow Matching (ExFM) reframes flow-based density estimation by introducing a tractable loss that preserves the gradient of standard Flow Matching while reducing training variance. It provides an explicit, closed-form vector-field expression in several scenarios, extends to stochastic maps with SDEs, and demonstrates variance reduction both analytically and empirically across toy, tabular, and high-dimensional datasets. The paper combines theoretical derivations with practical training schemes, including importance sampling for integral estimates, and shows faster convergence and more stable learning than CFMs and OT-CFM in numerous experiments. This work paves the way for more reliable flow-matching training and sharpens the theoretical understanding of flow fields, with potential to enhance diffusion-model training and related probabilistic modeling tasks.

Abstract

This paper proposes a novel method, Explicit Flow Matching (ExFM), for training and analyzing flow-based generative models. ExFM leverages a theoretically grounded loss function, ExFM loss (a tractable form of Flow Matching (FM) loss), to demonstrably reduce variance during training, leading to faster convergence and more stable learning. Based on theoretical analysis of these formulas, we derived exact expressions for the vector field (and score in stochastic cases) for model examples (in particular, for separating multiple exponents), and in some simple cases, exact solutions for trajectories. In addition, we also investigated simple cases of diffusion generative models by adding a stochastic term and obtained an explicit form of the expression for score. While the paper emphasizes the theoretical underpinnings of ExFM, it also showcases its effectiveness through numerical experiments on various datasets, including high-dimensional ones. Compared to traditional FM methods, ExFM achieves superior performance in terms of both learning speed and final outcomes.

Explicit Flow Matching: On The Theory of Flow Matching Algorithms with Applications

TL;DR

Explicit Flow Matching (ExFM) reframes flow-based density estimation by introducing a tractable loss that preserves the gradient of standard Flow Matching while reducing training variance. It provides an explicit, closed-form vector-field expression in several scenarios, extends to stochastic maps with SDEs, and demonstrates variance reduction both analytically and empirically across toy, tabular, and high-dimensional datasets. The paper combines theoretical derivations with practical training schemes, including importance sampling for integral estimates, and shows faster convergence and more stable learning than CFMs and OT-CFM in numerous experiments. This work paves the way for more reliable flow-matching training and sharpens the theoretical understanding of flow fields, with potential to enhance diffusion-model training and related probabilistic modeling tasks.

Abstract

This paper proposes a novel method, Explicit Flow Matching (ExFM), for training and analyzing flow-based generative models. ExFM leverages a theoretically grounded loss function, ExFM loss (a tractable form of Flow Matching (FM) loss), to demonstrably reduce variance during training, leading to faster convergence and more stable learning. Based on theoretical analysis of these formulas, we derived exact expressions for the vector field (and score in stochastic cases) for model examples (in particular, for separating multiple exponents), and in some simple cases, exact solutions for trajectories. In addition, we also investigated simple cases of diffusion generative models by adding a stochastic term and obtained an explicit form of the expression for score. While the paper emphasizes the theoretical underpinnings of ExFM, it also showcases its effectiveness through numerical experiments on various datasets, including high-dimensional ones. Compared to traditional FM methods, ExFM achieves superior performance in terms of both learning speed and final outcomes.
Paper Structure (57 sections, 7 theorems, 113 equations, 17 figures, 8 tables, 2 algorithms)

This paper contains 57 sections, 7 theorems, 113 equations, 17 figures, 8 tables, 2 algorithms.

Key Result

Theorem 2.1

Losses $L_{\text{CFM}}\xspace$ in Eq. eq:LCFM and $L_{\text{ExFM}}\xspace$ in Eq. eq:Lour have the same derivative with respect to model parameters:

Figures (17)

  • Figure 1: (Left) The key novelty of our approach is that in classical CFM, highly divergent directions can appear in a small spatial area at similar times (left part). In our approach (right part) we average over these vectors, training the model on a smoothed unnoised vector field. (Right) The comparison evaluated dispersion norm over time parameter $t$ for CFM and ExFM in matching standard Gaussian $\rho_0 = \mathcal{N}(0,I)$ to general Gaussian $\rho_1 = \mathcal{N}(\mu,\sigma^2I)$ distributions. The y-axis represents the sum of dispersion vector components, denoted as $|\mathbb D_{x,x_1}\Delta v(x,t)|$. The left panel illustrates samples drawn from the $\rho_0$ and $\rho_1$ distributions, as well as the corresponding flows. The right panel depicts the dispersion trend over time for both CFM (black line) and ExFM (red line) objectives. The dotted lines correspond to the dispersion levels (in top-down order $|\mathbb D x_1|$, $|\mathbb D x_0|$, $|\mathbb D x_1| / N$.
  • Figure 2: Trajectories and vector field obtained in simple cases: (a) $N=80$ random trajectories from $\mathcal{N}\left(\cdot\middle\vert\, 0, 1^2\right)$ to GM; (b) 2D plot of the vector field in this case (c)--(f) $N=40$ random trajectories from $\mathcal{N}\left(\cdot\middle\vert\, 0, 1^2\right)$ to $\mathcal{N}\left(\cdot\middle\vert\, 2, 3^2\right)$ and 2D plot of the vector fieldfor different $\sigma_e$ for the Brownian Bridge map
  • Figure 3: Visual comparison of methods on toy 2D data. First row sampled by ExFM, second row sampled by CFM, third row sampled by OT-CFM.
  • Figure 4: a) $N=40$ random trajectories from from $\mathcal{N}\left(\cdot\middle\vert\, 0, 1^2\right)$ to $\mathcal{N}\left(\cdot\middle\vert\, 2, 3^2\right)$; (b) 2D plot of the vector field in this case
  • Figure 5: a) $N=80$ random trajectories from $\mathcal{N}\left(\cdot\middle\vert\, 0, 1^2\right)$ to GM of $\mathcal{N}\left(\cdot\middle\vert\, -2, 1/2^2\right)$ and $\mathcal{N}\left(\cdot\middle\vert\, 2, 1/2^2\right)$; (b) 2D plot of the vector field in this case
  • ...and 12 more figures

Theorems & Definitions (12)

  • Theorem 2.1
  • Corollary 2.2
  • Remark 2.3
  • Theorem 2.4
  • Proposition 2.5
  • Proposition 2.6
  • proof
  • proof
  • Theorem A.2
  • proof
  • ...and 2 more