CFG-Ctrl:基于控制的无分类器扩散引导
CFG-Ctrl: Control-Based Classifier-Free Diffusion Guidance
March 3, 2026
作者: Hanyang Wang, Yiyang Liu, Jiawei Chi, Fangfu Liu, Ran Xue, Yueqi Duan
cs.AI
摘要
无分类器引导(CFG)已成为提升基于流的扩散模型语义对齐效果的核心技术。本文提出统一框架CFG-Ctrl,将CFG重新诠释为对一阶连续时间生成流的控制方法,利用条件-无条件差异作为误差信号来调整速度场。基于此视角,我们将原始CFG归纳为固定增益的比例控制器(P控制),而典型改进版本则衍生出扩展的控制律设计。然而现有方法主要依赖线性控制,易导致不稳定、超调及语义保真度下降等问题,尤其在较大引导尺度下更为显著。为此,我们提出滑模控制CFG(SMC-CFG),通过强制生成流向快速收敛的滑模流形靠拢来解决上述问题。具体而言,我们基于语义预测误差定义指数型滑模面,并引入切换控制项建立非线性反馈引导校正机制。此外,我们通过李雅普诺夫稳定性分析为有限时间收敛性提供理论支撑。在Stable Diffusion 3.5、Flux和Qwen-Image等文生图模型上的实验表明,SMC-CFG在语义对齐效果上优于标准CFG,并在宽泛的引导尺度范围内展现出更强鲁棒性。项目页面:https://hanyang-21.github.io/CFG-Ctrl
English
Classifier-Free Guidance (CFG) has emerged as a central approach for enhancing semantic alignment in flow-based diffusion models. In this paper, we explore a unified framework called CFG-Ctrl, which reinterprets CFG as a control applied to the first-order continuous-time generative flow, using the conditional-unconditional discrepancy as an error signal to adjust the velocity field. From this perspective, we summarize vanilla CFG as a proportional controller (P-control) with fixed gain, and typical follow-up variants develop extended control-law designs derived from it. However, existing methods mainly rely on linear control, inherently leading to instability, overshooting, and degraded semantic fidelity especially on large guidance scales. To address this, we introduce Sliding Mode Control CFG (SMC-CFG), which enforces the generative flow toward a rapidly convergent sliding manifold. Specifically, we define an exponential sliding mode surface over the semantic prediction error and introduce a switching control term to establish nonlinear feedback-guided correction. Moreover, we provide a Lyapunov stability analysis to theoretically support finite-time convergence. Experiments across text-to-image generation models including Stable Diffusion 3.5, Flux, and Qwen-Image demonstrate that SMC-CFG outperforms standard CFG in semantic alignment and enhances robustness across a wide range of guidance scales. Project Page: https://hanyang-21.github.io/CFG-Ctrl