CREPE: Controlling Diffusion with Replica Exchange

Jiajun He, Paul Jeha, Peter Potaptchik, Leo Zhang, José Miguel Hernández-Lobato, Yuanqi Du, Saifuddin Syed, Francisco Vargas

TL;DR

CREPE (Controlling with REPlica Exchange) introduces a parallel tempering framework for the inference-time control of diffusion models, offering a powerful alternative to standard Sequential Monte Carlo (SMC) methods. By running Markov chains across different denoising steps in parallel, CREPE generates highly diverse samples sequentially, avoids mode collapse, and allows researchers to dynamically add or refine constraints on the fly without retraining the model.

What Problem Does This Paper Address?

Diffusion models excel at generating high-quality data, but steering their outputs to satisfy specific constraints at inference time—such as matching a specific text prompt, maximizing a reward function, or combining multiple models—remains a challenge.

Currently, researchers rely heavily on Sequential Monte Carlo (SMC) frameworks to debias these steered trajectories. However, SMC has three major drawbacks:

  1. Memory Intensity: It requires maintaining a massive batch of particles simultaneously throughout the denoising process.
  2. Poor Sample Diversity: Due to repeated importance resampling steps, SMC is highly prone to mode collapse, especially when particle counts are low.
  3. Rigidity: Once the denoising process finishes, the samples are locked in. If the results are unsatisfactory or constraints change, you have to restart the entire generation from scratch.

Methods

CREPE addresses these limitations by adapting Parallel Tempering (PT)—specifically Accelerated PT (APT)—to the diffusion setting.

Mathematically, CREPE acts as a computational "dual" to SMC by flipping the axes of time and parallelism. While SMC propagates a large batch of particles in parallel through sequential time steps, CREPE runs chains at different noise/diffusion levels in parallel and generates particles sequentially over iterations.

Figure 2: Comparison between diffusion inference-time control with SMC and CREPE. We visualise the diffusion process using colour shading: darker colours correspond to higher noise/mask levels (large t), while brighter colours indicate states closer to the data distribution (small t). SMC (Left): particles are initialised at t = 1 and progressively denoised towards lower noise levels. During denoising, importance resampling is applied to select particles that better satisfy the imposed constraints. CREPE (Right): particles are initialised at several different diffusion steps, and they undergo local exploration and communication in parallel, evolving them towards desired constraints. The example shows using SMC and CREPE to debias classifier-free guidance.

To make parallel tempering work with pretrained diffusion models (where explicit target densities are unknown), the authors utilize the Radon-Nikodym Estimator (RNE). The RNE allows them to analytically compute the swap acceptance probabilities between adjacent diffusion steps based purely on the path integrals of the proposal and diffusion drifts.

CREPE is highly versatile, natively supporting both continuous Gaussian diffusions and discrete Markov chain (CTMC) mask diffusions. It also optionally incorporates local exploration steps, such as the Unadjusted Langevin Algorithm (ULA), to accelerate mixing.

Datasets

The authors evaluated CREPE across a diverse set of modalities and tasks:

  • Molecules: Alanine Dipeptide, Tetrapeptide, and Hexapeptide datasets derived from 5-microsecond molecular dynamics simulations.
  • Images: ImageNet-64 and ImageNet-512 (using pretrained EDM2 models), as well as MNIST for discrete diffusion testing.
  • Trajectories: The pointmaze-giant-stitch-v0 dataset, consisting of short 2D maze trajectories.
  • Text: The SST-2 sentiment control dataset, utilized alongside a finetuned SEDD-Medium discrete diffusion model.

Key Insights and Ideas

  • The Space-Time Flip: The core conceptual breakthrough is realizing that parallel tempering can bypass the particle-dependency bottleneck of SMC. By parallelizing across noise levels rather than particle counts, CREPE maintains a steady computational footprint while generating an arbitrary number of samples sequentially.
  • Preserving the True Distribution Weights: In multimodal spaces (like molecular configurations), mini-batch SMC often collapses into a single mode because its resampling step acts locally. CREPE avoids this entirely; after a brief burn-in period, it naturally explores and preserves the true relative weights of different modes.
  • Anytime Inference and Online Refinement: Because CREPE continuously updates its chains, it functions as an "anytime" algorithm. More importantly, it allows for online refinement—you can inject a brand-new constraint mid-run, and the system will dynamically adapt the existing samples to satisfy it.

Key Results

  • Molecular Tempering: On the complex Alanine Hexapeptide task, CREPE achieved significantly lower Total Variation Distance (TVD) and Wasserstein-2 (W2) distances compared to SMC baselines, demonstrating vastly superior mode coverage.
  • Image Debiasing & Reward Tilting: When debiasing Classifier-Free Guidance (CFG) on ImageNet-64, CREPE scaled exceptionally well with sample size, achieving an FID of 1.79 (compared to 1.96 for the SMC-based FKC method at 512 samples) while maintaining much higher visual diversity.
Figure 1: Trajectory of images generated using CREPE for prompted reward-tilting on ImageNet-512, thinned every 8 iterations. After burn-in, the samples align closely with the prompt.
  • Maze Trajectory Stitching: CREPE successfully stitched short trajectories together using a composite reward function, achieving a final success rate of 84.6%. When an intermediate target was introduced online at iteration 100k, the model adapted within just 1k iterations.
  • Discrete Text Diffusion: In sentiment-controlled text generation, CREPE reduced text perplexity by up to a factor of 5 compared to SMC at high target strengths, effectively mitigating the distribution distortion typically induced by aggressive classifier-free guidance.

Limitations and Future Work

Despite its advantages, CREPE has a few notable limitations:

  • Burn-in Overhead: The algorithm requires an initial burn-in period, meaning the first few hundred or thousand samples are highly biased and must be discarded. This can introduce a high upfront computational cost.
  • Error Accumulation: The communication swap rate relies on an approximation that assumes a perfect diffusion model. In practice, discretisation errors can accumulate over thousands of iterations, potentially causing deviations from the exact target distribution.

For future work, the authors suggest exploring advanced schedule-tuning and path-selection techniques from classical MCMC literature to optimize the noise-level spacing and further accelerate mixing.

Summary updated

BibTeX
@inproceedings{he2026crepe,
  author = {Jiajun He and Paul Jeha and Peter Potaptchik and Leo Zhang and José Miguel Hernández-Lobato and Yuanqi Du and Saifuddin Syed and Francisco Vargas},
  title = {{CREPE: Controlling Diffusion with Replica Exchange}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=uOZRWcbiZl},
}
Figure