DPOK: Reinforcement Learning for Fine-tuning Text-to-Image Diffusion Models

Ying Fan, Olivia Watkins, Yuqing Du, Hao Liu, Moonkyung Ryu +5 more
5/25/2023
cs.LGcs.CV

Official code: google-research/google-research (38,246 stars, Apache-2.0, last commit 2026-04-30).

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.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Google Research

38,2468,446C, ROct 4, 20185 months agoApache-2.0
aimachine-learningresearch

Similar Papers

Cite this paper

@article{fan2023dpok,
  title  = {DPOK: Reinforcement Learning for Fine-tuning Text-to-Image Diffusion Models},
  author = {Ying Fan and Olivia Watkins and Yuqing Du and Hao Liu and Moonkyung Ryu and Craig Boutilier and Pieter Abbeel and Mohammad Ghavamzadeh and Kangwook Lee and Kimin Lee},
  year   = {2023},
  eprint = {2305.16381},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.16381v3},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.16381.svg)](https://codeofpaper.com/paper/2305.16381)

Discussion