Test-Time Alignment of Text-to-Image Diffusion Models via Null-Text Embedding Optimisation
Taehoon Kim, Henry Gouk, Timothy Hospedales
TL;DR
The paper addresses the problem of aligning text-to-image diffusion models to targeted rewards without expensive fine-tuning or vulnerable reward hacking. It introduces Null-Text Test-Time Alignment (Null-TTA), which optimises the unconditional (null-text) embedding in classifier-free guidance to steer the model’s generative distribution within the semantic space defined by the text encoder, coupled with a KL-based regularisation to preserve pretrained behavior. A lightweight backward-process refinement via particle filtering further guides the denoising trajectory toward high-reward regions. Empirically, Null-TTA achieves state-of-the-art target reward performance while maintaining strong cross-reward generalisation and favorable compute/memory efficiency, across both differentiable and non-differentiable reward settings. This semantic-space optimisation framework establishes a principled, training-free paradigm for reliable inference-time alignment of diffusion models with broad practical impact.
Abstract
Test-time alignment (TTA) aims to adapt models to specific rewards during inference. However, existing methods tend to either under-optimise or over-optimise (reward hack) the target reward function. We propose Null-Text Test-Time Alignment (Null-TTA), which aligns diffusion models by optimising the unconditional embedding in classifier-free guidance, rather than manipulating latent or noise variables. Due to the structured semantic nature of the text embedding space, this ensures alignment occurs on a semantically coherent manifold and prevents reward hacking (exploiting non-semantic noise patterns to improve the reward). Since the unconditional embedding in classifier-free guidance serves as the anchor for the model's generative distribution, Null-TTA directly steers model's generative distribution towards the target reward rather than just adjusting the samples, even without updating model parameters. Thanks to these desirable properties, we show that Null-TTA achieves state-of-the-art target test-time alignment while maintaining strong cross-reward generalisation. This establishes semantic-space optimisation as an effective and principled novel paradigm for TTA.
