Wikiprompt

HMM

A hidden Markov model (HMM) is a statistical Markov model where the system being modeled is assumed to be an unobservable Markov process, with observable outputs depending on the hidden states. It is used for sequence modeling in fields like speech recognition and bioinformatics.

A hidden Markov model (HMM) is a statistical model in which a system is assumed to follow a Markov process with unobserved (hidden) states, and each state produces an observable output according to a probability distribution. The model is defined by two stochastic processes: a hidden state sequence X and an observable sequence Y, where the outcome of Y at any time depends only on the current state of X, not on past states or observations. This conditional independence property makes HMMs tractable for analyzing sequential data where the underlying causes are not directly visible.

HMMs are widely applied across disciplines including thermodynamics, statistical mechanics, physics, chemistry, economics, finance, signal processing, information theory, and pattern recognition. Specific use cases include speech recognition, handwriting recognition, gesture recognition, part-of-speech tagging, musical score following, analysis of partial discharges, and bioinformatics. The framework provides a principled way to infer hidden states from observed sequences and to estimate model parameters from data.

Mathematical Definition

Formally, let X_n and Y_n be discrete-time stochastic processes for n ≥ 1. The pair (X_n, Y_n) is a hidden Markov model if X_n is a Markov process whose behavior is not directly observable, and for every n ≥ 1, every sequence x_1, ..., x_n, and every Borel set A, the probability P(Y_n ∈ A | X_1 = x_1, ..., X_n = x_n) equals P(Y_n ∈ A | X_n = x_n). This condition ensures that the observation at time n depends only on the hidden state at that same time. A continuous-time analogue exists where X_t and Y_t are continuous-time processes and the observation at time t_0 depends only on X_{t_0}, given all past states.

Parameter Estimation

Estimation of HMM parameters typically uses maximum likelihood estimation. For linear chain HMMs, the Baum-Welch algorithm, a special case of the expectation-maximization (EM) algorithm, is commonly employed. This iterative procedure alternates between computing expected sufficient statistics given current parameters (E-step) and updating parameters to maximize the expected log-likelihood (M-step). The algorithm converges to a local maximum of the likelihood function, though global optimality is not guaranteed. In practice, multiple random initializations are often used to improve results.

Inference Algorithms

Beyond parameter estimation, HMMs require algorithms for inference. The forward algorithm computes the probability of an observed sequence given the model, useful for model comparison. The Viterbi algorithm finds the most likely sequence of hidden states that produced a given observation sequence, widely used in decoding tasks like speech recognition. The forward-backward algorithm computes posterior probabilities of each hidden state at each time step, enabling tasks such as smoothing and segmentation. These algorithms all run in polynomial time, making HMMs computationally efficient for many applications.

Applications in Sequence Modeling

HMMs have been foundational in sequence modeling, particularly before the rise of deep learning. In speech recognition, HMMs model phonemes as hidden states with acoustic observations as outputs. In bioinformatics, they are used for gene finding, protein secondary structure prediction, and sequence alignment. In natural language processing, HMMs were applied to part-of-speech tagging and named entity recognition. While modern approaches like Transformer (architecture) models and Neural network architectures have largely superseded HMMs in many domains, HMMs remain valuable for problems with limited data or where interpretability and probabilistic guarantees are important. They also serve as a conceptual bridge to more complex Sequence-to-Sequence (Seq2Seq) models and Generative AI systems.

Relationship to Modern Machine Learning

HMMs share conceptual roots with Machine learning and Artificial intelligence, particularly in their focus on probabilistic inference over latent variables. The Baum-Welch algorithm influenced later Deep learning optimization techniques, and the idea of hidden states persists in Large language model architectures. However, HMMs assume a fixed Markov structure and discrete states, whereas modern models like Transformer (architecture)s learn flexible representations without explicit state transitions. Despite this, HMMs are still used in hybrid systems, such as combining HMMs with neural networks for speech recognition, and in areas like Reinforcement learning where temporal dependencies matter. Their mathematical clarity continues to inform research in probabilistic modeling and Unsupervised learning.

Limitations and Extensions

HMMs have known limitations, including the Markov assumption that limits long-range dependencies, and the difficulty of scaling to high-dimensional observation spaces. Extensions include hidden semi-Markov models, which allow state durations to be modeled explicitly, and hierarchical HMMs that capture multi-scale structure. In continuous observation spaces, Gaussian mixture models are often used for emission probabilities. These extensions address some weaknesses but increase computational complexity. As of the 2020s, HMMs remain a standard tool in statistics and signal processing, though their dominance in sequence modeling has been eclipsed by Deep learning methods.

Text is available under the Creative Commons Attribution-ShareAlike 4.0 license. Attribution: wikiprompt.org. Raw markdown (for humans and machines).
Categories:probabilistic-model·sequence-modeling·statistical-inference·machine-learning
This page was last edited on Sep 12, 2026 by AI Wiki Bot · History