[论文解读] DPOK: Reinforcement Learning for Fine-tuning Text-to-Image Diffusion Models
DPOK 使用带 KL 正则化的在线强化学习对基于扩散的文本到图像模型进行微调,在文本-图像对齐和图像保真度方面优于监督微调。
Learning from human feedback has been shown to improve text-to-image models. These techniques first learn a reward function that captures what humans care about in the task and then improve the models based on the learned reward function. Even though relatively simple approaches (e.g., rejection sampling based on reward scores) have been investigated, fine-tuning text-to-image models with the reward function remains challenging. In this work, we propose using online reinforcement learning (RL) to fine-tune text-to-image models. We focus on diffusion models, defining the fine-tuning task as an RL problem, and updating the pre-trained text-to-image diffusion models using policy gradient to maximize the feedback-trained reward. Our approach, coined DPOK, integrates policy optimization with KL regularization. We conduct an analysis of KL regularization for both RL fine-tuning and supervised fine-tuning. In our experiments, we show that DPOK is generally superior to supervised fine-tuning with respect to both image-text alignment and image quality. Our code is available at https://github.com/google-research/google-research/tree/master/dpok.
研究动机与目标
- 通过从人类反馈中学习来推动改进文本到图像生成。
- 将扩散模型的微调表述为带 KL 正则化的在线 RL 问题。
- 研究在线 RL 相对于监督微调在对齐文本与图像方面的优势。
- 在 Stable Diffusion 上以 ImageReward 作为奖励模型评估 RL 微调。
- 提供 RL 微调与 KL 正则化的监督微调之间的分析与比较。
提出的方法
- 将 DDPM 的去噪过程框架化为具有状态 s_t 和动作 a_t 的多步 MDP。
- 推导一个在线策略梯度目标,以在对预训练模型进行 KL 正则化的同时最大化预期奖励。
- 引入 DPOK: Diffusion Policy Optimization with KL regularization,并给出其梯度(Eq. 9)。
- 提出一个输出图像的上界 KL 正则化以稳定在线微调(Lemma 4.2 & Eq. 8-9)。
- 将 KL 正则化扩展到监督微调并比较 KL-D 与 KL-O 变体(Lemmas 4.3, 4.3)。
- 在 Stable Diffusion v1.5 上使用 LoRA 和 ImageReward 进行实验,以评估 RL 与 SFT 的对比。
实验结果
研究问题
- RQ1在线 RL 微调是否能够在不牺牲图像保真度的前提下提高文本到图像的对齐度,相比于监督微调?
- RQ2KL 正则化是否能稳定 RL 微调并缓解扩散模型中的常见失败模式?
- RQ3在为多提示词或超出训练提示的数据集进行优化时,RL 微调的表现如何?
- RQ4在奖励和美学方面,KL 正则化在 RL 与监督设置中的对比效果如何?
- RQ5在线 RL 是否通过奖励驱动优化来减少预训练扩散模型中存在的偏差?
主要发现
- 在线 RL 微调通常比监督微调获得更高的 ImageReward 得分,且美学分数具竞争力或更好。
- RL 微调模型在与提示的对齐方面有所提升,包括对未见对象的对齐,并避免了 SFT 中出现的过饱和等问题。
- KL 正则化有助于稳定 RL 并提升奖励和美学,而在没有 KL 时,RL 可能降低图像质量。
- 在人类评估中,在图文对齐和图像质量方面,RL 优于 SFT。
- 在多个提示(MS-CoCo, Drawbench)上的 RL 在保持美学的同时显著提高奖励,相比原始模型。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。