[CVPR 2025] SpatialScore: Solving the "Left-vs-Right" Dilemma in Image Generation with Specialized Reward Modeling

Enhancing Spatial Understanding in Image Generation via Reward Modeling

Summary
Problem
Method
Results
Takeaways
Abstract

The paper introduces SpatialScore, a specialized reward model designed to enhance spatial understanding in text-to-image generation. By training on the new SpatialReward-Dataset (80k preference pairs), it enables effective online reinforcement learning (RL) for diffusion models like FLUX.1-dev, achieving SOTA results in complex spatial reasoning.

TL;DR

While modern Image Gen models (like FLUX or SD3) create stunning visuals, they often fail at basic "spatial logic"—placing a kettle to the right of a pan might result in the opposite. This paper introduces SpatialScore, a reward model that understands geometry better than GPT-4o. By coupling this with a filtered RL training loop (GRPO), the authors significantly boost the spatial accuracy of diffusion models without sacrificing image quality.

Problem: The Spatial Blind Spot of Generative AI

Current Text-to-Image (T2I) models suffer from a fundamental misalignment: they are trained on massive datasets with simple captions that describe what is in an image, but rarely where everything is in relation to each other.

  • Existing Reward Models Fail: Models like HPSv2 or PickScore prioritize "prettiness" (aesthetics). They might give a high score to a beautiful image even if the objects are in the wrong positions.
  • Rule-based Limits: Tools like GenEval use object detectors, but these fail under occlusion or complex long-form prompts.

Methodology: Teaching Machines to "See" Space

The researchers attacked this by building a dedicated feedback loop consisting of two parts: a high-quality dataset and a robust reward model.

1. The SpatialReward-Dataset

They created 80,000 "adversarial pairs." For every correct image, they generated a "perturbed" version where spatial relationships were intentionally swapped (e.g., moving a laptop from the left of a mouse to the right). This forces the reward model to learn the difference that spatial logic makes.

2. SpatialScore Architecture

Using Qwen2.5-VL-7B as a backbone, they added a reward head that outputs a distribution (Gaussian) rather than a single number. This provides a more nuanced signal for Reinforcement Learning.

Model Architecture Figure: The GRPO training pipeline utilizing SpatialScore to guide the policy model.

3. Optimization: Top-k Filtering GRPO

Training with Reinforcement Learning (specifically GRPO) is tricky in image generation. Easy prompts sometimes produce mostly "good" images, making the average score too high and unfairly penalizing decent samples. The authors proposed top-k filtering: they only train on the best and worst samples in a group. This balanced the signal and made training 2x faster in terms of compute (NFE).

Experimental Results: Surpassing the Giants

The most striking result is that SpatialScore (7B) actually outperformed GPT-5 and Gemini-2.5 Pro on spatial reasoning tasks.

ModelOverall Accuracy (Spatial)
HPSv365.2%
Qwen2.5-VL (72B)76.4%
GPT-589.0%
Gemini-2.5 Pro95.1%
SpatialScore (7B)95.8%

When applied to FLUX.1-dev, the model's ability to follow complex spatial instructions (like "a candle behind a dog photo, a clock in front of the center frame") improved drastically.

Qualitative Comparison Figure: Qualitative results showing the base FLUX model vs. the SpatialScore-enhanced version.

Critical Analysis & Takeaways

This work highlights a shift in AI training: we are moving from "general" feedback (is this image good?) to "specialized" feedback (is the chair actually behind the desk?).

Strengths:

  • Scalability: The top-k filtering solves a major efficiency bottleneck in applying GRPO to diffusion models.
  • Precision: Surpassing closed-source LLMs with a 7B parameter model is a testament to the power of specialized datasets.

Limitations:

  • Static vs. Dynamic: Currently, this only works for 2D images. The authors acknowledge that extending this to Video Generation is the next frontier, where objects must move through space and time correctly.

Conclusion

SpatialScore proves that image generation models don't just need more data—they need better critiques. By focusing specifically on spatial relationships, researchers have unlocked a way to make AI-generated scenes as logical as they are beautiful.

Find Similar Papers

Try Our Examples

  • Search for recent papers that use Reinforcement Learning from Human Feedback (RLHF) or GRPO specifically to improve compositional or spatial consistency in diffusion models.
  • Identify the origin of Group Relative Policy Optimization (GRPO) in LLMs and how its advantage estimation differs when applied to continuous latent spaces in image generation.
  • Explore if there are studies applying spatially-aware reward models to video generation or 3D scene synthesis to maintain temporal-spatial consistency.
Contents
[CVPR 2025] SpatialScore: Solving the "Left-vs-Right" Dilemma in Image Generation with Specialized Reward Modeling
1. TL;DR
2. Problem: The Spatial Blind Spot of Generative AI
3. Methodology: Teaching Machines to "See" Space
3.1. 1. The SpatialReward-Dataset
3.2. 2. SpatialScore Architecture
3.3. 3. Optimization: Top-k Filtering GRPO
4. Experimental Results: Surpassing the Giants
5. Critical Analysis & Takeaways
6. Conclusion