Abstract
Text-to-image generative models have recently attracted considerable interest, enabling the synthesis of high-quality images from textual prompts. However, these models often lack the capability to generate specific subjects from given reference images or to synthesize novel renditions under varying conditions. Methods like DreamBooth and Subject-driven Text-to-Image (SuTI) have made significant progress in this area. Yet, both approaches primarily focus on enhancing similarity to reference images and require expensive setups, often overlooking the need for efficient training and avoiding overfitting to the reference images. In this work, we present the $\lambda$-Harmonic reward function, which provides a reliable reward signal and enables early stopping for faster training and effective regularization. By combining the Bradley-Terry preference model, the $\lambda$-Harmonic reward function also provides preference labels for subject-driven generation tasks. We propose Reward Preference Optimization (RPO), which offers a simpler setup (requiring only $3\%$ of the negative samples used by DreamBooth) and fewer gradient steps for fine-tuning. Unlike most existing methods, our approach does not require training a text encoder or optimizing text embeddings and achieves text-image alignment by fine-tuning only the U-Net component. Empirically, $\lambda$-Harmonic proves to be a reliable approach for model selection in subject-driven generation tasks. Based on preference labels and early stopping validation from the $\lambda$-Harmonic reward function, our algorithm achieves a state-of-the-art CLIP-I score of 0.833 and a CLIP-T score of 0.314 on DreamBench.
Introduction
Subject-driven text-to-image (T2I) generation is a specialized task where a model must learn to render a specific object from a few reference images into any context described by a textual prompt. This requires a delicate balance between subject fidelity—ensuring the object retains its unique identity—and prompt alignment—ensuring the object is correctly integrated into the requested scene.
Existing methods like DreamBooth and SuTI face significant hurdles. DreamBooth is computationally intensive, requiring over 1,000 "negative" images to prevent the model from forgetting generic concepts. SuTI is even more expensive, relying on half a million "expert" models. Furthermore, these methods often suffer from overfitting, where the model becomes so specialized on the reference images that it fails to follow creative or complex textual prompts.
Methodology
We introduce Reward Preference Optimization (RPO), a framework that treats subject-driven fine-tuning as a Reinforcement Learning (RL) problem. RPO addresses the limitations of previous methods through several key innovations:
- The $\lambda$-Harmonic Reward Function: Traditional optimization often uses simple averages of metrics, which can allow a model to maximize one area (like subject similarity) while ignoring another (like prompt alignment). We propose a weighted harmonic mean of image and text similarity. As a "pessimistic" reward function, it is sensitive to the lower of the two scores, forcing the model to achieve a balance between both objectives.
- Preference-based RL: Using the $\lambda$-Harmonic function, we rank a small set of generated images (typically 32) against reference photos. These rankings are converted into preference labels via the Bradley-Terry model, providing a clear signal for optimization.
- Efficient U-Net Fine-tuning: Unlike methods that optimize entire models or text encoders, RPO fine-tunes only the U-Net component. This approach, combined with a preference loss inspired by Direct Preference Optimization (DPO), significantly reduces the computational footprint.
- Automated Early Stopping: The reward function provides a reliable validation signal, allowing training to terminate at peak performance—usually within 400 gradient steps.
Key Results
RPO was evaluated on DreamBench, the standard benchmark for subject-driven generation. Our method achieved state-of-the-art results with a CLIP-I score of 0.833 (subject fidelity) and a CLIP-T score of 0.314 (text alignment).
Beyond quantitative metrics, RPO demonstrates superior qualitative performance in preserving fine details and handling complex accessorization tasks. Notably, the entire fine-tuning process is highly efficient, requiring only 3% of the negative samples used by DreamBooth and completing in 5 to 20 minutes on a single Cloud TPU V4.
Conclusion
Reward Preference Optimization provides a robust and efficient solution for personalized image generation. By leveraging the pessimistic $\lambda$-Harmonic reward function, RPO avoids the common pitfalls of overfitting and poor prompt alignment. Future work will explore online RL updates and the integration of Low-Rank Adaptation (LoRA) to further enhance the portability and speed of the framework.
Summary updated