TL;DR
Latent-CFM accelerates generative flow matching by using pretrained latent variable models (like VAEs) to provide a "structural map" of the data distribution. This approach achieves state-of-the-art image quality with up to 50% less training time and produces significantly more physically accurate samples for scientific datasets.
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 model the underlying structure/manifold 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. Existing strategies of incorporating manifolds, including data with underlying multi-modal distribution, often require expensive training and hence frequently lead to suboptimal performance. To this end, we present $\texttt{Latent-CFM}$, which provides simplified training/inference strategies to incorporate multi-modal data structures using pretrained deep latent variable models. Through experiments on multi-modal synthetic data and widely used image benchmark datasets, we show that $\texttt{Latent-CFM}$ exhibits improved generation quality with significantly less training (up to $\sim 50\%$ less) and computation than state-of-the-art flow matching models by incorporating extracted data features using pretrained lightweight latent variable models. Moving beyond natural images to generating fields arising from processes governed by physics, using a 2d Darcy flow dataset, we demonstrate that our approach generates more physically accurate samples than competitive 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.
Introduction
Generative modeling via Flow Matching (FM) has emerged as a powerful alternative to Diffusion models, primarily by learning a vector field that transports a simple source distribution—typically Gaussian noise—to a complex target data distribution. Despite its potential, a significant challenge remains: most FM models treat the source and target distributions as independent entities. They often fail to explicitly account for the low-dimensional manifolds or distinct clusters inherent in real-world data, such as natural images or physical fields.
Because standard models must learn this underlying structure from scratch during training, the process is frequently computationally inefficient and slow to converge. This is particularly problematic for high-dimensional datasets where the "transport" paths can become unnecessarily complex without structural guidance.
Methodology: Latent-CFM
The proposed Latent-CFM framework addresses these inefficiencies by conditioning the flow matching process on latent features extracted from the data. This provides the model with a "structural map" of the target distribution before training begins.
Feature Extraction and Conditioned Transport
Instead of learning the entire distribution at once, Latent-CFM utilizes a lightweight, pretrained latent variable model. For high-dimensional images, a Variational Autoencoder (VAE) is employed, while for simpler synthetic data, a Gaussian Mixture Model (GMM) suffices. The vector field network is then modified to accept these latent features as additional inputs. This conditioning effectively guides the model, indicating which cluster or manifold a noise sample should be transported toward, resulting in straighter and more efficient transport paths.
Regularization and Architecture
To ensure the latent space remains well-structured and promotes diversity during unconditional generation, the authors incorporate a modified loss function featuring a KL-divergence term. By using a "frozen" or minimally fine-tuned encoder, the framework gains structural awareness without the massive overhead associated with training a full autoencoder-based generative stack from the ground up.
Experiments and Results
The researchers evaluated Latent-CFM across three distinct domains: synthetic multi-modal data, natural image benchmarks (MNIST, CIFAR10, ImageNet), and scientific computing (2D Darcy Flow).
Performance and Efficiency
Latent-CFM demonstrated remarkable training efficiency, reaching competitive FID scores on CIFAR10 and ImageNet with approximately 50% fewer training steps than standard Independent Conditional Flow Matching (I-CFM). On CIFAR10 specifically, Latent-CFM achieved an FID of ~3.51, outperforming both standard OT-CFM (3.72) and I-CFM (3.56).
Mode Capture and Scientific Accuracy
In synthetic tests involving a 16-mode "Triangle" dataset, Latent-CFM was the only model to clearly capture all distinct modes, whereas baseline models often suffered from mode collapse or blurred clusters.
For the Darcy Flow task—where samples must obey fluid pressure and permeability fields governed by partial differential equations (PDEs)—Latent-CFM produced samples with a median PDE residual of 3.18. This is a significant improvement over the 4.92–5.92 range observed for standard I-CFM, indicating that the generated samples are much more physically consistent.
Discussion: Interpretability and Control
Beyond efficiency, conditioning on latents introduces a layer of interpretability. Users can perform latent space traversal, perturbing specific coordinates to change image attributes (like background color) while preserving others (like object shape). Furthermore, the model supports compositionality, allowing users to combine high-frequency details from one source with low-frequency traits from another by multiplying the outputs of feature-conditioned models.
Conclusion
Latent-CFM offers a robust solution to the inefficiencies of standard flow matching by leveraging pretrained latent structures. While the current loss function serves as an upper bound, future work may focus on tightening this bound or improving latent disentanglement for even finer control. The framework's success in scientific modeling also suggests its potential for multifidelity applications, where cheap, low-accuracy simulations guide the generation of high-fidelity physical data.
Summary updated