Recent progress in text-to-image generation has greatly advanced visual fidelity and creativity, but it has also imposed higher demands on prompt complexity-particularly in encoding intricate spatial relationships. In such cases, achieving satisfactory results often requires multiple sampling attempts. To address this challenge, we introduce a novel method that strengthens the spatial understanding of current image generation models. We first construct the SpatialReward-Dataset with over 80k preference pairs. Building on this dataset, we build SpatialScore, a reward model designed to evaluate the accuracy of spatial relationships in text-to-image generation, achieving performance that even surpasses leading proprietary models on spatial evaluation. We further demonstrate that this reward model effectively enables online reinforcement learning for the complex spatial generation. Extensive experiments across multiple benchmarks show that our specialized reward model yields significant and consistent gains in spatial understanding for image generation.
Figures & tables
Figure 1: Failure of Reward Models on Spatial Understanding. Existing reward models [ 29 , 17 , 53 , 23 ] often assign higher reward values to spatially incorrect images than to spatially correct ones, thereby exposing their limited spatial reasoning capabilities.
Figure 2: Limitations of GenEval [ 8 ] as the reward model. (a) GenEval-based RL training fails to generalize to long prompts involving complex spatial relationships across multiple objects. (b) The rule-based GenEval rewards, which rely on object detectors, often produce incorrect evaluations under visual challenges like occlusion, while modern VLMs can accurately infer the correct response.
Figure 3: Overview of our SpatialReward-Dataset.
Figure 4: GRPO training pipeline for enhancing spatial unserstanding. We first samples a group of images from the policy model and uses our specialized SpatialScore to rate their spatial accuracy. After ranking based on these scores, we select the top- k most accurate and bottom- k least accurate examples and convert these scores into advantage signals. The policy model is updated via policy gradient optimization to directly reward correct spatial layouts and penalize errors, thereby enhancing the base model’s spatial understanding.
Figure 5: Advantage bias. For easy prompts with many high-reward samples, some high-quality samples often obtain negative advantages due to the high group mean.
Setting
Image Reward Models
Qwen2.5-VL Series
Proprietary Models
SpatiaScore
Image Reward
Pickscore
HPSv2.1
VQAScore
Unified Reward
HPSv3
7B
32B
72B
GPT-5
Gemini- 2.5 pro
1 Pert.
0.439
0.461
0.433
0.567
0.583
0.606
0.572
0.644
0.711
0.855
0.933
0.939
2–3 Pert.
0.513
0.551
0.491
0.638
0.627
0.697
0.632
0.724
0.816
0.924
0.968
0.978
Overall
0.479
0.509
0.463
0.603
0.605
0.652
0.602
0.685
0.764
0.890
0.951
0.958
Table 1: Pairwise-accuracy comparisons on the reward evaluation benchmark. “1 Pert.” and “2–3 Pert.” denote subsets with one or two–three spatial perturbations applied to the perfect prompts when constructing the perturbed prompts.
Method
SpatialScore
DPG-bench
TIIF-bench-short
TIIF-bench-long
Unibench(short)
Unibench(long)
Relation-Spatial
BR
AR
RR
BR
AR
RR
Lay-2D
Lay-3D
Lay-2D
Lay-3D
Flux.1-dev [ 18 ]
2.18
0.871
0.769
0.608
0.584
0.758
0.677
0.645
0.766
0.667
0.819
0.742
Flow-GRPO* [ 25 ]
3.01
0.742
0.851
0.652
0.621
0.577
0.510
0.482
0.726
0.635
0.445
0.405
Ours
7.81
0.932
0.875
0.700
0.647
0.845
0.715
0.675
0.875
0.773
0.891
0.801
Table 2: Detailed comparisons on SpatialScore, DPG-Bench, TIIF-Bench (short/long), and UnigenBench++ (short/long). * denotes training with Geneval as the reward model. BR, AR, and RR denote basic relation, attribute+relation, and relation+reasoning. Lay-2D/3D refer to layout-2D/3D. Unibench denotes UniGenBench++.
Figure 6: Qualitative comparison on prompts with complex spatial relationships across multiple objects.
Figure 7: Reward training curves for ablations on top- k filtering
Method
Global
Entity
Attribute
Relation
Other
Overall
GPT-Image-1
88.89
88.94
89.84
92.63
90.96
85.15
Flux.1-dev
84.70
87.29
89.29
89.44
89.46
82.91
Flow-GRPO*
69.20
72.37
69.23
73.26
69.72
57.02
Ours
87.65
90.56
91.20
91.58
86.43
85.03
Table 3: Full-dimensional comparison on DPG-Bench. The best Flux variants are in bold , and * denotes training with GenEval.
Setting
SpatialScore
DPG-bench
Unigenbench++ (long)
NFE
Rel-Spatial
Layout-2D
Layout-3D
w/o top- k
7.73
0.919
0.891
0.793
24*6
w/ top- k (k=4)
7.71
0.916
0.882
0.796
8*6
w/ top- k (k=6)
7.81
0.932
0.887
0.801
12*6
Table 4: Ablations on top- k filtering. NFE per prompt for each training step is reported under a denoising step count of 6.
Figure 12
Figure 8: Distribution statistics of SpatialReward-Dataset.
Figure 9: Visualization of the preference pairs (perfect images and perturbed images) in our SpatialReward-Dataset.
Figure 10: More visualizations of the preference pairs (perfect images and perturbed images) in our SpatialReward-Dataset.
Methods
Single object
Two object
Counting
Colors
Position
Color Attribute
Overall
Flux.1-dev
0.99
0.81
0.70
0.76
0.19
0.45
0.65
Ours
1.00
0.92
0.88
0.79
0.37
0.66
0.78
Table 5: Quantitative evaluations on the Geneval benchmark. Our model is trained using SpatialScore as the reward model.
Setting\backbone
Qwen2.5-VL-3B
Qwen2.5-VL-7B
Qwen2.5-VL-32B
1 Pert.
0.861
0.939
0.955
2–3 Pert.
0.919
0.978
0.989
Overall
0.891
0.958
0.973
Table 6: Ablation study of SpatialScore backbone sizes on the reward evaluation benchmark. “1 Pert.” and “2–3 Pert.” denote subsets constructed by applying one or two–three spatial perturbations, respectively, to perfect prompts for perturbed prompts.
Method
SpatialScore
DPG-bench
TIIF-bench-short
TIIF-bench-long
Unibench(short)
Unibench(long)
Relation-Spatial
BR
AR
RR
BR
AR
RR
Lay-2D
Lay-3D
Lay-2D
Lay-3D
Qwen-Image [ 51 ]
6.74
0.920
0.865
0.756
0.704
0.827
0.751
0.716
0.864
0.852
0.912
0.860
Ours*
8.25
0.958
0.899
0.792
0.791
0.871
0.801
0.780
0.908
0.917
0.926
0.893
Table 7: Detailed comparisons for the Qwen-Image family on SpatialScore, DPG-Bench, TIIF-Bench (short/long), and UnigenBench++ (short/long). * denotes RL-training with our SpatialScore as the reward model. BR, AR, and RR denote basic relation, attribute+relation, and relation+reasoning. Lay-2D/3D refer to layout-2D/3D. Unibench denotes UnigenBench++.
Figure 11: More qualitative comparisons of the long prompts with complex spatial relationships across objects.
Text-to-image generation creates images from natural-language prompts using generative models, with research focused on fidelity, control, efficiency, and safety.
Recent advances in text-to-image (T2I) generation via reinforcement learning (RL) have benefited from reward models that assess semantic alignment and visual quality. However, most existing reward models pay limited attention to fine-grained spatial relationships, often producing images that appear plausible overall yet contain inaccuracies in object positioning. In this work, we present SpatialReward, a verifiable reward model explicitly designed to evaluate spatial layouts in generated images. SpatialReward adopts a multi-stage pipeline: a Prompt Decomposer extracts entities, attributes, and spatial metadata from free-form prompts; expert detectors provide accurate visual grounding of object positions and attributes; and a vision-language model applies chain-of-thought reasoning over grounded observations to assess complex spatial relations that are challenging for rule-based methods. To more comprehensively evaluate spatial relationships in generated images, we introduce SpatRelBench, a benchmark covering object attributes, orientation, inter-object relations, and rendered text placement. Experiments on Stable Diffusion and FLUX show that incorporating SpatialReward into RL training consistently improves spatial consistency and overall generation quality, with results aligned more closely to human judgments. These findings indicate that verifiable reward models hold considerable potential for enabling more accurate and controllable optimization in text-to-image generation models.
Sashuai Zhou, Qiang Zhou, Junpeng Ma +9
Zhejiang University · Alibaba Group · Fudan University
Reinforcement learning (RL) is promising for spatial text-to-image generation, but existing work largely focuses on policy optimization, assuming accurate rewards and effective online rollouts. We observe in-domain gains with out-of-domain degradation, exposing two limitations: unreliable spatial rewards in open-world settings and rollouts lacking basic-to-complex progression. We propose a curriculum-guided RL framework. First, we introduce SpatialCritic, an agentic reward model equipped with a spatial perception harness that combines reusable verification guidance with specialized vision tools. We then construct spatial preference datasets through targeted counterfactual perturbations and perform agent-harness alignment to improve tool selection and evidence integration efficiently. Second, curriculum learning organizes shared foundational capabilities and their compositional dependencies in a capability graph for mastery-guided rollouts, periodic review, and targeted remediation. On SpaRW-Eval, SpatialCritic achieves 95.1% verification accuracy, outperforming 320B GLM-5.3-Flash with a 40x smaller 8B backbone and raising average baseline scores from 78.4 to 83.9 on SD3.5-Medium and 83.2 to 86.5 on BAGEL. Project page: https://xiaofeng-tan.github.io/projects/spatialcritic/
Spatial intelligence is essential for agents to move from static semantic understanding toward interacting with the physical world. Many spatial tasks are grounded in continuous visual scenes, where locations, regions, and paths are more naturally expressed by pointing, marking, or drawing than by reporting precise coordinates or discrete textual symbols. Yet existing spatial reasoning benchmarks usually require coordinates, options, or text, creating an answer-interface mismatch for image-generation models. This makes it difficult to evaluate image-generation models under the same task semantics as text-output VLMs, despite their ability to externalize spatial judgments directly in pixel space. We propose ProVisE (Protocolized Visual Evaluation), a benchmark-agnostic framework that elicits protocol-constrained visual answers from image-generation models and parses them into structured predictions compatible with original metrics. ProVisE also includes an Agentic builder that constructs and validates task-specific protocols for new benchmarks. We further introduce SpatialGen-Bench, a curated diagnostic benchmark of 470 samples across 14 spatial subtasks, four capability levels, and diverse answer forms. We evaluate representative text-output VLMs and image-generation models in a unified setting and validate Agentic protocol construction on six external spatial benchmarks. Results show that image-generation models are competitive when spatial answers can be externalized directly in pixel space, while text-output VLMs retain a clear advantage in compositional spatial reasoning. These findings reveal complementary strengths of pixel-space expression and text-based reasoning and establish a metric-compatible testbed for studying spatial cognition in image-generation models.