Training-free Diffusion Model Alignment with Sampling Demons
Po-Hung Yeh, Kuang-Huei Lee, Jun-Cheng Chen
TL;DR
This work tackles the challenge of aligning pre-trained diffusion-based image generation with user preferences without retraining. It introduces Demon, an inference-time, stochastic-noise optimization framework that guides denoising by shaping reverse-time perturbations, accommodating non-differentiable reward signals such as VLM API outputs and human judgments. Two concrete variants, Tanh Demon and Boltzmann Demon, are proposed, each with theoretical guarantees on improving the final reward over standard PF-ODE-based sampling. The authors provide a rigorous link between the reward estimate r_beta and its ODE proxy r ∘ c, and demonstrate substantial improvements in aesthetics and alignment across SD v1.4/XL under various reward objectives, all without backpropagation or retraining. The approach is plug-and-play and scalable, broadening the practical use of diffusion systems by leveraging non-differentiable and human-derived signals while offering a public implementation.
Abstract
Aligning diffusion models with user preferences has been a key challenge. Existing methods for aligning diffusion models either require retraining or are limited to differentiable reward functions. To address these limitations, we propose a stochastic optimization approach, dubbed Demon, to guide the denoising process at inference time without backpropagation through reward functions or model retraining. Our approach works by controlling noise distribution in denoising steps to concentrate density on regions corresponding to high rewards through stochastic optimization. We provide comprehensive theoretical and empirical evidence to support and validate our approach, including experiments that use non-differentiable sources of rewards such as Visual-Language Model (VLM) APIs and human judgements. To the best of our knowledge, the proposed approach is the first inference-time, backpropagation-free preference alignment method for diffusion models. Our method can be easily integrated with existing diffusion models without further training. Our experiments show that the proposed approach significantly improves the average aesthetics scores for text-to-image generation. Implementation is available at https://github.com/aiiu-lab/DemonSampling.
