Learning the Ising Model with Generative Neural Networks

Francesco D'Angelo, Lucas BöttcherarXiv 2020 · DOI

Abstract

Recent advances in deep learning and neural networks have led to an increased interest in the application of generative models in statistical and condensed matter physics. In particular, restricted Boltzmann machines (RBMs) and variational autoencoders (VAEs) as specific classes of neural networks have been successfully applied in the context of physical feature extraction and representation learning. Despite these successes, however, there is only limited understanding of their representational properties and limitations. To better understand the representational characteristics of RBMs and VAEs, we study their ability to capture physical features of the Ising model at different temperatures. This approach allows us to quantitatively assess learned representations by comparing sample features with corresponding theoretical predictions. Our results suggest that the considered RBMs and convolutional VAEs are able to capture the temperature dependence of magnetization, energy, and spin-spin correlations. The samples generated by RBMs are more evenly distributed across temperature than those generated by VAEs. We also find that convolutional layers in VAEs are important to model spin correlations whereas RBMs achieve similar or even better performances without convolutional filters.

Introduction

Generative models have emerged as powerful tools for physicists to study phase transitions and represent complex quantum wave functions. However, the "representational limits" of these models—the specific physical features they can or cannot learn—remain poorly understood. While previous studies focused on small systems and single-temperature models, this research scales the investigation to a $32 \times 32$ lattice (1,024 spins) and evaluates whether a single "global" model can represent the entire temperature spectrum of the 2D Ising model, including the critical phase transition.

Methodology

The study compares two primary generative architectures: Restricted Boltzmann Machines (RBMs) and Conditional Variational Autoencoders (cVAEs). RBMs are energy-based models with a bipartite graph structure, trained using Persistent Contrastive Divergence (PCD). cVAEs utilize an encoder-decoder structure to map configurations to a latent space, conditioned on temperature labels.

Schematic of the Variational Autoencoder (VAE) architecture, illustrating the encoder-decoder structure and latent space sampling.

The models were trained on synthetic data generated via the Metropolis-Hastings algorithm across six discrete temperatures $T \in \{1.5, 2, 2.5, 2.75, 3, 4\}$, encompassing ordered, critical, and disordered phases. Advanced monitoring techniques, such as Pseudo log-likelihood, were employed to track RBM performance, as exact partition function calculations are intractable for systems of this size.

Results and Discussion

Both RBMs and convolutional cVAEs successfully replicated the temperature dependence of key thermodynamic properties, including magnetization and energy. A separate classifier achieved 89% accuracy in identifying the temperature of generated samples, confirming their physical representativeness.

Convergence of the average magnetization $M(T)$ for an RBM during training compared to ground truth $M(RT)^2$ data.

A critical finding was the role of architecture in capturing spatial features. For VAEs, convolutional layers were essential to model spin-spin correlations. In contrast, fully connected RBMs demonstrated a surprising ability to capture these spatial features without specialized filters. Both models faced the greatest challenge at the critical temperature ($T_c \approx 2.269$), where long-range correlations are hardest to compress into latent representations.

In terms of trade-offs, VAEs were significantly faster to train (20 hours on a GPU vs. 7 days on a CPU for RBMs) and achieved a closer fit to the training data's probability density for magnetization (Wasserstein distance of 0.023 vs. 0.034). However, RBMs produced a more uniform distribution of samples across the temperature range.

Conclusion

This work demonstrates that generative neural networks can effectively learn the global physics of the 2D Ising model. While convolutional VAEs offer speed and precision, RBMs exhibit robust representational capabilities for spatial correlations. Future research will focus on bridging the "critical gap" at $T_c$ and applying these models to disordered systems like spin glasses, where analytical solutions are unavailable.

Summary updated

BibTeX
@misc{dangelo2020learning,
  author = {Francesco D'Angelo and Lucas Böttcher},
  title = {{Learning the Ising Model with Generative Neural Networks}},
  year = {2020},
  eprint = {2001.05361},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.05361},
}
Figure