MIRA: Towards Mitigating Reward Hacking in Inference-Time Alignment of T2I Diffusion Models

Kevin Zhai, Utsav Singh, Anirudh Thatipelli, Souradip Chakraborty, Anit Kumar Sahu, Furong Huang, Amrit Singh Bedi, Mubarak Shah · DOI

Abstract

Aligning text-to-image (T2I) diffusion models with human preferences often leads to "reward hacking," where models maximize reward scores by generating artifacts or ignoring prompts. We present MIRA (MItigating Reward hAcking), a training-free, inference-time alignment method. By regularizing the image-space distribution using a novel score-based KL surrogate, MIRA prevents semantic drift while achieving superior alignment. Experimental results demonstrate that MIRA achieves an 80.3% human win rate over state-of-the-art baselines without requiring model fine-tuning.

The Problem: Reward Hacking in T2I Models

Aligning T2I models with human preferences (e.g., "make this more aesthetic") typically requires expensive fine-tuning. A more efficient alternative is inference-time noise optimization, which iteratively adjusts the starting noise to steer the model toward high-reward images.

However, these models often engage in reward hacking. They discover that they can achieve massive "Aesthetic Scores" by producing hyper-saturated, weirdly textured images that completely ignore the text prompt. For instance, a model might generate abstract green shapes when asked for a "fly" because those shapes happen to trigger a high score from the reward model.

Visual demonstration of reward hacking. While DNO achieves a higher aesthetic score, it fails to generate the requested "fly," whereas MIRA maintains prompt adherence.

The authors identify a fundamental flaw in previous attempts to fix this: they regularized the noise space. This paper proves that because the denoising process is highly non-linear, even tiny, "regularized" changes in the starting noise can lead to massive, unpredictable drifts in the final image distribution.

Methodology: Image-Space Regularization

MIRA shifts the focus from noise-space constraints to image-space constraints through four key components:

  1. Noise Optimization: MIRA treats the initial noise as a parameter to be optimized via gradient descent based on a reward function.
  2. Image Distribution Regularizer: To prevent the model from drifting away from the prompt, MIRA adds a regularization term that penalizes the KL divergence between the optimized image distribution and the base model's natural distribution.
  3. Tractable KL Surrogate: Since calculating KL divergence for high-dimensional images is computationally prohibitive, MIRA derives a "score-based surrogate" using the diffusion model’s internal score functions. This allows the model to monitor its own "drift" during sampling without extra training.
  4. MIRA-DPO: For non-differentiable rewards (like JPEG file size), the authors adapted Direct Preference Optimization (DPO) to the inference-time setting, allowing MIRA to function even when gradients are unavailable.

Key Results and Performance

Evaluated across benchmarks like SDv1.5 and SDXL, MIRA consistently outperformed existing baselines in both qualitative and quantitative metrics.

  • Human Preference: In head-to-head studies, MIRA achieved an 80.3% win rate against the state-of-the-art baseline (DNO).
  • Prompt Adherence: MIRA maintained higher CLIP scores compared to baselines, ensuring that images remained faithful to the text prompt even as optimization steps increased.
  • Visual Fidelity: MIRA avoids "deep-fried" or "black hole" artifacts. When optimizing for "darkness," for example, MIRA produces a realistic dark image of the subject, whereas baselines often collapse into a solid black square.
Quantitative comparison of MIRA vs. DNO. MIRA avoids the "hacking" regime of high scores with low fidelity, leading to significantly higher human preference win rates.

Notably, MIRA achieves these results with a frozen backbone, making it a "plug-and-play" solution. It also maintains a constant GPU memory footprint (approx. 9GB), significantly lower than competing steering methods that often require over 20GB of VRAM.

Conclusion

MIRA demonstrates that effective alignment does not require expensive fine-tuning or sacrifice semantic integrity. By shifting regularization to the image space and utilizing a tractable KL surrogate, MIRA provides a robust framework for steering diffusion models toward human preferences while effectively mitigating the risks of reward hacking.

Summary updated

BibTeX
@misc{zhai2025mira,
  author = {Kevin Zhai and Utsav Singh and Anirudh Thatipelli and Souradip Chakraborty and Anit Kumar Sahu and Furong Huang and Amrit Singh Bedi and Mubarak Shah},
  title = {{MIRA: Towards Mitigating Reward Hacking in Inference-Time Alignment of T2I Diffusion Models}},
  year = {2025},
  eprint = {2510.01549},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.01549},
}
Figure