Abstract
Classifier-free guidance is a key component for enhancing the performance of conditional generative models across diverse tasks. While it has previously demonstrated remarkable improvements for sample quality, it has been exclusively employed for diffusion models. In this paper, we integrate classifier-free guidance into Flow Matching (FM) models, an alternative simulation-free approach that trains Continuous Normalizing Flows (CNFs) based on regressing vector fields. We explore the usage of Guided Flows for a variety of downstream applications. We show that Guided Flows significantly improves sample quality in conditional image generation and zero-shot text-to-speech synthesis, boasting state-of-the-art performance. Notably, we are the first to apply flow models for plan generation in the offline reinforcement learning setting, showcasing a 10x speedup in computation compared to diffusion models while maintaining comparable performance.
Introduction
Generative modeling has seen significant advances through diffusion models, largely due to the effectiveness of Classifier-Free Guidance (CFG). CFG allows models to amplify the influence of conditional inputs—such as text prompts or class labels—thereby significantly enhancing sample quality. However, diffusion models are computationally expensive, often requiring hundreds of sequential denoising steps.
Flow Matching (FM) has emerged as a promising alternative, offering faster sampling by learning straight-line trajectories (vector fields) to map noise to data. This work introduces Guided Flows, a framework that successfully bridges the gap by bringing the power of guidance to the efficiency of Flow Matching.
Methodology
The core innovation of Guided Flows is the adaptation of CFG to the velocity vector fields of Flow Matching models. In a standard FM setup, a model learns a vector field $u_t(x|y)$ to transform a base distribution into a target distribution conditioned on $y$. Guided Flows define a modified vector field:
$$\tilde{u}_t(x|y) = (1 - \omega)u_t(x) + \omega u_t(x|y)$$
where $\omega$ represents the guidance weight. For $\omega > 1$, the model prioritizes the conditional information over the unconditional data distribution. The authors provide a theoretical link demonstrating that this linear combination is mathematically analogous to score-based guidance in diffusion models, provided the probability paths remain close to marginal Gaussian paths.
Experimental Evaluation
The researchers evaluated Guided Flows across three distinct domains: image generation, text-to-speech (TTS), and offline reinforcement learning (RL).
Image and Speech Synthesis
On the ImageNet-64 dataset, the application of guidance reduced the Frechet Inception Distance (FID) from 2.54 to 1.68, surpassing standard diffusion baselines in quality. In zero-shot TTS tasks using a 60,000-hour audiobook dataset, Guided Flows achieved state-of-the-art results, specifically lowering Word Error Rates (WER) in creative, text-only generation scenarios.
Offline Reinforcement Learning
A major contribution of this work is the first application of flow models to plan generation in offline RL. Using the D4RL benchmark (Hopper, Walker, and HalfCheetah), the model generated future state sequences conditioned on target rewards. Guided Flows achieved a 10x speedup in computation compared to diffusion-based planners, requiring only 10–20 steps to reach comparable performance levels that typically take diffusion models 100–200 steps.
Discussion and Conclusion
Guided Flows demonstrate that guidance is a universal mechanism for manipulating probability paths, not limited to diffusion. By leveraging the "straighter" trajectories of Flow Matching, Guided Flows provide a high-quality, high-efficiency alternative for generative tasks. Furthermore, the model's ability to generalize to out-of-distribution target returns in RL highlights its robustness.
Future work may address the theoretical constraints regarding non-Gaussian paths and explore optimization strategies for RL replanning, such as "warm-starting" trajectories to further enhance real-time performance.
This summary is based on research from FAIR (Meta), Weizmann Institute, and UCLA.
Summary updated