Generative diffusion for perceptron problems: statistical physics analysis and efficient algorithms

Davide Straziota, Elizaveta Demyanenko, Carlo Baldassi, Carlo Lucibello

Abstract

We consider random instances of non-convex perceptron problems in the high-dimensional limit of a large number of examples $M$ and weights $N$, with finite load $\alpha = M/N$. We develop a formalism based on replica theory to predict the fundamental limits of efficiently sampling the solution space using generative diffusion algorithms, conjectured to be saturated when the score function is provided by Approximate Message Passing (AMP). For the spherical perceptron with negative margin $\kappa$, we find that the uniform distribution over solutions can be efficiently sampled in most of the Replica Symmetric region of the $\alpha$-$\kappa$ plane. In contrast, for binary weights, sampling from the uniform distribution remains intractable. A theoretical analysis of this obstruction leads us to identify a potential $U(s) = -\log(s)$, under which the corresponding tilted distribution becomes efficiently samplable via diffusion. Moreover, we show numerically that an annealing procedure over the shape of this potential yields a fast and robust Markov Chain Monte Carlo (MCMC) algorithm for sampling the solution space of the binary perceptron.

Introduction

Generative diffusion models have revolutionized high-dimensional sampling by transforming noise into structured data through a learned score function. However, their performance on complex, non-convex landscapes—typical of neural network solution spaces—remains poorly understood. This paper investigates the fundamental limits of diffusion-based sampling in two prototypical "hard" problems from statistical physics: the spherical perceptron and the binary weight perceptron.

Methods: Bridging Diffusion and Replica Theory

The authors employ Algorithmic Stochastic Localization (ASL), a diffusion-like process where the score function (the Bayesian denoiser) is approximated at each step using Approximate Message Passing (AMP). To analyze the asymptotic performance of this algorithm, they use Replica Theory. This framework allows them to track the evolution of the "free entropy" landscape as the diffusion process progresses. If the landscape becomes multi-modal or "shatters" into disconnected clusters, AMP fails to provide an accurate score, and the diffusion process collapses.

Results: Spherical Perceptron and Ergodicity Breaking

For the spherical perceptron with a negative margin $\kappa$, the study reveals that diffusion can efficiently sample the uniform distribution of solutions across a significant portion of the phase space. The limit of this efficiency is precisely defined by the De Almeida-Thouless (DAT) transition, which marks the onset of Replica Symmetry Breaking.

Phase diagram for the spherical perceptron with negative margin $\kappa$. The green region indicates where diffusion sampling is efficient, bounded by the DAT transition (red line).

As shown in the phase diagram, the ASL process successfully tracks the solution space until the landscape fragments. Beyond the DAT line, the ergodicity of the space is broken, and local algorithms like AMP-guided diffusion can no longer navigate the complex geometry.

Results: The Binary Perceptron and the Log-Potential Fix

The binary weight perceptron presents a more significant challenge. Replica analysis shows that its free entropy landscape is inherently "hostile" to uniform sampling, characterized by isolated solutions that AMP cannot find. To overcome this, the authors introduce a potential tilting strategy. By modifying the target distribution with a potential $U(s) = -\log(s)$, they penalize solutions that are near the boundaries of the constraint.

Phase diagram for the binary perceptron with log-potential (left) and validation of the theoretical distribution $P(s)$ (right).

This "log-potential" smooths the landscape, steering the diffusion process toward dense clusters of solutions. As illustrated in the phase diagram (left), this approach achieves an algorithmic threshold of $\alpha \approx 0.65$, significantly extending the range of solvable loads. The right panel validates the theoretical predictions for the resulting distribution $P(s)$ against numerical simulations.

Practical Implications: $\tau$-annealed MCMC

While AMP is powerful for synthetic data, it is often brittle on structured real-world datasets. Leveraging the theoretical insight of the log-potential, the authors developed a practical $\tau$-annealed MCMC algorithm. This method uses an annealing schedule over the shape of the potential rather than just temperature.

In tests on MNIST, FashionMNIST, and CIFAR10, this new algorithm demonstrated remarkable robustness, finding binary perceptron solutions in high-dimensional regimes where standard simulated annealing fails. This transition from theoretical physics to practical algorithmic design highlights the value of replica-based analysis in understanding and improving modern generative models.

Conclusion

This work establishes a rigorous link between generative diffusion and the phase transitions of spin-glass theory. By identifying the mathematical obstructions to sampling—and providing a potential-based remedy—the authors provide a roadmap for developing more robust sampling algorithms for the complex landscapes of deep learning.

Summary updated

BibTeX
@inproceedings{straziota2025generative,
  author = {Davide Straziota and Elizaveta Demyanenko and Carlo Baldassi and Carlo Lucibello},
  title = {{Generative diffusion for perceptron problems: statistical physics analysis and efficient algorithms}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=SyJ3PdcokV},
}
Figure