Skip to main content
QUICK REVIEW

[Paper Review] Stochastic Gradient MCMC Methods for Hidden Markov Models

Yi-An Ma, Nicholas J. Foti|arXiv (Cornell University)|Jun 14, 2017
Markov Chains and Monte Carlo MethodsMathematics24 references15 citations
TL;DR

This paper proposes a stochastic gradient MCMC algorithm for hidden Markov models (HMMs) that enables efficient Bayesian inference on large-scale sequential data by leveraging marginal likelihood gradients and buffered message passing to handle temporal dependencies. The method achieves up to 1,000× speedup over batch MCMC while maintaining theoretical validity and supporting non-conjugate emission distributions.

ABSTRACT

Stochastic gradient MCMC (SG-MCMC) algorithms have proven useful in scaling Bayesian inference to large datasets under an assumption of i.i.d data. We instead develop an SG-MCMC algorithm to learn the parameters of hidden Markov models (HMMs) for time-dependent data. There are two challenges to applying SG-MCMC in this setting: The latent discrete states, and needing to break dependencies when considering minibatches. We consider a marginal likelihood representation of the HMM and propose an algorithm that harnesses the inherent memory decay of the process. We demonstrate the effectiveness of our algorithm on synthetic experiments and an ion channel recording data, with runtimes significantly outperforming batch MCMC.

Motivation & Objective

  • To address the challenge of scaling Bayesian inference in HMMs to massive sequential datasets with strong temporal dependencies.
  • To develop a stochastic gradient MCMC algorithm that maintains correct asymptotic sampling from the posterior despite non-i.i.d. data and latent discrete states.
  • To enable efficient inference with non-conjugate emission distributions, which are typically infeasible in standard MCMC or variational methods.
  • To provide a theoretically grounded method for breaking dependencies in sequential data via buffering and mixing time-based subchain spacing.
  • To demonstrate significant computational gains over batch MCMC while preserving estimation accuracy on real and synthetic data.

Proposed method

  • The method operates on the marginal likelihood of the HMM, avoiding direct inference over discrete latent states by computing stochastic gradients from small subchains.
  • It uses a buffering strategy to approximate full forward-backward passes, restricting message passing to short windows around each subchain to reduce computational cost.
  • The buffer length and inter-subchain gap are theoretically justified using random dynamical systems to ensure uncorrelated subchain computations and maintain the correct stationary distribution.
  • Subchains are spaced according to the mixing time of the HMM to ensure approximate independence, enabling valid stochastic gradient updates.
  • The algorithm is based on Riemannian Langevin dynamics (RLD), which provides a principled SG-MCMC framework with theoretical convergence guarantees.
  • The method supports non-conjugate priors and emission models, enabling flexible Bayesian modeling beyond standard conjugate exponential families.

Experimental results

Research questions

  • RQ1Can stochastic gradient MCMC be effectively applied to non-i.i.d. sequential data like HMMs, where dependencies must be broken for minibatching?
  • RQ2How can the inherent memory decay in Markov processes be leveraged to approximate full posterior gradients using only local subchains?
  • RQ3What is a theoretically justified way to choose buffer size and subchain spacing to ensure uncorrelated updates and correct stationary distribution?
  • RQ4Can the proposed method achieve accurate posterior inference with non-conjugate emission distributions, which are typically intractable in scalable Bayesian methods?
  • RQ5To what extent does the algorithm outperform batch MCMC in runtime while maintaining estimation accuracy on real-world sequential data?

Key findings

  • The SG-RLD algorithm achieved a 1,000× speedup over batch RLD on a 1MHz ion channel recording, completing convergence in under 10 minutes while batch MCMC had not finished a single iteration.
  • On synthetic data with log-normal emissions, the non-conjugate model converged to accurate transition matrix estimates in fewer iterations than the conjugate model.
  • The non-conjugate HMM model correctly selected the true number of states (K=2), whereas the conjugate model overfitted and selected K=4 states.
  • The algorithm produced plausible segmentations and accurate parameter estimates on ion channel data, matching the quality of batch MCMC but in a fraction of the time.
  • The method demonstrated robust performance on both short-sequence and long-sequence synthetic HMMs, with error decay in transition matrix estimates consistent with theoretical expectations.
  • The theoretical framework for buffer length and subchain spacing was validated empirically, ensuring that the stochastic gradients remain unbiased and the stationary distribution is preserved.

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.