Self-Rewarding Large Vision-Language Models for Optimizing Prompts in Text-to-Image Generation

Hongji Yang, Yucheng Zhou, Wencheng Han, Jianbing Shen · DOI

TL;DR

Crafting effective prompts for text-to-image models typically requires specialized vocabulary or expensive, human-annotated datasets to train prompt rewriters. This paper introduces a self-rewarding framework that unifies prompt rewriting and image evaluation into a single Large Vision-Language Model (LVLM). By acting as both the solver and the judge, the model iteratively improves its performance through AI feedback and Direct Preference Optimization (DPO), significantly boosting image aesthetics and alignment without human intervention.

What Problem Does This Paper Address?

While text-to-image (T2I) models like Stable Diffusion can generate stunning imagery, they are highly sensitive to how a prompt is phrased. To get the best results, users often need expert knowledge of specific descriptors (e.g., "photorealistic," "octane render," "35mm lens").

To bridge this gap, existing methods train prompt rewriting models. However, these approaches suffer from two major bottlenecks:

  1. Data Scarcity: They rely heavily on large-scale, manually annotated datasets, which are prohibitively expensive and time-consuming to collect.
  2. Static Feedback: Current reinforcement learning (RL) approaches use a fixed reward model to score image quality. Because the reward model remains static during training, it cannot evolve alongside the prompt generator, leading to a lack of dynamic feedback and potential optimization plateaus.

Methods

The authors propose a self-rewarding prompt optimization framework that leverages a single LVLM (specifically, VILA-v1.5-8b) to serve simultaneously as a Prompt Rewriter (the solver) and an Image Evaluator (the judge).

The training pipeline consists of five key stages:

  1. Model Initialization: The base LVLM undergoes Supervised Fine-Tuning (SFT) on a mixture of prompt-rewriting pairs and image-evaluation data to establish baseline capabilities.
  2. Prompt Generation: Given a simple user prompt, the model acts as a solver to generate multiple diverse, optimized candidate prompts.
  3. Image Generation: A fixed T2I model (Stable Diffusion v1.5) generates corresponding images for each candidate prompt.
  4. LVLM Rewarding (LVLM-as-a-judge): The same LVLM evaluates the generated images based on three dimensions: aesthetic quality, human preference alignment (PickScore), and text-image relevance. It outputs both a numerical score and a chain-of-thought explanation.
  5. RL Training via DPO: The highest- and lowest-scoring candidates form preference pairs. The model is then updated using Direct Preference Optimization (DPO) to align its generation preferences with its own internal judging criteria.

This entire loop is repeated iteratively, allowing the model to continuously refine both its rewriting and judging capabilities through self-play.

Figure 2: Four types of framework in prompt optimizing. The main difference among them is the reward generation. (a) The reward function (or Metrics) is pre-defined for reinforcement learning, which typically involves mathematical equations for text or images, such as work (Hao et al., 2024). (b) A feedback model is trained using a large annotated dataset (typical manual score) and then is employed for RL, like PPO, which is employed in (Cao et al., 2023; Rosenman et al., 2023). (c) Rewards are generated through a fixed external LVLM. The upper bound of evaluation depends on external models. (d) Rewriter and Reward Model share the same weight, achieving self-improvement by an iterative method to generating answers and self-judgment.

Datasets

The framework was trained and evaluated using several prominent text-to-image datasets:

  • Beautiful-Prompt: Used during the SFT phase (104,487 prompt pairs) and for reinforcement learning iterations (10k to 20k subsets).
  • Pickapic-v1: A subset of the training set was used to construct evaluation examples during initialization, and the test set was used to verify the model's self-improvement capability.
  • DiffusionDB: A large-scale prompt gallery dataset used to validate the model's generalization performance on unseen prompts.

Key Insights and Ideas

  • The Power of Self-Play: Unifying the rewriter and the evaluator into a single model creates a virtuous cycle. As the model becomes a better judge of image aesthetics, it naturally becomes a better prompt writer, and vice versa.
  • Mitigating Reward Bias: Traditional fixed reward models introduce static biases. By allowing the reward mechanism to evolve dynamically during DPO iterations, the framework avoids overfitting to a static metric.
  • AI Feedback over Human Labor: The model successfully substitutes laborious human feedback with its own internal prior knowledge, demonstrating that LLMs/LVLMs possess latent aesthetic criteria that can be unlocked for self-improvement.

Key Results

The proposed method was evaluated against strong competitors, including MagicPrompt, ChatGPT, and Beautiful-Prompt.

  • Aesthetic and Alignment Gains: On the Beautiful-Prompt test set, the self-rewarding model achieved an Aesthetic Score of 6.59, outperforming the baseline SFT model (5.95) and the fully supervised Beautiful-Prompt method (6.52), despite using significantly less training data.
  • Generalization: On the larger DiffusionDB dataset, the model achieved an Aesthetic Score of 6.57, outperforming Promptist (6.26) and NeuroPrompts (6.27).
  • Human Preference: In a blind user study with 20 volunteers, images generated using the model's optimized prompts achieved a 60.9% win rate over raw user prompts and a 54.7% win rate over the SFT baseline.

Limitations and Future Work

The primary limitation acknowledged by the authors is computational scalability. Training and iteratively fine-tuning models with billions of parameters demands substantial GPU memory and processing power. Due to hardware constraints, the authors were unable to scale the framework to larger parameter models, such as VILA-40B, which likely possess even richer visual priors. Future work will focus on optimizing the framework to run efficiently on larger model architectures and exploring more complex multi-modal self-play strategies.

Summary updated

BibTeX
@inproceedings{yang2025self,
  author = {Hongji Yang and Yucheng Zhou and Wencheng Han and Jianbing Shen},
  title = {{Self-Rewarding Large Vision-Language Models for Optimizing Prompts in Text-to-Image Generation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure