A Boltzmann Kernel for Discrete Diffusion: How Locality and Equivariance Explain Creativity

Alberto Bechara, Navonil Neogi, Nabil Iqbal, Erik J. Bekkers, Maria Esteban-CasadevallarXiv 2026

TL;DR

Left to their own mathematical devices, discrete diffusion models should simply memorize their training data verbatim—yet in practice, they generate brand-new, creative outputs. This paper derives an exact mathematical formula showing how architectural constraints like locality and translation equivariance "force" these models to generalize. Instead of memorizing whole images, the network acts like a thermodynamic mosaic artist, stitching together tiny patches of training data weighted by how closely they match the noisy input.

What Problem Does This Paper Address?

Diffusion models work by corrupting data with noise and training a neural network to reverse the process. If a model had infinite capacity and no structural constraints, minimizing its training loss on a finite dataset would lead to a boring outcome: complete memorization. At test time, it would just spit out exact copies of training examples.

Yet real-world models dream up novel images and text. In continuous diffusion models (where pixel values are smooth numbers), researchers recently proved that architectural inductive biases—built-in structural rules—prevent memorization and induce creativity. However, for discrete diffusion models (which operate on distinct tokens or quantized pixels, either by randomly flipping tokens in Uniform Discrete Diffusion or hiding them in Masked Diffusion), we lacked a clear mathematical theory explaining where their creativity comes from.

Methods

Building on a recent theoretical framework for continuous diffusion, the authors derive the first analytical theory for Uniform Discrete Diffusion Models (UDMs) constrained by two classic architectural rules (such as those found in Convolutional Neural Networks):

  1. Locality: To predict a clean token, the network can only look at a small $w \times w$ window (patch) around it, rather than the whole image.
  2. Translation Equivariance: Shifting the input shifts the output identically—meaning the network processes patches without knowing where in the image they came from.

By solving for the optimal denoiser under these constraints, the authors prove that the network's exact mathematical optimum is a Boltzmann-like kernel. To clean a central token, the formula compares the current noisy patch against every $w \times w$ patch across the entire training set, weighting each training patch exponentially by its Hamming distance (the count of mismatched tokens). The temperature parameter $\beta_t$ scales up as noise decreases, making the matching stricter near the end of generation.

Figure 1: The Boltzmann weights depend on the Hamming distance between the noisy patch, coming from the noisy image xt, and the patches N0 coming from the training samples D. The Hamming distance measures the number of tokens that disagree with the noisy patch (highlighted in pink).

For Masked Diffusion Models (MDMs)—where tokens are blanked out rather than randomly flipped—pure math says $\beta_t \to \infty$, turning the model into a rigid "exact lookup" table that breaks whenever it encounters an unseen pattern of unmasked tokens. Because real neural networks use finite softmax logits and can't output literal infinities, the authors introduce a novel heuristic relaxation: keeping the exact same Boltzmann kernel formula, but replacing the theoretical $\beta_t$ with an empirically fitted parameter $\hat{\beta}$ governed by the architecture and training dynamics.

Datasets

The authors validate their theoretical equations against actual trained neural networks (primarily CNNs, alongside ablations on Neighborhood Attention Transformers and Graph Neural Networks) using quantized versions of standard vision datasets, where pixels are discretized into small vocabulary sizes $K \in \{2, 4, 8\}$:

  • MNIST
  • CIFAR-10
  • (A third dataset [19] is briefly cited in the introduction alongside MNIST and CIFAR-10, though the main text focuses on the $N=5000$ sample experiments for MNIST and CIFAR-10). No new benchmarks are introduced.

Key Insights and Ideas

  • Creativity is "forced" mosaic-making: Unconstrained discrete diffusion models provably memorize; empirically, unconstrained runs copy $>98.8\%$ of their tokens from the single closest training image. Locality shrinks the combinatorial space from whole images ($K^{H \cdot W}$) down to tiny patches ($K^{w^2}$), while equivariance pools patches from everywhere. Creativity emerges because the model seamlessly recombines local training patches in globally novel ways.
  • Neural networks save Masked Diffusion from itself: Theoretically, a masked diffusion model shouldn't be able to interpolate—it should only match visible tokens exactly. The fact that MDMs generalize at all in practice is a happy side effect of neural network parameterization (softmax over finite logits), which naturally smooths a brittle lookup table into a soft, similarity-weighted Boltzmann kernel.
  • The curse of the large window: As the receptive field ($w$) or vocabulary size ($K$) grows, the space of possible patches explodes ($K^{w^2}$). Training data can no longer densely cover all local possibilities, causing the trained neural network to drift away from the ideal analytical formula—and eventually revert toward global memorization when the window covers the whole image.

Key Results

Trained CNNs match the authors' pen-and-paper Boltzmann formula with remarkable precision when local patch coverage is high:

  • Uniform Diffusion (UDM): On MNIST ($K=2$, window $w=3$), the trained CNN achieves 99.56% top-1 agreement with the analytical formula (KL divergence of just $0.0009$). On CIFAR-10 ($K=2, w=3$), top-1 agreement hits 98.40%.
  • Scaling effects: As predicted by theory, widening the window and vocabulary degrades the match due to sparser data coverage—dropping to 82.48% agreement (KL $1.6989$) on CIFAR-10 when $K=8$ and $w=7$.
  • Masked Diffusion (MDM): Across all tested settings, the relaxed Boltzmann heuristic ($\hat{\beta}$) dramatically outperforms the theoretical "exact lookup." For example, on CIFAR-10 ($K=4, w=5$), exact lookup yields a massive KL divergence of $1.4868$ against the trained CNN, whereas the relaxed Boltzmann kernel (with fitted $\hat{\beta}=2.8$) drops the KL divergence down to $0.0496$.
Side-by-side comparison showing virtually identical token predictions between a trained CNN and the paper's analytical theory on noisy MNIST inputs.

Limitations and Future Work

  • Strict architectural assumptions: The exact mathematical derivations apply only to strictly local, group-equivariant architectures. Real-world workhorses—like full self-attention Transformers—can route information globally across an entire sequence or image. Extending the Boltzmann kernel to capture long-range data correlations and attention mechanisms is a primary next step.
  • Independent, unstructured tokens: The theory assumes noise is applied independently per coordinate and treats the vocabulary as flat and unstructured (meaning token 1 is just as different from 2 as it is from 8). Accounting for semantic structure within the vocabulary and correlations across coordinates remains open.
  • Heuristic MDM temperature: While $\beta_t$ is derived from first principles for uniform diffusion, $\hat{\beta}$ in masked diffusion is currently fitted after the fact rather than predicted analytically from optimization dynamics.

Summary updated

BibTeX
@misc{bechara2026boltzmann,
  author = {Alberto Bechara and Navonil Neogi and Nabil Iqbal and Erik J. Bekkers and Maria Esteban-Casadevall},
  title = {{A Boltzmann Kernel for Discrete Diffusion: How Locality and Equivariance Explain Creativity}},
  year = {2026},
  eprint = {2611.37573},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.37573},
}
Figure