Source-linked AI summary

Learning Thermodynamics with Boltzmann Machines

Giacomo Torlai, Roger G. Melko

arXiv:1606.02718v1cond-mat.stat-mechcond-mat.dis-nncs.LG

TL;DR

The paper asks whether Boltzmann machines can model thermodynamic distributions and observables for finite-temperature Ising systems. It trains restricted Boltzmann machines on Monte Carlo importance-sampled spin configurations and compares generated observables with direct Monte Carlo estimates. The machines faithfully reproduce the observables, but require many more hidden nodes near criticality, particularly for specific heat.

  • Problem

    The paper addresses whether a neural network can reproduce statistical-mechanical distributions and their thermodynamic observables in an unsupervised setting.

  • Method

    Restricted Boltzmann machines are trained at different temperatures on Monte Carlo importance-sampled Ising spin configurations, then used to generate spin states and observables.

  • Results

    The machines faithfully reproduce thermodynamic observables across temperatures, using only a few hidden nodes away from criticality but many more near Tc for specific heat.

  • Takeaways & Limitations

    Boltzmann machines may serve as a research tool for estimating thermodynamic observables from generated configurations alongside standard Monte Carlo sampling.

Abstract

from arXiv · show

A Boltzmann machine is a stochastic neural network that has been extensively used in the layers of deep architectures for modern machine learning applications. In this paper, we develop a Boltzmann machine that is capable of modelling thermodynamic observables for physical systems in thermal equilibrium. Through unsupervised learning, we train the Boltzmann machine on data sets constructed with spin configurations importance-sampled from the partition function of an Ising Hamiltonian at different temperatures using Monte Carlo (MC) methods. The trained Boltzmann machine is then used to generate spin states, for which we compare thermodynamic observables to those computed by direct MC sampling. We demonstrate that the Boltzmann machine can faithfully reproduce the observables of the physical system. Further, we observe that the number of neurons required to obtain accurate results increases as the system is brought close to criticality.

I. INTRODUCTION

The paper motivates using unsupervised generative neural networks to model statistical-mechanical distributions and estimate observables from Monte Carlo-sampled data. It focuses on whether Boltzmann machines can reproduce finite-temperature Ising thermodynamics, especially near criticality.

  • Motivation: Unsupervised generative models learn data distributions without labels and can generate approximate samples from those distributions.This makes them relevant when labelled data are scarce.
  • Motivation: Neural networks have been applied successfully to several complex problems in physics, including phase identification and locating phase transitions.These applications motivate extending neural-network methods to statistical-mechanical distributions.
  • Research question: The paper asks whether neural networks can reproduce statistical-mechanical distributions of classical Hamiltonians in an unsupervised setting.The proposed workflow trains on Monte Carlo importance-sampled configurations and estimates observables from generated distributions.
  • Candidate model: A Boltzmann machine is selected as the candidate because it is a stochastic neural network that can reconstruct approximate input probability distributions.Its stochastic nodes and weighted connections support generative modelling.
  • Paper contribution: The study targets finite-temperature Ising distributions and evaluates energy, magnetization, and specific heat generated by the trained machines.Faithful observable recreation is demonstrated for a finite-size lattice, while criticality requires substantially more neurons than paramagnetic or ferromagnetic phases.

II. THE BOLTZMANN MACHINE

The paper frames the Boltzmann machine as an approximate probabilistic model of a target Boltzmann distribution. Monte Carlo sampling provides both training configurations and direct thermodynamic estimators for comparison.

  • Target and comparison: The target distribution is the Boltzmann distribution of N Ising spin variables, which can be sampled using Monte Carlo methods.The same simulations can directly estimate thermodynamic observables such as energy and specific heat.
  • Model objective: The Boltzmann machine is trained to build an approximate model of the target probability distribution.The model-generated distribution can then be used in place of direct sampling for observable estimation.
  • Evaluation: Monte Carlo supplies sampled configurations and reference estimators against which observables from the trained machine can be compared.This establishes a direct physical-distribution versus model-distribution evaluation procedure.

A. Target probability distribution and thermodynamic observables

The physical system is described by a thermal Boltzmann distribution, while thermodynamic observables are estimated from sampled configurations. Direct partition-function evaluation is limited to very small systems.

  • Target distribution: A thermal system of N Ising spins on a d-dimensional lattice has configuration probability given by the Boltzmann distribution.The spin configuration is σ = {σ1, σ2, · · ·, σN}, and the Hamiltonian is denoted HS(σ).
  • Target distribution: The canonical partition function enables computation of thermodynamic potentials and average observables.The partition function is ZS = Trσe^−HS(σ)/T.
  • Computational limitation: Summing over all 2^N spin states is feasible only for very small systems.This motivates estimating observables from sampled configurations rather than enumerating the full state space.
  • Observable estimation: For samples drawn from pS(σ, T), the observable average is estimated by averaging O(σk) over M configurations.The expression becomes exact as M approaches infinity; finite-M estimates are obtained through Markov-chain Monte Carlo.
  • Observable estimation: The resulting Monte Carlo expectation values are treated as exact reference results for comparison with observables generated by a Boltzmann machine.The comparison is between the target-distribution estimates and the model-generated distribution.

B. Restricted Boltzmann Machine

The restricted Boltzmann machine models a target distribution with a two-layer undirected graph whose stochastic visible and hidden units can be sampled efficiently. Its parameters define the model energy and marginal visible distribution.

  • Model construction: The model builds a probabilistic distribution pλ(σ) that mimics a target distribution pS(σ).Parameters λ are tuned to reduce the distance between the model and target distributions.
  • Architecture: The restricted Boltzmann machine uses a bilayer architecture with symmetric edges connecting visible spin nodes and hidden nodes.The architecture is an undirected graphical model with parameters including W, b, and c.
  • Architecture: External fields are represented through couplings to ancillary units whose variables are clamped to one.The visible and hidden layers receive the corresponding external-field weights b and c.
  • Inference: The distribution over visible spins is obtained by marginalizing the joint distribution over visible and hidden nodes.This introduces an effective visible energy, often called the free energy.
  • Inference: Independent activations within each layer allow the visible and hidden layers to be sampled one at a time.The layerwise sampling procedure exploits fast linear-algebra routines in numerical simulations.
  • Extensions: The architecture can be extended with a label layer for classification and forms a basis for multilayer deep-learning models.The paper’s main use here, however, is generating visible spin states.

C. Training

Training fits the Boltzmann machine to an Ising-derived data distribution by minimizing KL divergence with stochastic optimization. Contrastive divergence approximates the required model-dependent gradients using short Monte Carlo chains, accelerating learning while leaving moderate-data overfitting as a concern.

  • Objective: The machine parameters are tuned so the model distribution pλ(σ) approaches the target distribution pS(σ) by minimizing their KL divergence.The training objective is equivalent to optimizing the distance between the target and model distributions.
  • Data construction: The training data set D is built from Ising spin configurations sampled by Markov-chain Monte Carlo at temperature T.For sufficiently large |D|, the empirical distribution pdata(σ) approximates the target distribution pS(σ).
  • Optimization: Stochastic gradient descent updates parameters using gradients of the KL divergence, with mini-batches providing more frequent updates across each data-set sweep.Mini-batches are useful because data sets are often redundant.
  • Caveat: For moderate-sized data sets, stochastic-gradient training can overfit the training data, motivating regularization such as weight decay.The paper identifies overfitting as a common neural-network training issue in this setting.
  • Optimization: Contrastive divergence CDk estimates model correlations by running k Markov steps after clamping data samples and alternating exact conditional layer updates.Starting chains from data samples reduces equilibration requirements, so k can be small; CD1 can sometimes reconstruct visible states with low error.

III. RESULTS

The study evaluates Boltzmann machines trained on Ising-model spin configurations across temperatures, comparing generated thermodynamic observables with direct sampling. Accurate reproduction is possible, but criticality requires substantially more hidden nodes and exposes sampling limitations.

  • Training and evaluation: In the six-spin one-dimensional test, training is assessed using KL divergence and by comparing exact probabilities with machine distributions after 10 and 500 training steps.The small system permits exact calculation of the partition function and full probability distribution.
  • Training and evaluation: The authors train Boltzmann machines on Monte Carlo-sampled Ising configurations and compare machine-generated observables with values calculated from the data set.For the two-dimensional system, machines use block Gibbs sampling after training to generate visible-spin samples.
  • Training and evaluation: Increasing the contrastive-divergence order k can improve learning but substantially increases the time required to reach a solution.The reported two-dimensional training uses CD20 with fixed learning and mini-batch settings.
  • Thermodynamic observables: The evaluated observables are energy, magnetization, specific heat, and magnetic susceptibility for a two-dimensional Ising system with N = 64 spins.Figure 4 compares machine outputs against exact values calculated from the data set for nH = 4, 16, and 64.
  • Thermodynamic observables: Magnetization is reproduced within statistical error even with as few as two hidden nodes, whereas energy shows a larger discrepancy because local energy constraints are absent from the training configurations.The magnetization result is attributed to its implicit encoding in real-space spin samples.
  • Temperature dependence: For fixed physical size, machines learn best away from criticality, reproducing specific heat within statistical error in ordered and disordered phases largely independently of hidden-node count.The low- and high-temperature behavior is consistent with the trained weight histograms and the effective decoupling or polarization of the layers.
  • Temperature dependence: At criticality, accurate specific-heat convergence requires significantly more hidden nodes, and the required threshold grows with increasing system size N.The corresponding magnetization scaling shows no clear dependence on the number of hidden nodes.

IV. CONCLUSIONS

The study shows that restricted Boltzmann machines can reproduce thermodynamic observables from Monte Carlo-trained Ising spin configurations, including in two dimensions. Accuracy is achieved with few hidden nodes away from criticality, while critical behavior requires substantially more hidden nodes and motivates further quantum extensions.

  • Monte Carlo importance-sampled Ising configurations were used to train restricted Boltzmann machines as stochastic models of thermodynamic probability distributions.The study includes an exact convergence check for a small one-dimensional system.
  • The machines faithfully reproduced thermodynamic observables for the two-dimensional Ising model when compared with direct Monte Carlo calculations.Training was performed at temperatures above, below, and at the Ising critical temperature.
  • For T > Tc and T < Tc, the Boltzmann machine captured the thermodynamics with only a few hidden nodes.The result held for both the ordered and disordered phases in the reported experiments.
  • Near T = Tc, reproducing the specific heat required many more hidden nodes, reflecting increased fluctuations at criticality.The reported growth is reminiscent of a previously suggested connection between deep learning and the renormalization group.
  • Boltzmann machines may serve as research tools for condensed matter and statistical mechanics when coupled with standard Monte Carlo sampling.The trained configurations could support additional thermodynamic estimators or redistribute estimator calculation away from Monte Carlo.
  • Future work could test whether standard or quantum Boltzmann machines capture quantum correlations in configurations generated by quantum Monte Carlo.The sign problem for direct and approximate estimator calculations is also identified as an open issue.
Loading 1606.02718v1…