Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:2203.10989 · Computer Physics Communications

Hierarchical autoregressive neural networks for statistical systems

P. Białas, Piotr Korcyl, Tomasz Stebel

Published Aug 18, 2022• 11 citations
arXivHTMLPDF

Abstract

It was recently proposed that neural networks could be used to approximate many-dimensional probability distributions that appear e.g. in lattice field theories or statistical mechanics. Subsequently they can be used as variational approximators to assess extensive properties of statistical systems, like free energy, and also as neural samplers used in Monte Carlo simulations. The practical application of this approach is unfortunately limited by its unfavourable scaling both of the numerical cost required for training, and the memory requirements with the system size. This is due to the fact that the original proposition involved a neural network of width which scaled with the total number of degrees of freedom, e.g. L 2 in case of a two dimensional L × L lattice. In this work we propose a hierarchical association of physical degrees of freedom, for instance spins, to neurons which replaces it with the scaling with the linear extent L of the system. We demonstrate our approach on the two-dimensional Ising model by simulating lattices of various sizes up to 128 × 128 spins, with time benchmarks reaching lattices of size 512 × 512 . We observe that our proposal improves the quality of neural network training, i.e. the approximated probability distribution is closer to the target that could be previously achieved. As a consequence, the variational free energy reaches a value closer to its theoretical expectation and, if applied in a Markov Chain Monte Carlo algorithm, the resulting autocorrelation time is smaller. Finally, the replacement of a single neural network by a hierarchy of smaller networks considerably reduces the memory requirements.

DOI
10.1016/j.cpc.2022.108502

Related papers

Simulating first-order phase transition with hierarchical autoregressive networks

P. Białas, Paulina Czarnota, Piotr Korcyl +1 more

We apply the hierarchical autoregressive neural network sampling algorithm to the two-dimensional Q-state Potts model and perform simulations around the phase transition at Q=12. We quantify the performance of the approach in the vicinity of the first-order phase transition and compare it with that of the Wolff cluster algorithm. We find a significant improvement as far as the statistical uncertainty is concerned at a similar numerical effort. In order to efficiently train large neural networks we introduce the technique of pretraining. It allows us to train some neural networks using smaller system sizes and then employ them as starting configurations for larger system sizes. This is possible due to the recursive construction of our hierarchical approach. Our results serve as a demonstration of the performance of the hierarchical approach for systems exhibiting bimodal distributions. Additionally, we provide estimates of the free energy and entropy in the vicinity of the phase transition with statistical uncertainties of the order of 10^{-7} for the former and 10^{-3} for the latter based on a statistics of 10^{6} configurations.

arXiv:2212.04955•Physical review. E•May 24, 2023•5 citations

Deep Autoregressive Models for the Efficient Variational Simulation of Many-Body Quantum Systems

Or Sharir, Yoav Levine, Noam Wies +2 more

Artificial neural networks were recently shown to be an efficient representation of highly entangled many-body quantum states. In practical applications, neural-network states inherit numerical schemes used in variational Monte Carlo method, most notably the use of Markov-chain Monte Carlo (MCMC) sampling to estimate quantum expectations. The local stochastic sampling in MCMC caps the potential advantages of neural networks in two ways: (i) Its intrinsic computational cost sets stringent practical limits on the width and depth of the networks, and therefore limits their expressive capacity; (ii) its difficulty in generating precise and uncorrelated samples can result in estimations of observables that are very far from their true value. Inspired by the state-of-the-art generative models used in machine learning, we propose a specialized neural-network architecture that supports efficient and exact sampling, completely circumventing the need for Markov-chain sampling. We demonstrate our approach for two-dimensional interacting spin models, showcasing the ability to obtain accurate results on larger system sizes than those currently accessible to neural-network quantum states.

arXiv:1902.04057•Physical Review Letters•Jan 16, 2020•257 citations

Sampling the XY model with an attention-based neural network

P. Białas, Christian Diego Morales, Tomasz Stebel +1 more

We present a transformer-based variational autoregressive network for sampling lattice systems with continuous degrees of freedom and apply it to the two-dimensional XY model near the Berezinskii-Kosterlitz-Thouless transition. The architecture is combined with physics-informed ingredients: locality-informed attention and approximate probabilities. The resulting sampler significantly outperforms existing neural samplers. We train the model on lattices up to $96\times96$, verify with a mode-dropping estimator that no parts of the configuration space are missed, and reproduce the energy, magnetization and helicity modulus obtained with the traditional Markov Chain Monte Carlo algorithm.

arXiv:2610.23783•Oct 16, 2026•0 citations

Sampling two-dimensional spin systems with transformers

P. Białas, Piotr Korcyl, Tomasz Stebel +2 more

Autoregressive Neural Networks based on dense or convolutional layers have recently been shown to be a viable strategy for generating classical spin systems. Unlike these methods, sampling with transformers is commonly considered to be computationally inefficient. In this work, we propose a novel approach to transformer-based neural samplers in which we generate not a single spin per step but groups of spins. As an additional improvement, we construct a model of approximated probabilities, further improving the efficiency of the algorithm. Despite our approach being computationally heavier than dense networks or CNN-based approaches, we were able to sample larger systems of up to $180 \times 180$ spins in case of the Ising model. The Effective Sample Size of our sampler is $\sim 20$ times larger than that of the previous state-of-the-art neural sampler when trained for the $128 \times 128$ Ising model at critical temperature. Finally, we also test our algorithm on the 2D Edwards-Anderson model, where we train $64\times 64$ spin systems.

arXiv:2604.27738•Apr 30, 2026•0 citations

Variational Autoregressive Networks with probability priors

P. Białas, Piotr Korcyl, Tomasz Stebel +1 more

Monte Carlo methods are essential across diverse scientific fields, yet their efficiency is frequently hampered by critical slowing down-a sharp increase in autocorrelation times near phase transitions. Although deep learning approaches, such as neural-network-based samplers, have been proposed to alleviate this issue, they face another serious problem: the difficulty of training the models. This difficulty partially stems from the overly general nature of original machine-learning architectures, which often ignore underlying physical symmetries and force networks to relearn them from scratch. In this paper, we demonstrate that incorporating physical priors into the model significantly enhances performance. Building upon existing strategies that integrate spin-spin interactions, we propose a framework that utilizes a prior probability distribution as a starting point for training. Our results for the Ising model, as well as for the Edwards-Anderson spin glass model, suggest that moving away from `blank slate' models in favor of physics-informed priors reduces the training burden and facilitates the simulation of larger system sizes in discrete spin models.

arXiv:2605.16020•May 15, 2026•0 citations

Integrating neural networks and tensor networks for computing free energy

Hanyan Cao, Yijia Wang, Feng Ping Pan +1 more

Abstract Computing free energy is a fundamental problem in statistical physics. Recently, two distinct methods have been developed and have demonstrated remarkable success: the tensor-network-based contraction method and the neural-network-based variational method. Tensor networks are accurate, but their application is often limited to low-dimensional systems due to the high computational complexity in high-dimensional systems. The neural network method applies to systems with general topology. However, as a variational method, it is not as accurate as tensor networks. In this work, we propose an integrated approach, tensor-network-based variational autoregressive networks (TNVAN), that leverages the strengths of both tensor networks and neural networks: combining the variational autoregressive neural network’s ability to compute an upper bound on free energy and perform unbiased sampling from the variational distribution with the tensor network’s power to accurately compute the partition function for small sub-systems, resulting in a robust method for precisely estimating free energy. To evaluate the proposed approach, we conducted numerical experiments on spin glass systems with various topologies, including two-dimensional lattices, fully connected graphs, and random graphs. Our numerical results demonstrate the superior accuracy of our method compared to existing approaches. In particular, it effectively handles systems with long-range interactions and leverages GPU efficiency without requiring singular value decomposition, indicating great potential in tackling statistical mechanics problems and simulating high-dimensional complex systems through both tensor networks and neural networks.

arXiv:2504.12037•Communications in Theoretical Physics•Mar 31, 2025•0 citations
It was recently proposed that neural networks could be used to approximate many-dimensional probability distributions that appear e.g. in lattice field theories or statistical mechanics. Subsequently they can be used as variational approximators to assess extensive properties of statistical systems, like free energy, and also as neural samplers used in Monte Carlo simulations. The practical application of this approach is unfortunately limited by its unfavourable scaling both of the numerical cost required for training, and the memory requirements with the system size. This is due to the fact that the original proposition involved a neural network of width which scaled with the total number of degrees of freedom, e.g. L 2 in case of a two dimensional L × L lattice. In this work we propose a hierarchical association of physical degrees of freedom, for instance spins, to neurons which replaces it with the scaling with the linear extent L of the system. We demonstrate our approach on the two-dimensional Ising model by simulating lattices of various sizes up to 128 × 128 spins, with time benchmarks reaching lattices of size 512 × 512 . We observe that our proposal improves the quality of neural network training, i.e. the approximated probability distribution is closer to the target that could be previously achieved. As a consequence, the variational free energy reaches a value closer to its theoretical expectation and, if applied in a Markov Chain Monte Carlo algorithm, the resulting autocorrelation time is smaller. Finally, the replacement of a single neural network by a hierarchy of smaller networks considerably reduces the memory requirements.
We apply the hierarchical autoregressive neural network sampling algorithm to the two-dimensional Q-state Potts model and perform simulations around the phase transition at Q=12. We quantify the performance of the approach in the vicinity of the first-order phase transition and compare it with that of the Wolff cluster algorithm. We find a significant improvement as far as the statistical uncertainty is concerned at a similar numerical effort. In order to efficiently train large neural networks we introduce the technique of pretraining. It allows us to train some neural networks using smaller system sizes and then employ them as starting configurations for larger system sizes. This is possible due to the recursive construction of our hierarchical approach. Our results serve as a demonstration of the performance of the hierarchical approach for systems exhibiting bimodal distributions. Additionally, we provide estimates of the free energy and entropy in the vicinity of the phase transition with statistical uncertainties of the order of 10^{-7} for the former and 10^{-3} for the latter based on a statistics of 10^{6} configurations.
Artificial neural networks were recently shown to be an efficient representation of highly entangled many-body quantum states. In practical applications, neural-network states inherit numerical schemes used in variational Monte Carlo method, most notably the use of Markov-chain Monte Carlo (MCMC) sampling to estimate quantum expectations. The local stochastic sampling in MCMC caps the potential advantages of neural networks in two ways: (i) Its intrinsic computational cost sets stringent practical limits on the width and depth of the networks, and therefore limits their expressive capacity; (ii) its difficulty in generating precise and uncorrelated samples can result in estimations of observables that are very far from their true value. Inspired by the state-of-the-art generative models used in machine learning, we propose a specialized neural-network architecture that supports efficient and exact sampling, completely circumventing the need for Markov-chain sampling. We demonstrate our approach for two-dimensional interacting spin models, showcasing the ability to obtain accurate results on larger system sizes than those currently accessible to neural-network quantum states.
We present a transformer-based variational autoregressive network for sampling lattice systems with continuous degrees of freedom and apply it to the two-dimensional XY model near the Berezinskii-Kosterlitz-Thouless transition. The architecture is combined with physics-informed ingredients: locality-informed attention and approximate probabilities. The resulting sampler significantly outperforms existing neural samplers. We train the model on lattices up to 96×9696\times9696×96, verify with a mode-dropping estimator that no parts of the configuration space are missed, and reproduce the energy, magnetization and helicity modulus obtained with the traditional Markov Chain Monte Carlo algorithm.
Autoregressive Neural Networks based on dense or convolutional layers have recently been shown to be a viable strategy for generating classical spin systems. Unlike these methods, sampling with transformers is commonly considered to be computationally inefficient. In this work, we propose a novel approach to transformer-based neural samplers in which we generate not a single spin per step but groups of spins. As an additional improvement, we construct a model of approximated probabilities, further improving the efficiency of the algorithm. Despite our approach being computationally heavier than dense networks or CNN-based approaches, we were able to sample larger systems of up to 180×180180 \times 180180×180 spins in case of the Ising model. The Effective Sample Size of our sampler is ∼20\sim 20∼20 times larger than that of the previous state-of-the-art neural sampler when trained for the 128×128128 \times 128128×128 Ising model at critical temperature. Finally, we also test our algorithm on the 2D Edwards-Anderson model, where we train 64×6464\times 6464×64 spin systems.
Monte Carlo methods are essential across diverse scientific fields, yet their efficiency is frequently hampered by critical slowing down-a sharp increase in autocorrelation times near phase transitions. Although deep learning approaches, such as neural-network-based samplers, have been proposed to alleviate this issue, they face another serious problem: the difficulty of training the models. This difficulty partially stems from the overly general nature of original machine-learning architectures, which often ignore underlying physical symmetries and force networks to relearn them from scratch. In this paper, we demonstrate that incorporating physical priors into the model significantly enhances performance. Building upon existing strategies that integrate spin-spin interactions, we propose a framework that utilizes a prior probability distribution as a starting point for training. Our results for the Ising model, as well as for the Edwards-Anderson spin glass model, suggest that moving away from `blank slate' models in favor of physics-informed priors reduces the training burden and facilitates the simulation of larger system sizes in discrete spin models.
Abstract Computing free energy is a fundamental problem in statistical physics. Recently, two distinct methods have been developed and have demonstrated remarkable success: the tensor-network-based contraction method and the neural-network-based variational method. Tensor networks are accurate, but their application is often limited to low-dimensional systems due to the high computational complexity in high-dimensional systems. The neural network method applies to systems with general topology. However, as a variational method, it is not as accurate as tensor networks. In this work, we propose an integrated approach, tensor-network-based variational autoregressive networks (TNVAN), that leverages the strengths of both tensor networks and neural networks: combining the variational autoregressive neural network’s ability to compute an upper bound on free energy and perform unbiased sampling from the variational distribution with the tensor network’s power to accurately compute the partition function for small sub-systems, resulting in a robust method for precisely estimating free energy. To evaluate the proposed approach, we conducted numerical experiments on spin glass systems with various topologies, including two-dimensional lattices, fully connected graphs, and random graphs. Our numerical results demonstrate the superior accuracy of our method compared to existing approaches. In particular, it effectively handles systems with long-range interactions and leverages GPU efficiency without requiring singular value decomposition, indicating great potential in tackling statistical mechanics problems and simulating high-dimensional complex systems through both tensor networks and neural networks.