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
Figure 1: Comparison of uniform token weighting in GRPO and semantic span weighting in SCOPE. A T2I evaluator provides a single reward for the image. Standard GRPO derives an advantage for the completion and applies it across token positions. However, compositional prompt edits are naturally organized into semantic phrases whose boundaries need not align with tokenizer positions. SCOPE preserves the same advantage for the completion and derives a shared coefficient for each semantic span from shifts in policy log probabilities. This coefficient modulates all token updates within the span.
Figure 2: Overview of SCOPE Pipeline. The rewriter generates a prompt together with its semantic spans. After removing the span separators, the frozen renderer generates an image whose score contributes to the reward for the completion. SCOPE aligns the spans to rollout tokens and pools changes in log probability between the current and old policies. The resulting coefficients reweight the shared advantage within each span. Gradients flow through the clipped GRPO surrogate while the coefficients are detached.
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
Table 1: SCOPE achieves the highest overall GenEval score on each frozen backbone. RePrompt † is our Qwen-Image reproduction, while its SD3 and FLUX.1-dev scores follow Wu et al. [55] . Single and Two denote one and two objects. Cnt., Clr., Pos., and Attr. denote counting, color, position, and attribute binding. Bold marks the best score per metric and backbone.
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
Table 2: SCOPE exceeds GRPO in every T2I-CompBench category on all three backbones. RePrompt † is our Qwen-Image reproduction. Other RePrompt scores follow Wu et al. [55] . Bold marks the best per metric and backbone.
Figure 3: Ablation and mechanistic diagnostics. (a) GenEval averages across backbones: SCOPE consistently outperforms uniform GRPO, whereas unpooled token-level shifts degrade performance. (b) Semantic boundaries substantially outperform random partitions and fixed 3 -token windows on Qwen-Image. (c) SCOPE remains robust across advantage formulations on FLUX.1-dev, with all variants surpassing vanilla GRPO ( 0.760 ) and the hybrid rule achieving the peak score. (d) Training reward dynamics on Qwen-Image: SCOPE breaks through GRPO’s early saturation plateau to achieve higher asymptotic reward.
Figure 4: Qualitative comparison on four prompts. From left to right: images from the original prompt (Qwen-Image), GRPO, and gpt-image 2, followed by the rewrite snippet and the SCOPE output (Qwen-Image).
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 N
8
Learning rate
1×10−6
Table 3: Optimization configuration for prompt rewriting, span weighting, and normalization.
Backbone
Resolution
Steps
CFG scale
Qwen-Image
512×512
20
4.0
FLUX.1-dev
512×512
20
3.5
Stable Diffusion 3 (SD3)
512×512
28
7.5
Table 4: Fixed rendering configuration for training rewards and benchmark evaluation in our runs.
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%
Table 5: Fallback frequencies in the logged training rollouts by benchmark and frozen image backbone.
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
Table 6: GenEval scores for the Z-Image rewriter across the three frozen backbones. Subset of Table 1 .
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
Table 7: T2I-CompBench scores for the Z-Image rewriter by backbone. Subset of Table 2 .
Figure 5: Additional qualitative comparisons on four prompts, using the same five columns as Figure 4 .
School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen 518172, China · XJTU-POLIMI Joint School, Xi’an Jiaotong University, Xi’an 710049, China · Shenzhen Future Network of Intelligence Institute (FNii-Shenzhen)