The backward probability in Hidden Markov Models (HMMs) is computed using the backward algorithm, which is a dynamic programming approach. Let's delve into this process and explore an intuitive example to clarify the concepts.
Computation of Backward Probability
Objective: The backward probability (\beta_t(i)) is defined as the probability of observing the sequence of observations from time (t+1) to the end, given that the model is in state (i) at time (t).
Steps:
-
Initialization:
- The initialization step sets the backward probability at the last time step ((T)) to 1 for each state. This is because, at the end of the sequence, the process is trivially complete.
[
\beta_T(i) = 1 \quad \forall : i
]
-
Recursion:
- The recursive step moves backwards through the sequence, from time (T-1) to time 1. For each state (i) and time (t), calculate (\beta_t(i)) as:
[
\beta_t(i) = \sum_{j=1}^{N} a_{ij} \cdot b_j(O_{t+1}) \cdot \beta_{t+1}(j)
]
- Here, (a_{ij}) is the transition probability from state (i) to state (j), (b_j(O_{t+1})) is the emission probability of observing (O_{t+1}) from state (j), and (\beta_{t+1}(j)) is the backward probability from the next state.
-
Termination:
- The backward probability computation proceeds until time (t=1), preparing the probabilities for further calculations or model evaluations combined with forward probabilities.
Intuitive Example
Consider a simple scenario with a weather model:
- States (S): Sunny (S), Rainy (R)
- Observations (O): Clear (C), Cloudy (D)
- Transition Probabilities ((A)): (a_{SS}=0.8), (a_{SR}=0.2), (a_{RS}=0.6), (a_{RR}=0.4)
- Emission Probabilities ((B)): (b_S(C)=0.7), (b_S(D)=0.3), (b_R(C)=0.4), (b_R(D)=0.6)
- Observation Sequence: (O = [C, D])
Calculate Backward Probabilities
-
Initialization:
[
\beta_2(S) = 1, \quad \beta_2(R) = 1
]
-
Recursion ((t=1)):
-
Calculate (\beta_1(S)):
[
\beta_1(S) = a_{SS} \cdot b_S(D) \cdot \beta_2(S) + a_{SR} \cdot b_R(D) \cdot \beta_2(R)
]
[
\beta_1(S) = 0.8 \cdot 0.3 \cdot 1 + 0.2 \cdot 0.6 \cdot 1 = 0.24 + 0.12 = 0.36
]
-
Calculate (\beta_1(R)):
[
\beta_1(R) = a_{RS} \cdot b_S(D) \cdot \beta_2(S) + a_{RR} \cdot b_R(D) \cdot \beta_2(R)
]
[
\beta_1(R) = 0.6 \cdot 0.3 \cdot 1 + 0.4 \cdot 0.6 \cdot 1 = 0.18 + 0.24 = 0.42
]
In this example, the backward probabilities (\beta_1(S)) and (\beta_1(R)) give the likelihoods of observing the sequence starting from the respective states at (t=1) through to the end. These calculations are foundational for decoding and estimating the hidden states in the sequence.