Comparison between the Hamiltonian Monte Carlo method and the Metropolis–Hastings method for coseismic fault model estimation
A rapid source fault estimation and quantitative assessment of the uncertainty of the estimated model can elucidate the occurrence mechanism of earthquakes and inform disaster damage mitigation. The Bayesian statistical method that addresses the posterior distribution of unknowns using the Markov chain Monte Carlo (MCMC) method is significant for uncertainty assessment. The Metropolis–Hastings method, especially the Random walk Metropolis–Hastings (RWMH), has many applications, including coseismic fault estimation. However, RWMH exhibits a trade-off between the transition distance and the acceptance ratio of parameter transition candidates and requires a long mixing time, particularly in solving high-dimensional problems. This necessitates a more efficient Bayesian method. In this study, we developed a fault estimation algorithm using the Hamiltonian Monte Carlo (HMC) method, which is considered more efficient than the other MCMC method, but its applicability has not been sufficiently validated to estimate the coseismic fault for the first time. HMC can conduct sampling more intelligently with the gradient information of the posterior distribution. We applied our algorithm to the 2016 Kumamoto earthquake (MJMA 7.3), and its sampling converged in 2 × 104 samples, including 1 × 103 burn-in samples. The estimated models satisfactorily accounted for the input data; the variance reduction was approximately 88%, and the estimated fault parameters and event magnitude were consistent with those reported in previous studies. HMC could acquire similar results using only 2% of the RWMH chains. Moreover, the power spectral density (PSD) of each model parameter's Markov chain showed this method exhibited a low correlation with the subsequent sample and a long transition distance between samples. These results indicate HMC has advantages in terms of chain length than RWMH, expecting a more efficient estimation for a high-dimensional problem that requires a long mixing time or a problem using nonlinear Green’s function, which has a large computational cost.Graphical
- Research Article
154
- 10.1016/j.strusafe.2018.05.005
- Aug 16, 2018
- Structural Safety
Hamiltonian Monte Carlo methods for Subset Simulation in reliability analysis
- Research Article
8
- 10.1093/gji/ggae131
- Apr 9, 2024
- Geophysical Journal International
SUMMARY Bayesian methods provide a valuable framework for rigorously quantifying the model uncertainty arising from the inherent non-uniqueness in the magnetotelluric (MT) inversion. However, widely used Markov chain Monte Carlo (MCMC) sampling approaches usually require a significant number of model samples for accurate uncertainty estimates, making their applications computationally challenging for 2-D or 3-D MT problems. In this study, we explore the applicability of the Hamiltonian Monte Carlo (HMC) method for 2-D probabilistic MT inversion. The HMC provides a mechanism for efficient exploration in high-dimensional model space by making use of gradient information of the posterior probability distribution, resulting in a substantial reduction in the number of samples needed for reliable uncertainty quantification compared to the conventional MCMC methods. Numerical examples with synthetic data demonstrate that the HMC method achieves rapid convergence to the posterior probability distribution of model parameters with a limited number of model samples, indicating the computational advantages of the HMC in high-dimensional model space. Finally, we applied the developed approach to the COPROD2 field data set. The statistical models derived from the HMC approach agree well with previous results obtained by 2-D deterministic inversions. Most importantly, the probabilistic inversion provides valuable quantitative model uncertainty information associated with the resistivity structures derived from the observed data, which facilitates model interpretation.
- Research Article
2
- 10.1093/gji/ggae389
- Oct 30, 2024
- Geophysical Journal International
SUMMARY In this work, we introduce the probabilistic inversion of tomographic complex resistivity (CR) measurements using the Hamiltonian Monte Carlo (HMC) method. The posterior model distribution on which our approach operates accounts for the underlying complex-valued nature of the CR imaging problem accurately by including the individual errors of the measured impedance magnitude and phase, allowing for the application of independent regularization on the inferred subsurface conductivity magnitude and phase, and incorporating the effects of cross-sensitivities. As the tomographic CR inverse problem is nonlinear, of high dimension and features strong correlations between model parameters, efficiently sampling from the posterior model distribution is challenging. To meet this challenge we use HMC, a Markov-chain Monte Carlo method that incorporates gradient information to achieve efficient model updates. To maximize the benefit of a given number of forward calculations, we use the No-U-Turn sampler (NUTS) as a variant of HMC. We demonstrate the probabilistic inversion approach on a synthetic CR tomography measurement. The NUTS succeeds in creating a sample of the posterior model distribution that provides us with the ability to analyse correlations between model parameters and to calculate statistical estimators of interest, such as the mean model and the covariance matrix. Our results provide a strong basis for the characterization of the posterior model distribution and uncertainty quantification in the context of the tomographic CR inverse problem.
- Research Article
- 10.1111/1365-2478.70016
- Mar 11, 2025
- Geophysical Prospecting
In geophysics, Bayesian inversion methods are of significant prominence. Here, we present a novel approach utilizing the Hamiltonian Monte Carlo (HMC) method in gravity inversion for elucidating three‐dimensional (3D) density structures. HMC provides a multi‐dimensional sampling method that demonstrates enhanced optimization efficiency, facilitating the attainment of distant proposals with elevated acceptance probabilities. Its applicability also extends to resolving linear inverse problems. Three synthetic models of cubic bodies, dipping dykes and a combined model were designed for tests. The testes underscore the promising potential of HMC in recovering subsurface density source bodies and giving the uncertainty of the inversion model. Furthermore, an inversion test conducted on the Vinton salt dome yields a reasonable 3D distribution of cap rock, consistent with prior studies in this area. The modelling and field experiments showed that the proposed HMC gravity inversion method had higher accuracy and application potential.
- Conference Article
2
- 10.1109/asap52443.2021.00009
- Jul 1, 2021
Monte Carlo (MC) methods are widely used in many research areas such as physical simulation, statistical analysis, and machine learning. Application of MC methods requires drawing fast mixing samples from a given probability distribution. Among existing sampling methods, the Hamiltonian Monte Carlo (HMC) utilizes gradient information during Hamiltonian simulation and can produce fast mixing samples at the highest efficiency. However, without carefully chosen simulation parameters for a specific problem, HMC generally suffers from simulation locality and computation waste. As a result, the No-U-Turn Sampler (NUTS) has been proposed to automatically tune these parameters during simulation and is the current state-of-the-art sampling algorithm. However, application of NUTS requires frequent gradient calculation of a given distribution and high-volume vector processing, especially for large-scale problems, leading to drawing an expensively large number of samples and a desire of hardware acceleration. While some hardware acceleration works have been proposed for traditional Markov Chain Monte Carlo (MCMC) and HMC methods, there is no existing work targeting hardware acceleration of the NUTS algorithm. In this paper, we present the first NUTS accelerator on FPGA while addressing the high complexity of this state-of-the-art algorithm. Our hardware and algorithm co-optimizations include an incremental resampling technique which leads to a more memory efficient architecture and pipeline optimization for multi-chain sampling to maximize the throughput. We also explore three levels of parallelism in the NUTS accelerator to further boost performance. Compared with optimized C++ NUTS package: RSTAN, our NUTS accelerator can reach a maximum speedup of 50.6X and an energy improvement of 189.7X.
- Preprint Article
- 10.5194/egusphere-egu23-14252
- May 15, 2023
Hamiltonian Monte Carlo (HMC) method is an application of non-Euclidean geometry to inverse problems. It is a probabilistic sampling method with the basis of Hamiltonian dynamics. One of the main advantages of the HMC algorithm is to draw independent samples from the state space with a higher acceptance rate than other MCMC methods. In order to understand how a higher acceptance rate is achieved, I have studied HMC in the light of symplectic geometry. Hamiltonian dynamics is defined on the phase space (cotangent bundle), which has a natural symplectic structure, i.e. a differential two-form that is non-degenerate and closed.Symplectic geometry lies at the very foundations of physics: Geometry is the method of abstracting the solutions of physical phenomena. Once the use of phase space in the solutions of mechanical systems (e.g. simple harmonic motion, or ray-tracing) is abstracted via geometry, then it can be used in other branches such as optimization problems (e.g. Hamiltonian Monte Carlo). I present two different applications of symplectic geometry: Ray-tracing and Hamiltonian Monte Carlo.First, the Hamiltonian function is defined on the phase space, which corresponds to an invariant of the system (e.g. total energy for the HMC method and wavefront normal for ray-tracing problem), and then by using the non-degeneracy property, a vector field can be found in which Hamiltonian function is invariant along the integral curves of the field. The invariance of the Hamiltonian function results in a high acceptance rate, where we apply the accept-reject test to satisfy the detailed-balance property.After describing the concept of phase space for both mechanical systems and optimization problems, I am going to show different applications of HMC, including 2-dimensional travel-time tomography on a synthetic complex velocity structure. 
- Research Article
2
- 10.3390/e23050499
- Apr 22, 2021
- Entropy (Basel, Switzerland)
To sample from complex, high-dimensional distributions, one may choose algorithms based on the Hybrid Monte Carlo (HMC) method. HMC-based algorithms generate nonlocal moves alleviating diffusive behavior. Here, I build on an already defined HMC framework, hybrid Monte Carlo on Hilbert spaces (Beskos, et al. Stoch. Proc. Applic. 2011), that provides finite-dimensional approximations of measures , which have density with respect to a Gaussian measure on an infinite-dimensional Hilbert (path) space. In all HMC algorithms, one has some freedom to choose the mass operator. The novel feature of the algorithm described in this article lies in the choice of this operator. This new choice defines a Markov Chain Monte Carlo (MCMC) method that is well defined on the Hilbert space itself. As before, the algorithm described herein uses an enlarged phase space having the target as a marginal, together with a Hamiltonian flow that preserves . In the previous work, the authors explored a method where the phase space was augmented with Brownian bridges. With this new choice, is augmented by Ornstein–Uhlenbeck (OU) bridges. The covariance of Brownian bridges grows with its length, which has negative effects on the acceptance rate in the MCMC method. This contrasts with the covariance of OU bridges, which is independent of the path length. The ingredients of the new algorithm include the definition of the mass operator, the equations for the Hamiltonian flow, the (approximate) numerical integration of the evolution equations, and finally, the Metropolis–Hastings acceptance rule. Taken together, these constitute a robust method for sampling the target distribution in an almost dimension-free manner. The behavior of this novel algorithm is demonstrated by computer experiments for a particle moving in two dimensions, between two free-energy basins separated by an entropic barrier.
- Research Article
1
- 10.3390/a18100661
- Oct 17, 2025
- Algorithms
The Hamiltonian Monte Carlo (HMC) method is effective for Bayesian inference but suffers from synchronization overhead in distributed settings. We propose two variants: a distributed HMC (DHMC) baseline with synchronized, globally exact gradient evaluations and a communication-avoiding leapfrog HMC (CALF-HMC) method that interleaves local surrogate micro-steps with a single–global Metropolis–Hastings correction per trajectory. Implemented on Apache Spark/PySpark and evaluated on a large synthetic logistic regression (N=107, d=100, workers J∈{4,8,16,32}), DHMC attained an average acceptance of 0.986, mean ESS of 1200, and wall-clock of 64.1 s per evaluation run, yielding ≈18.7 ESS/s; CALF-HMC achieved an acceptance of 0.942, mean ESS of 5.1, and 14.8 s, i.e., ≈0.34 ESS/s under the tested surrogate configuration. While DHMC delivered higher ESS/s due to robust mixing under conservative integration, CALF-HMC reduced the per-trajectory runtime and exhibited more favorable scaling as inter-worker latency increased. The study contributes (i) a systems-oriented communication cost model for distributed HMC, (ii) an exact, communication-avoiding leapfrog variant, and (iii) practical guidance for ESS/s-optimized tuning on clusters.
- Research Article
- 10.1190/geo2024-0336.1
- Aug 18, 2025
- GEOPHYSICS
The transient electromagnetic (TEM) method can detect underground resistivity anomalies, and it is often used in the advanced detection of tunnels. This method can detect the low-resistance anomaly in front of the tunnel face. The resistivity of rock and groundwater is different, and groundwater usually presents a low-resistance anomaly, which can be used to determine the size and location of the water body and prevent water inrush accidents. A probabilistic statistical method is developed, which is different from the conventional optimal method. It can explore the full sampling space and obtain a set of inversion parameters to quantify the uncertainty of the result. A Hamiltonian Monte Carlo (HMC) method is devised for the inversion of TEM data in tunnels for the first time and applied to the Dadushan tunnel project in the Guizhou Province, China. In the tunnel construction site, the space of a parallel pilot tunnel is used for TEM detection of the main tunnel. The synthetic case proves that it is a faster convergence method than the conventional Markov chain Monte Carlo method and can cope with the tight tunnel construction period. On the premise that we know the location of the main tunnel cavity in advance, it is easy to judge whether the inversion results are consistent with the actual situation. The HMC provides the inversion results of the observed data and the distribution of a posteriori probability density function, and the location of the banded low-resistance anomaly is consistent with the location of the main tunnel cavity. Finally, based on the inversion results, some suggestions are made for the subsequent construction of the tunnel. These suggestions can provide an important reference for the waterproofing work of Dadushan tunnel and provide help for the safe construction of tunnel projects.
- Research Article
14
- 10.1016/j.physa.2023.128618
- Feb 24, 2023
- Physica A: Statistical Mechanics and its Applications
Acoustic Full Waveform Inversion with Hamiltonian Monte Carlo Method
- Research Article
27
- 10.1016/j.jmbbm.2018.05.037
- May 31, 2018
- Journal of the Mechanical Behavior of Biomedical Materials
Uncertainty quantification for constitutive model calibration of brain tissue.
- Research Article
41
- 10.1007/s11222-019-09885-x
- Jul 22, 2019
- Statistics and Computing
The Hamiltonian Monte Carlo (HMC) method has been recognized as a powerful sampling tool in computational statistics. We show that performance of HMC can be significantly improved by incorporating importance sampling and an irreversible part of the dynamics into a chain. This is achieved by replacing Hamiltonians in the Metropolis test with modified Hamiltonians, and a complete momentum update with a partial momentum refreshment. We call the resulting generalized HMC importance sampler---Mix & Match Hamiltonian Monte Carlo (MMHMC). The method is irreversible by construction and further benefits from (i) the efficient algorithms for computation of modified Hamiltonians; (ii) the implicit momentum update procedure and (iii) the multi-stage splitting integrators specially derived for the methods sampling with modified Hamiltonians. MMHMC has been implemented, tested on the popular statistical models and compared in sampling efficiency with HMC, Riemann Manifold Hamiltonian Monte Carlo, Generalized Hybrid Monte Carlo, Generalized Shadow Hybrid Monte Carlo, Metropolis Adjusted Langevin Algorithm and Random Walk Metropolis-Hastings. To make a fair comparison, we propose a metric that accounts for correlations among samples and weights, and can be readily used for all methods which generate such samples. The experiments reveal the superiority of MMHMC over popular sampling techniques, especially in solving high dimensional problems.
- Research Article
13
- 10.1016/j.apm.2021.11.026
- Dec 2, 2021
- Applied Mathematical Modelling
Generalized Integral Transform and Hamiltonian Monte Carlo for Bayesian structural damage identification
- Research Article
9
- 10.2183/pjab.99.023
- Nov 10, 2023
- Proceedings of the Japan Academy, Series B
The present paper reviews recent activities on inverse analysis strategies in geotechnical engineering using Kalman filters, nonlinear Kalman filters, and Markov chain Monte Carlo (MCMC)/Hamiltonian Monte Carlo (HMC) methods. Nonlinear Kalman filters with finite element method (FEM) broaden the choices of unknowns to be determined for not only parameters but also initial and/or boundary conditions, and the use of the posterior probability of the state variables can be widely applied to, for example, the decision making for design changes. The relevance of the unknowns and the observed values and the selection of the best sensor locations are some of the considerations made while using the Kalman filter FEM. This paper demonstrates several real-world geotechnical applications of the nonlinear Kalman filter and the MCMC with FEM. Future studies should focus on the following areas: attaining excellent performance for long-term forecasts using short-term observation and developing a viable method for selecting equations that describe physical phenomena and constitutive models.
- Research Article
12
- 10.1103/physrevresearch.6.033142
- Aug 6, 2024
- Physical Review Research
One of the open challenges in quantum computing is to find meaningful and practical methods to leverage quantum computation to accelerate classical machine-learning workflows. A ubiquitous problem in machine-learning workflows is sampling from probability distributions that we only have access to via their log probability. To this end, we extend the well-known Hamiltonian Monte Carlo (HMC) method for Markov chain Monte Carlo (MCMC) sampling to leverage quantum computation in a hybrid manner as a proposal function. Our new algorithm, Quantum Dynamical Hamiltonian Monte Carlo (QD-HMC), replaces the classical symplectic integration proposal step with simulations of quantum-coherent continuous-space dynamics on digital or analog quantum computers. We show that QD-HMC maintains key characteristics of HMC, such as maintaining the detailed balanced condition with momentum inversion, while also having the potential for polynomial speedups over its classical counterpart in certain scenarios. As sampling is a core subroutine in many forms of probabilistic inference, and MCMC in continuously parametrized spaces covers a large class of potential applications, this work widens the areas of applicability of quantum devices. Published by the American Physical Society 2024