Covariance-Adaptive Sequential Black-box Optimization for Diffusion Targeted Generation

Yueming Lyu, Kim Yong Tan, Yew-Soon Ong, Ivor TsangarXiv 2024

Abstract

Diffusion models have demonstrated great potential in generating high-quality content for images, natural language, protein domains, etc. However, how to perform user-preferred targeted generation via diffusion models with only black-box target scores of users remains challenging. To address this issue, we first formulate the fine-tuning of the targeted reserve-time stochastic differential equation (SDE) associated with a pre-trained diffusion model as a sequential black-box optimization problem. Furthermore, we propose a novel covariance-adaptive sequential optimization algorithm (CASBO) to optimize cumulative black-box scores under unknown transition dynamics. Theoretically, we prove a $O(\frac{d^2}{\sqrt{T}})$ convergence rate for cumulative convex functions without smooth and strongly convex assumptions. Empirically, experiments on both numerical test problems and target-guided 3D-molecule generation tasks show the superior performance of our method in achieving better target scores.

Introduction

Diffusion models are the powerhouses behind modern AI art and drug discovery, but they face a significant "steering" problem. Generating content toward specific targets—such as a molecule with high binding affinity—typically requires calculating gradients for the target goal. However, in many real-world scenarios, we only have access to a black-box score from a simulator, which provides feedback without indicating how to improve the output. Furthermore, the high-dimensional, multi-step nature of diffusion processes makes standard optimization computationally overwhelming.

The CASBO Framework

To overcome these challenges, researchers introduced CASBO (Covariance-Adaptive Sequential Black-box Optimization). This framework treats the fine-tuning of a diffusion model's reverse-time Stochastic Differential Equation (SDE) as a sequential black-box optimization problem.

Key technical components include:

  • Sequential Formulation: CASBO explicitly models the transition dynamics between each step of the diffusion process rather than treating the output as a single vector.
  • Covariance Adaptation: The algorithm performs full covariance matrix updates to capture second-order information about the search landscape, which is crucial for navigating "ill-conditioned" problems.
  • The $\gamma_t$ Trick: A technical enlargement term added to gradient updates ensures convergence even when dealing with non-smooth or complex functions.
Definitions of the numerical benchmark functions (Rastrigin-10, L1-Ellipsoid, and Levy) used to evaluate the optimization performance.

Experimental Evaluation

Numerical Benchmarks

The researchers evaluated CASBO against standard optimizers like CMA-ES and TuRBO using mathematical "torture tests" modified for unknown transition dynamics. As shown in the results below, CASBO (labeled as BDTG in the figures) consistently outperformed the baselines, demonstrating faster and more stable convergence across different objective landscapes.

Performance comparison of CASBO (BDTG) against CMA-ES and TuRBO on three numerical benchmarks. CASBO achieves lower objective values more efficiently.

Real-World Applications

Beyond numerical tests, the method was applied to complex generative tasks:

  • 3D-Molecule Generation: Using the CrossDocked2020 dataset, CASBO minimized Vina docking scores for six different protein receptors, consistently achieving better binding affinity than baselines.
  • Targeted Image Generation: CASBO steered Stable Diffusion v2.1 to generate specific concepts, such as "a white puppy with golden wings," raising the average CLIP score from 0.3084 to 0.4274 over 300 steps.

Key Insights

  • Trajectory Matters: Explicitly handling the sequential history of diffusion makes optimization significantly more efficient than "flat" optimizers.
  • Gradient-Free Steering: The method proves that sophisticated fine-tuning is possible without a differentiable pipeline, allowing complex scientific simulators to guide generative AI.
  • Robustness: Unlike TuRBO, which can suffer from objective value spikes due to local restarts, CASBO maintains stability throughout the optimization process.

Conclusion

CASBO represents a fundamental improvement for guided diffusion, offering a provably convergent way to steer models using non-differentiable feedback. While future work may address potential reductions in output diversity, the current framework successfully bridges the gap between high-fidelity generative models and complex, black-box evaluation metrics.

Summary updated

BibTeX
@misc{lyu2024covariance,
  author = {Yueming Lyu and Kim Yong Tan and Yew-Soon Ong and Ivor Tsang},
  title = {{Covariance-Adaptive Sequential Black-box Optimization for Diffusion Targeted Generation}},
  year = {2024},
  url = {https://openreview.net/forum?id=piI1BuEnTM},
}
Figure