From microcanonical HMC to Helmholtz theorem: thermodynamic foundations and a lower-dimensional sampler

A new thermodynamic analysis shows Microcanonical HMC obeys the Helmholtz theorem, adds a low-dimensional sampler, and argues canonical MCMC is more natural.

Direct answer

Microcanonical Hamiltonian Monte Carlo (MCHMC) was proposed as a sampler inspired by the microcanonical ensemble, but its thermodynamic foundations had not been verified in detail. This paper derives the thermodynamic state variables of MCHMC, proves analytically and numerically that it satisfies the Helmholtz theorem—an alternative formulation of the first law of thermodynamics—and constructs a new volume-based sampler that extends the method to lower-dimensional inference problems [1]. Crucially, the authors also argue that canonical MCMC algorithms such as HMC and Metropolis-Hastings are more natural from thermodynamic and information-theoretic perspectives, because only in the canonical case does thermodynamic entropy coincide with Shannon entropy of the posterior [1]. The work thus clarifies both what MCHMC is thermodynamically and where its conceptual limits lie.

5sources cited

This article was generated with WisPaper-powered search and paper analysis.

The thermodynamic baseline: canonical ensembles and MCMC

Earlier work established that Bayesian inference and MCMC can be described through the lens of statistical physics. The canonical partition function Z(T,J) = ∫ d^nθ d^nπ exp[−(1/T)(π²/2 − log(LΠ) − J·θ)] reduces to the Bayesian evidence at T=1, J=0, and its derivatives with respect to J yield cumulants of the posterior [1]. This canonical framework has been fruitful: it inspired new convergence criteria for HMC [1], and it underlies the construction of thermodynamic cyclic processes with Markov samplers, where varying temperature and sources in a closed loop can diagnose non-Gaussianity in Bayesian inference [4]. The canonical ensemble's entropy at unit temperature coincides with Shannon's entropy of the posterior, S_can(T=1) = −∫ d^nθ p(θ|y) log p(θ|y), a highly intuitive result that connects thermodynamic and information-theoretic notions [1].

The microcanonical ensemble, by contrast, describes isolated systems with fixed energy E, volume V, and particle number N. In molecular simulation, microcanonical Monte Carlo has been used for decades to study systems ranging from hard spheres to Lennard-Jones clusters [7, 9, 11]. These earlier microcanonical methods typically operate in the physical sciences, where the energy is a genuine physical quantity and the entropy is defined via the number of microstates. The question this paper addresses is whether MCHMC, an algorithm designed for Bayesian inference, genuinely realizes a microcanonical ensemble and whether its thermodynamic entropy has a meaningful information-theoretic interpretation [1].

MCHMC satisfies the Helmholtz theorem: analytical and numerical evidence

The paper's central technical contribution is a formal derivation showing that MCHMC's construction corresponds to a microcanonical thermodynamic ensemble [1]. The authors define the microcanonical partition function Ω₂(E,J) = ∫ d^nθ d^nπ δ(E − H₂(θ,π;J)) with Hamiltonian H₂ = |π|²/2 − (1/2)(LΠ e^{J·θ})^{2/(n−2)}, and show that at E=0, J=0, it reduces to Ω₂(0,0) = Ω_{n−1} p(y), proportional to the Bayesian evidence [1]. This mirrors the canonical case and confirms that samples from the microcanonical phase space density, when marginalised over momenta, yield the correct posterior distribution [1].

The Helmholtz theorem, an alternative formulation of the first law of thermodynamics for microcanonical mechanical systems, requires that the temperature T = ∂S/∂E derived from the volume entropy S(E,J) = log φ₂(E,J) matches the temperature computed from the sampler's samples. The authors verify this analytically for Gaussian likelihoods, finding T = 2E/n, and numerically for a toy problem and a cosmological inference problem using Pantheon+SH0ES Type Ia supernova data with 1590 supernovae [1]. In the cosmological application, the likelihood required shifting to ensure max log L ≈ 0 and whitening to handle a conditioning number of κ ≈ 10⁴, but the Helmholtz theorem was confirmed within numerical precision [1]. This establishes that MCHMC behaves according to the thermodynamic laws it was named after, at least for the H₂ Hamiltonian.

A volume-based sampler for lower-dimensional problems

The paper introduces a new sampling algorithm based on the volume entropy φ₂(E,J) = ∫ d^nθ d^nπ Θ(E − H₂), which can be interpreted as a low-dimensional extension of MCHMC [1]. The original MCHMC was designed for high-dimensional problems, where the typical set concentrates and the microcanonical construction becomes efficient. In lower dimensions, the volume of the energy shell behaves differently, and the new algorithm approaches MCHMC only in the high-dimensional limit [1]. This extension is sketched in Appendix A of the paper and represents a practical contribution for practitioners working with low-dimensional inference problems where standard MCHMC may not be appropriate.

The new sampler is not merely a technical variant; it arises directly from the thermodynamic analysis. By studying the volume entropy needed for the Helmholtz theorem, the authors identified a natural algorithmic extension [1]. This illustrates how thermodynamic reasoning can inspire algorithmic design, a theme also seen in the construction of MCMC cycles for canonical ensembles [4]. However, the paper does not provide extensive numerical performance comparisons between the new sampler and established methods, leaving its practical advantages to be determined in future work [1].

Why canonical MCMC is more natural: entropy and information

The paper's most provocative argument is that canonical MCMC algorithms are more natural than MCHMC from thermodynamic and information-theoretic perspectives [1]. The authors present three arguments. First, the microcanonical partition sum is more involved to construct than the canonical one, requiring additional momentum degrees of freedom that are not needed for the canonical definition [1]. Second, at unit temperature, the canonical thermodynamic entropy coincides exactly with Shannon's entropy of the posterior, while the microcanonical entropy at zero energy is the logarithm of an evidence-type integral, S₂(0,0) = log Ω_{n−2} + log ∫ d^nθ (1/n)(LΠ)^{n/(n−2)}, which is not a meaningful information entropy measure for the inference problem [1]. Third, the authors prove that it is impossible to construct a microcanonical sampling algorithm where the thermodynamic entropy equals Shannon's entropy, because the evidence is a global functional of the likelihood and prior, while the Hamiltonian must be local for computational efficiency [1].

This argument aligns with the broader observation that canonical ensembles have been the primary framework for thermodynamic analyses of MCMC. The canonical partition function has yielded convergence criteria [1], cyclic processes for diagnosing non-Gaussianity [4], and connections to information theory via Jaynes' work [1]. The microcanonical ensemble, while physically meaningful for isolated systems, does not naturally accommodate the global normalisation that Bayesian inference requires. The paper's conclusion is not that MCHMC is invalid—it does satisfy the Helmholtz theorem—but that its thermodynamic foundations are less aligned with the information-theoretic nature of Bayesian inference [1].

Boundaries of the evidence and open questions

The conclusions rest on theoretical derivations and numerical experiments on a toy problem and a three-dimensional cosmological inference problem [1]. The authors explicitly note that the Helmholtz theorem has not been tested on large-scale, high-dimensional inference tasks, and the new low-dimensional sampler is limited to low-dimensional problems [1]. The H₂ Hamiltonian has practical limitations: because the likelihood itself is evaluated rather than its logarithm, transformations such as shifting and whitening are necessary to make the sampler work at all, and the authors note that H₀ provides the better performing sampling algorithm [1]. This suggests that the thermodynamic verification, while mathematically sound, may be most relevant for the H₂ variant that is not the preferred choice in practice.

The paper also leaves open questions about the broader applicability of microcanonical methods. The authors suggest extending the Helmholtz theorem verification to non-Gaussian likelihoods using DALI or Gram-Charlier expansions, and studying the new volume-based sampler's numerical performance in more detail [1]. Additionally, the relationship between microcanonical MCMC and other ensembles, such as the macrocanonical Avalanche algorithm [1], remains to be explored. The thermodynamic perspective has yielded a better understanding of canonical, macrocanonical, and now microcanonical MCMC sampling algorithms, but the practical implications for Bayesian inference workflows are still emerging [1].

About These Sources

This research page is built on 5 peer-reviewed studies — published from 2011 to 2026, 4 from 2024 or later, collectively cited 3,502 times — selected as the most relevant from 13 studies that passed quality screening, drawn from 63 papers retrieved from a database of over 500 million.

Sources used in this answer

1

Microcanonical Hamiltonian Monte Carlo and the Helmholtz Theorem.

The anchor paper proves analytically and numerically that Microcanonical Hamiltonian Monte Carlo satisfies the Helmholtz theorem, constructs a low-dimensional volume-based sampler, and argues that canonical MCMC is more natural from thermodynamic and information-theoretic perspectives.

2

Handbook of Markov Chain Monte Carlo

Neal's handbook chapter provides foundational background on MCMC using Hamiltonian dynamics, establishing the canonical framework that the anchor paper contrasts with microcanonical approaches.

3

Monte Carlo Simulation on Adiabatic Ensembles and a Genetic Algorithm.

Silva Fernandes demonstrates interactive Monte Carlo simulations for adiabatic ensembles, including microcanonical simulations of harmonic oscillators that illustrate Boltzmann entropy and the Second Law, providing pedagogical context for microcanonical methods.

4

Thermodynamic Cyclic Processes with Markov Samplers in Bayesian Inference

von Campe and Schaefer construct thermodynamic cyclic processes with Markov samplers in Bayesian inference, showing that non-zero net work output diagnoses non-Gaussianity, and demonstrating the fruitfulness of canonical thermodynamic analyses of MCMC.

5

Embedding memory in coarse-grained Hamiltonian systems

Español discusses embedding memory in coarse-grained Hamiltonian systems, noting constraints related to microcanonical ensembles and Dirac delta forms, highlighting limitations in reduced descriptions.