SCOPE: Semantic Bounded Credit Optimization for Prompt Engineering in Text-to-image Generation
Organizations: Xiamen University · University of Rochester · The University of Hong Kong · Nanyang Technological University
Abstract
Reinforcement learning (RL) enables language models to improve text-to-image (T2I) generation by rewriting prompts for a frozen image generator. Existing methods typically apply a single signal derived from the image to individual subword tokens, although objects, counts, attributes, and relations form coherent semantic spans. We propose SCOPE, an objective based on Group Relative Policy Optimization (GRPO) that aligns update weighting with this structure. The rewriter jointly generates an enhanced prompt and its semantic partition. SCOPE pools shifts in policy log probabilities within each span to derive a shared coefficient for its token losses while retaining a single advantage for each completion. It requires neither separate span rewards nor additional image renders. Across Qwen-Image, SD3, and FLUX.1-dev, SCOPE achieves average relative gains over vanilla GRPO of 9.48% on GeneVal and 7.62% on T2I-CompBench. Ablation studies show that both semantic boundaries and pooling within spans contribute to these gains, supporting semantic structure as a practical inductive bias for prompt engineering with RL.
Figures & tables
| Backbone | Method | Single | Two | Cnt. | Clr. | Pos. | Attr. | Overall |
| Qwen-Image | Baseline | 0.99 | 0.95 | 0.87 | 0.89 | 0.79 | 0.75 | 0.87 |
| Z-Image rewriter | 0.95 | 0.89 | 0.69 | 0.82 | 0.51 | 0.73 | 0.76 | |
| GRPO | 0.99 | 0.97 | 0.90 | 0.94 | 0.87 | 0.80 | 0.91 | |
| RePrompt † [ 55 ] | 0.99 | 0.95 | 0.83 | 0.85 | 0.69 | 0.66 | 0.83 | |
| SCOPE (Ours) | 1.00 | 0.99 | 0.94 | 0.93 | 0.95 | 0.88 | 0.95 | |
| SD3 | Baseline | 0.98 | 0.78 | 0.44 | 0.83 | 0.23 | 0.50 | 0.63 |
| Backbone | Method | Color | Shape | Texture | Spatial | Numeracy | Complex | Avg |
| Qwen-Image | Baseline | 0.8352 | 0.5965 | 0.7598 | 0.4452 | 0.7340 | 0.3971 | 0.6280 |
| Z-Image rewriter | 0.8324 | 0.5930 | 0.7285 | 0.3880 | 0.6963 | 0.3922 | 0.6051 | |
| GRPO | 0.8344 | 0.6042 | 0.7366 | 0.4487 | 0.7321 | 0.3921 | 0.6247 | |
| RePrompt [ 55 ] † | 0.8337 | 0.6110 | 0.7546 | 0.4268 | 0.7332 | 0.3882 | 0.6246 | |
| SCOPE (Ours) | 0.8633 | 0.6273 | 0.7857 | 0.5043 | 0.7713 | 0.4473 | 0.6665 | |
| SD3 | Baseline | 0.7886 | 0.5684 | 0.7267 | 0.2299 | 0.5761 | 0.3754 | 0.5442 |
| Component | Value |
| Policy model | Qwen3-8B |
| Image models | Qwen-Image, SD3, FLUX.1-dev (frozen, Sec. 4 ) |
| Span acquisition | Qwen3-8B jointly generates nonempty spans separated by | |
| Training data | 10k selected GenEval + 4.2k T2I-CB prompts |
| Grouped samples per prompt | 8 |
| Learning rate |
| Backbone | Resolution | Steps | CFG scale |
| Qwen-Image | 20 | 4.0 | |
| FLUX.1-dev | 20 | 3.5 | |
| Stable Diffusion 3 (SD3) | 28 | 7.5 |
| Benchmark | Backbone | Fallbacks | Rollouts | Rate |
| GenEval | FLUX.1-dev | 147 | 80,000 | 0.18% |
| SD3 | 165 | 80,000 | 0.21% | |
| Qwen-Image | 89 | 80,000 | 0.11% | |
| T2I-CompBench | FLUX.1-dev | 269 | 33,600 | 0.80% |
| SD3 | 247 | 33,600 | 0.74% | |
| Qwen-Image | 249 | 33,600 | 0.74% |
| Backbone | 1 Obj. | 2 Obj. | Cnt. | Clr. | Pos. | Attr. | Avg. |
| Qwen-Image | 0.95 | 0.89 | 0.69 | 0.82 | 0.51 | 0.73 | 0.76 |
| SD3 | 0.58 | 0.54 | 0.37 | 0.42 | 0.25 | 0.37 | 0.42 |
| FLUX.1-dev | 0.53 | 0.50 | 0.56 | 0.42 | 0.30 | 0.36 | 0.44 |
| Backbone | Color | Shape | Texture | Spatial | Numeracy | Complex |
| Qwen-Image | 0.8324 | 0.5930 | 0.7285 | 0.3880 | 0.6963 | 0.3922 |
| SD3 | 0.7933 | 0.5846 | 0.7141 | 0.2977 | 0.6286 | 0.3876 |
| FLUX.1-dev | 0.7624 | 0.5363 | 0.6396 | 0.3162 | 0.6492 | 0.3817 |
Prompt Optimization for T2I Generation
Prompt optimization for text-to-image generation improves how natural-language instructions control image content, style, composition, and quality.
See all 32 papers