TL;DR
Generating high-quality molecules and biological sequences with discrete diffusion models is challenging because their reward functions are often "noisy" and sensitive to small changes. This paper introduces the Clean-Sample Markov Chain (CSMC) Sampler, a novel method that uses a Metropolis-Hastings algorithm to directly optimize clean samples, bypassing the problematic intermediate rewards. CSMC consistently outperforms existing methods, achieving better rewards for molecule and sequence generation tasks.
What Problem Does This Paper Address?
Discrete diffusion models are powerful tools for generating complex data like molecules and DNA sequences. A key goal in these fields is to generate samples that not only resemble the training data but also possess desirable properties, quantified by "reward functions" (e.g., drug-likeness for molecules). However, guiding these models to produce high-reward samples during generation (inference-time scaling) is tricky. Existing methods often rely on "intermediate rewards" calculated at various stages of the diffusion process. The problem is that for scientific data like molecular strings, reward functions are often non-smooth: a tiny change can drastically alter the reward, making intermediate rewards noisy and unreliable. This noise can lead to inefficient exploration and suboptimal results. The authors aim to develop a method that can effectively guide discrete diffusion models towards high-reward samples without relying on these problematic intermediate rewards.
Methods
The core innovation is the Clean-Sample Markov Chain (CSMC) Sampler. Instead of using intermediate rewards, CSMC constructs a Markov chain of clean samples. This chain is built using the Metropolis-Hastings (MH) algorithm, which is known to converge to a target distribution. The target distribution here is the reward-weighted distribution, which favors high-reward samples while staying close to the original data distribution.
The key challenge in applying MH to diffusion models is calculating the acceptance probability, which typically requires knowing the probability of a clean sample, $p(x_0)$, which is intractable. CSMC overcomes this by designing a novel forward-backward proposal distribution. This proposal works by:
- Taking a current clean sample $x_0$.
- Applying the forward diffusion process for a random number of steps to get a noisy sample $x_t$.
- Running the reverse diffusion process for $M$ steps to generate a new candidate clean sample $x'_0$.
Crucially, the authors show that this specific forward-backward proposal distribution allows the intractable terms involving $p(x_0)$ to cancel out in the acceptance probability calculation, making it tractable. This enables efficient sampling guided by accurate, clean rewards.
Datasets
The authors evaluate their method on several datasets:
- QM9: A dataset of small organic molecules.
- ZINC250K: A dataset of commercially available compounds.
- MPRA (Massively Parallel Reporter Assay): A dataset of DNA sequences used for enhancer activity prediction.
They pretrain four different discrete diffusion models (MDM, USM, SEDD-M, SEDD-U) on these datasets.
Key Insights and Ideas
- The "noisy reward" problem is critical: The non-smooth nature of reward functions in scientific domains (like molecular strings) makes intermediate rewards unreliable, hindering effective guidance.
- Directly optimizing clean samples is key: By focusing on the final, clean samples and using the MH algorithm, CSMC sidesteps the noise issue inherent in intermediate rewards.
- A clever proposal distribution is the secret sauce: The forward-backward diffusion process as a proposal mechanism in MH is the technical breakthrough that makes the acceptance probability tractable.
- CSMC is broadly applicable: The method works with various discrete diffusion model architectures (masked and uniform) and doesn't require retraining the diffusion model itself.
Key Results
- Superior Reward: CSMC consistently achieves the highest rewards across all tested datasets and reward functions (QED, ring count, SA for molecules; HepG2 activity for DNA sequences). For example, in molecule generation, CSMC often achieves significantly higher ring counts and QED scores compared to other methods.
- Robustness: The method demonstrates robustness to initialization and is less sensitive to hyperparameters like time parameters ($t_{low}$, $t_{high}$) compared to other methods.
- Efficiency: The "CSMC-B" variant, which uses batching, significantly accelerates sampling while maintaining high rewards.
- Diversity: CSMC maintains good diversity in generated samples, with an average Tanimoto similarity below 0.2 for molecules and cosine similarity below 0.3 for DNA sequences, indicating that the generated samples are not overly clustered.
Limitations and Future Work
- Theoretical Convergence: While the MH algorithm guarantees convergence to the target distribution, this relies on the assumption of a "perfect denoiser." The authors note that the discrepancy between learned marginal distributions and true ones is an area for future research.
- Computational Cost: While CSMC is efficient, it still requires a sufficient number of iterations for the Markov chain to converge. The paper explores varying the number of reverse steps ($M$) in the proposal, finding it doesn't significantly impact rewards but can affect computational cost.
- Future Work: The authors suggest exploring the theoretical guarantees more deeply and potentially combining CSMC with other guidance methods.
Summary updated