Diffusion models have emerged as a powerful framework for generative tasks in deep learning. They decompose generative modeling into two computational primitives: deterministic neural-network evaluation and stochastic sampling. Current implementations usually place most computation in the neural network, but diffusion as a framework allows a broader range of choices for the stochastic transition kernel. Here, we generalize the stochastic sampling component by replacing independent noise injection with Markov chain Monte Carlo (MCMC) dynamics that incorporate known interaction structure. Standard independent diffusion is recovered as a special case when couplings are set to zero. By explicitly incorporating Ising couplings into the diffusion dynamics, the noising and denoising processes exploit spatial correlations representative of the target system. The resulting framework maps naturally onto probabilistic computers (p-computers) built from probabilistic bits (p-bits), which provide orders-of-magnitude advantages in sampling throughput and energy efficiency over GPUs. We demonstrate the approach on equilibrium states of the 2D ferromagnetic Ising model and the 3D Edwards-Anderson spin glass, showing that correlated diffusion produces samples in closer agreement with MCMC reference distributions than independent diffusion. More broadly, the framework shows that p-computers can enable new classes of diffusion algorithms that exploit structured probabilistic sampling for generative modeling.
Figures & tables
Fig. 1 : Hybrid p-computer/GPU inference loop for correlated diffusion. System-level view of one reverse-diffusion iteration. The current noisy configuration ( st ) is passed from the probabilistic computer to the neural network on the GPU, which produces per-site denoising probabilities p=fθ(st) . A binary clean-state estimate s^0 is then sampled from these probabilities and sent back to the probabilistic computer, where it initializes an ensemble of forward Gibbs chains under the known couplings Jij and the scheduled inverse temperatures. Each chain produces a candidate for st−1 , and the candidates are reweighted by the one-step likelihood P(st∣st−1) before one is sampled to continue the reverse trajectory. Repeating this procedure produces successive reverse states st→st−1→⋯→s0 , yielding the final sample s0 . The two blocks represent a conceptual division of labor between estimation and sampling, in an integrated CMOS+sMTJ realization both can reside on the same chip.
Fig. 2 : Probabilistic computing hardware primitives. (a) p-bits and g-bits serve as the building blocks for Bernoulli and Gaussian sampling, respectively. (b) Multi-state Potts variables with integer states in [0,2Np−1] can be realized either as native Potts units or as networks of Np interconnected p-bits. (c) A p-bit circuit and candidate stochastic nanodevice realizations, including sMTJs, Zener diodes, and SPADs. (d) Three tunable g-bits implemented on FPGA, each with 256 states and independently programmable means and variances.
Platform
Throughput (Gsample/s)
Power (W)
Efficiency (Gsamples/J)
Improvement factor
GPU (experimental)
1000
280
3.5
1
FPGA (experimental)
15000
25
600
∼102
sMTJ (projected)
31250
2
15625
∼104
Table 1: Comparison of efficiency for generating 32-bit random-number samples across hardware platforms
Fig. 3 : Independent and correlated diffusion noising in a p-bit framework: Illustration of the forward noising process implemented using probabilistic bits (p-bits), showing how structure-aware correlated noising generalizes the independent diffusion for a 2D ferromagnetic Ising system. (a) Independent diffusion noising : each p-bit si is updated with Jij=0 under a time-dependent local bias hi=sit−1 , so that Ii=sit−1 ; a decreasing inverse temperature schedule β→0 (Eq. 1 ) progressively destroys correlations, resulting in factorized, site-wise noise injection (top row). (b) Correlated diffusion noising : each p-bit is updated from an interaction-dependent local field Ii=∑jJijsj+hi , where explicit couplings Jij introduce spatially correlated noise consistent with the underlying Ising structure (bottom row). The independent noising process in (a) is recovered as a special case of (b) by setting Jij=0 and absorbing the noising strength into the bias term hi .
Fig. 4 : Reverse generative process (diffusion inference) using neural-network guidance and p-bit sampling: Schematic of one reverse step. Given the current noisy state st , a neural network computes per-site denoising probabilities p=fθ(st) , from which a clean-state estimate s^0 is sampled. An ensemble of forward Gibbs chains initialized at s^0 then produces candidates for st−1 on the probabilistic computer. These candidates are reweighted according to Pr(st−1∣st,s^0)∝Pr(st∣st−1)Pr(st−1∣s^0) , and one candidate is sampled to continue the reverse trajectory. Repeating this procedure yields a sequence of progressively denoised states ending at s0 .
Fig. 5 : Reverse trajectories for independent and correlated kernels on the 2D ferromagnetic Ising model. Representative configurations (right-to-left) at diffusion timesteps t={100,55,33,11,0} (red/blue denote s=+1/−1 ). Top: independent (site-wise) kernel. Middle: Gibbs-sampled reference at matching timesteps. Bottom: correlated (interaction-aware) kernel. The mean magnetization ⟨m⟩ and mean energy per spin ⟨E⟩/N , averaged over the ensemble at each timestep, are reported beneath the corresponding column. The correlated kernel tracks the Gibbs reference more closely across timesteps, while the independent kernel produces spatially fragmented intermediate states and can deviate in magnetization even when energy appears comparable.
Fig. 6 : Correlated diffusion applied to a 3D Edwards-Anderson spin glass near the phase transition. (a) Energy-per-spin distribution of the generated samples (blue) against the Monte Carlo reference (black). (b) Training and validation loss of the conditional estimator. (c) Parisi overlap distribution P(q) of the generated samples (blue) compared with the equilibrium reference (black), showing that the framework captures the bimodal overlap structure of the spin-glass phase. (d) Mean energy per spin during the forward and reverse processes, for the generated trajectory (blue) and the Monte Carlo reference (black).
Architecture
Training
Input / output size
N
Loss
Binary cross-entropy
Hidden layers
2
Optimizer
Adam
Hidden units per layer
1024
Learning rate
10−6
Activation
ReLU
Weight decay
None
Dropout
None
Batch size
512
Layer normalization
None
Epochs
4500
Table S2: Architecture and training hyperparameters for the conditional estimator fθ , used identically for the 2D ferromagnetic Ising model and the 3D spin glass.
Fig. S1 : Energy and magnetization across diffusion timesteps for generated Ising states. Mean energy per spin ⟨E⟩/N and absolute mean magnetization ∣⟨m⟩∣ versus diffusion timestep t . (a,b) Independent noising: reverse-generated states (red) are compared with forward samples from the factorized noising kernel (black). Energy appears broadly similar under a chosen schedule (a), but magnetization differs strongly (b), showing that independent noising suppresses long-range order too rapidly. (c,d) Correlated noising: reverse-generated states (blue) are compared with interaction-respecting MCMC reference states (black). Both ⟨E⟩/N and ∣⟨m⟩∣ track the reference more closely over t , consistent with the preservation of spatial correlations in the forward kernel.
Fig. S2 : Connected two-point correlation of the final generated samples ( L=5 ). C(r)=⟨sisi+r⟩−⟨m⟩2 for the generated s0 ensembles of the correlated (blue) and independent (red) kernels on a 5×5 ferromagnetic Ising model with open boundary conditions near the critical inverse temperature, compared against the ideal MCMC reference (black). Both kernels share the same network architecture and training protocol. The correlated kernel closely follows the reference, while the independent kernel deviates substantially. Error bars, where visible, denote the statistical uncertainty of the generated ensembles.
Fig. S3 : Parisi overlap distribution on the 3D Edwards-Anderson instance: correlated versus independent diffusion. P(q) of the generated ensembles for correlated diffusion (blue) and for an independent-diffusion baseline with the couplings removed from the diffusion kernels, J=0 (red), compared against the equilibrium MCMC reference (black), for the 10×10×10 instance at β=0.9091 . The two arms share the same estimator architecture, training protocol, reverse sampler, and training data, and differ only in whether the couplings enter the diffusion kernels. Neither reproduces the reference, but the correlated kernel retains weight at intermediate overlap that the independent baseline does not.
Fig. S4 : Energy autocorrelation of the reference Monte Carlo dynamics. Normalized autocorrelation of the energy per spin, CE(k)=[⟨E(t)E(t+k)⟩−⟨E⟩2]/[⟨E2⟩−⟨E⟩2] , against lag k in Monte Carlo sweeps, for the 2D ferromagnet at β=0.453125 (left) and the 3D Edwards-Anderson instance at β=0.9091 (right).
We introduce a novel technique for scalable sampling of spin-system states with continuous symmetries using diffusion models. By applying our approach to the XY model, a fundamental continuous-spin model in condensed matter physics, we show that our technique addresses the shortfalls of the Markov chain Monte Carlo (MCMC) in generalization to varying system sizes. More specifically, we show that training a temperature-conditioned diffusion model on smaller-size XY model lattices enables the generation of accurate samples in larger lattice sizes. By tracking physically important observables of the model, such as spin correlations, our experiments demonstrate that diffusion sampling followed by a few MCMC steps reduces the thermalization time by an order of magnitude relative to the standard MCMC with random initialization. Our study provides valuable insight as to how generative models can be used to study continuous-state condensed matter systems at scale.
Sehmimul Hoque, Roger Melko, Pooya Ronagh
Institute for Quantum Computing, University of Waterloo, Waterloo, Ontario N2L 3G1, Canada · Department of Physics and Astronomy, University of Waterloo, Waterloo, Ontario N2L 3G1, Canada · Perimeter Institute for Theoretical Physics, Waterloo, Ontario N2L 2Y5, Canada +1
Computational sampling has been central to the sciences since the mid-20th century. While machine-learning-based approaches have recently enabled major advances, their behavior remains poorly understood, with limited theoretical control over when and why they succeed. Here we provide such insight for diffusion models-a class of generative schemes highly effective in practice-by analyzing their application to the O(n) model of statistical field theory in the Gaussian limit n→∞. In this analytically tractable setting, we show that training a score model with a one-layer network architecture matching the exact solution exhibits a form of critical slowing down in parameter learning. This slowing down also impacts the generation process, indicating that the well-known difficulties of sampling near criticality persist even for learned generative models. To overcome this bottleneck, we demonstrate the power of combining architectural depth with physical locality. We find that using a two-layer architecture drastically reduces the critical slowing down, with the training time scaling logarithmically rather than quadratically with system size. By introducing a local score approximation we show that this acceleration in training time can be achieved without increasing the number of neural network parameters. Taken together, these results demonstrate that diffusion models can overcome the critical slowing down through appropriate architectural design, and establish a controlled framework for understanding and improving learned sampling methods in statistical physics and beyond.
Luca Maria Del Bono, Giulio Biroli, Patrick Charbonneau +1
Dipartimento di Fisica, Sapienza Università di Roma, Piazzale Aldo Moro 5, Rome 00185, Italy · CNR-Nanotec, Rome unit, Piazzale Aldo Moro 5, Rome 00185, Italy · Laboratoire de Physique Statistique, École normale supérieure, PSL Research University, 24 rue Lhomond, 75005 Paris, France +3
Uniform-state discrete diffusion models excel at few-step generation and guidance due to their ability to self-correct, making them preferred over autoregressive or Masked diffusion models in these settings. However, their sampling quality plateaus with ancestral samplers as the number of steps increases. We introduce a family of Predictor-Corrector (PC) samplers for discrete diffusion that generalize prior methods and apply to arbitrary noise processes. When paired with uniform-state diffusion, our samplers outperform ancestral sampling on both language and image modeling, achieving lower generative perplexity at matched unigram entropy on OpenWebText and better FID/IS scores on CIFAR10. Crucially, unlike conventional samplers, our PC methods continue to improve with more sampling steps. Taken together, these findings call into question the assumption that Masked diffusion is the inevitable future of diffusion-based language modeling. Beyond sampling, we develop a memory-efficient curriculum for the Gaussian relaxation training phase, reducing training time by 25% and memory by 33% compared to Duo while maintaining comparable perplexity on OpenWebText and LM1B and strong downstream performance. We release code, checkpoints, and a video-tutorial on: https://s-sahoo.com/duo-ch2