🎲 Hidden Markov Model — States & Observations
Watch a hidden Markov model emit observations from latent states, then recover the most likely state path with the Viterbi algorithm and infer state probabilities with the forward pass.
Frequently Asked Questions
What distinguishes a Hidden Markov Model from a regular Markov chain?
In a regular Markov chain, states are directly observable. In an HMM, the states are hidden and only indirectly revealed through noisy or incomplete emissions. The model must infer the underlying state sequence from the observed output symbols.
What is the Viterbi algorithm?
The Viterbi algorithm efficiently finds the most probable sequence of hidden states given an observation sequence using dynamic programming. It runs in O(T·K²) time, where T is the sequence length and K is the number of states, making it tractable for practical problems.
How are HMMs trained?
HMMs are typically trained using the Baum–Welch algorithm, an instance of Expectation-Maximisation. It iterates between computing state occupation probabilities (E-step) and updating transition and emission parameters to maximise the likelihood of observed data (M-step).
Are HMMs still used in modern speech recognition?
HMMs formed the backbone of speech recognition from the 1980s through the 2000s. Modern systems use deep neural networks, but many hybrid architectures still combine neural acoustic models with HMM-based sequence decoding. Pure HMM systems remain in use for low-resource or embedded applications.
What is the Markov assumption and when does it fail?
The Markov assumption states that the next state depends only on the current state, not the full history. It fails when long-range dependencies matter — for example, grammatical agreement over many words in language. Higher-order Markov models and neural sequence models relax this assumption.
Watch a hidden Markov model emit observations from latent states, then recover the most likely state path with the Viterbi algorithm and infer state probabilities with the forward pass.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install