TL;DR
Standard reinforcement learning post-training for text-to-image models applies a single, uniform reward across the entire generation process, ignoring the fact that specific regions and timesteps matter more for text alignment. To fix this, STAR (SpatioTemporal Adaptive Reward Allocation) dynamically routes image-level rewards to prompt-relevant latent regions using internal text-image attention maps. This fine-grained credit assignment significantly boosts compositional semantic alignment, text rendering, and human preference scores with virtually zero computational overhead.
What Problem Does This Paper Address?
Text-to-image (T2I) diffusion and flow models have made massive strides in visual quality, but they still frequently stumble on complex prompts involving object counting, attribute binding, and spatial relationships. While RL post-training (like Flow-GRPO) helps align models with human preferences or automated evaluators, it suffers from a major granularity mismatch.
The reward is typically a single scalar for the final image, which standard policy-gradient methods apply uniformly across all denoising timesteps and all spatial pixels. In reality, text alignment is highly localized: if a prompt asks for "a red chair beside a green plant," the background sky shouldn't be penalized or rewarded the same as the chair or the plant. STAR addresses this spatiotemporal credit assignment problem by ensuring that the regions responsible for text alignment receive the strongest updates.
Methods
STAR introduces an attention-guided reward routing mechanism that breaks down the global scalar advantage into a spatially and temporally resolved training signal:
- Text-Unit Extraction: The prompt is broken down into core semantic components (e.g., subjects, attributes, relations) using either deterministic focus-span rules or a lightweight LLM/VLM.
- Attention-Guided Heatmaps: During the model's forward pass, STAR extracts cross-attention or joint-attention maps between the image latents and the text tokens corresponding to these key components. It aggregates these maps across selected transformer layers to create a timestep-specific spatial heatmap.
- Adaptive Reward Rescaling: This heatmap is normalized into bounded coefficients ($C_t^i(u)$) that scale the original scalar advantage. Regions highly relevant to the prompt receive stronger policy updates, while background regions maintain a baseline, weaker influence to preserve overall composition and quality.
- Spatially Resolved Policy Objective: The standard PPO-style clipped objective is extended to operate over individual spatial locations using a normalized spatial likelihood ratio, ensuring gradients are backpropagated precisely where they matter most.
Datasets
The authors evaluate STAR across three distinct tasks using Stable Diffusion 3.5 Medium as the base model:
- GenEval: A benchmark designed to evaluate compositional generation abilities across sub-tasks like object counting, color attribution, position, and attribute binding.
- OCR Text Rendering: Evaluates the model's ability to render specific text strings legibly and accurately, measured via word-level edit distance.
- PickScore: A dataset and learned preference reward model used to evaluate general alignment with human preferences.
Key Insights and Ideas
- Leveraging Internal Representations: Instead of training an expensive external dense reward model (which requires pixel-level annotations), STAR cleverly reuses the model's own internal text-image attention maps from the forward pass. This makes it incredibly lightweight.
- Preserving Global Context: The allocation map doesn't completely zero out background regions; it uses a scaling factor $\lambda \ge 1$ to amplify prompt-relevant regions while keeping a baseline weight for the rest of the image. This ensures overall image quality and composition aren't sacrificed.
- Middle Layers Matter Most: Through ablation studies, the authors found that middle transformer blocks (layers 10–15 in SD3.5-M) contain the clearest text-image alignment signals, providing a better balance than using all layers or just the front/back layers.
Key Results
STAR consistently outperforms standard scalar-allocation baselines (like Flow-GRPO) across all benchmarks:
- GenEval: Achieved an overall score of 0.9759 (up from 0.95 for Flow-GRPO and 0.63 for the base SD3.5-M), showing massive gains in attribute binding (0.94 vs 0.86) and counting (0.98 vs 0.95).
- OCR Accuracy: Boosted text rendering accuracy to 0.9757 compared to 0.92 for Flow-GRPO.
- PickScore: Improved human preference scores to 23.60 (vs 23.31).
- Efficiency: Because it reuses existing attention maps, STAR introduces less than 2% training time overhead and only a 1.56% increase in peak memory.

Limitations and Future Work
While STAR provides an elegant solution for credit assignment, its reliance on internal attention maps means its performance is inherently tied to the quality of the base model's initial attention layouts. If the base model completely fails to attend to a prompt component during the early stages, STAR might not have a strong enough signal to route the reward effectively. The authors suggest that future work could explore integrating explicit external grounding or open-vocabulary detectors to guide the reward allocation when internal attention maps are noisy or unaligned.
Summary updated