Practical and Asymptotically Exact Conditional Sampling in Diffusion Models

Luhuan Wu, Brian L. Trippe, Christian A. Naesseth, David M. Blei, John P. Cunningham
6/30/2023
stat.MLcs.LGq-bio.BM

Official code: blt2114/twisted_diffusion_sampler (50 stars, last commit 2024-11-24).

Abstract

Diffusion models have been successful on a range of conditional generation tasks including molecular design and text-to-image generation. However, these achievements have primarily depended on task-specific conditional training or error-prone heuristic approximations. Ideally, a conditional generation method should provide exact samples for a broad range of conditional distributions without requiring task-specific training. To this end, we introduce the Twisted Diffusion Sampler, or TDS. TDS is a sequential Monte Carlo (SMC) algorithm that targets the conditional distributions of diffusion models through simulating a set of weighted particles. The main idea is to use twisting, an SMC technique that enjoys good computational efficiency, to incorporate heuristic approximations without compromising asymptotic exactness. We first find in simulation and in conditional image generation tasks that TDS provides a computational statistical trade-off, yielding more accurate approximations with many particles but with empirical improvements over heuristics with as few as two particles. We then turn to motif-scaffolding, a core task in protein design, using a TDS extension to Riemannian diffusion models. On benchmark test cases, TDS allows flexible conditioning criteria and often outperforms the state of the art.

View on arXivView PDF

Code Implementations(1)

Practically and asymptotically accurate conditional sampling from diffusion generative models without conditional training

5011Shell, PythonJul 4, 20231 years ago

Similar Papers

Cite this paper

@article{wu2023practical,
  title  = {Practical and Asymptotically Exact Conditional Sampling in Diffusion Models},
  author = {Luhuan Wu and Brian L. Trippe and Christian A. Naesseth and David M. Blei and John P. Cunningham},
  year   = {2023},
  eprint = {2306.17775},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2306.17775v2},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.17775.svg)](https://codeofpaper.com/paper/2306.17775)

Discussion