Restrained Diffusion Bridges: Targeted Denoiser Training and Refinement
Authors: Xuanxi Zhang, Kevin S. Cheng, Weizhou Wang, Aaron R. Dinner, Jonathan Weare
Organizations: Courant Institute School of Mathematics, Computing, and Data Science, New York University, New York, New York 10012, United States · Department of Chemistry and James Franck Institute, University of Chicago, Chicago, Illinois 60637, United States
Diffusion models are often inaccurate in critical, data-sparse regions of the target distribution. Sampling from restrained distributions, biased distributions used in classical enhanced sampling to concentrate data near chosen configurations, can control where training data are collected but biases the learned distribution. We establish that this bias cancels exactly when forward noising from restrained data is conditioned on the restrained configuration at an appropriately chosen intermediate time. This allows a pretrained model fine-tuned on restrained data to achieve high accuracy in any chosen region of the target distribution, regardless of its probability, using standard denoising or flow matching objectives without importance weights. When no target data are available, Gibbs sampling enables inference from a model trained exclusively on restrained data.
Figures & tables
Figure 1: Conceptual overview of Restrained Diffusion Bridges (RDBs). (a) Standard training provides many trajectories to the dominant mode of π but few to the rare mode. (b) Multiplying π (blue dashed) by the Gaussian restraint (red dashed) gives the restrained target p(⋅∣z) (orange). Restrained endpoints and bridges pinned at xt∗=αt∗z focus fine-tuning on the rare region while recovering the score of π . (c) Algorithm 1 uses the pretrained model from T to t∗ and the fine-tuned model from t∗ to 0 . Algorithm 2 alternates the reverse bridge with z∼N(x0,s2I) using only the fine-tuned model
Figure 2: (a) The Müller–Brown potential with the central basin outlined in red. (b) Free-energy profile along x2 , βF^(x2)=−lnp(x2) , at β=2.00 for a representative sampling run of each method against the exact profile; the shaded band marks the extent of the central basin in x2 . The restrained sampler recovers the central basin, whereas the baseline does not. (c) Central-basin occupancy relative to its reference value from quadrature, ppred/pref , against inverse temperature β for the restrained sampler at t∗=0.02 and for the budget-matched baseline. Raw occupancy values are plotted in Appendix E . Median (dots and diamonds) and interquartile range (shading) are plotted for twenty independently seeded inference runs.
Figure 3: Results for isomerization of the alanine dipeptide in explicit solvent. (a) Free energy as a function of the Ramachandran angles, with the five basins that we characterize marked. (b) Generated R5 population versus training updates at a fixed 25.25μs MD budget; synthetic-pair refinement branches at 20,000 updates. (c) Generated R5 population versus matched MD budget at 50,000 updates. Curves and bars show medians over 20 training runs, and bands and error bars show interquartile ranges. Dashed lines indicate the reference value.
Figure 4: Results for chignolin in implicit solvent. (a) Free energy in the (NO1,NO2) plane estimated from the 20μs reference ensemble, with folded and misfolded regions outlined. (b) Generated misfolded population versus training updates at a fixed 22μs MD budget. Synthetic-pair refinement branches at 80,000 updates. (c) Generated misfolded population versus total MD budget at 160,000 total updates. Synthetic-pair refinement uses t∗=0.30 . Curves and bars show medians over 10 training runs, and bands and error bars show interquartile ranges. Dashed lines indicate the reference value.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: (a) The raw values of central-basin occupancy plotted in Figure 2 (c). For β=3 , the baseline model gives zero occupancy. (b) Central-basin occupancy relative to its exact value, ppred/pref , against t∗ at each inverse temperature β , after 10,000 training iterations. Median and interquartile range are calculated over five independently seeded runs.
Basin
minimum ϕ (rad)
minimum ψ (rad)
ΔF/kBT
R1
−2.5237
2.7541
0.6
R2
−1.2462
2.6704
1.0
R3
−1.3090
−0.3037
1.5
R4
0.9320
0.5341
3.0
R5
1.0367
3.0264
2.0
Appendix
Table 1: Local-minimum coordinates and basin-specific free-energy barriers used for all alanine dipeptide analyses.
Baseline model training dataset
RDB model training dataset
Matched MD budget ( μ s)
Production interval per trajectory ( μ s)
Training configurations
Restrained-MD probes
Retained training pairs
5.25
(0.05,1.05]
100,000
1,000
30,000
10.25
(0.05,2.05]
200,000
2,000
60,000
15.25
(0.05,3.05]
300,000
3,000
90,000
20.25
(0.05,4.05]
400,000
4,000
120,000
25.25
(0.05,5.05]
500,000
5,000
150,000
Appendix
Table 2: Comparison of the two model-training datasets at matched MD budgets. The baseline model dataset pools configurations from five equilibrium trajectories after discarding the first 50 ns of each trajectory and subsampling the remaining production segments every 50 ps. The restrained-MD RDB model dataset is constructed from a 250 ns high-temperature probe trajectory and matched restrained simulations. After discarding the equilibration portion of each restrained trajectory, 30 target configurations are retained per probe. Consequently, the two approaches use the same total MD time but different numbers of retained training configurations.
Figure 6: Two-dimensional Ramachandran JS distance versus (a) training updates at a fixed 25.25μ s MD budget and (b) matched MD budget at 50,000 updates. Curves and bars show medians over 20 training runs, and bands and error bars show interquartile ranges. Dashed lines indicate the expected JS distance between a 100,000-sample multinomial draw and the 25.0 μ s reference histogram.
MD budget ( μ s)
Source interval ( μ s)
Frames
7
(2,7]
500,000
12
(2,12]
1,000,000
17
(2,17]
1,500,000
22
(2,22]
2,000,000
Appendix
Table 3: Chignolin training windows. The 2–22 μ s reference is fixed across all four data budgets.
Figure 7: Chignolin bridge-time comparison. Generated misfolded population versus (a) training iteration at a fixed 22 μ s MD budget and (b) MD budget at 160,000 total updates. Curves and bars show medians over ten seeds; bands and error bars show interquartile ranges. The dashed line is the fixed reference population, 0.3747% , and the dotted line in (a) marks the 80,000 branch point.
Figure 8: Chignolin global fidelity. Two-dimensional NO JS distance versus (a) training iteration at a fixed 22μ s MD budget and (b) MD budget at 160,000 total updates, for both t∗=0.30 and 0.35 . Curves and bars show medians over ten seeds; bands and error bars show interquartile ranges. Dashed lines indicate the expected finite-sample JS distance, 0.09822 , estimated from 200 independent 100,000-sample resamples of the fixed 2 – 22μs reference ensemble. The dotted line in (a) marks the 80,000 branch point.
MD budget ( μ s)
Method
pgen(Rmis) (%)
∣relativeerror∣ (%)
2D NO JS distance
Median [Q1, Q3]
Median
[Q1, Q3]
7
Base
0.2330 [0.2302, 0.2440]
37.8
0.13290
[0.13179, 0.13386]
Synthetic, t∗=.30
0.3320 [0.3132, 0.3558]
11.4
0.14217
[0.14167, 0.14316]
Synthetic, t∗=.35
0.3010 [0.2833, 0.3145]
19.7
0.13552
[0.13453, 0.13655]
12
Base
0.3130 [0.2993, 0.3158]
16.5
0.11184
[0.11153, 0.11268]
Synthetic, t∗=.30
0.3930 [0.3862, 0.3970]
4.9
0.12443
[0.12254, 0.12498]
Appendix
Table 4: Final Chignolin metrics at 160,000 total updates. Relative error is computed from each across-seed median and the fixed reference population 0.3747% .
Constrained generative models aim to produce samples that satisfy complex feasibility constraints while remaining faithful to the data distribution. Existing constrained generation methods typically enforce constraints either through training-time optimization or sampling-time correction. Training-time optimization approaches optimize on states induced by the training distribution, which can differ substantially from those encountered during sampling. Sampling-time correction methods instead modify the sampling process at inference, introducing distribution shift and requiring expensive tuning, particularly for few-step sampling. We propose a fine-tuning framework that incorporates constraint guidance obtained through online rollout into the training process, which aligns training with sampling by differentiating through the fixed noise schedule used to numerically integrate the denoising process. This exposes the model to violations that arise along the denoising trajectory and aligns diffusion learning with the sampling process. Experiments across multiple tasks show that our method improves constraint satisfaction while maintaining competitive sampling quality compared to prior methods.
Steering diffusion models toward conditions unseen during training typically requires either retraining with conditional inputs or per-step gradient computations, both of which incur substantial computational overhead. We present Noise-Aligned RFM Steering (NA-RFM), a general recipe for efficiently steering diffusion models without gradient guidance during inference, enabling fast controllable generation. The method combines two offline-computed signals: noise alignment, a high-noise correction from PCA statistics of the target examples and the full data, and Recursive Feature Machine (RFM) activation steering, which learns a target-discriminative direction from labeled forward-process activations. During sampling, noise alignment provides coarse control at high noise, while the RFM direction is reused over intermediate/late timesteps through lightweight activation edits. Experiments on CIFAR-10, ImageNet, CelebA, and fine-grained bird species show improved target accuracy over gradient-based post-hoc guidance baselines, improved FID on the class-guidance benchmarks, and substantial inference speedups. Code: https://github.com/isotrivial/na-rfm.
Qingsong Wang, Mikhail Belkin, Yusu Wang
Halıcıoğlu Data Science Institute, University of California San Diego, La Jolla, CA, USA
We introduce RefineMix, a framework for training discrete diffusion models under severe data scarcity, a common constraint in scientific applications. RefineMix uses out-of-distribution data at selected diffusion times to improve generalization without biasing the sampling distribution. Although this strategy has been explored in continuous diffusion, discrete diffusion presents a distinct challenge: unlike Gaussian noise, masking preserves domain information in surviving tokens, limiting the use of related data at high noise levels. At low noise levels, however, the domains effectively disjoint supports become an advantage, allowing the model to learn from both in-domain and out-of-distribution data without biasing the sampler. We formalize these intuitions and provide a theoretical analysis for the proposed method. Experimentally, across five domain-shift settings, RefineMix matches or outperforms in-domain finetuning and data mixing. For protein sequence generation, finetuning with just 197 in-domain examples nearly doubles the fraction of generated proteins that are simultaneously novel, foldable, and in-family compared to standard finetuning.