Clicky

Introduction to Sequential Monte Carlo Methods

These notes are based on the following article:

Doucet, Arnaud, Nando de Freitas, and Neil Gordon (2001): “An Introduction to Sequential Monte Carlo Methods,” in Sequential Monte Carlo Methods in Practice, ed. by A. Doucet, N. de Freitas, and N. Gordon. New York: Springer-Verlag.

Introduction

Real-world data analysis often requires estimating unknown quantities given only a sequence of observations on some related observable quantity. In a Bayesian framework, one typically has a priori knowledge of the model: a prior distribution of the unobservable quantity of interest and likelihood functions which relate the observables to the unobservables. The resulting posterior distribution of the unobservables can be calculated using Bayes’ theorem. This allows one to conduct inference about the unobserved quantities.

In some cases, it is natural to process observations sequentially. These cases are the focus of this introductory article and the rest of the book. For example, on-line applications such as radar tracking or estimating financial instruments where new data become available in real time, it is easier to update the previously formed posterior distribution than to recalculate it from scratch.

Sequential Monte Carlo methods are simulation-based methods for calculating approximations to posterior distributions. They avoid making linearity or normality assumptions required by related methods such as the Kalman filter.

Model

Let {x t} t=0 denote the sequence of unobserved states, with x t𝒳. The authors consider only the case when {x t} is a Markov process with initial distribution p(x 0). The Markov assumption is not needed and is only for tractability. Let p(x t|x t1) denote the transition equation. Let {y t} t=1 denote a sequence of observations with y t𝒴. Suppose that, given {x t}, the observations are conditionally independent. Let p(y t|x t) denote the marginal distribution, or the observation equation.

Thus, the model is defined by the following distributions: p(x 0), p(x t|x t1)fort1, p(y t|x t)fort1.

Define x 0:t{x 0,,x t} and y 0:t{y 1,,y t}. Our goal is to estimate the posterior distribution p(x 0:t|y 1:t) recursively. We also may care about the marginal distribution p(x t|y 1:t) or an expectation such as I(h t)E[h t(x 0:t)|y 1:t]=h t(x 0:t)p(x 0:t|y 1:t)dx 0:t for some h t:𝒳 t n that is integrable with respect to p(x 0:t|y 1:t).

Bayes’ theorem gives us the posterior distribution at any time t: p(x 0:t|y 1:t)=p(y 1:t|x 0:t)p(x 0:t)p(y 1:t|x 0:t)p(x 0:t)dx 0:t

There is an inherent recursive relationship for updating the posterior distribution. We can express p(x 0:t+1|y 0:t+1) in terms of p(x 0:t|y 1:t): p(x 0:t+1|y 1:t+1) =p(x 0:t+1,y 1:t+1)p(y 1:t+1) =p(x t+1,y t+1|x 0:t,y 0:t)p(x 0:t,y 1:t)p(y t+1|y 1:t)p(y 1:t) =p(y t+1|x t+1)p(x t+1|x t)p(y t+1|y 1:t)p(x 0:t|y 1:t) where the last equality uses the definition of the conditional density, the conditional independence assumption, and the Markov assumption. The expression in the denominator is constant with respect to x 0:t+1.

Perfect Monte Carlo Sampling

In the ideal situation, we could draw a sample of size N from p(x 0:t|y 1:t), the posterior distribution of interest. Call this sample {x 0:t (i)} i=1 N. We can form an estimate of p(x 0:t|y 1:t) using the empirical distribution of the sample: P N(dx 0:t|y 0:t)=N 1 i=1 Nδ x 0:t (i)(dx 0:t). From here, we can estimate the integral I(h t) by h t(x 0:t)P N(dx 0:t|y 1:t)=N 1 i=1 Nh t(x 0:t (i)).

Typically it is impossible to get such a sample since p(x 0:t|y 1:t) is multivariate, known only up to a constant of proportionality, and non-standard. Markov chain Monte Carlo methods may be used in similar situations, but they are not well-suited to recursive problems such as the ones considered here.

Importance Sampling

Since we can’t draw from p(x 0:t|y 1:t) directly, we can use importance sampling to draw from p(x 0:t|y 1:t) indirectly using an importance sampling density π(x 0:t|y 1:t) and a corresponding importance weight for each draw. The importance sampling density must be chosen so that its support includes the support of p(x 0:t|y 1:t). We have I(h t)E[h t(x 0:t)|y 1:t] =h t(x 0:t)p(x 0:t|y 1:t)dx 0:t =h t(x 0:t)p(x 0:t|y 1:t)dx 0:tp(x 0:t|y 1:t)dx 0:t =h t(x 0:t)w(x 0:t)π(x 0:t|y 1:t)dx 0:tw(x 0:t)π(x 0:t|y 1:t)dx 0:t where w(x 0:t)p(x 0:t|y 1:t)π(x 0:t|y 1:t) is the importance weight.

Thus, to approximate the expectation I(h t), we simply need to draw a sample {x 0:t (i)} i=1 N from π(x 0:t|y 1:t) and calculate I(h t)=N 1 ih t(x 0:t)w(x 0:t (i))N 1 iw(x 0:t (i))= ih t(x 0:t)w˜ t (i) where w˜ t (i)w(x 0:t) jw(x 0:t (j)) are the normalized importance weights.

This procedure can be interpreted as a sampling method with an approximate posterior given by P^ N(dx 0:t|y 1:t)= iw t (i)δ x 0:t(dx 0:t). We can then approximate I(h t) by I^(h t)=h t(x 0:t)P^ N(dx 0:t|y 1:t).

Although this solves the problem of being able to obtain draws, this approach is still not well-suited for our recursive problem.

Sequential Importance Sampling (SIS)

The goal of Sequential Importance Sampling (SIS) is to compute an estimate of p(x 0:t|y 1:t) using the past simulated values {x 0:t1 (i)} i=1 N. We have the following recursive representation of the importance sampling distribution: π(x 0:t|y 1:t) =π(x 0) k=1 tπ(x k|x 0:k1,y 0:k). This recursive relationship allows us to calculate the importance weights recursively: w(x 0:t) p(x 0:t|y 1:t)π(x 0:t|y 1:t) =p(x 0:t,y 1:t)p(y 1:t)π(x 0:t1|y 1:t1)π(x t|x 0:t1,y 1:t) =p(x 0:t1,y 1:t1)p(x t,y t|x 0:t1,y 1:t1)p(y t|y 1:t1)p(y 1:t1)π(x 0:t1|y 1:t1)π(x t|x 0:t1,y 1:t) =p(x 0:t1|y 1:t1)π(x 0:t1|y 1:t1)p(y t|x t)p(x t|x 0:t1)p(y t|y 1:t1)π(x t|x 0:t1,y 1:t) =w(x 0:t1)p(y t|x t)p(x t|x 0:t1)p(y t|y 1:t1)π(x t|x 0:t1,y 1:t). Hence, w˜(x 0:t (i)) =w(x 0:t (i)) jw(x 0:t (j)) =w(x 0:t (i))p(y t|x t (i))p(x t (i)|x 0:t1 (i))p(y 1:t|y 1:t1)π(x t (i)|x 0:t1 (i),y 1:t) jw(x 0:t (j))p(y t|x t (j))p(x t (j)|x 0:t1 (j))p(y 1:t|y 1:t1)π(x t (j)|x 0:t1 (j),y 1:t). Notice that the p(y t|y 1:t1) term is constant for all x 0:t and cancels out.

A special case occurs when π(x 0:t|y 1:t)=p(x 0:t)=p(x 0) k=1 kp(x k|x k1) so that w(x 0:t)w(x 0:t1)p(y t|x t) and w˜ t (i)w t1 (i)p(y t|x t (i)).

SIS is usually inefficient for high-dimensional integrals because as t, the importance weights for some particles quickly approaches zero.

The Bootstrap Filter

To prevent particle degeneracy, the bootstrap filter introduces a resampling step which eliminates particles with low importance weights. Instead of using the importance-weighted empirical distribution P^ N we use a uniformly-weighted distribution P N(dx 0:t|y 1:t)=N 1 iN t (i)δ x 0:t (i)(dx 0:t), where N t (i) is the number of offspring of the particle x 0:t (i) which is to be determined by some branching mechanism. The most common such mechanism involves resampling N times from P^ N (Gordon et al., 1993). We require iN t (i)=N for all t. If N t (j)=0, the particle x 0:t (j) dies. We want to choose N t (i) such that h t(x 0:t)P N(dx 0:t|y 1:t)h t(x 0:t)P^ N(dx 0:t|y 1:t). The surviving particles, those with N t (i)>0, are approximately distributed according to p(x 0:t|y 1:t).

Algorithm

  1. Initialization (t=0).

    • For i=1,,N, draw x 0 (i)p(x 0).
    • Set t1.
  2. Importance Sampling Step

    • For i=1,,N, draw x˜ t (i)p(x t|x t1 (i)) and set x˜ 0:t (i)(x 0:t1 (i),x˜ t (i)).

    • For i=1,,N, calculate the importance weights w˜ t (i)=p(y t|x˜ t (i)) and normalize them.

  3. Resampling Step

    • Take N draws {x 0:t (i)} i=1 N with replacement from the set {x˜ 0:t (i)} i=1 N with weights {w˜ t (i)} i=1 N.

    • Set tt+1 and go to step 2.