Strid (2010) Efficient Parallelisation of Metropolis–Hastings Algorithms Using a Prefetching Approach

mcmcmetropolis-hastingsparallel-computationdsgebayesiancomputational-statistics

Summary

Strid (2010) introduces prefetching — a branch-prediction strategy that exploits parallel processors to evaluate the Metropolis-Hastings (MH) acceptance criterion at multiple future candidate states simultaneously, eliminating the serial bottleneck where each evaluation must await the previous acceptance decision. The paper derives the theoretical expected speedup D(P)D(P) (expected draws per tour with PP processors), shows that the classical optimal acceptance rate of 0.234 is no longer optimal in parallel settings (the true optimum decreases monotonically toward zero as PP increases), and benchmarks five algorithm variants on a Smets-Wouters (2003) Dynamic Stochastic General Equilibrium (DSGE) model. The best variant, "most likely path," achieves a theoretical speedup of 4.99×\times with 7 processors and an actual cluster speedup of 5.15×\times with 8 processors.

Key Claims

Prefetching and the Metropolis Tree

At each iteration the MH chain must sequentially draw a candidate θ\theta^*, evaluate π(θ)\pi(\theta^*), and make an accept/reject decision before the next proposal can be formed. With PP parallel processors, prefetching speculatively evaluates the posterior at PP future states in parallel by building a binary Metropolis tree: at each node the chain either accepts (left branch) or rejects (right branch = current state), so PP nodes span all possible state trajectories. A tour of size PP selects a deterministic path through this tree; the expected draws per tour

D(P)=p=1PPr(node p selected)D(P) = \sum_{p=1}^P \Pr(\text{node } p \text{ selected})

is the theoretical speedup over serial processing.

Five Algorithm Variants

Variant Branch probabilities D(P=7)D(P=7) at α=0.25\alpha=0.25 Notes
(1) Basic (Brockwell 2006) All = 0.5 3.00 Lower bound; D(P)=log2(P+1)D(P)=\log_2(P+1)
(2) Static Known α\alpha; reject branches = 1α1-\alpha, accept branches = α\alpha 3.54 Best-case with constant acceptance rate
(3) Dynamic (uniform draws) Empirical αk=Pr(u<XuIk)\alpha_k = \Pr(u < X \mid u \in I_k) from pilot, over KK bins 3.81 Adapts to unknown α\alpha via histogram
(4) Dynamic (posterior approx.) αmin(β,p(θaccept)/p(θcurrent))\alpha \approx \min(\beta,\, p^*(\theta_\text{accept})/p^*(\theta_\text{current})) 4.58 Uses Laplace approximation p=N(θm,Hm1)p^* = \mathcal{N}(\theta_m, H_m^{-1})
(5) Most likely path Run chain PP steps ahead with pp^*; non-branching tour 4.99 Best performer; inapplicable with discontinuous likelihoods

Optimal Acceptance Rate Shifts Downward with PP

Serial MH optimum is αopt0.234\alpha^\text{opt} \approx 0.234 (Roberts-Rosenthal 2001). With prefetching the joint expected output is E(α,P)=E1(α)×D(α,P)E(\alpha, P) = E^1(\alpha) \times D(\alpha, P), where E1(α)E^1(\alpha) is serial efficiency and D(α,P)D(\alpha,P) is the expected draws per tour. Because lower α\alpha increases the probability of long accepted-state runs (trees favoring the "left" branch), DD rises as α\alpha falls. The optimum is:

Processors PP αopt,P\alpha_\text{opt,P} Theoretical speedup
1 (serial) 0.234 1.0
3 ~0.17 2.57
7 0.120 4.34
\infty 0 \infty

Independence Chain MH: Embarrassingly Parallel but Poor Mixing

The independence chain (ICMH) proposes each θ\theta^* independently of the current state, so all proposals can be evaluated in parallel — S(P)PS(P) \approx P in theory. In practice for the 40-parameter Smets-Wouters model, the best ICMH achieves only 13% acceptance and an inefficiency factor ~8×\times worse than random-walk MH, making ICMH's parallelism advantage illusory.

Table 1: Theoretical Expected Draws per Tour (Smets-Wouters, α=0.25\alpha=0.25)

Algorithm P=3 P=7 P=15 P=31
Basic 2 3 4 5
Static 2.31 3.54 4.75 6.00
Dynamic (uniform) 2.38 3.81 5.04 6.24
Dynamic (post. approx) 2.57 4.58 6.45 8.04
Most likely path 2.66 4.99 7.31 8.42

Table 2: Actual Cluster Speedup (Lenngren High Performance Computing (HPC) Cluster, 8 processors)

Algorithm DD (expected draws) SS (actual speedup) Serial time \to Parallel time
Static P=8 3.77 3.46 80 min \to 23 min
Most likely path P=8 5.39 5.15 ~80 min \to 15 min

Communication overhead accounts for the gap between DD and SS.

DSGE Estimation Context

The one-block Random-Walk Metropolis-Hastings (RWMH) over all parameters simultaneously is standard for DSGE models because (i) the full conditional distributions are not available in closed form, (ii) blocking is difficult since drawing a subset of parameters would require solving a system of non-linear equations for each sub-block, and (iii) the Kalman filter marginalizes all latent states. Reparameterization to unbounded space improves the posterior Laplace approximation and thereby the accuracy of branch probability estimates for variants (4) and (5).

Two-Layer Parallelism

Strid (2010) also considers combining prefetching with a parallel particle filter (PPF) — the two layers can be used simultaneously. For the linearized DSGE model (Kalman filter), PPF alone already achieves the theoretical S=PS=P; for nonlinear DSGE requiring a particle filter, the cross-over from PPF-alone to SP+PPF occurs at Popt=22P^*_\text{opt} = 22 processors.

Limitations

Concepts Introduced or Extended

Entities Mentioned

Quotes

"The most important finding is that the optimal acceptance rate for parallel computation is lower than the rule of thumb for serial computation."

"The independence chain MH is embarrassingly parallel but provides poor mixing in high-dimensional parameter spaces such as the Smets-Wouters model."

My Take

The prefetching idea is elegant and directly addresses the fundamental serial bottleneck of Markov Chain Monte Carlo (MCMC): the accept/reject decision cannot be made until the posterior evaluation completes. The theoretical framework (Metropolis tree, expected draws per tour) is clean and the key result — that αopt,P\alpha_\text{opt,P} decreases with PP — overturns received wisdom on tuning. The practical ceiling of ~5–8×\times speedup with 7–8 processors is modest by modern HPC standards, but the paper was written in 2010 when such speedups were meaningful. The most likely path variant, despite its name, is essentially running the chain forward using a Laplace approximation as a surrogate — conceptually close to modern surrogate-assisted MCMC. The limitations for nonlinear models (particle filter, no Laplace) are the binding constraint for modern DSGE work where nonlinear solution is increasingly standard.