Get the 2026 ML Training Cookbook | 52 recipes — GRPO, Flow Matching, World Models, and everything in between Download Now →

Architecture

Flow Matching

A generative modeling framework that learns a vector field transporting a simple prior to the target data distribution, offering more flexibility and faster sampling than diffusion.

Definition

Flow Matching is a generative modeling framework that learns a time-dependent vector field capable of transporting a simple prior distribution (such as a standard Gaussian) to the target data distribution. The core idea is to define a continuous-time probability flow — a deterministic ordinary differential equation (ODE) — whose trajectories map samples from the prior to samples from the data distribution. Training involves regressing a neural network against the target vector field that defines this transport.

Unlike diffusion models, which are restricted to noise-adding forward processes (and correspondingly noise-removing reverse processes), flow matching allows arbitrary transport paths between the prior and data distributions. This includes straight-line paths (optimal transport), which are more efficient to simulate and require fewer discretization steps. The greater flexibility in path design often translates to faster sampling — flow-matching models can generate high-quality samples in as few as 1–10 ODE steps compared to the hundreds of steps traditional diffusion models may require.

Flow matching has been adopted across diverse domains including voice synthesis (e.g., voice cloning and text-to-speech), image generation, video generation, and protein structure prediction. It provides a unified mathematical framework that subsumes several prior approaches, including score-based diffusion and rectified flow, under a common training objective.

Key Points
  • Learns a vector field (ODE) transporting a Gaussian prior to the data distribution
  • Allows arbitrary transport paths, unlike diffusion's restriction to noise-adding processes
  • Straight-line (optimal transport) paths enable much faster sampling (1–10 steps)
  • Unifies score-based diffusion and rectified flow under a common framework
  • Applied in voice synthesis, image/video generation, and protein structure prediction
Example Use Case

Generating natural-sounding speech from text by learning a flow that transports Gaussian noise to the distribution of speech spectrogram features.

Related Terms