无需训练即可在生成时精准控制扩散模型输出,提升质量与可控性。
A General Framework for Inference-time Scaling and Steering of Diffusion Models

- 通过粒子系统在推理阶段动态调整生成路径,利用奖励函数引导样本方向。
- 0.8B模型用此方法在提示一致性上超越2.6B微调模型,且速度更快。
- 支持无梯度控制毒性等属性,适合需要快速部署的生成应用。
扩散模型在图像、视频、蛋白质设计和文本等领域表现优异,但生成符合用户指定属性的样本仍具挑战。现有方法依赖微调以最大化奖励函数,但需昂贵训练且易陷入模式崩溃。本文提出费曼-卡茨(Feynman-Kac, FK)引导框架,可在推理阶段通过多个相互作用的扩散过程(称为粒子)进行采样,并在中间步骤根据基于势函数计算的得分重采样粒子。势函数由中间状态的奖励定义,高值表示该粒子将产生高奖励样本。我们探索了多种势函数、中间奖励和采样器选择。在文本到图像及文本扩散模型上评估显示:使用人类偏好奖励引导文本到图像模型时,0.8B参数模型的表现优于2.6B微调模型,在提示保真度上更优,且采样更快、无需训练;在文本扩散模型中,使用文本质量与特定属性奖励,FK引导生成更低困惑度、语言更自然的输出,并实现对毒性等属性的无梯度控制。结果表明,仅用现成奖励即可在推理阶段实现显著的样本质量提升与可控性增强。代码已公开于 https://github.com/zacharyhorvitz/Fk-Diffusion-Steering。
原文摘要 · Abstract (English)
Diffusion models produce impressive results in modalities ranging from images and video to protein design and text. However, generating samples with user-specified properties remains a challenge. Recent research proposes fine-tuning models to maximize rewards that capture desired properties, but these methods require expensive training and are prone to mode collapse. In this work, we present Feynman-Kac (FK) steering, an inference-time framework for steering diffusion models with reward functions. FK steering works by sampling a system of multiple interacting diffusion processes, called particles, and resampling particles at intermediate steps based on scores computed using functions called potentials. Potentials are defined using rewards for intermediate states and are selected such that a high value indicates that the particle will yield a high-reward sample. We explore various choices of potentials, intermediate rewards, and samplers. We evaluate FK steering on text-to-image and text diffusion models. For steering text-to-image models with a human preference reward, we find that FK steering a 0.8B parameter model outperforms a 2.6B parameter fine-tuned model on prompt fidelity, with faster sampling and no training. For steering text diffusion models with rewards for text quality and specific text attributes, we find that FK steering generates lower perplexity, more linguistically acceptable outputs and enables gradient-free control of attributes like toxicity. Our results demonstrate that inference-time scaling and steering of diffusion models - even with off-the-shelf rewards - can provide significant sample quality gains and controllability benefits. Code is available at https://github.com/zacharyhorvitz/Fk-Diffusion-Steering .
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。