Temperature-Regulated Stochastic Sampling for Diffusion-Based High-Quality Molecular Generation

Yuyan Ni, Haoming Kong, Bo Qiang, Yanjing Li, Xin Hong, Shikun Feng, Wen Yan, Yanyan LanNeurIPS 2026

TL;DR

Diffusion models are revolutionizing drug discovery and protein design, yet we mostly sample from them using off-the-shelf algorithms built for generating pictures of cats. Because molecules obey strict physical laws rather than forgiving visual aesthetics, standard samplers often "blur" their outputs into physically impossible shapes. This paper introduces TREASSURE, a training-free, plug-and-play sampling upgrade that dials in temperature and randomness to generate dramatically more stable small molecules and higher-quality proteins—all without retraining a single model weight.

What Problem Does This Paper Address?

If a diffusion model generates an image of a dog and shifts a few pixels by a millimeter, nobody notices. If a molecular diffusion model shifts a carbon atom by an angstrom, you violate quantum mechanics, clash electron clouds, and end up with a useless, high-energy chemical wreck.

Valid molecules live on razor-thin, sharply peaked probability manifolds dictated by physics. Yet, when researchers build state-of-the-art molecular and protein generators (like AlphaFold3 or EDM), they typically focus on neural network architectures and treat the sampler—the algorithm that actually denoises random static into a final 3D structure—as an afterthought, borrowing standard setups from computer vision. Due to neural network "spectral bias" (a tendency to learn smooth approximations rather than jagged, high-frequency details), standard samplers over-smooth these sharp molecular peaks, leaking probability mass into invalid, unphysical regions.

Figure 1: Overview of TREASSURE. (A) Molecular distributions are sharply peaked in physically plausible regions, whereas standard samplers over-smooth and leak mass into invalid regions. To address this, (B) from a pretrained original process pt, we introduce a temperature-sharpened reference p(τ) t and a practical reverse process ˜pt that reuses the pretrained score with stochasticity β and noise scaling τ. Theorem 2.1 justifies score reuse for the tempered target and motivates τ annealing; Theorem 2.2 characterizes its instantaneous KL correction under score error. Guided by the analysis, (C) the resulting sampler combines temperature annealing with stochasticity control. (D) It improves sample quality across molecular generation tasks without retraining.

Methods

Instead of retraining massive models, the authors rethink how we walk backward through the diffusion noise using a unified Stochastic Differential Equation (SDE) framework. They parameterize the reverse sampling process using two intuitive knobs:

  1. Temperature ($\tau$): Controls which target distribution you aim for by regulating its sharpness (raising the target density to the power of $1/\tau^2$). Rather than using a constant low temperature—which traps molecules locally and ruins exploration—TREASSURE uses power-law temperature annealing, keeping $\tau$ near 1 early on to explore, and cooling it down only at the very end to snap atoms into low-energy configurations.
  2. Stochasticity ($\beta$, or discrete $\gamma_t$): Controls how you approach that target by balancing deterministic drift against injected random noise. While standard samplers stick to deterministic (DDIM) or standard Markovian (DDPM) regimes, the authors unify these and introduce StoMax ($\gamma_t = 0$), a maximally stochastic variant where conditional noise is completely refreshed at each step.

TREASSURE combines late-stage temperature cooling with tunable stochasticity in a lightweight discrete update rule that drops directly into existing pretrained models at zero extra compute cost.

Datasets

Because TREASSURE is training-free, no new benchmarks are introduced; instead, it is evaluated on established datasets across three distinct biological scales:

  • Small Molecules: QM9 (~134k small organic molecules up to 9 heavy atoms) and GEOM-Drugs (430k drug-like molecules up to 181 atoms).
  • Protein Structure Prediction: Recent PDB test sets (monomers and complexes) and the AlphaFold3 antibody-antigen benchmark (224 paired interfaces), tested via RoseTTAFold3.
  • De Novo Protein Design: Evaluated on 100 unconditionally generated protein backbones (100–300 residues long) using RFdiffusion3 (originally trained on PDB and the AlphaFold Database).

Key Insights and Ideas

  • Free temperature scaling works—if you wait until the end: You might think sampling from a sharper, temperature-scaled distribution requires retraining the score network. Theorem 2.1 proves (without assuming simple Gaussian data) that the original pretrained score naturally approximates the tempered score, provided you are in the low-noise regime ($O(\sigma^2)$ error). Cooling early breaks the math; cooling late is theoretically sound.
  • Noise isn't a bug; it's an active error-corrector: Neural networks inevitably make score-estimation errors. Theorem 2.2 tracks the exact KL-divergence evolution and shows that below a certain score-error threshold, injecting more stochasticity ($\beta$) actively accelerates error correction, scrubbing away accumulated trajectory mistakes.
  • The Stability–Diversity Dial: Jointly cranking up stochasticity and cooling creates a clean, controllable Pareto frontier—trading off structural diversity (uniqueness) for near-perfect physical validity.
Figure 2: Joint variation of temperature and stochasticity by interpolating from DDIM to DDPM.

Key Results

  • Small Molecules: On QM9, TREASSURE boosts EDM's molecular stability by 10.0 percentage points (82.0% $\to$ 92.0%) and validity by 4.6 points (91.9% $\to$ 96.5%). On GEOM-Drugs, EDM atomic stability jumps from 81.3% to 91.3%, and validity hits 99.7%. Bond-length standard deviations shrink by over 30%, matching physical ground truth much more tightly.
  • Faster Sampling: Because high stochasticity corrects errors so aggressively, the StoMax variant uses 10$\times$ fewer denoising steps (100 vs. 1000) than standard DDPM while still achieving better validity-times-uniqueness.
  • Protein Prediction & Design: Plugged into RoseTTAFold3, TREASSURE improves structure prediction lDDT by ~2% and lifts antibody-antigen DockQ success rates from 37.9% to 42.0%. In RFdiffusion3 protein design, it consistently slashes side-chain rotamer loss (e.g., from 0.40 down to 0.26 at matched diversity) while boosting pLDDT and designability.

Limitations and Future Work

  • Mathematical Idealizations: The theoretical proof for temperature scaling assumes globally bounded derivatives. Real physical energy landscapes have violent singularities (like steric clashes where two atoms overlap), meaning the theory formally describes locally smooth, high-probability neighborhoods rather than the entire space.
  • Pointwise vs. Exact Marginals & Continuous Time: Theorem 2.1 justifies temperature scaling at fixed $\tau$, so dynamically annealing $\tau(t)$ isn't guaranteed to track an exact tempered marginal at every intermediate step. Similarly, the error-correction proof assumes continuous time, leaving finite-step discretization errors unmodeled (and full details of general limitations are deferred to Appendix G, outside the main text).
  • Anticorrelated Noise: Setting $\gamma_t < 0$ creates anticorrelated noise steps that could push stochasticity even higher than StoMax—an intriguing regime the authors leave for future exploration.

Summary updated

Abstract

Despite the strong performance of diffusion models in molecular generation, the sampling process itself remains largely understudied, with most existing methods adopting off-the-shelf sampling strategies developed for natural images. Yet unlike natural images, molecular distributions are governed by physical laws and are sharply concentrated, making them particularly challenging for standard samplers, which frequently produce invalid or unphysical structures. In this work, we revisit diffusion sampling from a unified stochastic differential equation (SDE) perspective and introduce a general framework parameterized by two interpretable controls: stochasticity and temperature. Our analysis shows that stochasticity strengthens instantaneous error correction under a bounded score-error condition, while temperature controls distribution sharpness in the low-noise regime. Building on these insights, we develop TReaSSure (Temperature-Regulated Stochastic Sampling), a lightweight, training-free strategy that combines stochasticity scheduling with temperature annealing to better capture the sharply concentrated distributions of molecular data. Extensive experiments on small molecule generation, protein structure prediction, and protein design demonstrate that TReaSSure consistently improves generation quality and produces more physically valid structures. Empirical analyses further corroborate our theoretical findings. The method uses pretrained models without retraining, supporting its practical value across molecular domains.
BibTeX
@inproceedings{ni2026temperature,
  author = {Yuyan Ni and Haoming Kong and Bo Qiang and Yanjing Li and Xin Hong and Shikun Feng and Wen Yan and Yanyan Lan},
  title = {{Temperature-Regulated Stochastic Sampling for Diffusion-Based High-Quality Molecular Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=cRfW6yk3ke},
}

Loading related content...

Figure