RePrompt: Reasoning-Augmented Reprompting for Text-to-Image Generation via Reinforcement Learning

Mingrui Wu, Lu Wang, Pu Zhao, Fangkai Yang, Jianjin Zhang, Jianfeng Liu, Yuefeng Zhan, Weihao Han, Hao Sun, Jiayi Ji, Xiaoshuai Sun, Qingwei Lin, Weiwei Deng, Dongmei Zhang, Feng Sun, Rongrong Ji

TL;DR

Text-to-image (T2I) models often fail to follow complex spatial or compositional instructions in user prompts. RePrompt solves this by training a language model via reinforcement learning to "think" about the scene's layout before generating an enhanced prompt. This reasoning-augmented approach dramatically improves spatial fidelity and text-image alignment across various image generators without needing to retrain them.

The Challenge of Under-Specified Prompts

Despite the stunning visual quality of modern T2I models like DALL-E 3 or Stable Diffusion, they frequently stumble when given short, under-specified prompts. For example, if a user asks for "a couch below a vase," standard models might place the vase next to the couch or hallucinate a floating vase. They struggle with spatial relations, object counts, and attribute binding (e.g., making sure the car is red and the bicycle is blue, not vice versa).

Comparison of standard prompting vs. RePrompt

Prior attempts to fix this fall into two camps:

  1. Iterative refinement: Generate an image, use an AI to critique it, tweak the prompt, and repeat. This works but is painfully slow and computationally expensive.
  2. LLM prompt enhancement: Use a Large Language Model (LLM) to rewrite the prompt with more detail in a single pass. However, LLMs often just add stylistic fluff. Because they lack grounding in physical reality, they frequently hallucinate unrealistic compositions.

The authors aim to bridge this gap by forcing the LLM to explicitly reason about visual logic and physical constraints before it writes the final prompt, doing so in a fast, single-pass inference step.

The RePrompt Framework

The authors introduce RePrompt, a framework that decouples prompt generation from image generation. Instead of just rewriting text, RePrompt trains a "Prompting Policy" (an LLM) to output a structured reasoning trace (a Chain-of-Thought) followed by the enhanced prompt.

Crucially, RePrompt is trained using Reinforcement Learning (RL)—specifically Group Relative Policy Optimization (GRPO)—based purely on the quality of the downstream images. The underlying T2I model (e.g., FLUX.1) is kept completely frozen.

To guide the RL, the authors designed a custom T2I RePrompt Reward Model that evaluates the generated images without needing human-annotated reasoning traces. The reward is an ensemble of:

  • Visual-Reasoning Reward: Combines ImageReward (which scores human aesthetic preference) and VLM-Reward (using GPT-4V to check if the image actually matches the prompt's semantics).
  • Structure & Length Rewards: Ensures the LLM outputs the correct syntax and stays within the token limits of the T2I model.

Key Insights

  • Reasoning Reduces Reward Variance: A major theoretical and empirical finding is that forcing the model to generate a reasoning trace before the prompt strictly reduces the variance of the downstream reward signal. By planning the scene first, the model reduces the randomness of the image generation, making RL training much more stable and sample-efficient.
  • Ensemble Rewards Prevent "Hacking": Optimizing only for human preference often leads to models generating beautiful images that ignore the prompt. Optimizing only for semantic alignment can degrade image quality. Balancing both is essential for holistic improvement.
  • Model-Agnostic Plug-and-Play: Because RePrompt treats the image generator as a black-box renderer during training, it learns to tailor its reasoning to the specific strengths and weaknesses of whatever T2I model it is paired with.

Results and Performance

RePrompt was evaluated across benchmarks like GenEval and T2I-Compbench, testing fine-grained composition and generalization.

  • Massive Spatial Improvements: On the GenEval benchmark, RePrompt achieved a +77.1% relative improvement in the "Position" category when applied to FLUX, +78.8% on Stable Diffusion 3 (SD3), and +122.2% on Pixart-Σ, compared to standard LLM-enhanced baselines.
  • Overall Accuracy: RePrompt pushed the overall GenEval score of FLUX from 0.66 to 0.76, establishing new state-of-the-art results.
  • High Speed: RePrompt maintains an inference latency of about 30 seconds per image. This is an order of magnitude faster than optimization-heavy iterative baselines, making it highly practical for real-world deployment.

Limitations and Future Work

While spatial reasoning improved dramatically, gains on precise quantitative tasks (like exact object counting) remain modest. The method can also sometimes suffer from "over-reasoning," where the LLM hallucinates unrequested details due to excessive interpretation. Finally, RePrompt is ultimately bottlenecked by the intrinsic limits of the base T2I model; if the image generator lacks the capacity to render a specific complex attribute, a perfect prompt won't save it. Future work will likely focus on improving the fidelity of reward models and exploring fairness-aware training objectives.

Summary updated

BibTeX
@inproceedings{wu2026reprompt,
  author = {Mingrui Wu and Lu Wang and Pu Zhao and Fangkai Yang and Jianjin Zhang and Jianfeng Liu and Yuefeng Zhan and Weihao Han and Hao Sun and Jiayi Ji and Xiaoshuai Sun and Qingwei Lin and Weiwei Deng and Dongmei Zhang and Feng Sun and Rongrong Ji},
  title = {{RePrompt: Reasoning-Augmented Reprompting for Text-to-Image Generation via Reinforcement Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=HJ3vgg7TYQ},
}
Figure