Inference-Time Alignment of Diffusion Models via Evolutionary Algorithms
Purvish Jajal, Nick John Eliopoulos, Benjamin Shiue-Hal Chou, George K. Thiruvathukal, James C. Davis, Yung-Hsiang Lu
TL;DR
This work addresses aligning diffusion-model outputs to downstream objectives without access to gradients or internal states by proposing inference-time, black-box optimization over latent noise using evolutionary algorithms. It introduces two latent-space formulations (direct noise search and noise-transform search) and two representative EA families (Genetic Algorithms and Natural Evolutionary Strategies), evaluated across DrawBench and Open Image Preferences with multiple reward functions. Results show that evolutionary approaches, particularly CoSyNE and SNES, often outperform gradient-based and gradient-free baselines in short-horizon settings while offering substantial memory and speed advantages, and they remain compatible with fine-tuning alignment methods. The findings highlight a scalable, model-agnostic toolkit for practical diffusion-model alignment, with caveats around long-horizon optimization and potential reward hacking, motivating future EA-tailored designs for extended horizons.
Abstract
Diffusion models are state-of-the-art generative models, yet their samples often fail to satisfy application objectives such as safety constraints or domain-specific validity. Existing techniques for alignment require gradients, internal model access, or large computational budgets resulting in high compute demands, or lack of support for certain objectives. In response, we introduce an inference-time alignment framework based on evolutionary algorithms. We treat diffusion models as black boxes and search their latent space to maximize alignment objectives. Given equal or less running time, our method achieves 3-35% higher ImageReward scores than gradient-free and gradient-based methods. On the Open Image Preferences dataset, our method achieves competitive results across four popular alignment objectives. In terms of computational efficiency, we require 55% to 76% less GPU memory and are 72% to 80% faster than gradient-based methods.
