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.
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.
In this work, we study generative adversarial networks (GANs) as a tool to learn the distribution of spin configurations and to generate samples, conditioned on external tuning parameters or other quantities associated with individual configurations. For concreteness, we focus on two examples of conditional variables---the temperature of the system and the energy of the samples. We show that temperature-conditioned models can not only be used to generate samples across thermal phase transitions, but also be employed as unsupervised indicators of transitions. To this end, we introduce a GAN-fidelity measure that captures the model’s susceptibility to external changes of parameters. The proposed energy-conditioned models are integrated with Monte Carlo simulations to perform over-relaxation steps, which break the Markov chain and reduce auto-correlations. We propose ways of efficiently representing the physical states in our network architectures, e.g., by exploiting symmetries, and to minimize the correlations between generated samples. A detailed evaluation, using the two-dimensional XY model as an example, shows that these incorporations bring in considerable improvements over standard machine-learning approaches. We further study the performance of our architectures when no training data is provided near the critical region.
It is a long-standing challenge to accurately and efficiently compute thermodynamic quantities of many-body systems at thermal equilibrium. The conventional methods, e.g., Markov chain Monte Carlo, require many steps to equilibrate. The recently developed deep learning methods can perform direct sampling, but only work at a single trained temperature point and risk biased sampling. Here, we propose a variational method for canonical ensembles with differentiable temperatures, which gives thermodynamic quantities as continuous functions of temperature akin to an analytical solution. The proposed method is a general framework that works with any tractable density generative model. At optimal, the model is theoretically guaranteed to be the unbiased Boltzmann distribution. We validated our method by calculating phase transitions in the Ising and XY models, demonstrating that our direct-sampling simulations are as accurate as Markov chain Monte Carlo methods but more efficient. Moreover, our differentiable free energy aligns closely with the exact one to the second-order derivative, indicating that the variational model captures the subtle thermal transitions at the phase transitions. This functional dependence on external parameters is a fundamental advancement in combining the exceptional fitting ability of deep learning with rigorous physical analysis.
Sampling equilibrium configurations of three-dimensional (3D) spin glasses with quenched disorder remains a fundamental challenge in statistical physics. The rugged energy landscape, pronounced critical slowing down, and intrinsic ergodicity breaking render standard Monte Carlo methods severely inefficient, particularly for large systems at low temperatures. In this Letter, we introduce the tensor-network Markov-chain Monte Carlo (TNMCMC) approach to address the issue. By formulating large-scale collective updates via tensor-network contractions on 2D lattice slices, TNMCMC yields unbiased samples of the Boltzmann distribution while substantially reducing autocorrelation times relative to conventional MCMC approaches. Numerical benchmarks on 3D spin glasses demonstrate that the method systematically mitigates critical slowing down. Furthermore, application to three- and four-state 3D Potts models shows that TNMCMC can traverse the exponential free-energy barriers of first-order phase transitions that typically hinder local MC updates. These results establish TNMCMC as a promising numerical framework capable of addressing important 3D problems in statistical physics and beyond, such as the precise computation of low-temperature thermodynamic properties of three-dimensional spin glasses and the decoding of quantum error-correcting codes with a three-dimensional topology.
The application of generative modeling to many-body physics offers a promising pathway for analyzing high-dimensional state spaces of spin systems. However, unlike computer vision tasks where visual fidelity suffices, physical systems require the rigorous reproduction of higher-order statistical moments and thermodynamic quantities. While Score-Based Generative Models (SGMs) have emerged as a powerful tool, their standard formulation on Euclidean embedding space is ill-suited for continuous spin systems, where variables inherently reside on a manifold. In this work, we demonstrate that training on the Euclidean space compromises the model's ability to learn the target distribution as it prioritizes to learn the manifold constraints. We address this limitation by proposing the use of Manifold-Aware Score-Based Generative Modeling framework applied to the 64x64 2D XY model (a 4096-dimensional torus). We show that our method estimates the theoretical Boltzmann score with superior precision compared to standard diffusion models. Consequently, we successfully capture the Berezinskii-Kosterlitz Thouless (BKT) phase transition and accurately reproduce second-moment quantities, such as heat capacity without explicit feature engineering. Furthermore, we demonstrate zero-shot generalization to unseen lattice sizes, accurately recovering the physics of variable system scales without retraining. Since this approach bypasses domain-specific feature engineering, it remains intrinsically generalizable to other continuous spin systems.
Abstract Markov chain Monte Carlo (MCMC) is a standard tool for studying many-body systems, but its practical cost can become substantial, especially when simulations must be repeated across temperatures and lattice sizes or near transition regions where equilibration becomes increasingly difficult. In this work, we introduce a flow matching (FM) framework. It is not a standalone replacement for equilibrium Monte Carlo. Instead, we present it as a scalable, physically informed initializer for downstream MCMC simulations. We use a U-Net architecture. The FM model is trained on small-system configurations of the two-dimensional XY model and then deployed across unseen temperatures and larger lattice sizes. FM-generated configurations preserve the correct qualitative physical trends across temperature and system size. This makes them suitable warm-start states for subsequent Monte Carlo refinement. Observables computed from FM-generated samples primarily serve as diagnostics of initializer quality, not as precision equilibrium estimates. The regression-based L 2 objective suppresses variance and limits the accuracy of fluctuation-sensitive observables. Examples include susceptibility and spin stiffness. Still, the model captures sufficient local statistical structure to yield physically aligned initial states across a broad range of conditions. These results support a reusable hybrid FM–MCMC workflow. The one-time FM training cost can be amortized across temperatures and lattice sizes. The generated warm-start configurations then reduce the burden of initializing large-scale Monte Carlo simulations. Our findings show that FM can support efficient exploration of transition regions in many-body systems by providing reusable warm-start configurations for downstream Monte Carlo simulations.
Understanding strongly correlated electron systems remains one of the central challenges in condensed matter physics. Finding ab initio descriptions of non-perturbative systems is of great importance for modeling carbon-based materials such as graphene or fullerenes. In this regime, computational methods become indispensable tools for performing simulations, making predictions, and ultimately comparing to experiments. The Hubbard model offers a minimal description of the dynamics of electrons in such materials. As exact methods are limited to small system sizes by the exponentially growing Hilbert space, larger-scale first-principle studies rely on numerical approaches. Alongside powerful Hamiltonian-based methods, the auxiliary-field description of the model offers a natural setting for Lagrangian-based Monte Carlo sampling. However, substantial challenges, such as lack of ergodicity and the numerical sign problem, arise in these approaches, leading to long autocorrelation times, biased results, and large statistical uncertainties. In recent years, generative models, especially normalizing flows, have been applied extensively to various theories to address shortcomings of traditional Monte Carlo-based algorithms, such as critical slowing down or topological freezing. While these approaches have shown promise in alleviating these issues, a poorly understood and unfavorable scaling of these methods has stalled their progress, and whether they can reach state-of-the-art system sizes in lattice quantum chromodynamics remains to be seen. This motivates the application of these methods to condensed matter systems, where physically relevant system sizes are reachable at substantially smaller scales. In this work, we study for the first time the application of generative models to the finite-temperature auxiliary-field Hubbard model. We begin by employing an equivariant normalizing flow that respects multiple symmetries inherent to the Boltzmann distribution, demonstrating a substantial improvement in sampling efficiency over Hybrid Monte Carlo and standard non-equivariant flows. We further develop Symmetry-Enforcing Stochastic Modulation (SESaMo), a more scalable algorithm capable of modeling both exact and broken symmetries in normalizing flows, and show that it achieves significantly higher effective sample sizes than traditional equivariant techniques at large system sizes. Equipped with SESaMo, we compute physical observables at half-filling in excellent agreement with exact diagonalization at substantially lower computational cost than Hybrid Monte Carlo. We then turn to the doped Hubbard model, where the theory exhibits a numerical sign problem. We introduce an annealing scheme to simulate the Hubbard model at finite chemical potential in the spin basis. Making use of the less severe sign problem in this description, the annealing scheme enables ergodic sampling of the multi-modal distribution, yielding more accurate results with substantially reduced uncertainties compared to state-of-the-art optimized Hybrid Monte Carlo. Lastly, we employ a masked autoencoder for distribution estimation to learn the Boltzmann distribution of the discrete auxiliary-field Hubbard model. Preliminary results show a significantly higher effective sample size compared to normalizing flows with continuous degrees of freedom, while also exhibiting a milder sign problem than the continuous spin basis.