Content deleted Content added
Tpbradbury (talk | contribs) →Extensions: not long, perhaps it's been shortened |
Citation bot (talk | contribs) Add: bibcode, article-number. Removed URL that duplicated identifier. Removed parameters. Some additions/deletions were parameter name changes. | Use this bot. Report bugs. | Suggested by Headbomb | Linked from Wikipedia:WikiProject_Academic_Journals/Journals_cited_by_Wikipedia/Sandbox | #UCB_webform_linked 152/990 |
||
(14 intermediate revisions by 11 users not shown) | |||
Line 1:
{{
{{
A '''hidden Markov model''' ('''HMM''') is a [[Markov model]] in which the observations are dependent on a latent (or
Hidden Markov models are known for their applications to [[thermodynamics]], [[statistical mechanics]], [[physics]], [[chemistry]], [[economics]], [[finance]], [[signal processing]], [[information theory]], [[pattern recognition]]—such as [[speech recognition|speech]],<ref>{{cite web |
== Definition ==
Line 10:
* <math>X_n</math> is a [[Markov process]] whose behavior is not directly observable ("hidden");
* <math>\operatorname{\mathbf{P}}\bigl(Y_n \in A\ \bigl|\ X_1=x_1,\ldots,X_n=x_n\bigr)=\operatorname{\mathbf{P}}\bigl(Y_n \in A\ \bigl|\ X_n=x_n\bigr)
:for every <math>n\geq 1
Let <math>X_t</math> and <math>Y_t</math> be continuous-time stochastic processes. The pair <math>(X_t,Y_t)</math> is a ''hidden Markov model'' if
Line 18:
*<math>\operatorname{\mathbf{P}}(Y_{t_0} \in A \mid \{X_t \in B_t\}_{ t\leq t_0}) = \operatorname{\mathbf{P}}(Y_{t_0} \in A \mid X_{t_0} \in B_{t_0})</math>,
:for every <math>
=== Terminology ===
Line 27:
[[File:HiddenMarkovModel.svg|right|thumb|300px|
Figure 1. Probabilistic parameters of a hidden Markov model (example)<br
''X'' — states<br
''y'' — possible observations<br
''a'' — state transition probabilities<br
''b'' — output probabilities]]
In its discrete form, a hidden Markov process can be visualized as a generalization of the [[urn problem]] with replacement (where each item from the urn is returned to the original urn before the next step).<ref>{{cite journal |author=Lawrence R. Rabiner |author-link=Lawrence Rabiner |date=February 1989 |title=A tutorial on Hidden Markov Models and selected applications in speech recognition |url=http://www.ece.ucsb.edu/Faculty/Rabiner/ece259/Reprints/tutorial%20on%20hmm%20and%20applications.pdf |journal=Proceedings of the IEEE |volume=77 |issue=2 |pages=257–286 |citeseerx=10.1.1.381.3454 |doi=10.1109/5.18626 |s2cid=13618539}} [
The Markov process
=== Weather guessing game ===
Line 66:
== Structural architecture ==
The diagram below shows the general architecture of an instantiated HMM. Each oval shape represents a random variable that can adopt any of a number of values. The random variable ''x''(''t'') is the hidden state at time {{mvar|t}} (with the model from the above diagram, {{nowrap|''x''(''t'')
From the diagram, it is clear that the [[conditional probability distribution]] of the hidden variable ''x''(''t'') at time {{mvar|t}}, given the values of the hidden variable {{mvar|x}} at all times, depends ''only'' on the value of the hidden variable {{nowrap|''x''(''t''
In the standard type of hidden Markov model considered here, the state space of the hidden variables is discrete, while the observations themselves can either be discrete (typically generated from a [[categorical distribution]]) or continuous (typically from a [[Gaussian distribution]]).
The hidden state space is assumed to consist of one of {{mvar|N}} possible values, modelled as a categorical distribution. (See the section below on extensions for other possibilities.) This means that for each of the {{mvar|N}} possible states that a hidden variable at time {{mvar|t}} can be in, there is a transition probability from this state to each of the {{mvar|N}} possible states of the hidden variable at time <math>t+1</math>, for a total of <math>N^2</math> transition probabilities.
In addition, for each of the {{mvar|N}} possible states, there is a set of emission probabilities governing the distribution of the observed variable at a particular time given the state of the hidden variable at that time.
[[File:hmm temporal bayesian net.svg|500px|center|Temporal evolution of a hidden Markov model]]
== Inference ==
[[File:HMMsequence.svg|thumb|400px|The state transition and output probabilities of an HMM are indicated by the line opacity in the upper part of the diagram. Given that
5 3 2 5 3 2<br
4 3 2 5 3 2<br
3 1 2 5 3 2<br
Several [[inference]] problems are associated with hidden Markov models, as outlined below.
=== Probability of an observed sequence ===
The task is to compute in a best way, given the parameters of the model, the probability of a particular output sequence.
The probability of observing a sequence
: <math>Y=y(0), y(1),\dots,y(L-1)
of length ''L'' is given by
:<math>P(Y)=\sum_{X}P(Y\mid X)P(X)
where the sum runs over all possible hidden-node sequences
: <math>X=x(0), x(1), \dots, x(L-1).
Applying the principle of [[dynamic programming]], this problem, too, can be handled efficiently using the [[forward algorithm]].
=== Probability of the latent variables ===
A number of related tasks ask about the probability of one or more of the latent variables, given the model's parameters and a sequence of observations <math>y(1),\dots,y(t)
==== Filtering ====
The task is to compute, given the model's parameters and a sequence of observations, the distribution over hidden states of the last latent variable at the end of the sequence, i.e. to compute <math>P(x(t)
This problem can be handled efficiently using the [[forward algorithm]]. An example is when the algorithm is applied to a Hidden Markov Network to determine <math>\mathrm{P}\big( h_t \
==== Smoothing ====
This is similar to filtering but asks about the distribution of a latent variable somewhere in the middle of a sequence, i.e. to compute <math>P(x(k)\
The [[forward-backward algorithm]] is a good method for computing the smoothed values for all hidden state variables.
==== Most likely explanation ====
The task, unlike the previous two, asks about the [[joint probability]] of the ''entire'' sequence of hidden states that generated a particular sequence of observations (see illustration on the right).
This task requires finding a maximum over all possible state sequences, and can be solved efficiently by the [[Viterbi algorithm]].
=== Statistical significance ===
For some of the above problems, it may also be interesting to ask about [[statistical significance]].
== Learning ==
The parameter learning task in HMMs is to find, given an output sequence or a set of such sequences, the best set of state transition and emission probabilities. The task is usually to derive the [[maximum likelihood]] estimate of the parameters of the HMM given the set of output sequences. No tractable algorithm is known for solving this problem exactly, but a local maximum likelihood can be derived efficiently using the [[Baum–Welch algorithm]] or the Baldi–Chauvin algorithm.
If the HMMs are used for time series prediction, more sophisticated Bayesian inference methods, like [[Markov chain Monte Carlo]] (MCMC) sampling are proven to be favorable over finding a single maximum likelihood model both in terms of accuracy and stability.<ref>Sipos, I. Róbert. ''Parallel stratified MCMC sampling of AR-HMMs for stochastic time series prediction''. In: Proceedings, 4th Stochastic Modeling Techniques and Data Analysis International Conference with Demographics Workshop (SMTDA2016), pp. 295-306. Valletta, 2016. [http://1drv.ms/b/s!ApL_0Av0YGDLglwEOv1aYAGbmQeL PDF]</ref> Since MCMC imposes significant computational burden, in cases where computational scalability is also of interest, one may alternatively resort to variational approximations to Bayesian inference, e.g.<ref>{{cite journal |url=http://users.iit.demokritos.gr/~dkosmo/downloads/patrec10/vbb10.pdf |doi=10.1016/j.patcog.2010.09.001 |volume=44 |issue=2 |title=A variational Bayesian methodology for hidden Markov models utilizing Student's-t mixtures |year=2011 |journal=Pattern Recognition |pages=295–306 |last1=Chatzis |first1=Sotirios P. |last2=Kosmopoulos |first2=Dimitrios I. |bibcode=2011PatRe..44..295C |citeseerx=10.1.1.629.6275 |access-date=2018-03-11 |archive-date=2011-04-01 |archive-url=https://web.archive.org/web/20110401184517/http://users.iit.demokritos.gr/~dkosmo/downloads/patrec10/vbb10.pdf |url-status=dead
== Applications ==
Line 130:
HMMs can be applied in many fields where the goal is to recover a data sequence that is not immediately observable (but other data that depend on the sequence are). Applications include:
* [[Computational finance]]<ref>{{cite journal |doi=10.1007/s10614-016-9579-y |volume=49 |issue=4 |title=Parallel Optimization of Sparse Portfolios with AR-HMMs |year=2016 |journal=Computational Economics |pages=563–578 |last1=Sipos |first1=I. Róbert |last2=Ceffer |first2=Attila |last3=Levendovszky |first3=János|s2cid=61882456
* [[Single-molecule experiment|Single-molecule kinetic analysis]]<ref>{{cite journal |last1=Nicolai |first1=Christopher |date=2013 |doi=10.1142/S1793048013300053 |title=
* [[Neuroscience]]<ref>{{cite journal |doi=10.1002/hbm.25835 |title=Spatiotemporally Resolved Multivariate Pattern Analysis for M/EEG |journal=Human Brain Mapping |date=2022 |last1=Higgins |first1=Cameron |last2=Vidaurre |first2=Diego |last3=Kolling |first3=Nils |last4=Liu |first4=Yunzhe |last5=Behrens |
* [[Cryptanalysis]]
* [[Speech recognition]], including [[Siri]]<ref>{{cite book|last1=Domingos|first1=Pedro|title=The Master Algorithm: How the Quest for the Ultimate Learning Machine Will Remake Our World|url=https://archive.org/details/masteralgorithmh0000domi|url-access=registration|date=2015|publisher=Basic Books|isbn=9780465061921|page=[https://archive.org/details/masteralgorithmh0000domi/page/37 37]|language=en}}</ref>
Line 145:
* [[Time series|Time series analysis]]
* [[Activity recognition]]
* [[Protein folding]]<ref>{{Cite journal |last1=Stigler |first1=J. |last2=Ziegler |first2=F. |last3=Gieseke |first3=A. |last4=Gebhardt |first4=J. C. M. |last5=Rief |first5=M. |title=The Complex Folding Network of Single Calmodulin Molecules |doi=10.1126/science.1207598 |journal=[[Science (journal)|Science]] |volume=334 |issue=6055 |pages=512–516 |year=2011 |pmid=22034433 |bibcode=2011Sci...334..512S |s2cid=5502662
* Sequence classification<ref>{{Cite journal |last1=Blasiak |first1=S. |last2=Rangwala |first2=H. |title=A Hidden Markov Model Variant for Sequence Classification |journal=IJCAI Proceedings-International Joint Conference on Artificial Intelligence |volume=22 |pages=1192 |year=2011
* [[Metamorphic virus detection]]<ref>{{Cite journal |last1=Wong |first1=W. |last2=Stamp |first2=M. |doi=10.1007/s11416-006-0028-7 |title=Hunting for metamorphic engines |journal=Journal in Computer Virology |volume=2 |issue=3 |pages=211–229 |year=2006 |s2cid=8116065
* [[Sequence motif]] discovery (DNA and proteins)<ref>{{Cite journal |last1=Wong |first1=K. -C. |last2=Chan |first2=T. -M. |last3=Peng |first3=C. |last4=Li |first4=Y. |last5=Zhang |first5=Z. |title=DNA motif elucidation using belief propagation |doi=10.1093/nar/gkt574 |journal=Nucleic Acids Research |volume=41 |issue=16 |pages=e153 |year=2013 |pmid=23814189 |pmc=3763557}}</ref>
* DNA hybridization kinetics<ref>{{Cite journal|last1=Shah|first1=Shalin|last2=Dubey|first2=Abhishek K.|last3=Reif|first3=John|date=2019-05-17|title=Improved Optical Multiplexing with Temporal DNA Barcodes|journal=ACS Synthetic Biology|volume=8|issue=5|pages=1100–1111|doi=10.1021/acssynbio.9b00010|pmid=30951289|s2cid=96448257}}</ref><ref>{{Cite journal|last1=Shah|first1=Shalin|last2=Dubey|first2=Abhishek K.|last3=Reif|first3=John|date=2019-04-10|title=Programming Temporal DNA Barcodes for Single-Molecule Fingerprinting|journal=Nano Letters|volume=19|issue=4|pages=2668–2673|doi=10.1021/acs.nanolett.9b00590|pmid=30896178|bibcode=2019NanoL..19.2668S|s2cid=84841635|issn=1530-6984}}</ref>
*[[Chromatin]] state discovery<ref>{{Cite web|url=http://compbio.mit.edu/ChromHMM/|title=ChromHMM: Chromatin state discovery and characterization|website=compbio.mit.edu|access-date=2018-08-01}}</ref>
*[[Transportation forecasting]]<ref>{{Cite arXiv|title=Modeling and Forecasting the Evolution of Preferences over Time: A Hidden Markov Model of Travel Behavior|last=El Zarwi|first=Feraz|date=May 2011|eprint = 1707.09133|class = stat.AP}}</ref>
*[[Solar irradiance]] variability
== History ==
Hidden Markov models were described in a series of statistical papers by [[Leonard E. Baum]] and other authors in the second half of the 1960s.<ref>{{cite journal |last=Baum |first=L. E. |author2=Petrie, T. |title=Statistical Inference for Probabilistic Functions of Finite State Markov Chains |journal=The Annals of Mathematical Statistics |year=1966 |volume=37 |issue=6 |pages=1554–1563 |doi=10.1214/aoms/1177699147|doi-access=free
In the second half of the 1980s, HMMs began to be applied to the analysis of biological sequences,<ref>{{cite journal |doi=10.1016/0022-2836(86)90289-5 |author=M. Bishop and E. Thompson |title=Maximum Likelihood Alignment of DNA Sequences |journal=[[Journal of Molecular Biology]] |volume=190 |issue=2 |pages=159–165 |year=1986 |pmid=3641921}} {{subscription required}} {{closed access}}</ref> in particular [[DNA]]. Since then, they have become ubiquitous in the field of [[bioinformatics]].<ref name=durbin>{{Durbin 1998|mode=cs1}}</ref>
Line 163:
In the hidden Markov models considered above, the state space of the hidden variables is discrete, while the observations themselves can either be discrete (typically generated from a [[categorical distribution]]) or continuous (typically from a [[Gaussian distribution]]). Hidden Markov models can also be generalized to allow continuous state spaces. Examples of such models are those where the Markov process over hidden variables is a [[linear dynamical system]], with a linear relationship among related variables and where all hidden and observed variables follow a [[Gaussian distribution]]. In simple cases, such as the linear dynamical system just mentioned, exact inference is tractable (in this case, using the [[Kalman filter]]); however, in general, exact inference in HMMs with continuous latent variables is infeasible, and approximate methods must be used, such as the [[extended Kalman filter]] or the [[particle filter]].
Nowadays, inference in hidden Markov models is performed in [[Nonparametric statistics|nonparametric]] settings, where the dependency structure enables [[identifiability]] of the model<ref>{{Cite journal |last1=Gassiat |first1=E. |last2=Cleynen |first2=A. |last3=Robin |first3=S. |date=2016-01-01 |title=Inference in finite state space non parametric Hidden Markov Models and applications |url=https://doi.org/10.1007/s11222-014-9523-8 |journal=Statistics and Computing |language=en |volume=26 |issue=1 |pages=61–71 |doi=10.1007/s11222-014-9523-8 |issn=1573-1375|url-access=subscription }}</ref> and the learnability limits are still under exploration.<ref>{{Cite journal |last1=Abraham |first1=Kweku |last2=Gassiat |first2=Elisabeth |last3=Naulet |first3=Zacharie |date=March 2023 |title=Fundamental Limits for Learning Hidden Markov Model Parameters
=== Bayesian modeling of the transitions probabilities ===
Hidden Markov models are [[generative model]]s, in which the [[joint distribution]] of observations and hidden states, or equivalently both the [[prior distribution]] of hidden states (the ''transition probabilities'') and [[conditional distribution]] of observations given states (the ''emission probabilities''), is modeled.
An extension of the previously described hidden Markov models with [[Dirichlet distribution|Dirichlet]] priors uses a [[Dirichlet process]] in place of a Dirichlet distribution.
=== Discriminative approach ===
A different type of extension uses a [[discriminative model]] in place of the [[generative model]] of standard HMMs.
A variant of the previously described discriminative model is the linear-chain [[conditional random field]].
=== Other extensions ===
Yet another variant is the ''factorial hidden Markov model'', which allows for a single observation to be conditioned on the corresponding hidden variables of a set of <math>K</math> independent Markov chains, rather than a single Markov chain. It is equivalent to a single HMM, with <math>N^K</math> states (assuming there are <math>N</math> states for each chain), and therefore, learning in such a model is difficult: for a sequence of length <math>T</math>, a straightforward Viterbi algorithm has complexity <math>O(N^{2K} \, T)</math>. To find an exact solution, a junction tree algorithm could be used, but it results in an <math>O(N^{K+1} \, K \, T)</math> complexity. In practice, approximate techniques, such as variational approaches, could be used.<ref>{{cite journal |last1=Ghahramani |first1=Zoubin |author-link1=Zoubin Ghahramani |last2=Jordan |first2=Michael I. |author-link2=Michael I. Jordan |title=Factorial Hidden Markov Models |journal=[[Machine Learning (journal)|Machine Learning]] |year=1997 |volume=29 |issue=2/3 |pages=245–273 |doi=10.1023/A:1007425814087|doi-access=free
All of the above models can be extended to allow for more distant dependencies among hidden states, e.g. allowing for a given state to be dependent on the previous two or three states rather than a single previous state; i.e. the transition probabilities are extended to encompass sets of three or four adjacent states (or in general <math>K</math> adjacent states).
Another recent extension is the ''triplet Markov model'',<ref name="TMM">{{cite journal |doi=10.1016/S1631-073X(02)02462-7 |volume=335 |issue=3 |title=Chaı̂nes de Markov Triplet |year=2002 |journal=Comptes Rendus Mathématique |pages=275–278 |last1=Pieczynski |first1=Wojciech|url=http://www.numdam.org/item/10.1016/S1631-073X(02)02462-7.pdf
Finally, a different rationale towards addressing the problem of modeling nonstationary data by means of hidden Markov models was suggested in 2012.<ref name="Reservoir-HMM">{{cite journal |last1=Chatzis |first1=Sotirios P. |last2=Demiris |first2=Yiannis |year=2012 |title=A Reservoir-Driven Non-Stationary Hidden Markov Model |journal=Pattern Recognition |volume=45 |issue=11 |pages=3985–3996 |doi=10.1016/j.patcog.2012.04.018|bibcode=2012PatRe..45.3985C |hdl=10044/1/12611 |hdl-access=free
In 2023, two innovative algorithms were introduced for the Hidden Markov Model. These algorithms enable the computation of the posterior distribution of the HMM without the necessity of explicitly modeling the joint distribution, utilizing only the conditional distributions.<ref>Azeraf, E., Monfrini, E., & Pieczynski, W. (2023). Equivalence between LC-CRF and HMM, and Discriminative Computing of HMM-Based MPM and MAP. Algorithms, 16(3), 173.</ref><ref>Azeraf, E., Monfrini, E., Vignon, E., & Pieczynski, W. (2020). Hidden markov chains, entropic forward-backward, and part-of-speech tagging. arXiv preprint arXiv:2005.10629.</ref> Unlike traditional methods such as the Forward-Backward and Viterbi algorithms, which require knowledge of the joint law of the HMM and can be computationally intensive to learn, the Discriminative Forward-Backward and Discriminative Viterbi algorithms circumvent the need for the observation's law.<ref>Azeraf, E., Monfrini, E., & Pieczynski, W. (2022). Deriving discriminative classifiers from generative models. arXiv preprint arXiv:2201.00844.</ref><ref>Ng, A., & Jordan, M. (2001). On discriminative vs. generative classifiers: A comparison of logistic regression and naive bayes. Advances in neural information processing systems, 14.</ref> This breakthrough allows the HMM to be applied as a discriminative model, offering a more efficient and versatile approach to leveraging Hidden Markov Models in various applications.
Line 190:
== Measure theory ==
{{See also|Subshift of finite type}}
[[File:Blackwell_HMM_example.png|thumb|193x193px|The hidden part of a hidden Markov model, whose observable states is non-Markovian
Given a Markov transition matrix and an invariant distribution on the states,
The curious thing is that the probability measure on the subshifts on <math>A, B
Conversely, there exists a space of subshifts on 6 symbols, projected to subshifts on 2 symbols, such that any Markov measure on the smaller subshift has a preimage measure that is not Markov of any order (
== See also ==
Line 206:
* [[Conditional random field]]
* [[Estimation theory]]
* [[HH-suite]] (HHpred
* [[HMMER]], a free hidden Markov model program for protein sequence analysis
* [[Hidden Bernoulli model]]
Line 214:
* [[Sequential dynamical system]]
* [[Stochastic context-free grammar]]
*
* [[Variable-order Markov model]]
* [[Viterbi algorithm]]
Line 226:
=== Concepts ===
* {{cite journal |last1=Teif |first1=V. B. |last2=Rippe |first2=K. |year=2010 |title=Statistical–mechanical lattice models for protein–DNA binding in chromatin |journal=J. Phys.: Condens. Matter |volume=22 |issue=41 |page=414105 |doi=10.1088/0953-8984/22/41/414105 |pmid=21386588 |arxiv=1004.5514|bibcode=2010JPCM...22O4105T |s2cid=103345
* [http://www.cs.sjsu.edu/~stamp/RUA/HMM.pdf A Revealing Introduction to Hidden Markov Models] by Mark Stamp, San Jose State University.
* [https://web.archive.org/web/20120415032315/http://www.ee.washington.edu/research/guptalab/publications/EMbookChenGupta2010.pdf Fitting HMM's with expectation-maximization – complete derivation]
* [http://www.comp.leeds.ac.uk/roger/HiddenMarkovModels/html_dev/main.html A step-by-step tutorial on HMMs] {{Webarchive|url=https://web.archive.org/web/20170813231824/http://www.comp.leeds.ac.uk/roger/HiddenMarkovModels/html_dev/main.html |date=2017-08-13
* [
* [http://jedlik.phy.bme.hu/~gerjanos/HMM/node2.html Hidden Markov Models] ''(by Narada Warakagoda)''
* Hidden Markov Models: Fundamentals and Applications [http://www.eecis.udel.edu/~lliao/cis841s06/hmmtutorialpart1.pdf Part 1], [http://www.eecis.udel.edu/~lliao/cis841s06/hmmtutorialpart2.pdf Part 2] ''(by V. Petrushin)''
|