Scalable Discrete Diffusion Samplers: Combinatorial Optimization and Statistical Physics

Sebastian Sanokowski, Wilhelm Franz Berghammer, Haoyu Peter Wang, Martin Ennemoser, Sepp Hochreiter, Sebastian Lehner

Abstract

Sampling from complex, unnormalized discrete distributions is a fundamental challenge in scientific computing, spanning from NP-hard combinatorial optimization to the simulation of physical spin systems. While discrete diffusion models have emerged as a powerful tool for Neural Probabilistic Optimization (NPO), they are traditionally limited by linear memory scaling with respect to diffusion steps and inherent sampling bias. We introduce Scalable Discrete Diffusion Samplers (SDDS), a framework that reformulates diffusion training using Reinforcement Learning (RL) and Importance Sampling. This approach reduces memory requirements to a constant $O(1)$ per step, enabling the use of significantly more diffusion steps. Our methods achieve state-of-the-art results in unsupervised combinatorial optimization and provide the first framework for asymptotically unbiased sampling of physics models using discrete diffusion.

Introduction

The ability to sample from unnormalized discrete distributions $p(x) \propto \exp(-E(x))$ is critical for solving optimization problems and understanding physical phenomena. Recent advances in Neural Probabilistic Optimization (NPO) leverage generative models to learn these distributions by minimizing energy functions rather than relying on labeled datasets. Discrete diffusion models are particularly well-suited for this task due to their ability to model complex dependencies.

However, two primary obstacles have hindered their widespread adoption in scientific domains. First, standard training via backpropagation through time requires storing the entire generative chain, leading to $O(T)$ memory complexity. This "memory wall" limits the number of diffusion steps $T$, restricting the model's expressivity. Second, diffusion models typically provide biased samples, which is problematic for statistical physics where exact expectation values (e.g., average energy or entropy) are required.

Methodology: Scalable Discrete Diffusion Samplers (SDDS)

To address the memory bottleneck, we propose two novel training objectives that decouple memory usage from the number of diffusion steps.

1. Training via Reinforcement Learning (rKL w/ RL)

By treating the reverse diffusion process as a sequential decision-making task, we can apply the Policy Gradient Theorem. Specifically, using Proximal Policy Optimization (PPO), we can update the model parameters using individual transitions in the diffusion chain. This shift reduces memory requirements from $O(T)$ to $O(1)$, allowing us to scale to hundreds of diffusion steps on standard hardware. This objective minimizes the reverse Kullback-Leibler (KL) divergence, which is inherently "mode-seeking" and ideal for finding optimal solutions in combinatorial problems.

2. Mass-Covering via Importance Sampling (fKL w/ MC)

For applications requiring a broader exploration of the state space, such as statistical physics, we adapt Self-Normalized Neural Importance Sampling (SN-NIS) to minimize the forward KL divergence. This "mass-covering" approach ensures the model does not collapse onto a single mode, preserving the diversity of samples necessary for accurate physical measurements.

3. Unbiased Sampling through Path Probabilities

To eliminate approximation bias, we extend Neural Markov Chain Monte Carlo (MCMC) and SN-NIS to the diffusion setting. While the marginal likelihood of a sample $q(x)$ is intractable, the joint likelihood of the entire diffusion path $q(x_{0:T})$ is easily computed. By using these path probabilities to calculate importance weights or MCMC acceptance ratios, we can generate asymptotically unbiased samples from the target distribution.

Experimental Evaluation

We evaluated SDDS across two distinct domains: Unsupervised Combinatorial Optimization (UCO) and Statistical Physics.

Unsupervised Combinatorial Optimization

We tested the RL-based SDDS on several NP-hard graph problems, including Maximum Independent Set (MIS), Maximum Clique (MaxCl), Minimum Dominating Set (MDS), and Maximum Cut (MaxCut). Using difficult RB-model and Barabasi-Albert graphs with up to 1200 nodes, SDDS achieved state-of-the-art results in 6 out of 7 benchmarks. The ability to use 3-4x more diffusion steps than previous methods was a key driver of this performance improvement.

Statistical Physics

In simulations of the 2D Ising model and the Edwards-Anderson spin glass, the mass-covering (fKL w/ MC) variant of SDDS demonstrated superior accuracy. In Ising model tests, our method produced estimates for free energy and entropy that were significantly closer to theoretical values than those produced by state-of-the-art autoregressive (AR) baselines. Furthermore, SDDS proved more efficient, requiring fewer forward passes (300 steps) compared to the 576 passes required by AR models on a 24x24 grid.

Conclusion

Scalable Discrete Diffusion Samplers (SDDS) overcome the fundamental limitations of memory scaling and sampling bias in discrete diffusion. By integrating Reinforcement Learning and Importance Sampling into the diffusion framework, we enable the training of deeper, more expressive models that excel in both optimization and physical simulation. This work paves the way for applying diffusion models to large-scale scientific problems where both efficiency and exactness are paramount.

Limitations and Future Directions

While RL-based training offers significant scalability, it can be sensitive to hyperparameter selection. Future work will explore the integration of discrete score matching to further refine the importance-sampling objectives and extend the framework to categorical discrete spaces, such as those found in protein folding or complex scheduling tasks.

Summary updated

BibTeX
@inproceedings{sanokowski2025scalable,
  author = {Sebastian Sanokowski and Wilhelm Franz Berghammer and Haoyu Peter Wang and Martin Ennemoser and Sepp Hochreiter and Sebastian Lehner},
  title = {{Scalable Discrete Diffusion Samplers: Combinatorial Optimization and Statistical Physics}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=peNgxpbdxB},
}
Figure