8.5 Sequential Probability Models

8.5.3 Algorithms for Monitoring and Smoothing

Any standard belief-network algorithms, such as variable elimination, can be used to carry out monitoring or smoothing. However, it is possible to take advantage of the fact that time moves forward and that the agent is getting observations in time and is interested in its state at the current time.

In belief monitoring or filtering, an agent computes the probability of the current state given the history of observations. In terms of the HMM of Figure 8.12, for each i, the agent wants to compute P(Sio0,,oi), which is the distribution over the state at time i given the particular observation of o0,,oi. This is done using variable elimination:

P(Sio0,,oi) P(Si,o0,,oi)
= P(oiSi)P(Si,o0,,oi-1)
= P(oiSi)Si-1P(Si,Si-1,o0,,oi-1)
= P(oiSi)Si-1P(SiSi-1)P(Si-1,o0,,oi-1)
P(oiSi)Si-1P(SiSi-1)P(Si-1o0,,oi-1). (8.2)

Suppose the agent has computed the previous belief based on the observations received up until time i-1. That is, it has a factor representing P(Si-1o0,,oi-1). This is just a factor on Si-1. To compute the next belief, it multiplies this by P(SiSi-1), sums out Si-1, multiplies this by the factor P(oiSi), and normalizes.

Multiplying a factor on Si-1 by the factor P(SiSi-1) and summing out Si-1 is an instance of matrix multiplication. Multiplying the result by P(oiSi) is called the dot product. Matrix multiplication and dot product are simple instances of variable elimination.

Example 8.33.

Consider the domain of Example 8.31. An observation of a door involves multiplying the probability of each location L by P(doorLoc=L) and renormalizing. A move right involves, for each state, doing a forward simulation of the move-right action in that state weighted by the probability of being in that state.

Smoothing is the problem of computing the probability distribution of a state variable in an HMM given past and future observations. The use of future observations can make for more accurate predictions. Given a new observation, it is possible to update all previous state estimates with one sweep through the states using variable elimination; see Exercise 17.