Table of Contents
Fetching ...

Deep generative modelling of canonical ensemble with differentiable thermal properties

Shuo-Hui Li, Yao-Wen Zhang, Ding Pan

TL;DR

The paper tackles the challenge of computing thermodynamic quantities of many-body systems at thermal equilibrium by introducing VaTD, a variational framework that turns any tractable density model into a temperature-differentiable sampler for the canonical ensemble. By conditioning on beta and optimizing a temperature-averaged loss, VaTD yields an unbiased Boltzmann distribution across a continuous temperature range and provides differentiable estimates of the free energy and its derivatives. Empirical validation on 2D Ising and XY models shows that VaTD's direct-sampling results match or closely approach unbiased MCMC results, with significant efficiency gains and scalable performance to large lattices. The approach unifies deep generative modeling with rigorous thermodynamic analysis, enabling continuous temperature dependence and rapid computation of thermodynamic observables without training separate models per temperature.

Abstract

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 temperature, 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, 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.

Deep generative modelling of canonical ensemble with differentiable thermal properties

TL;DR

The paper tackles the challenge of computing thermodynamic quantities of many-body systems at thermal equilibrium by introducing VaTD, a variational framework that turns any tractable density model into a temperature-differentiable sampler for the canonical ensemble. By conditioning on beta and optimizing a temperature-averaged loss, VaTD yields an unbiased Boltzmann distribution across a continuous temperature range and provides differentiable estimates of the free energy and its derivatives. Empirical validation on 2D Ising and XY models shows that VaTD's direct-sampling results match or closely approach unbiased MCMC results, with significant efficiency gains and scalable performance to large lattices. The approach unifies deep generative modeling with rigorous thermodynamic analysis, enabling continuous temperature dependence and rapid computation of thermodynamic observables without training separate models per temperature.

Abstract

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 temperature, 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, 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.
Paper Structure (21 sections, 42 equations, 11 figures, 3 tables, 1 algorithm)

This paper contains 21 sections, 42 equations, 11 figures, 3 tables, 1 algorithm.

Figures (11)

  • Figure 1: (a) The exact and estimated free energy of the 2D Ising model on a $16\times 16$ square lattice with PBC, and the relative error between the two (inset). The temperature factor ($-T$) is removed from the free energy($-T \log \mathcal{Z}$) for better comparison. (b) The estimated squared magnetization of the Ising model. (c) State configurations directly sampled from the trained model at three temperatures, with background color as a continuous interpolation of the discrete site for better visualization.
  • Figure 2: The mean energy and heat capacity of the Ising model, estimated using the differentiation of the free energy, compared with the results obtained from the MCMC simulation.
  • Figure 3: (a) The estimated free energy and its standard deviation (inset) of the 2D XY model on a $16\times 16$ square lattice with PBC. The temperature factor ($-T$) is removed from the free energy($-T \log \mathcal{Z}$) for better comparison. (b) The estimated squared magnetization of the XY model. (c) State configurations directly sampled from the trained model at three temperatures, the background color represents the vorticity.
  • Figure 4: The mean energy and heat capacity of the XY model, estimated using the differentiation of the free energy, compared with the results obtained from the MCMC simulation.
  • Figure S1: A comparison of total time consumption between VaTD and MCMC methods on a 2D $16\times16$ XY model with periodic boundary conditions. The temperature points are equally spaced within the range of $\beta \in [0.5, 1.5]$. The convergence accuracy is set at $10^{-3}$. We estimated the RMHMC time consumption curve using the speedup of $3.5$ relative to HMC, which is a upper bound of the reported best-case speedup of $3$.
  • ...and 6 more figures