Diffusion Model Alignment Using Direct Preference Optimization

LLM DPO GenAI Diffusion
2023年11月21日
大型语言模型(LLMs)使用来自人类比较数据的强化学习从人类反馈中进行微调,以使它们更符合用户的偏好。与LLMs相比,人类偏好学习在文本到图像扩散模型中并没有得到广泛探索;目前最好的方法是使用精心策划的高质量图像和标题微调预训练模型,以改善视觉吸引力和文本对齐。我们提出了Diffusion-DPO方法,通过直接在人类比较数据上进行优化,将扩散模型与人类偏好对齐。Diffusion-DPO是从最近开发的直接偏好优化(DPO)中改编而来的,这是一种更简单的替代RLHF的方法,它直接优化在分类目标下最能满足人类偏好的策略。我们重新制定了DPO,以考虑扩散模型的似然概念,利用证据下界推导出可微分的目标。使用851K众包成对偏好的Pick-a-Pic数据集,我们使用Diffusion-DPO微调了最先进的Stable Diffusion XL(SDXL)-1.0模型的基础模型。我们微调的基础模型在人类评估中显著优于基础SDXL-1.0和由附加细化模型组成的更大的SDXL-1.0模型,改善了视觉吸引力和提示对齐。我们还开发了一种使用AI反馈并具有与使用人类偏好进行训练相当的性能的变体,为扩散模型对齐方法的扩展打开了大门。
Large language models (LLMs) are fine-tuned using human comparison data with Reinforcement Learning from Human Feedback (RLHF) methods to make them better aligned with users' preferences. In contrast to LLMs, human preference learning has not been widely explored in text-to-image diffusion models; the best existing approach is to fine-tune a pretrained model using carefully curated high quality images and captions to improve visual appeal and text alignment. We propose Diffusion-DPO, a method to align diffusion models to human preferences by directly optimizing on human comparison data. Diffusion-DPO is adapted from the recently developed Direct Preference Optimization (DPO), a simpler alternative to RLHF which directly optimizes a policy that best satisfies human preferences under a classification objective. We re-formulate DPO to account for a diffusion model notion of likelihood, utilizing the evidence lower bound to derive a differentiable objective. Using the Pick-a-Pic dataset of 851K crowdsourced pairwise preferences, we fine-tune the base model of the state-of-the-art Stable Diffusion XL (SDXL)-1.0 model with Diffusion-DPO. Our fine-tuned base model significantly outperforms both base SDXL-1.0 and the larger SDXL-1.0 model consisting of an additional refinement model in human evaluation, improving visual appeal and prompt alignment. We also develop a variant that uses AI feedback and has comparable performance to training on human preferences, opening the door for scaling of diffusion model alignment methods.
许愿