Implicit Diffusion: Efficient Optimization through Stochastic Sampling
Pierre Marion, Anna Korba, Peter Bartlett, Mathieu Blondel, Valentin De Bortoli, Arnaud Doucet, Felipe Llinares-López, Courtney Paquette, Quentin Berthet
TL;DR
The paper addresses optimizing distributions defined implicitly by parameterized stochastic diffusions, turning a distributional problem into a finite-dimensional outer optimization over theta. It introduces Implicit Diffusion, a single-loop framework that jointly updates diffusion parameters and samples, with gradient estimation via implicit differentiation, analytic expressions, and adjoint methods. The authors provide theoretical guarantees for both continuous and discrete Langevin dynamics and a Gaussian denoising case, and demonstrate practical benefits in reward-driven tuning of Langevin and denoising diffusion models. The approach enables efficient finetuning of energy-based models and diffusion models without nested inner loops, with open-source implementation to support reproducibility and broader adoption.
Abstract
We present a new algorithm to optimize distributions defined implicitly by parameterized stochastic diffusions. Doing so allows us to modify the outcome distribution of sampling processes by optimizing over their parameters. We introduce a general framework for first-order optimization of these processes, that performs jointly, in a single loop, optimization and sampling steps. This approach is inspired by recent advances in bilevel optimization and automatic implicit differentiation, leveraging the point of view of sampling as optimization over the space of probability distributions. We provide theoretical guarantees on the performance of our method, as well as experimental results demonstrating its effectiveness. We apply it to training energy-based models and finetuning denoising diffusions.
