Improving Classifier-Free Guidance of Flow Matching via Manifold Projection
Jian-Feng Cai, Haixia Liu, Zhengyi Su, Chao Wang
摘要
Classifier-free guidance (CFG) is a widely used technique for controllable generation in diffusion and flow-based models. Despite its empirical success, CFG relies on a heuristic linear extrapolation that is often sensitive to the guidance scale. In this work, we provide a principled interpretation of CFG through the lens of optimization. We demonstrate that the velocity field in flow matching corresponds to the gradient of a sequence of smoothed distance functions, which guides latent variables toward the scaled target image set. This perspective reveals that the standard CFG formulation is an approximation of this gradient, where the prediction gap, the discrepancy between conditional and unconditional outputs, governs guidance sensitivity. Leveraging this insight, we reformulate the CFG sampling as a homotopy optimization with a manifold constraint. This formulation necessitates a manifold projection step, which we implement via an incremental gradient descent scheme during sampling. To improve computational efficiency and stability, we further enhance this iterative process with Anderson Acceleration without requiring additional model evaluations. Our proposed methods are training-free and consistently refine generation fidelity, prompt alignment, and robustness to the guidance scale. We validate their effectiveness across diverse benchmarks, demonstrating significant improvements on large-scale models such as DiT-XL-2-256, Flux, and Stable Diffusion 3.5. Code is available at https://github.com/LeonSuZhengYi/CFG-MP.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- Scalable Diffusion Models with Transformers 引用了 Denoising Diffusion Probabilistic Models
- Scalable Diffusion Models with Transformers 引用了 Denoising Diffusion Implicit Models
- Scalable Diffusion Models with Transformers 引用了 Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding
- Denoising Diffusion Implicit Models 引用了 Denoising Diffusion Probabilistic Models
- Scaling Rectified Flow Transformers for High-Resolution Image Synthesis 引用了 Scalable Diffusion Models with Transformers
- Scaling Rectified Flow Transformers for High-Resolution Image Synthesis 引用了 Denoising Diffusion Probabilistic Models
- Scaling Rectified Flow Transformers for High-Resolution Image Synthesis 引用了 Denoising Diffusion Implicit Models
- Scaling Rectified Flow Transformers for High-Resolution Image Synthesis 引用了 Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding 引用了 Denoising Diffusion Probabilistic Models
- Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding 引用了 Denoising Diffusion Implicit Models
它引用的 Paper21
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 次引用
- Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 次引用
- Photorealistic Text-to-Image Diffusion Models with Deep Language UnderstandingChitwan Saharia, William Chan, Saurabh Saxena, Lala Li 等NeurIPS 2022 · 8,965 次引用
- Scalable Diffusion Models with TransformersWilliam Peebles, Saining XieICCV 2023 · 5,568 次引用
- Scaling Rectified Flow Transformers for High-Resolution Image SynthesisPatrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari 等ICML 2024 · 3,620 次引用
相关 Paper
- CFG-Ctrl: Control-Based Classifier-Free Diffusion GuidanceHanyang Wang, Yiyang Liu, Jiawei Chi, Fangfu Liu 等CVPR 2026 · 5 次引用
- Overshoot and Shrinkage in Classifier-Free Guidance: From Theory to PracticeKrunoslav Lehman Pavasovic, Jakob Verbeek, Giulio Biroli, Marc MezardICLR 2026
- Rectified CFG++ for Flow Based ModelsShreshth Saini, Shashank Gupta, Alan BovikNeurIPS 2025 · 20 次引用
- Guiding a Diffusion Model by Swapping Its TokensWeijia Zhang, Yuehao Liu, Shanyan Guan, Wu Ran 等CVPR 2026 · 2 次引用
- CFG++: Manifold-constrained Classifier Free Guidance for Diffusion ModelsHyungjin Chung, Jeongsol Kim, Geon Yeong Park, Hyelin Nam 等ICLR 2025
