Skip to main content
QUICK REVIEW

[Paper Review] Quantum-Inspired Hamiltonian Monte Carlo for Bayesian Sampling

Ziming Liu, Zheng Zhang|arXiv (Cornell University)|Dec 4, 2019
Markov Chains and Monte Carlo MethodsMathematics42 references5 citations
TL;DR

This paper proposes Quantum-Inspired Hamiltonian Monte Carlo (QHMC), a Bayesian sampling method that treats the particle mass as a random positive definite matrix, inspired by the quantum mechanical energy-time uncertainty principle. By allowing adaptive time scales, QHMC improves sampling efficiency in spiky and multimodal posteriors, with a stochastic gradient variant (QSGNHT) achieving superior performance in neural network pruning and image denoising compared to HMC and its variants.

ABSTRACT

Hamiltonian Monte Carlo (HMC) is an efficient Bayesian sampling method that can make distant proposals in the parameter space by simulating a Hamiltonian dynamical system. Despite its popularity in machine learning and data science, HMC is inefficient to sample from spiky and multimodal distributions. Motivated by the energy-time uncertainty relation from quantum mechanics, we propose a Quantum-Inspired Hamiltonian Monte Carlo algorithm (QHMC). This algorithm allows a particle to have a random mass matrix with a probability distribution rather than a fixed mass. We prove the convergence property of QHMC and further show why such a random mass can improve the performance when we sample a broad class of distributions. In order to handle the big training data sets in large-scale machine learning, we develop a stochastic gradient version of QHMC using Nos{é}-Hoover thermostat called QSGNHT, and we also provide theoretical justifications about its steady-state distributions. Finally in the experiments, we demonstrate the effectiveness of QHMC and QSGNHT on synthetic examples, bridge regression, image denoising and neural network pruning. The proposed QHMC and QSGNHT can indeed achieve much more stable and accurate sampling results on the test cases.

Motivation & Objective

  • To address the inefficiency of standard Hamiltonian Monte Carlo (HMC) in sampling from spiky and multimodal posterior distributions common in sparse and low-rank Bayesian modeling.
  • To leverage the energy-time uncertainty relation from quantum mechanics to enable adaptive time scales in sampling via a random mass matrix.
  • To develop a scalable stochastic gradient version, QSGNHT, for large-scale machine learning with theoretical guarantees on steady-state distributions.
  • To demonstrate improved sampling accuracy and convergence stability on synthetic and real-world Bayesian learning tasks, including regression, image denoising, and neural network pruning.

Proposed method

  • Proposes QHMC, where the particle mass matrix is a random positive definite matrix drawn from a probability distribution, rather than a fixed scalar or matrix.
  • Uses the Nosé-Hoover thermostat to maintain thermal equilibrium in the stochastic gradient version, ensuring correct steady-state distributions.
  • Introduces QSGNHT, a stochastic gradient variant of QHMC that uses batch-estimated gradients and a lower bound $m_0$ on the sampled mass to prevent numerical instability.
  • Employs a Metropolis-Hastings correction step in the sampling process to ensure detailed balance and convergence to the true posterior.
  • Applies three parametrizations—S-QHMC, D-QHMC, and M-QHMC—offering flexible and efficient implementations for different distribution types.
  • Theoretical analysis proves convergence of QHMC to the true posterior and justifies the steady-state distribution of QSGNHT using stochastic differential equations.

Experimental results

Research questions

  • RQ1Can a random mass matrix in Hamiltonian dynamics improve sampling efficiency in multimodal and spiky posterior distributions compared to fixed-mass HMC?
  • RQ2How does the energy-time uncertainty principle from quantum mechanics inspire a more effective sampling strategy in Bayesian inference?
  • RQ3Can a stochastic gradient version of QHMC maintain correct steady-state distributions while scaling to large datasets?
  • RQ4Does QHMC outperform standard HMC, SGHMC, and SGLD in real-world Bayesian learning tasks such as neural network pruning and image denoising?
  • RQ5What are the theoretical conditions under which QHMC converges to the true posterior distribution?

Key findings

  • QSGNHT achieved a 2% higher test accuracy (96.6% ± 0.2) than SGNHT (94.4% ± 0.2) on MNIST image classification after Bayesian pruning.
  • The proposed QSGNHT achieved a 14% higher compression rate (54.2 ± 2.1) than SGNHT (47.6 ± 1.3) in neural network pruning, indicating better model sparsity.
  • In image denoising, QHMC and QSGNHT produced more accurate and stable reconstructions than HMC and SGHMC, especially in regions with sharp transitions.
  • On synthetic multimodal distributions, QHMC successfully explored all modes, while standard HMC failed to mix properly due to fixed time-scale limitations.
  • Theoretical analysis confirms that QHMC converges to the true posterior distribution, and QSGNHT maintains the correct steady-state distribution under stochastic gradients.
  • The use of a lower bound $m_0$ on the sampled mass prevented numerical divergence and improved training stability in QSGNHT.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.