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.
