Hidden Markov models

What Are Hidden Markov Models?

Hidden Markov models (HMMs) are probabilistic graphical models in which a sequence of observable outputs is generated by an underlying sequence of discrete states that cannot be observed directly. The unobserved, or "hidden," states evolve according to a first-order Markov process: the probability of transitioning to a next state depends only on the current state, not on the history of previous states. At each time step, the current hidden state generates an observable symbol according to a state-specific emission distribution. This compact representation of temporal dependence has made HMMs the dominant framework for sequence modeling in fields ranging from speech processing to computational biology.

The mathematical foundations of HMMs were laid in work by L.E. Baum and colleagues in the late 1960s, with practical development accelerating through the 1970s and 1980s at Bell Laboratories and Carnegie Mellon University. The influential 1989 IEEE tutorial A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition by Lawrence Rabiner provided the engineering community with the three canonical HMM problems and their solutions, establishing the framework that still underlies most HMM-based systems.

Model Structure and Probability Framework

An HMM is defined by three sets of parameters: the state transition probability matrix, which specifies the probability of moving from each state to each other state; the emission probability distributions, which specify what observations each state tends to produce; and the initial state distribution, which governs the probability of the model starting in each state. For continuous observations such as speech feature vectors, emission distributions are commonly modeled as Gaussian mixtures; for discrete observations such as nucleotide sequences, they are categorical distributions. A Markov process with N states has an N-by-N transition matrix, and the structure of that matrix encodes domain knowledge: a left-to-right (Bakis) topology, for example, constrains states to advance forward only, which suits the sequential nature of phonemes in spoken words. Research on the applications of HMMs in speech recognition, published in Foundations and Trends in Signal Processing, surveys how different topologies and emission models have been adapted to specific recognition tasks.

Training and Decoding Algorithms

Three fundamental computational problems define the practical use of HMMs. The evaluation problem asks for the probability that a given observation sequence was produced by a particular model; the forward algorithm and the forward-backward algorithm solve this efficiently by summing over all possible state sequences using dynamic programming. The decoding problem asks for the single most probable hidden state sequence given an observation sequence; the Viterbi algorithm, also a dynamic programming method, solves this in time proportional to the product of the sequence length and the square of the number of states. The learning problem asks for the model parameters that maximize the likelihood of the training data; the Baum-Welch algorithm, an instance of the expectation-maximization (EM) framework, solves this iteratively by computing expected state occupation counts in the E-step and re-estimating parameters in the M-step. These three algorithms collectively enable HMMs to be trained from labeled or unlabeled data and applied to new sequences. ACM Digital Library research on HMM applications in speech recognition reviews how these algorithms scale to large-vocabulary systems with thousands of context-dependent phoneme states.

Applications

Hidden Markov models have applications in a range of fields, including:

  • Speech recognition and speaker identification in voice interface systems
  • Pattern recognition for handwriting and gesture recognition
  • Genomic sequence analysis, including gene finding and protein domain identification
  • Financial time series modeling and regime detection in quantitative analysis
  • Fault diagnosis and condition monitoring in industrial equipment
Loading…