Auxiliary particle filter

The auxiliary particle filter is a particle filtering algorithm introduced by Pitt and Shephard in 1999 to improve some deficiencies of the sequential importance resampling (SIR) algorithm when dealing with tailed observation densities.

Motivation
Particle filters approximate continuous random variable by $$M$$ particles with discrete probability mass $$\pi_t$$, say $$1/M$$ for uniform distribution. The random sampled particles can be used to approximate the probability density function of the continuous random variable if the value $$M\rightarrow\infin$$.

The empirical prediction density is produced as the weighted summation of these particles:

$$\widehat{f}(\alpha_{t+1}|Y_t)=\sum_{j=1}^Mf(\alpha_{t+1}|\alpha_t^j)\pi_t^j$$, and we can view it as the "prior" density. Note that the particles are assumed to have the same weight $$\pi_t^j=\frac{1}{M}$$.

Combining the prior density $$\widehat{f}(\alpha_{t+1}|Y_t)$$ and the likelihood $$f(y_{t+1}|\alpha_{t+1})$$, the empirical filtering density can be produced as:

$$\widehat{f}(\alpha_{t+1}|Y_{t+1})=\frac {f(y_{t+1}|\alpha_{t+1}) \widehat{f}(\alpha_{t+1}|Y_t)}{f(y_{t+1}|Y_t)} \propto f(y_{t+1}|\alpha_{t+1}) \sum_{j=1}^Mf(\alpha_{t+1}|\alpha_t^j)\pi_t^j$$, where $$f(y_{t+1}|Y_t) =\int f(y_{t+1}|\alpha_{t+1})dF(\alpha_{t+1}|Y_t)$$.

On the other hand, the true filtering density which we want to estimate is

$$f(\alpha_{t+1}|Y_{t+1})=\frac{f(y_{t+1}|\alpha_{t+1})f(\alpha_{t+1}|Y_t)}{f(y_{t+1}|Y_t)}$$.

The prior density $$\widehat{f}(\alpha_{t+1}|Y_t)$$ can be used to approximate the true filtering density $$f(\alpha_{t+1}|Y_{t+1})$$:


 * The particle filters draw $$R$$ samples from the prior density $$\widehat{f}(\alpha_{t+1}|Y_t)$$. Each sample are drawn with equal probability.
 * Assign each sample with the weights $$\pi_j=\frac{\omega_j}{\sum_{i=1}^R\omega_i},\omega_j=f(y|\alpha^j)$$. The weights represent the likelihood function $$f(y_{t+1}|\alpha_{t+1})$$.
 * If the number $$R\rightarrow\infin$$, than the samples converge to the desired true filtering density.
 * The $$R$$ particles are resampled to $$M$$ particles with the weight $$\pi_j$$.

The weakness of the particle filters includes:


 * If the weight {$$\omega_j$$} has a large variance, the sample amount $$R$$ must be large enough for the samples to approximate the empirical filtering density. In other words, while the weight is widely distributed, the SIR method will be imprecise and the adaption is difficult.

Therefore, the auxiliary particle filter is proposed to solve this problem.

Auxiliary variable
Comparing with the empirical filtering density which has $$\widehat{f}(\alpha_{t+1}|Y_{t+1})\propto f(y_{t+1}|\alpha_{t+1}) \sum_{j=1}^Mf(\alpha_{t+1}|\alpha_t^j)\pi_t^j$$,

we now define $$\widehat{f}(\alpha_{t+1},k|Y_{t+1})\propto f(y_{t+1}|\alpha_{t+1}) f(\alpha_{t+1}|\alpha_t^k)\pi^k$$, where $$k=1,...,M$$.

Being aware that $$\widehat{f}(\alpha_{t+1}|Y_{t+1})$$ is formed by the summation of $$M$$ particles, the auxiliary variable $$k$$ represents one specific particle. With the aid of $$k$$, we can form a set of samples which has the distribution $$g(\alpha_{t+1},k|Y_{t+1})$$. Then, we draw from these sample set $$g(\alpha_{t+1},k|Y_{t+1})$$ instead of directly from $$\widehat{f}(\alpha_{t+1}|Y_{t+1})$$. In other words, the samples are drawn from $$\widehat{f}(\alpha_{t+1}|Y_{t+1})$$ with different probability. The samples are ultimately utilized to approximate $$f(\alpha_{t+1}|Y_{t+1})$$.

Take the SIR method for example:


 * The particle filters draw $$R$$ samples from $$g(\alpha_{t+1},k|Y_{t+1})$$.
 * Assign each samples with the weight $$\pi_j=\frac{\omega_j}{\sum_{i=1}^R\omega_i}, \omega_j=\frac{f(y_{t+1}|\alpha_{t+1}^j)f(\alpha_{t+1}^j|\alpha_t^k)}{g(\alpha_{t+1}^j,k^j|Y_{t+1})}$$.
 * By controlling $$y_{t+1}$$ and $$\alpha_t^k$$, the weights are adjusted to be even.
 * Similarly, the $$R$$ particles are resampled to $$M$$ particles with the weight $$\pi_j$$.

The original particle filters draw samples from the prior density, while the auxiliary filters draw from the joint distribution of the prior density and the likelihood. In other words, the auxiliary particle filters avoid the circumstance which the particles are generated in the regions with low likelihood. As a result, the samples can approximate $$f(\alpha_{t+1}|Y_{t+1})$$ more precisely.

Selection of the auxiliary variable
The selection of the auxiliary variable affects $$g(\alpha_{t+1},k|Y_{t+1})$$ and controls the distribution of the samples. A possible selection of $$g(\alpha_{t+1},k|Y_{t+1})$$ can be: $$g(\alpha_{t+1},k|Y_{t+1})\propto f(y_{t+1}|\mu_{t+1}^k) f(\alpha_{t+1}|\alpha_t^k)\pi^k$$, where $$k=1,...,M$$ and $$\mu_{t+1}^k$$ is the mean.

We sample from $$g(\alpha_{t+1},k|Y_{t+1})$$ to approximate $$f(\alpha_{t+1}|Y_{t+1})$$ by the following procedure:


 * First, we assign probabilities to the indexes of $$f(\alpha_{t+1}|\alpha_t^k)$$. We named these probabilities as the first-stage weights $$\lambda_k$$, which are proportional to $$g(k|Y_{t+1})\propto \pi^kf(y_{t+1}|\mu_{t+1}^k)$$.
 * Then, we draw $$R$$ samples from $$f(\alpha_{t+1}|\alpha_t^k)$$ with the weighted indexes. By doing so, we are actually drawing the samples from $$g(\alpha_{t+1},k|Y_{t+1})$$.
 * Moreover, we reassign the second-stage weights $$\pi_j=\frac{\omega_j}{\sum_{i=1}^R\omega_i}$$ as the probabilities of the $$R$$ samples, where  $$\omega_j=\frac{f(y_{t+1}|\alpha_{t+1}^j)}{f(y_{t+1}|\mu_{t+1}^j)}$$. The weights are aim to compensate the effect of  $$\mu_{t+1}^k$$.


 * Finally, the $$R$$ particles are resampled to $$M$$ particles with the weights $$\pi_j$$.

Following the procedure, we draw the $$R$$ samples from $$g(\alpha_{t+1},k|Y_{t+1})$$. Since $$g(\alpha_{t+1},k|Y_{t+1})$$ is closely related to the mean $$\mu_{t+1}^k$$, it has high conditional likelihood. As a result, the sampling procedure is more efficient and the value $$R$$ can be reduced.

Other point of view
Assume that the filtered posterior is described by the following M weighted samples:



p(x_t|z_{1:t}) \approx \sum_{i=1}^M \omega^{(i)}_t \delta \left( x_t - x^{(i)}_t \right). $$

Then, each step in the algorithm consists of first drawing a sample of the particle index $$k$$ which will be propagated from $$t-1$$ into the new step $$t$$. These indexes are auxiliary variables only used as an intermediary step, hence the name of the algorithm. The indexes are drawn according to the likelihood of some reference point $$\mu^{(i)}_t$$ which in some way is related to the transition model $$x_t|x_{t-1}$$ (for example, the mean, a sample, etc.):



k^{(i)} \sim P(i=k|z_t) \propto \omega^{(i)}_t p( z_t | \mu^{(i)}_t ) $$

This is repeated for $$i=1,2,\dots,M$$, and using these indexes we can now draw the conditional samples:



x_t^{(i)} \sim p( x | x^{k^{(i)}}_{t-1}). $$

Finally, the weights are updated to account for the mismatch between the likelihood at the actual sample and the predicted point $$\mu_t^{k^{(i)}}$$:



\omega_t^{(i)} \propto \frac{p( z_t | x^{(i)}_t) } { p( z_t | \mu^{k^{(i)}}_t) }. $$