Skip to main content
QUICK REVIEW

[Paper Review] Diffusion models as plug-and-play priors

Alexandros Graikos, Nikolay Malkin|arXiv (Cornell University)|Jun 17, 2022
Bayesian Methods and Mixture ModelsComputer Science42 citations
TL;DR

The paper shows how independently trained denoising diffusion probabilistic models (DDPMs) can serve as plug-and-play priors for inference under differentiable constraints, enabling conditional generation, image segmentation, and continuous relaxations of combinatorial problems.

ABSTRACT

We consider the problem of inferring high-dimensional data $\mathbf{x}$ in a model that consists of a prior $p(\mathbf{x})$ and an auxiliary differentiable constraint $c(\mathbf{x},\mathbf{y})$ on $x$ given some additional information $\mathbf{y}$. In this paper, the prior is an independently trained denoising diffusion generative model. The auxiliary constraint is expected to have a differentiable form, but can come from diverse sources. The possibility of such inference turns diffusion models into plug-and-play modules, thereby allowing a range of potential applications in adapting models to new domains and tasks, such as conditional generation or image segmentation. The structure of diffusion models allows us to perform approximate inference by iterating differentiation through the fixed denoising network enriched with different amounts of noise at each step. Considering many noised versions of $\mathbf{x}$ in evaluation of its fitness is a novel search mechanism that may lead to new algorithms for solving combinatorial optimization problems.

Motivation & Objective

  • Introduce a framework where a pretrained DDPM acts as a prior p(x) in a model with a differentiable constraint c(x,y).
  • Demonstrate that inference can be performed by gradient-based optimization over a single latent variable using the DDPM's denoising network.
  • Showcase applications to conditional image generation, segmentation, and continuous relaxations of combinatorial problems.
  • Highlight that no additional training or finetuning of the DDPM is required for these plug-and-play uses.

Proposed method

  • Formulate p(x|y) up to a normalizing constant via a free energy F and approximate q(x) with a delta or Gaussian centered at a latent η.
  • Use the DDPM forward-noising process to compute expectations and derive a squared-error loss in ε-space for reconstruction, leading to a practical optimization objective (Equation 12).
  • Execute gradient-based optimization with respect to η (or y in latent-cased setups) while annealing time steps t to explore coarse-to-fine modes.
  • Leverage a pretrained DDPM without joint training of the constraint model, enabling off-the-shelf conditioning through differentiable constraints c(x,y).
  • We also discuss alternative posterior approximations and latent-space formulations to broaden applicability.

Experimental results

Research questions

  • RQ1Can an independently trained DDPM be used as a plug-and-play prior in the presence of differentiable constraints without retraining?
  • RQ2How can gradient-based inference over a DDPM latent or pixel-space representation yield high-lidelity, constrained samples in vision tasks?
  • RQ3What are effective conditioning strategies (e.g., classifier-based, weak-labels, color clustering) for conditional generation and segmentation using DDPM priors?
  • RQ4Can DDPMs enable continuous relaxations of combinatorial problems like the traveling salesman problem through latent-variable inference?
  • RQ5What are practical inference strategies (e.g., annealing schedules, initialization choices) that yield robust results across domains?

Key findings

  • A pretrained DDPM can be used as a prior to infer samples that satisfy a differentiable constraint, enabling conditional generation and segmentation without retraining.
  • Optimization over the DDPM’s latent/denoising space, guided by a constraint term log c(x,y), produces realistic samples that meet the desired condition (e.g., classifying attributes or weak labels).
  • In MNIST and CelebA-based experiments, the method yields conditional digits and faces with targeted attributes while preserving image realism due to the DDPM prior.
  • For semantic segmentation, the approach achieves competitive accuracy and IoU in EnviroAtlas across diverse geographies, demonstrating domain transfer capabilities.
  • In a continuous-relaxation TSP setup, the diffusion model infers latent adjacency structures that, after 2-opt refinement, yield tours within a small percentage of the optimum, showing competitive performance without discrete combinatorial solvers.
  • The methodology operates entirely in image space, enabling sublinear scaling under certain encoding schemes and leveraging visual priors for structured inference.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.