Hoffman 2022 - Ensemble-Chain Adaptation and Parallelism

Summary

Letting an MCMC kernel’s parameters depend on the current state of the same chain is generally invalid, but letting chain use parameters computed from the other chains preserves the product stationary distribution. MEADS arranges states into folds, computes parameters from the neighbour fold and skips one fold per iteration, so most chains update in parallel while remaining exactly valid.

Overview

If depends on the chain’s own state, invariance of under for fixed does not imply . Ensemble-chain adaptation (ECA; Gilks et al. 1994, “snooker” algorithm; named by Zhang and Sutton 2011) escapes this by conditioning on other chains.

Main Content

ECA invariance (eq. 3)

Let chain have state and the others , and target the product . If each update of uses a kernel that leaves invariant for every fixed , then

Proof sketch. is independent of under the product measure; condition on , apply invariance for fixed , then integrate out .

Treating the ensemble as one meta-chain justifies updating one state at a time serially, but that wastes the very parallel hardware (GPU/TPU, JAX/PyTorch/TensorFlow) that makes many chains cheap.

Parallelizable ECA (Sec. 3, Fig. 1)

Conceptually update states in order , each conditioned on states (left graphical model). Since each update only needs information from lower-index states, all notionally sequential updates of can be computed in parallel by discarding the intermediate states (right model). Then permute the states and repeat so all states are updated. Updating all states in parallel conditioned on one another (“hogwild”, Niu et al. 2011) can give incorrect results (Hoffman 2022 - Appendix - Hogwild Counterexample and Hessian Identity Proof).

K-fold update structure (Fig. 2)

Split the states into folds of states each. Compute kernel parameters from each fold and share them across all updates in the neighbouring fold: fold is updated with parameters computed from fold (Algorithm 3 uses equivalently under the index convention). Skip one fold’s update each iteration (fold ) to preserve the conditional independence structure. After iterations randomly reshuffle the states into new folds. MEADS uses .

Advantages over dense ECA. Parameters are always computed from exactly states, which helps batching; no parameters are estimated from fewer than states (important in GHMC, where a momentum-negating rejection is worse than standing still). Cost. of states skip each iteration (at most 25% slowdown for ); larger trades utilisation against variance in the estimated parameters (explored in Appendix A, Hoffman 2022 - MEADS - Experiments and Ablations). Leimkuhler et al. (2018) update only one fold at a time conditioned on all others, which reduces parallel updates by a factor .

Counting active chains

With 128 chains in folds of : each iteration 3 folds (96 chains) update, 32 sit out; utilisation 75%. With : 7 of 8 folds (112 chains) update, utilisation 87.5%, but each parameter estimate uses states.

# Fold bookkeeping in MEADS: which fold is skipped and which fold supplies parameters
K, T = 4, 8
for t in range(1, T+1):
    skipped = t % K
    updates = [(k, (k-1) % K) for k in range(K) if k != skipped]   # (fold updated, fold supplying stats)
    print(t, "skip", skipped, updates)
# reshuffle chain-to-fold assignment every K iterations

Connections

Adaptation that never needs freezing is the key difference from Hoffman 2021 - ChEES Criterion and Algorithm 1. The heuristics that fill are in Hoffman 2022 - MEADS Heuristics - Step Size, Damping, Drift and Eigenvalue Estimation.

See Also

Hoffman 2022 - MEADS - Overview, Hoffman 2022 - GHMC and Neal Persistent Slice Sampling, Efficient MCMC