Inference-Time Alignment of Diffusion Models with Direct Noise Optimization (2405.18881v3)
Abstract: In this work, we focus on the alignment problem of diffusion models with a continuous reward function, which represents specific objectives for downstream tasks, such as increasing darkness or improving the aesthetics of images. The central goal of the alignment problem is to adjust the distribution learned by diffusion models such that the generated samples maximize the target reward function. We propose a novel alignment approach, named Direct Noise Optimization (DNO), that optimizes the injected noise during the sampling process of diffusion models. By design, DNO operates at inference-time, and thus is tuning-free and prompt-agnostic, with the alignment occurring in an online fashion during generation. We rigorously study the theoretical properties of DNO and also propose variants to deal with non-differentiable reward functions. Furthermore, we identify that naive implementation of DNO occasionally suffers from the out-of-distribution reward hacking problem, where optimized samples have high rewards but are no longer in the support of the pretrained distribution. To remedy this issue, we leverage classical high-dimensional statistics theory to an effective probability regularization technique. We conduct extensive experiments on several important reward functions and demonstrate that the proposed DNO approach can achieve state-of-the-art reward scores within a reasonable time budget for generation.
- Training a helpful and harmless assistant with reinforcement learning from human feedback. arXiv preprint arXiv:2204.05862, 2022.
- D-flow: Differentiating through flows for controlled generation. arXiv preprint arXiv:2402.14017, 2024.
- Dimitri P Bertsekas. Nonlinear programming. Journal of the Operational Research Society, 48(3):334–334, 1997.
- Training diffusion models with reinforcement learning. arXiv preprint arXiv:2305.13301, 2023.
- Odin: Disentangled reward mitigates hacking in rlhf. arXiv preprint arXiv:2402.07319, 2024a.
- Id-aligner: Enhancing identity-preserving text-to-image generation with reward feedback learning, 2024b.
- Directly fine-tuning diffusion models on differentiable rewards. arXiv preprint arXiv:2309.17400, 2023.
- Prdp: Proximal reward difference prediction for large-scale reward finetuning of diffusion models. arXiv preprint arXiv:2402.08714, 2024.
- Diffusion models beat gans on image synthesis. Advances in Neural Information Processing Systems, 34:8780–8794, 2021.
- Raft: Reward ranked finetuning for generative foundation model alignment. arXiv preprint arXiv:2304.06767, 2023.
- Dpok: Reinforcement learning for fine-tuning text-to-image diffusion models, 2023.
- One-step diffusion distillation via deep equilibrium models. arXiv preprint arXiv:2401.08639, 2023.
- Reinforced self-training (rest) for language modeling, 2023.
- Pulid: Pure and lightning id customization via contrastive alignment, 2024.
- Optimizing prompts for text-to-image generation. arXiv preprint arXiv:2212.09611, 2022.
- Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in neural information processing systems, 30, 2017.
- Classifier-free diffusion guidance. arXiv preprint arXiv:2207.12598, 2022.
- Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems, 33:6840–6851, 2020.
- Imagen video: High definition video generation with diffusion models. arXiv preprint arXiv:2210.02303, 2022.
- Aligning language models with offline learning from human feedback, 2023.
- Elucidating the design space of diffusion-based generative models. Advances in Neural Information Processing Systems, 35:26565–26577, 2022.
- Optimizing diffusion noise can serve as universal motion priors. arXiv preprint arXiv:2312.11994, 2023.
- Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
- Pick-a-pic: An open dataset of user preferences for text-to-image generation, 2023.
- Pretraining language models with human preferences, 2023.
- Improved precision and recall metric for assessing generative models, 2019.
- Blip-2: Bootstrapping language-image pre-training with frozen image encoders and large language models, 2023.
- Languages are rewards: Hindsight finetuning using human feedback, 2023a. URL https://arxiv.org/abs/2302.02676.
- Instaflow: One step is enough for high-quality diffusion-based text-to-image generation. arXiv preprint arXiv:2309.06380, 2023b.
- Dpm-solver: A fast ode solver for diffusion probabilistic model sampling in around 10 steps. arXiv preprint arXiv:2206.00927, 2022.
- SDEdit: Guided image synthesis and editing with stochastic differential equations. In International Conference on Learning Representations, 2022.
- On distillation of guided diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14297–14306, 2023.
- Mitigating reward hacking via information-theoretic reward modeling. arXiv preprint arXiv:2402.09345, 2024.
- Controlled decoding from language models, 2023.
- Random gradient-free minimization of convex functions. Foundations of Computational Mathematics, 17(2):527–566, 2017.
- Ditto: Diffusion inference-time t-optimization for music generation. arXiv preprint arXiv:2401.12179, 2024.
- OpenAI. Chatgpt,https://openai.com/ blog/chatgpt/, 2022. URL https://openai.com/blog/chatgpt/.
- Training language models to follow instructions with human feedback. arXiv preprint arXiv:2203.02155, 2022.
- Pytorch: An imperative style, high-performance deep learning library. Advances in neural information processing systems, 32, 2019.
- Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 4195–4205, 2023.
- SDXL: Improving latent diffusion models for high-resolution image synthesis. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=di52zR8xgf.
- Aligning text-to-image diffusion models with reward backpropagation, 2023.
- Learning transferable visual models from natural language supervision. In International conference on machine learning, pages 8748–8763. PMLR, 2021.
- High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10684–10695, 2022.
- Progressive distillation for fast sampling of diffusion models. arXiv preprint arXiv:2202.00512, 2022.
- Improved techniques for training gans. Advances in neural information processing systems, 29, 2016.
- Adversarial diffusion distillation. arXiv preprint arXiv:2311.17042, 2023.
- Laion-5b: An open large-scale dataset for training next generation image-text models, 2022a.
- Laion-5b: An open large-scale dataset for training next generation image-text models. Advances in Neural Information Processing Systems, 35:25278–25294, 2022b.
- Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020a.
- Loss-guided diffusion models for plug-and-play controllable generation. In International Conference on Machine Learning, pages 32483–32498. PMLR, 2023a.
- Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456, 2020b.
- Consistency models. arXiv preprint arXiv:2303.01469, 2023b.
- Learning to summarize with human feedback. Advances in Neural Information Processing Systems, 33:3008–3021, 2020.
- Dreamsync: Aligning text-to-image generation with image understanding feedback, 2023.
- Zeroth-order optimization meets human feedback: Provable learning via ranking oracles. In The Twelfth International Conference on Learning Representations, 2024a. URL https://openreview.net/forum?id=TVDUVpgu9s.
- Accelerating parallel sampling of diffusion models. arXiv preprint arXiv:2402.09970, 2024b.
- Llama 2: Open foundation and fine-tuned chat models, 2023.
- Feedback efficient online fine-tuning of diffusion models. arXiv preprint arXiv:2402.16359, 2024.
- Martin J Wainwright. High-dimensional statistics: A non-asymptotic viewpoint, volume 48. Cambridge university press, 2019.
- Diffusion model alignment using direct preference optimization. arXiv preprint arXiv:2311.12908, 2023a.
- End-to-end diffusion latent optimization improves classifier guidance. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7280–7290, 2023b.
- Openchat: Advancing open-source language models with mixed-quality data, 2023a.
- Finetuned multimodal language models are high-quality image-text data filters. arXiv preprint arXiv:2403.02677, 2024.
- Diffusiondb: A large-scale prompt gallery dataset for text-to-image generative models, 2023b.
- Human preference score v2: A solid benchmark for evaluating human preferences of text-to-image synthesis, 2023.
- Seeing and hearing: Open-domain visual-audio generation with diffusion latent aligners. arXiv preprint arXiv:2402.17723, 2024.
- Imagereward: Learning and evaluating human preferences for text-to-image generation, 2023.
- Diffusion models: A comprehensive survey of methods and applications. ACM Computing Surveys, 56(4):1–39, 2023.
- Reward-directed conditional diffusion: Provable distribution estimation and reward improvement, 2023.
- Self-play fine-tuning of diffusion models for text-to-image generation. arXiv preprint arXiv:2402.10210, 2024.
- Hive: Harnessing human feedback for instructional visual editing. arXiv preprint arXiv:2303.09618, 2023.
- Unipc: A unified predictor-corrector framework for fast sampling of diffusion models. arXiv preprint arXiv:2302.04867, 2023.
- Zhiwei Tang (9 papers)
- Jiangweizhi Peng (2 papers)
- Jiasheng Tang (16 papers)
- Mingyi Hong (172 papers)
- Fan Wang (313 papers)
- Tsung-Hui Chang (87 papers)