Skip to main content
QUICK REVIEW

[Paper Review] DPOK: Reinforcement Learning for Fine-tuning Text-to-Image Diffusion Models

Ying Fan, Olivia Watkins|arXiv (Cornell University)|May 25, 2023
Generative Adversarial Networks and Image SynthesisComputer Science17 citations
TL;DR

DPOK uses online reinforcement learning with KL regularization to fine-tune diffusion-based text-to-image models, achieving better text-image alignment and image fidelity than supervised fine-tuning.

ABSTRACT

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.

Motivation & Objective

  • Motivate improving text-to-image generation via learning from human feedback.
  • Formulate fine-tuning of diffusion models as an online RL problem with KL regularization.
  • Investigate advantages of online RL over supervised fine-tuning in aligning text and images.
  • Evaluate RL fine-tuning on Stable Diffusion with ImageReward as reward model.
  • Provide analysis and comparisons between RL fine-tuning and KL-regularized supervised fine-tuning.

Proposed method

  • Frame the denoising process of DDPMs as a multi-step MDP with states s_t and actions a_t.
  • Derive an online policy gradient objective to maximize expected reward with KL regularization to the pre-trained model.
  • Introduce DPOK: Diffusion Policy Optimization with KL regularization and provide its gradient (Eq. 9).
  • Propose an upper-bound KL regularization for output images to stabilize online fine-tuning (Lemma 4.2 & Eq. 8-9).
  • Extend KL regularization to supervised fine-tuning and compare KL-D and KL-O variants (Lemmas 4.3, 4.3).
  • Conduct experiments on Stable Diffusion v1.5 with LoRA and ImageReward to evaluate RL vs. SFT.

Experimental results

Research questions

  • RQ1Can online RL fine-tuning improve text-to-image alignment without sacrificing image fidelity compared to supervised fine-tuning?
  • RQ2Does KL regularization stabilize RL fine-tuning and mitigate common failure modes in diffusion models?
  • RQ3How does RL fine-tuning perform when optimizing for multiple prompts or datasets beyond the training prompts?
  • RQ4What are the comparative effects of KL regularization in RL versus supervised settings on reward and aesthetics?
  • RQ5Does online RL reduce biases present in pre-trained diffusion models through reward-driven optimization?

Key findings

  • Online RL fine-tuning generally achieves higher ImageReward scores and competitive or better aesthetic scores than supervised fine-tuning.
  • RL fine-tuned models show improved alignment with prompts, including unseen objects, and avoid issues like over-saturation seen in SFT.
  • KL regularization helps stabilize RL and improve both reward and aesthetics, whereas without KL, RL can degrade image quality.
  • Human evaluations favor RL over SFT in terms of image-text alignment and image quality.
  • RL on multiple prompts (MS-CoCo, Drawbench) significantly improves reward while maintaining aesthetics compared to the original model.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.