# Efficient Markov Chain Monte Carlo Sampling for Hierarchical Hidden Markov Models 

Daniel Turek $^{∗}$, Perry de Valpine, and Christopher J. Paciorek 

$^{∗}$Corresponding author University of California, Berkeley 493 Evans Hall, Berkeley, CA 94720, USA dturek@berkeley.edu 

## Abstract 

Traditional Markov chain Monte Carlo (MCMC) sampling of hidden Markov mod- els (HMMs) involves latent states underlying an imperfect observation process, and generates posterior samples for top-level parameters concurrently with nuisance latent variables. When potentially many HMMs are embedded within a hierarchical model, this can result in prohibitively long MCMC runtimes. We study combinations of ex- isting methods, which are shown to vastly improve computational efficiency for these hierarchical models while maintaining the modeling flexibility provided by embedded HMMs. The methods include discrete filtering of the HMM likelihood to remove la- tent states, reduced data representations, and a novel procedure for dynamic block sampling of posterior dimensions. The first two methods have been used in isolation 

