NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Metropolis-Adjusted Diffusion Models

Kevin H. Lam, Tyler Farghly, Christopher Williams, Jun Yang, Yee Whye Teh, Arnaud Doucet

TL;DR

Predictor-corrector sampling in diffusion models often relies on the Unadjusted Langevin Algorithm (ULA) for corrections, which introduces its own discretization bias. This paper introduces Metropolis-Adjusted Diffusion Models (MADM), leveraging a clever mathematical identity to compute accept-reject probabilities directly from the score function. The authors provide both an exact method using a Bernoulli factory and a highly efficient approximation using Simpson's rule that consistently improves generated sample quality.

What Problem Does This Paper Address?

Diffusion models generate data by reversing a continuous-time noising process, which is practically implemented using discretized numerical integrators. To combat the accumulation of discretization errors from the "predictor" step, sampling frameworks often use a "corrector" step based on the Unadjusted Langevin Algorithm (ULA).

However, ULA itself is a biased sampler because it uses finite step sizes. In standard Markov Chain Monte Carlo (MCMC), researchers fix this using Metropolis-Hastings adjustments (such as the Metropolis-Adjusted Langevin Algorithm, or MALA). Unfortunately, MALA requires evaluating the ratio of target densities $p_t(\tilde{x})/p_t(x)$ between the proposed state and the current state. In diffusion models, these intermediate marginal densities are completely intractable—we only have access to an estimated score function $\nabla_x \log p_t(x)$. This paper solves the challenge of performing Metropolis-style adjustments using only the score function.

Figure 1: DDM sampling using a probability flow ODE predictor, ULA correction, and MADM correction. Mean distance to the true samples and the 95% sample containment distance are shown. A coarse diffusion schedule and large ULA stepsize are chosen to show the discretisation bias, the same schedule and stepsize are used in MADM to show the bias correction from this method.

Methods

The authors introduce two primary ways to perform Metropolis-adjusted corrections without knowing the underlying density:

  1. The Score-to-Ratio Identity: The foundational trick is rewriting the log-density ratio as a line integral of the score function along the straight-line path connecting the current state $x$ and the proposal $\tilde{x}$: $$\log\left(\frac{p_t(\tilde{x})}{p_t(x)}\right) = \int_0^1 \langle s(x + u(\tilde{x} - x), t), \tilde{x} - x \rangle \, du$$
  2. Exact MADM (Algorithm 2): To achieve an exact correction, the authors use a "two-coin Bernoulli factory" algorithm based on Barker's acceptance rule. By evaluating the score at a Poisson-distributed number of random points along the path, this method produces an exact accept/reject decision without ever calculating the absolute densities.
  3. Approximate MADM (Algorithm 3): Because the exact method requires a variable and potentially high number of score evaluations, the authors propose a deterministic approximation using Simpson's 1/3 rule. By evaluating the score at just one additional point—the midpoint between the current state and the proposal—they achieve a high-order accuracy of $O(h^{5/2})$ in the step size $h$ at near-zero marginal cost.

Datasets

The authors evaluated their approach on two categories of datasets:

  • Synthetic 2D Datasets: Toy problems including a checkerboard pattern, spiral, funnel, Sierpinski triangle, and pinwheel to visually demonstrate discretization bias and correction capabilities.
  • Standard Image Benchmarks: CIFAR-10, FFHQ, AFHQv2, and class-conditional ImageNet-64, utilizing pre-trained models from Karras et al. (2022).

Key Insights and Ideas

  • The Score Encodes the Ratio: The most significant insight is that you do not need the absolute density function to compute exact Metropolis-Hastings or Barker acceptance steps; a line integral over the score function contains the exact same information.
  • Correcting the "Corrector": Traditional ULA corrector steps can actually introduce their own discretization artifacts rather than fixing the predictor's errors. Injecting an accept-reject step ensures the corrector strictly preserves the target marginal distribution.
  • The Power of the Midpoint: The Simpson's rule approximation demonstrates that a single extra neural network forward pass at the path's midpoint provides an incredibly accurate correction, making it highly scalable for real-world image generation pipelines.

Key Results

  • Artifact Removal in 2D: On synthetic 2D datasets, standard predictors or ULA correctors leave a noticeable number of outlier points off the true data support. MADM successfully cleans up these artifacts, pulling samples precisely onto the target geometries.
MADM correction applied to various 2D synthetic datasets, effectively eliminating outliers.
  • Consistent Image Quality Gains: On image datasets, adding just one MADM corrector step per predictor step yielded systematic improvements in Fréchet Inception Distance (FID). For instance, on ImageNet-64 with an Euler predictor, adding MADM improved the FID from 2.41 to 2.25, even outperforming the higher-order Heun predictor baseline (2.32).
ODE Solver PC Sampler CIFAR-10 FFHQ AFHQv2 ImageNet
Heun PF-ODE 1.96 2.47 2.04 2.32
PF-ODE + MADM 1.95 2.43 2.03 2.15
Euler PF-ODE 7.62 4.59 2.93 2.41
PF-ODE + MADM 7.52 4.52 2.91 2.25

Limitations and Future Work

  • Computational Cost of Exactness: The exact Bernoulli factory method requires a random number of score queries, which scales poorly if the score bound $C$ is loose, making it less practical for large image models than the Simpson's rule approximation.
  • Assumption of Perfect Scores: The mathematical guarantees assume that the learned score function is perfectly accurate ($s_\phi(x,t) = \nabla \log p_t(x)$). If the score network itself has high approximation error, the MADM correction will target the wrong distribution.
  • Future Directions: Promising future work includes developing tighter, more efficient data-dependent bounds to accelerate the exact method and exploring how MADM behaves under imperfect or noisy score networks.

Summary updated

BibTeX
@inproceedings{lam2026metropolis,
  author = {Kevin H. Lam and Tyler Farghly and Christopher Williams and Jun Yang and Yee Whye Teh and Arnaud Doucet},
  title = {{Metropolis-Adjusted Diffusion Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=w2X7ALXCZx},
}
Figure