Diffusion Paths + Metropolis Correction: A New MCMC Algorithm Solves Multimodal Sampling Challenges

A new MCMC algorithm uses diffusion path interpolation for proposals and path-space Metropolis correction for unbiased multimodal sampling.
Sifan Liu's team at Duke University proposes a diffusion-path-based MCMC sampling algorithm to address the exponential decay of narrow-mode weights in high-dimensional multimodal distributions under traditional tempering. The method linearly interpolates between noise and target samples in sample space, preserving mixture weights, and describes forward noising and reverse denoising with SDEs. To eliminate the bias of the approximate reverse SDE, they construct a volume-preserving deterministic proposal in augmented path space and guarantee asymptotic unbiasedness via Metropolis-Hastings correction. Spectral gap analysis shows the ideal algorithm is insensitive to mode weight imbalance and mixes efficiently as long as modes overlap at the noise end. Experiments show the method outperforms parallel tempering and temperature transition in mode weight correction and local shape learning, but the acceptance rate is sensitive to score estimation error.
Multimodal Distribution Sampling: Pain Points of Traditional MCMC
In Bayesian inference and scientific computing, sampling from unnormalized densities is a fundamental task. Standard MCMC methods rely on local dynamics—random walks or gradient steps—combined with an accept-reject mechanism to guarantee invariance to the target distribution. However, to maintain a high acceptance rate, the step size must typically be small, which makes the algorithm inherently local. When faced with multimodal distributions, the chain struggles to jump from one mode to another, and mixing efficiency drops sharply.
According to Sifan Liu, Assistant Professor in the Department of Statistical Science at Duke University, in an academic talk, her team proposed a new MCMC algorithm that constructs proposal distributions using diffusion paths, eliminates bias through Metropolis-Hastings correction, and significantly outperforms traditional tempering methods in multiple multimodal sampling experiments.
Tempering and Parallel Tempering: Tempering is a class of MCMC strategies that improves mixing by constructing intermediate distributions. The basic idea is to introduce a "temperature" parameter that raises the target density π(x) to the power 1/T, yielding a flatter distribution π_T(x) ∝ π(x)^{1/T}. At high temperatures the distribution is flatter, barriers between modes are lowered, and the chain can move more easily between modes; at low temperatures it approximates the original target. Parallel tempering runs multiple chains at different temperatures simultaneously and allows chains at adjacent temperatures to exchange states, so that low-temperature chains can leverage the exploration ability of high-temperature chains to escape local modes. Temperature transition, on the other hand, gradually lowers the temperature over time on a single chain. The core assumption of such methods is that the high-temperature distribution mixes well, but in high dimensions the weight of narrow modes decays exponentially as temperature increases, causing high-temperature chains to almost never visit narrow modes, and tempering fails.
Limitations of Tempering: "Narrow Peaks Disappear" in High Dimensions
The classic solution is tempering or annealing: construct a sequence of intermediate distributions, lower the energy barriers between modes at higher temperatures, and make it easier for the chain to explore the entire space. Algorithms such as temperature transition are based on this idea.
However, tempering has inherent flaws in high-dimensional scenarios. Liu points out that when the target contains two modes and one is much narrower than the other, raising the temperature causes the weight of the narrow mode to decay exponentially with increasing dimension. This is similar to the explosion problem of importance weights in high dimensions, making it nearly impossible for the algorithm to visit the narrow mode at high temperatures.
Diffusion Paths: Interpolation in Sample Space
The research team's idea is: since what is needed is a sequence of intermediate distributions, tempering is not necessarily required. They choose to interpolate in sample space—taking a linear combination of noise and target samples. When the interpolation coefficient α approaches 1, the distribution approaches the target; when α approaches 0, it approaches a Gaussian distribution (easy to sample). The key advantage of this interpolation is that it preserves mixture weights: if the original target is a mixture distribution, the interpolated distribution has exactly the same weights, and the problem of narrow-peak weights disappearing does not arise.
This process can be described by a stochastic differential equation (SDE). Taking the standard OU process as an example, time advances forward from 0, gradually adding noise to target samples, and the distribution gradually smooths and approaches a Gaussian. But the difficulty is that the reverse process requires the score function at each temperature, whereas in practice only approximate estimates are available.

Score Function and Diffusion Models: In diffusion models, the score function is defined as the gradient of the log density ∇_x log p_t(x), which describes the "gradient direction" of the probability density in space—that is, the direction in which a sample point should move to increase density. The forward process (e.g., the OU process) gradually adds noise to the data, making the distribution approach a Gaussian; the reverse process uses the score function to recover data from noise. However, the reverse SDE requires the score function at every time t, and in practice we can only estimate it from data or the target density. Errors in score estimation accumulate in the reverse process, causing the generated sample distribution to deviate from the target. Therefore, directly sampling on the approximate reverse SDE is biased and requires an additional correction step (such as Metropolis-Hastings) to eliminate the bias.
Metropolis Correction: Eliminating Bias in Path Space
Running the approximate reverse SDE directly introduces bias, including initialization bias, score estimation error, and discretization error. The research team's approach is to perform Metropolis correction in path space.
The specific construction is as follows: starting from the current state X0, use Euler discretization of the forward OU process to obtain X1 through Xn; then starting from Xn, use discretization of the approximate reverse SDE to obtain Yn-1 through Y0, where Y0 is the proposed next state. Since directly computing the transition density from X0 to Y0 is infeasible, they treat the entire path (including all intermediate states of the forward and reverse processes) as an augmented state, define a joint distribution on it, and construct a deterministic proposal—reversing the entire path. The reversal operation is volume-preserving with a Jacobian determinant of 1, so the acceptance probability is simply the ratio of the densities of the two augmented states, which is fully computable.

Liu emphasizes that this result is very general: it does not require a specific discretization scheme, nor a specific score estimation method; as long as the transition densities are computable, the algorithm guarantees that the target distribution is invariant and that the chain is reversible with respect to the target.
Path Space Augmentation and Volume-Preserving Reversal: The key to performing Metropolis correction in path space is to treat the entire forward and reverse trajectories as a high-dimensional augmented state. Specifically, let the forward path be X_{0:n}=(X_0,...,X_n) and the reverse path be Y_{0:n}=(Y_0,...,Y_n), where Y_n=X_n. The proposal mechanism is deterministic: given X_{0:n}, the reverse discretization generates Y_{n-1},...,Y_0, and then the entire path is reversed to obtain a new path (X'_0,...,X'_n)=(Y_0,...,Y_n). Since this transformation is a linear reversal in path space (each component multiplied by -1 and then translated), its Jacobian determinant is 1, so the acceptance probability simplifies to the ratio of the densities of the two augmented states. This volume-preserving property makes the acceptance probability fully computable and independent of the specific discretization format or score estimation method, as long as the forward and reverse transition densities are computable.
Experimental Validation: Dual Correction of Mode Weights and Local Shape
In a 20-dimensional bimodal Gaussian mixture experiment, although uncorrected diffusion sampling can generate samples from both modes, the weights are clearly biased toward the wider mode. After adding Metropolis correction, the weights of the two modes are rebalanced and approach the true distribution, and trace plots show the chain frequently jumping between the two modes. In contrast, adaptive parallel tempering, non-reversible adaptive tempering, and temperature transition either miss the narrow mode or produce severely distorted weights.

In a skew-normal mixture experiment, the uncorrected method fails to learn the skewness of the local modes, and the shape remains close to normal. Metropolis correction corrects the local shape even when the score function has not learned these features. In a weight estimation experiment for a Bayesian Gaussian mixture model, repeated 100 times, this method's weight estimates are mostly close to the true value of 0.5, whereas tempering methods show large fluctuations.
Theoretical Insight: Spectral Gap Insensitive to Mode Weights
The research team analyzed the mixing time of the ideal algorithm (without discretization and score error). In this case the algorithm is equivalent to a two-block data-augmentation Gibbs sampler, i.e., proximal sampling. Its spectral gap can be decomposed into the product of two terms: a cross-mode transition term, which depends only on the product of the Wasserstein distance between modes and the interpolation coefficient; and a within-mode mixing term, which depends only on the strong convexity constant within modes.
The key conclusion is: the spectral gap lower bound is uniform in the mixture weight W, and is unaffected even when the modes are severely imbalanced. This stands in sharp contrast to tempering—tempering is very sensitive to imbalances in the relative scales of modes. To ensure a positive spectral gap, the modes at the noise end must sufficiently overlap, i.e., α times the squared distance must be sufficiently small. This means the diffusion time T need not be large; it suffices to ensure overlap of the modes at the noise end.
Spectral Gap and Mixing Time: In Markov chain theory, the spectral gap is the difference between the second-largest eigenvalue of the transition operator and 1, and it determines the mixing time of the chain—the larger the spectral gap, the faster the chain converges to the invariant distribution. For reversible Markov chains, the mixing time is roughly proportional to 1/spectral gap. Spectral gap lower bound analysis is a standard tool for proving algorithm efficiency. In this paper, the spectral gap of the ideal algorithm decomposes into the product of a cross-mode transition term and a within-mode mixing term, and the lower bound is uniform in the mixture weight W, meaning that even if the weights of the two modes differ greatly, the algorithm can still mix efficiently. In contrast, the spectral gap of tempering decays exponentially with mode weight imbalance, because the weight of narrow modes in the high-temperature distribution becomes extremely small, making them difficult for the chain to visit. This theoretical insight explains why diffusion path interpolation preserves mixture weights, thereby avoiding the "narrow peak disappearance" problem of tempering in high dimensions.
Error Sources and Tuning Guidelines
When Euler-Maruyama discretization is introduced, the rejection probability is on the order of the square root of the step size and can be controlled by reducing the step size. More critically, there is score error: the acceptance probability lower bound is approximately the exponential of the integral of the squared score error, i.e., the exponential of the KL divergence between the approximate SDE and the exact SDE. This makes the acceptance rate relatively sensitive to the quality of score estimation.
Regarding score estimation, since sampling scenarios have no data from the target distribution, the team adopts path-space variational inference, learning drift correction terms through stochastic optimal control. To mitigate the "mode collapse" problem of variational inference, they use initial mode knowledge to construct a Gaussian mixture approximation as the reference process, so that the forward and reverse SDEs of the reference process have closed-form score functions, and only the additional correction term is learned.
For tuning, increasing the number of discretization steps N improves the acceptance rate; increasing T accumulates more score error and discretization error, lowering the acceptance rate, but if T is too small, mode jumps cannot be achieved. Practical advice: first choose a balance point for N and T through preliminary experiments; if the acceptance rate no longer improves as N continues to increase, then decrease T; if the multimodal target cannot be sampled after decreasing T, then the score estimation needs improvement.
Outlook
At the end of the talk, Liu pointed out that this work mainly addresses the question of "how to eliminate bias given a score estimate," and how to obtain more accurate score functions remains an open direction. The acceptance probability depends on the symmetric KL divergence rather than only the reverse KL divergence, suggesting that there may be a better objective function when training score functions. In addition, high-dimensional random effects models may require customized score estimation methods, and the mixing time theory of this algorithm also needs further development.
For researchers working at the intersection of Bayesian computation and generative models, this work provides an important reminder: even if the generative model itself is biased, a correct Metropolis correction layer can still guarantee asymptotically exact sampling results—bias only affects efficiency, not correctness.

Related articles

Google Antigravity Major Update and Gemini 4 Neon's 100 Trillion Tokens
Google Antigravity's major update supports 80+ plugins and multi-Agent collaboration; Gemini 4 Neon surpasses 100 trillion tokens in API calls two weeks after release. This article examines the gap between Agent capability expansion and real-world office task testing, plus signals from ARC Prize, Nvidia model optimization, and Japan rate hike expectations.

Escape the Forbidden Zone 2: Good Bros Build a Sky-High Base While Fixing Zombie Heads, Evacuating the Lab
Bilibili UP host Mi Laozheng's Escape the Forbidden Zone Episode 2: fixing zombie heads, building a sky-high base, and evacuating the lab. Survival strategies, base location logic, and lab crisis with screenshots.

A New Path to AI Wealth: Stop Competing on Content, Go Transform the Physical World
AI's wealth opportunities lie not in content generation and SaaS but in the physical world: using AI to develop drugs, improve food, reshape warfare, print houses, and build human hardware. A conversation breaks down eight frontier directions for AI in the physical world and offers practical advice on choosing tracks like an investor.