A Novel Method for Decoding Any High-Order Hidden Markov Model
Abstract
This paper proposes a novel method for decoding any high-order hidden Markov model. First, the high-order hidden Markov model is transformed into an equivalent first-order hidden Markov model by Hadar’s transformation. Next, the optimal state sequence of the equivalent first-order hidden Markov model is recognized by the existing Viterbi algorithm of the first-order hidden Markov model. Finally, the optimal state sequence of the high-order hidden Markov model is inferred from the optimal state sequence of the equivalent first-order hidden Markov model. This method provides a unified algorithm framework for decoding hidden Markov models including the first-order hidden Markov model and any high-order hidden Markov model.
1. Introduction
Hidden Markov models are powerful tools for modeling and analyzing sequential data. For several decades, hidden Markov models have been used in many fields including handwriting recognition [1–3], speech recognition [4, 5], computational biology [6, 7], and longitudinal data analysis [8, 9]. Past and current developments on hidden Markov models are well documented in [10, 11]. A hidden Markov model comprises an underlying Markov chain and an observed process, where the observed process is a probabilistic function of the underlying Markov chain [12]. Given a hidden Markov model, an efficient procedure for finding the optimal state sequence is of great interest in the real-world applications. In the traditional first-order hidden Markov model, the Viterbi algorithm is utilized to recognize the optimal state sequence [13]. Like the Kalman filter, the Viterbi algorithm tracks the optimal state sequence with a recursive method.
In recent years, the theory and applications of high-order hidden Markov models have been substantially advanced, and high-order hidden Markov models are known to be more powerful than the first-order hidden Markov model. There are two basic approaches to study the algorithms of high-order hidden Markov models. The first one is called the extended approach, which is to extend directly the existing algorithms of the first-order hidden Markov model to high-order hidden Markov models [14–16]. The second one is called the model reduction method, which is to transform a high-order hidden Markov model to an equivalent first-order hidden Markov model by some means and then to establish the algorithms of the high-order hidden Markov model by using standard techniques applicable to the first-order hidden Markov model [17–20].
In this paper, we propose a novel method for decoding any high-order hidden Markov model. First, the high-order hidden Markov model is transformed into an equivalent first-order hidden Markov model by Hadar’s transformation. Next, the optimal state sequence of the equivalent first-order hidden Markov model is recognized by the existing Viterbi algorithm of the first-order hidden Markov model. Finally, the optimal state sequence of the high-order hidden Markov model is inferred from the optimal state sequence of the equivalent first-order hidden Markov model.
2. High-Order Hidden Markov Model and Hadar’s Transformation
Initially suppose two processes and {ot} are defined on some probability space , where t is an integer index. takes values in a finite set , and ot takes values in a finite set . Without loss of generality, the elements of can be denoted by {0,1, …, N − 1}. A high-order hidden Markov model is defined as follows.
Definition 1 (see [18], [20].)A high-order hidden Markov model is a doubly stochastic process with an underlying state process that is not directly observable but can be observed only through another stochastic process that is called the observation process. The observation process is governed by the hidden state process and produces the observation sequence. The state process and observation process, respectively, satisfy the following conditions.
- (a)
The hidden state process is a homogeneous Markov chain of order n, that is, a stochastic process that satisfies
() - (b)
The observation process {ot} is governed by the hidden state process according to a set of probability distributions that satisfy
()
- (1)
State transition probability distribution:
() - (2)
Symbol emission probability distribution:
() - (3)
Initial state probability distribution:
()
Definition 2 (see [18].)Let
Definition 3 (see [17].)Any two models λ1 and λ2 are defined as equivalent if
Remark 4. The function f is a one to one correspondence between the set and the set S = {0,1, …, Nr − 1}.
Proposition 5 (see [18].)Let aij = P(qt+1 = j∣qt = i) for any i, j ∈ S. If ⌊i/N⌋≠j − ⌊j/Nr−1⌋Nr−1, then aij = 0; that is, a transition from qt = i to qt+1 = j is impossible.
Lemma 6. Let ; then the process {qt} forms the first-order homogeneous Markov chain.
Proof. Without loss of generality, we may assume that qt = i and qt+1 = j, where i, j ∈ S.
First, we consider the case that ⌊i/N⌋≠j − ⌊j/Nr−1⌋Nr−1. By Proposition 5, it is easy to see that
Next, we consider the case that ⌊i/N⌋ = j − ⌊j/Nr−1⌋Nr−1. Since qt = i and qt+1 = j, it follows from (10) that
Through the above analysis, we derive that
Analogously, it is easy to see that
Therefore, the process {qt} forms the first-order homogeneous Markov chain.
Lemma 7. The two processes {qt} and {ot} form the first-order hidden Markov model.
Proof. Without loss of generality, we may assume that and qt = i, where and i ∈ S. Since qt = i, it follows from (10) that
Analogously, it is easy to see that
Combining these with Lemma 6, we prove that the two processes {qt} and {ot} form the first-order hidden Markov model.
Remark 8. Hadar and Messer [18] had also mentioned the fact that the two processes {qt} and {ot} form the first-order hidden Markov model, but they did not discuss and prove it in detail.
- (1)
State transition probability distribution:
() - (2)
Symbol emission probability distribution:
() - (3)
Initial state probability distribution:
()
Proposition 9 (see [18].)Let i = f([i1, …, ir]) and j = f([i0, …, ir−1]) for any ; then
Lemma 10. Let O = o1 ⋯ oT be any arbitrary observation sequence; then
Remark 11. Hadar and Messer [18] had also mentioned the fact that the high-order hidden Markov model is equivalent to the first-order hidden Markov model {qt, ot}, but they did not discuss and prove it in detail.
3. Methodology
Theorem 12. Let O = o1 ⋯ oT be any given observation sequence, and assume that ; then
Proof. Without loss of generality, let , where . According to Proposition 9, we have
On the other hand, it is easy to see that
Hence, by Lemma 10, we have
Theorem 13. Let O = o1 ⋯ oT be any given observation sequence, and assume that the state sequence satisfies
Proof. By Theorem 12, it is easy to see that
According to Theorem 13, we can know that some optimal state sequence of the high-order hidden Markov model is mapped to some optimal state sequence of the first-order hidden Markov model {qt, ot}. Similarly, we can draw the following conclusion.
Theorem 14. Let O = o1 ⋯ oT be any given observation sequence, and assume that the state sequence satisfies
Remark 15. Combining Theorem 13 with Theorem 14, it is known that there exists a one to one correspondence between the optimal state sequence of the high-order hidden Markov model and the optimal state sequence of the first-order hidden Markov model {qt, ot}.
To decode any high-order hidden Markov model , we transform it into an equivalent first-order hidden Markov model {qt, ot} by Hadar’s transformation. Then, do as follows.
Step 1. Determine some optimal state sequence of the first-order hidden Markov model {qt, ot} by using the Viterbi algorithm. Without loss of generality, let
Step 2. For , using the transformations
Step 3. For , , using the transformation
According to Theorem 14, the above state sequence is some optimal state sequence of the high-order hidden Markov model .
4. Conclusions
In this paper, a novel method for decoding any high-order hidden Markov model is given. Based on this method, the optimal state sequence of any high-order hidden Markov model can be inferred by the existing Viterbi algorithm of the first-order hidden Markov model. This method has universal character for decoding hidden Markov models and provides a unified algorithm framework for decoding hidden Markov models including the first-order hidden Markov model and any high-order hidden Markov model. For instance, the Viterbi algorithm of the first-order hidden Markov model can be easily derived as a special case of our conclusion when m = n = 1.
This method we analyzed is practical and valuable in its own right. Future research could use this method for applications in handwriting, speech recognition, speaker recognition, emotion recognition, and so forth.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Acknowledgments
This work is supported by the Major Program of the National Natural Science Foundation of China (no. 71390521), the Postdoctoral Science Foundation of China (no. 2014M551565), and the Scientific Research Foundation of Tongling University (no. 2012tlxyrc04).