
Thermodynamics of the Ising model encoded in restricted Boltzmann machines
Jing Gu1and Kai Zhang1, 2, ∗
1Division of Natural and Applied Sciences, Duke Kunshan University, Kunshan, Jiangsu, 215300, China
2Data Science Research Center (DSRC), Duke Kunshan University, Kunshan, Jiangsu, 215300, China
The restricted Boltzmann machine (RBM) is a two-layer energy-based model that uses its hidden-
visible connections to learn the underlying distribution of visible units, whose interactions are often
complicated by high-order correlations. Previous studies on the Ising model of small system sizes
have shown that RBMs are able to accurately learn the Boltzmann distribution and reconstruct
thermal quantities at temperatures away from the critical point Tc. How the RBM encodes the
Boltzmann distribution and captures the phase transition are, however, not well explained. In
this work, we perform RBM learning of the 2dand 3dIsing model and carefully examine how
the RBM extracts useful probabilistic and physical information from Ising configurations. We find
several indicators derived from the weight matrix that could characterize the Ising phase transition.
We verify that the hidden encoding of a visible state tends to have an equal number of positive
and negative units, whose sequence is randomly assigned during training and can be inferred by
analyzing the weight matrix. We also explore the physical meaning of visible energy and loss
function (pseudo-likelihood) of the RBM and show that they could be harnessed to predict the
critical point or estimate physical quantities such as entropy.
I. INTRODUCTION
The tremendous success of deep learning in multiple
areas over the last decade has really revived the inter-
play between physics and machine learning, in particular
neural networks [1]. On one hand, (statistical) physics
ideas [2], such as renormalization group (RG) [3], en-
ergy landscape [4], free energy [5], glassy dynamics [6],
jamming [7], Langevin dynamics [8], and field theory [9],
shed some light on the interpretation of deep learning
and statistical inference in general [10]. On the other
hand, machine learning and deep learning tools are har-
nessed to solved a wide range of physics problems, such as
interaction potential construction [11], phase transition
detection [12], structure encoding [13], physical concepts
discovery [14], and many others [15, 16]. At the very
intersection of these two fields lies the restricted Boltz-
mann machine (RBM) [17], which serves as a classical
paradigm to investigate how an overarching perspective
could benefit both sides.
The RBM uses hidden-visible connections to encode
(high-order) correlations between visible units [18]. Its
precursor–the (unrestricted) Boltzmann machine was in-
spired by spin glasses [19, 20] and is often used in the
inverse Ising problem to infer physical parameters [21–
23]. The restriction of hidden-hidden and visible-visible
connections in RBMs allows for more efficient training
algorithms, and therefore leads to recent applications in
Monte Carlo simulation acceleration [24], quantum wave-
function representation [25, 26], and polymer configura-
tion generation [27]. Deep neural networks formed by
stacks of RBMs have been mapped onto the variational
RG due to their conceptual similarity [28]. RBMs are
also shown to be equivalent to tensor network states from
∗kai.zhang@dukekunshan.edu.cn
quantum many-body physics [29]. As simple as it seems,
energy-based models like the RBM could eventually be-
come the building blocks of autonomous machine intelli-
gence [30].
Besides the above mentioned efforts, the RBM has also
been applied extensively in the study of the minimal
model for second-order phase transition–the Ising model.
For the small systems under investigation, it was found
that RBMs with an enough number of hidden units can
encode the Boltzmann distribution, reconstruct thermal
quantities, and generate new Ising configurations fairly
well [31–33]. The visible →hidden →visible ··· gener-
ating sequence of the RBM can be mapped onto a RG
flow in physical temperature (often towards the critical
point) [34–36]. But the mechanism and power of the
RBM to capture physics concepts and principles have not
been fully explored. First, in what way is the Boltzmann
distribution of the Ising model learned by the RBM? Sec-
ond, can the RBM learn and even quantitatively predict
the phase transition without extra human knowledge?
An affirmative answer to the second question is partic-
ularly appealing, because simple unsupervised learning
methods such as principal component analysis (PCA) us-
ing configuration information alone do not provide quan-
titative prediction for the transition temperature [37, 38]
and supervised learning with neural networks requires
human labeling of the phase type or temperature of a
given configuration [39, 40].
In this article, we report a detailed numerical study
on RBM learning of the Ising model with a system size
much larger than those used previously. The purpose
is to thoroughly dissect the various parts of the RBM
and reveal how each part contributes to the learning of
the Boltzmann distribution of the input Ising configu-
rations. Such understanding allows us to extract sev-
eral useful machine-learning estimators or predictors for
physical quantities, such as entropy and phase transi-
tion temperature. Conversely, the analysis of a physi-
arXiv:2210.06203v1 [cond-mat.stat-mech] 12 Oct 2022