[Paper Review] Aligning Text-to-Image Diffusion Models with Reward Backpropagation
This paper proposes AlignProp, a method that fine-tunes text-to-image diffusion models via end-to-end backpropagation of differentiable reward gradients through the denoising process. By using low-rank adapters and gradient checkpointing, AlignProp achieves higher reward performance with fewer training steps than reinforcement learning baselines, enabling efficient optimization of diverse objectives like image-text alignment, aesthetics, and controllability.
Text-to-image diffusion models have recently emerged at the forefront of image generation, powered by very large-scale unsupervised or weakly supervised text-to-image training datasets. Due to their unsupervised training, controlling their behavior in downstream tasks, such as maximizing human-perceived image quality, image-text alignment, or ethical image generation, is difficult. Recent works finetune diffusion models to downstream reward functions using vanilla reinforcement learning, notorious for the high variance of the gradient estimators. In this paper, we propose AlignProp, a method that aligns diffusion models to downstream reward functions using end-to-end backpropagation of the reward gradient through the denoising process. While naive implementation of such backpropagation would require prohibitive memory resources for storing the partial derivatives of modern text-to-image models, AlignProp finetunes low-rank adapter weight modules and uses gradient checkpointing, to render its memory usage viable. We test AlignProp in finetuning diffusion models to various objectives, such as image-text semantic alignment, aesthetics, compressibility and controllability of the number of objects present, as well as their combinations. We show AlignProp achieves higher rewards in fewer training steps than alternatives, while being conceptually simpler, making it a straightforward choice for optimizing diffusion models for differentiable reward functions of interest. Code and Visualization results are available at https://align-prop.github.io/.
Motivation & Objective
- To address the challenge of aligning pre-trained text-to-image diffusion models with downstream reward functions such as image quality, fairness, and text-image alignment.
- To overcome the prohibitive memory cost of end-to-end backpropagation through the long denoising chain in diffusion models.
- To develop a method that enables direct, differentiable optimization of diffusion models using reward gradients, avoiding the high-variance gradients of reinforcement learning.
- To enable interpolation between multiple reward functions via parameter averaging of LoRA adapters, achieving multi-objective alignment.
Proposed method
- Treats the denoising process as a differentiable recurrent policy mapping noise and text prompts to images, enabling gradient flow from the reward to model weights.
- Uses low-rank adapter (LoRA) modules to fine-tune only a small subset of parameters, drastically reducing memory usage compared to full fine-tuning.
- Employs gradient checkpointing to compute partial derivatives on-demand instead of storing them, avoiding terabyte-scale memory requirements.
- Applies truncated backpropagation through time (BPTT) with a fixed context length K to balance gradient quality and memory efficiency.
- Enables model interpolation by averaging LoRA weights from models fine-tuned on different reward functions, allowing multi-objective generation.
- Uses differentiable reward functions such as CLIP-based image-text alignment, aesthetic scores, and JPEG compressibility to guide optimization.
Experimental results
Research questions
- RQ1Can end-to-end backpropagation through the diffusion sampling process be made memory-efficient enough to be practical for large-scale text-to-image models?
- RQ2How does AlignProp compare to reinforcement learning baselines in terms of sample efficiency and final reward performance?
- RQ3Can AlignProp effectively interpolate between multiple reward functions by combining LoRA adapters from separately trained models?
- RQ4Does the use of low-rank adapters and gradient checkpointing preserve performance while reducing memory and compute costs?
Key findings
- AlignProp achieves significantly higher average rewards than baselines such as ReFL and DDPO, with a 3.30 average reward on the HPSv2 benchmark compared to 2.91 with K=1.
- The method reduces the number of training steps required to reach high reward performance, demonstrating superior sample efficiency over reinforcement learning methods.
- Interpolating LoRA weights from models trained on aesthetics and compressibility yields a hybrid model that achieves the highest overall reward at a mixing coefficient of α=0.5.
- Ablation studies show that LoRA fine-tuning outperforms full UNet fine-tuning, and that EDICT layers degrade performance and increase inference time despite reducing memory.
- Truncated backpropagation with K=10 yields better performance than K=1, indicating that longer context improves gradient quality without excessive memory cost.
- The method enables effective alignment with complex, multi-objective rewards, such as simultaneously improving image-text alignment and aesthetic quality, through parameter interpolation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.