Stream-level Flow Matching with Gaussian Processes

Ganchao Wei, Li Ma

Overview

This paper introduces Stream-level Flow Matching (GP-CFM), a framework that replaces simple linear paths in generative modeling with stochastic "streams" modeled by Gaussian Processes (GPs). By leveraging the analytical properties of GPs, the authors achieve smoother vector field estimation, reduced sampling variance, and a natural way to incorporate correlated data like time series into the flow matching objective.

The Problem: Limitations of Standard Flow Matching

Continuous Normalizing Flows (CNFs) are powerful generative models that transform a simple noise distribution into a complex data distribution by solving an Ordinary Differential Equation (ODE). Flow Matching (FM) has recently emerged as a way to train these models without the heavy computational burden of solving ODEs during training.

However, standard Conditional Flow Matching (CFM) typically relies on straight-line paths (linear interpolation) between noise and data. This approach has two main drawbacks:

  1. Narrow Coverage: Straight paths cover a very limited region of the state space. During generation, the model might encounter "out-of-distribution" points, leading to "leaky" or poor-quality samples.
  2. Limited Data Structures: Most FM methods only consider two endpoints (start and finish). They struggle to handle data with internal correlations, such as time series or multiple observations from the same subject.

Methods: Stream-Level Matching with GPs

To address these limitations, the authors propose moving from "per-sample" matching to "stream-level" matching. They define a "stream" as a latent stochastic path connecting source and target data.

The core innovation is modeling these streams using Gaussian Processes (GPs). This choice is mathematically elegant for several reasons:

  • Analytical Velocity: If a stream follows a GP, its derivative (velocity) is also a GP. This allows the training objective—matching the model's vector field to the stream's velocity—to remain "simulation-free" and computationally efficient.
  • Kernel Flexibility: By choosing different GP kernels (like Squared Exponential), researchers can control the "wiggliness" and variance of the paths. They can even use non-stationary kernels to inject more noise near the start or end of the flow to act as a form of regularization.
  • Multi-point Conditioning: GPs naturally allow for conditioning on multiple points. Instead of just connecting $t=0$ to $t=1$, a single GP stream can pass through several correlated data points (e.g., $t=0.5, 0.7, 1.0$), allowing the model to "borrow strength" across a sequence.
GP streams expand coverage compared to straight-line I-CFM, reducing extrapolation errors.

Key Insights and Ideas

  • Variance Reduction through Stochasticity: Counter-intuitively, adding stochasticity via GP streams reduces the variance of the estimated marginal vector field. By "filling in" more of the space during training, the neural network doesn't have to extrapolate as much during sampling.
  • The "Simulation-Free" Guarantee: A major hurdle in flow matching is keeping training fast. Because GP conditional distributions are available in closed form, GP-CFM retains the high speed of standard FM while offering the benefits of more complex path modeling.
  • Handling Crossing Paths: In complex datasets, paths from different data points might cross, confusing the model. The authors show that conditioning the flow on covariates (like a subject ID or a starting image) effectively "untangles" these streams.
Conditioning on covariates helps resolve ambiguities when streams from different subjects cross.

Datasets and Key Results

The authors evaluated their approach on a variety of benchmarks, including synthetic simulations, image datasets (MNIST, CIFAR-10), and time series data (HWD+, Local Field Potentials from mouse brains).

  • Better Sample Quality: On MNIST, GP-I-CFM achieved a lower Fréchet Inception Distance (FID) of 43.55 compared to 44.50 for standard I-CFM. Similar improvements were seen in Kernel Inception Distance (KID).
  • Sharper Images: For CIFAR-10, images generated by GP-based models were qualitatively sharper and more detailed than those from linear interpolation models.
  • Efficient Time Series Modeling: In the HWD+ and LFP experiments, the GP-CFM framework successfully generated smooth transitions across multiple time points within a single unified model, whereas standard methods required training separate models for each time interval.

Limitations and Future Work

  • Monte Carlo Error: The training objective relies on sampling from the GP. While efficient, this introduces Monte Carlo error that could be further mitigated using importance sampling techniques.
  • Computational Overhead: While "simulation-free," sampling from a GP and calculating its kernel is slightly more expensive than simple linear interpolation. The authors note a small decrease in training iterations per second (e.g., 3.6 vs 3.0 on CIFAR-10).
  • High-Dimensional GPs: The current implementation assumes independent GPs across dimensions for efficiency. Exploring more complex multi-output GPs could capture even richer correlations but would increase computational complexity.

Summary updated

BibTeX
@inproceedings{wei2025stream,
  author = {Ganchao Wei and Li Ma},
  title = {{Stream-level Flow Matching with Gaussian Processes}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=qg9p1I5lmp},
}
Figure