Efficient Flow Matching using Latent Variables
Anirban Samaddar, Yixuan Sun, Viktor Nilsson, Sandeep Madireddy
TL;DR
Efficient Flow Matching using Latent Variables introduces Latent-CFM, a framework that incorporates low-dimensional latent structure into conditional flow matching by conditioning the transport vector field on latent features extracted from data. It leverages pretrained lightweight latent-variable models such as VAEs or GMMs to parametrize the conditioning, enabling up to 50% fewer training steps while achieving competitive or superior sample quality on synthetic multimodal data and standard image benchmarks, as well as yielding physically consistent samples for 2D Darcy flow. A crucial advantage is conditional generation and latent-space interpretability, demonstrated via feature-conditioned sampling and compositional generation. The work highlights the potential of data-structure-aware flow learning for scalable high-dimensional generative modeling and physics-informed simulation.
Abstract
Flow matching models have shown great potential in image generation tasks among probabilistic generative models. However, most flow matching models in the literature do not explicitly utilize the underlying clustering structure in the target data when learning the flow from a simple source distribution like the standard Gaussian. This leads to inefficient learning, especially for many high-dimensional real-world datasets, which often reside in a low-dimensional manifold. To this end, we present $\texttt{Latent-CFM}$, which provides efficient training strategies by conditioning on the features extracted from data using pretrained deep latent variable models. Through experiments on synthetic data from multi-modal distributions and widely used image benchmark datasets, we show that $\texttt{Latent-CFM}$ exhibits improved generation quality with significantly less training and computation than state-of-the-art flow matching models by adopting pretrained lightweight latent variable models. Beyond natural images, we consider generative modeling of spatial fields stemming from physical processes. Using a 2d Darcy flow dataset, we demonstrate that our approach generates more physically accurate samples than competing approaches. In addition, through latent space analysis, we demonstrate that our approach can be used for conditional image generation conditioned on latent features, which adds interpretability to the generation process.
