用强化学习动态控制扩散模型生成结果,无需再训练
Inference-Time Alignment Control for Diffusion Models with Reinforcement Learning Guidance
- 推理时通过几何平均融合基模型与强化学习微调模型输出
- 可灵活调节对齐程度,提升人类偏好、组合控制等任务性能
- 理论证明其等价于调整正则化系数,适合需要动态调控的场景
基于去噪的生成模型,特别是扩散模型和流匹配算法,已取得显著进展。然而,将它们的输出分布对齐到复杂下游目标(如人类偏好、组合准确性或数据压缩性)仍具挑战。尽管受大语言模型中基于人类反馈的强化学习(RLHF)启发,已有强化学习微调方法被引入生成框架,但现有方法在扩散模型上表现不佳,且微调后难以灵活控制对齐强度。本文从随机微分方程和隐式奖励条件的角度重新审视扩散模型的强化学习微调,提出推理时使用的强化学习引导(RLG)方法。该方法通过几何平均结合基础模型与强化学习微调模型的输出,实现对分类无指导(CFG)的自适应调整。理论分析表明,RLG的引导尺度在数学上等价于标准强化学习目标中的KL正则化系数,从而可在不额外训练的情况下动态调节对齐与质量之间的权衡。大量实验显示,RLG在多种架构、强化学习算法和下游任务(包括人类偏好、组合控制、压缩性、文本渲染)中均持续提升性能。此外,RLG支持插值与外推,提供前所未有的生成对齐控制灵活性。本方法为增强和控制扩散模型在推理阶段的对齐能力提供了实用且理论严谨的解决方案。源代码已公开于 GitHub:https://github.com/jinluo12345/Reinforcement-learning-guidance。
原文摘要 · Abstract (English)
Denoising-based generative models, particularly diffusion and flow matching algorithms, have achieved remarkable success. However, aligning their output distributions with complex downstream objectives, such as human preferences, compositional accuracy, or data compressibility, remains challenging. While reinforcement learning (RL) fine-tuning methods, inspired by advances in RL from human feedback (RLHF) for large language models, have been adapted to these generative frameworks, current RL approaches are suboptimal for diffusion models and offer limited flexibility in controlling alignment strength after fine-tuning. In this work, we reinterpret RL fine-tuning for diffusion models through the lens of stochastic differential equations and implicit reward conditioning. We introduce Reinforcement Learning Guidance (RLG), an inference-time method that adapts Classifier-Free Guidance (CFG) by combining the outputs of the base and RL fine-tuned models via a geometric average. Our theoretical analysis shows that RLG's guidance scale is mathematically equivalent to adjusting the KL-regularization coefficient in standard RL objectives, enabling dynamic control over the alignment-quality trade-off without further training. Extensive experiments demonstrate that RLG consistently improves the performance of RL fine-tuned models across various architectures, RL algorithms, and downstream tasks, including human preferences, compositional control, compressibility, and text rendering. Furthermore, RLG supports both interpolation and extrapolation, thereby offering unprecedented flexibility in controlling generative alignment. Our approach provides a practical and theoretically sound solution for enhancing and controlling diffusion model alignment at inference. The source code for RLG is publicly available at the Github: https://github.com/jinluo12345/Reinforcement-learning-guidance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。