TL;DR
When fine-tuning diffusion models using multiple reward functions (like aesthetics, text correctness, and prompt alignment), standard methods apply a fixed, static weight to each reward across all denoising steps. ReCAST dynamically schedules these weights based on when a reward is most informative during the generation process—for instance, focusing on layout rewards early on and aesthetic rewards near the end. This temporal credit assignment improves alignment efficiency, boosts image quality, and generalizes better to held-out evaluation metrics without suffering from reward hacking.
What Problem Does This Paper Address?
Post-training diffusion models using reinforcement learning typically relies on combining multiple reward proxies (e.g., optimizing for prompt adherence, visual aesthetics, and safety simultaneously) via a simple linear combination. However, this static approach makes a flawed assumption: that every reward is equally useful at every single step of the denoising trajectory.
In reality, diffusion models generate images progressively, resolving global layout and composition at high noise levels (early timesteps) and refining fine local details at low noise levels (late timesteps). A reward checking for text spelling (OCR) can grade an image as soon as rough letter shapes emerge, whereas an aesthetic reward is useless on a highly noisy image. Forcing all rewards to contribute uniformly across all timesteps wastes optimization capacity and can lead to reward hacking. The authors introduce ReCAST to solve this temporal allocation problem, determining exactly when each reward's budget should be spent.
Methods
ReCAST (Reward Credit ASsignment across Timesteps) replaces static reward weights with a dynamic reward-by-timestep weight matrix $W$. The method determines these weights through three main components:
- Marginal Constraints: To ensure the user's original preferences are respected, the row sums of $W$ must match the user-specified overall reward budgets ($\lambda$). To prevent any single denoising step from being starved or over-optimized, the column sums are constrained to be equal ($1/T$).
- Rényi Discriminability Gain: ReCAST measures the informativeness of a reward at a specific timestep by calculating the Rényi divergence between the reward-induced "positive" policy and the current policy. The per-step gain isolates the new discriminability contributed by a reward at each specific transition.
- Strong External Proposal Distribution: Estimating these curves directly from the current imperfect policy can lead to degenerate, noisy results. ReCAST uses a stronger external expert generator (e.g., GPT Image 1.5) as a common proposal distribution to reliably map out the reward informativeness curves.
- Sinkhorn Projection: The raw informativeness gains are projected onto the valid constraint space using entropic regularized optimal transport (the Sinkhorn-Knopp algorithm) to yield the final optimal weight matrix $W^*$.
Datasets
The authors evaluated their method by fine-tuning Stable Diffusion 3.5-Medium using the following datasets:
- Pick-a-Pic: A dataset of 25,432 training and 2,048 testing prompts used during an initial warmup stage to optimize baseline rewards (CLIPScore, HPSv2, PickScore).
- Text-Rendering Prompts: 19,652 training and 1,017 testing prompts focused on text generation to evaluate an OCR reward setting.
- GenEval Prompts: 50,000 training and 2,211 testing prompts focused on compositional text-to-image alignment tasks.
Key Insights and Ideas
- Distinct Temporal Signatures: Different rewards peak at completely different stages of generation. Rule-based structural rewards like GenEval and OCR peak sharply at the noisy/early end of the trajectory because global layout is decided early. Conversely, open-domain preference rewards remain more uniform or lean toward the clean end.
- The Danger of Self-Rollouts: Trying to estimate timestep relevance using the model's own current outputs results in a massive collapse of discriminability (up to 200×), making the resulting curves too jagged and unstable to use. Utilizing a stable, high-quality external surrogate generator is essential for smooth weight scheduling.
- Timing Affects Generalization: Even in scenarios where ReCAST matches the training reward scores of a static baseline, it achieves vastly superior performance on completely unseen, held-out judge models. This indicates that optimizing at the right time prevents the model from overfitting to the quirks of the training rewards.
Key Results
The authors evaluated ReCAST against a static baseline across five different reward budgets using Stable Diffusion 3.5-Medium:
- Training Reward Improvements: In the OCR setting, ReCAST raised the aggregate training reward score from 2.867 to 2.920 on average, winning 11 out of 15 matched pairs without sacrificing any individual objective.
- Held-Out Judge Performance: ReCAST consistently outperformed static weighting across four entirely held-out evaluation models (ImageReward, Aesthetic, HPSv3, and UnifiedReward-2) in both the OCR and GenEval training setups.
- Human-Aligned LLM Evaluation: Using the MMRBv2 benchmark with Gemini-3.5-flash as an independent judge, ReCAST achieved a mean overall win rate of 57.2% over the static baseline, showing marked improvements in both prompt faithfulness and aesthetics.
Limitations and Future Work
- Surrogate Bias: ReCAST relies on a single external expert generator as a surrogate for all positive policies. If the surrogate's distribution deviates significantly from a specific reward's true ideal distribution, the estimated gain curves will be biased.
- API Cost and Dependency: Generating the proposal images requires querying proprietary APIs (like GPT Image 1.5), which introduces financial costs (~$35 per curve) and limits offline reproducibility.
- Future Directions: The authors suggest that future work could focus on constructing reward-specific positive policies dynamically or updating the credit assignment curves on-policy as training progresses, eliminating the need for a static external expert.
Summary updated