← Wiki Index / Computation & Algorithms / Particle Filter
💻 Computation & Algorithms

Particle Filter

A particle filter, or sequential Monte Carlo (SMC) method, is a recursive Bayesian state-estimation algorithm that represents the posterior probability distribution of a nonlinear, non-Gaussian dynamical system using an evolving ensemble of weighted random samples.

Particle filter, formally known in statistics and signal processing as a Sequential Monte Carlo (SMC) method, is a simulation-based recursive Bayesian estimation algorithm in computation and algorithms that tracks the hidden state xt of a dynamical system over time from noisy observations y1:t = {y1, y2, …, yt}. Whereas the linear Kalman filter computes exact closed-form Gaussian posteriors when both the state transition and observation models are linear with additive Gaussian noise, real-world physical, biological, and robotic systems frequently exhibit strong nonlinearities, multimodal likelihood landscapes, or non-Gaussian heavy-tailed noise where analytical integrals are intractable.

Introduced in its modern bootstrap form by Neil J. Gordon, David J. Salmond, and Adrian F. M. Smith in 1993 by combining sequential importance sampling with a Darwinian resampling step, the particle filter approximates the continuous filtering posterior density p(xt | y1:t) by a discrete empirical cloud of N weighted random samples—called particles—{(xt(i), wt(i))}i=1N. As a dynamic extension of the Monte Carlo method, expectations of any state function φ(xt) converge to the true Bayesian posterior expectation at the dimension-independent Monte Carlo rate O(N−1/2).

State-Space Formulation and Recursive Bayesian Filtering

A discrete-time Markov state-space model (hidden Markov model with continuous state space ℝd) is specified by an initial state prior p(x0) and two conditional probability distributions:

  1. State transition (process) model: xt ∼ p(xt | xt−1), governing the stochastic dynamics of the hidden state.
  2. Observation (measurement) likelihood: yt ∼ p(yt | xt), relating the noisy sensor reading yt to the current hidden state xt.

Recursive Bayesian filtering alternates between two conceptual steps at each time step t:

  • Prediction (Chapman–Kolmogorov equation): p(xt | y1:t−1) = ∫ p(xt | xt−1) p(xt−1 | y1:t−1) dxt−1
  • Update (Bayes' rule): p(xt | y1:t) = [p(yt | xt) p(xt | y1:t−1)] / p(yt | y1:t−1).

When p(xt | xt−1) or p(yt | xt) is nonlinear or bimodal, the integral in the Chapman–Kolmogorov equation cannot be evaluated in closed form. A particle filter replaces the continuous prior density with the empirical measure:

p̂(xt | y1:t) = ∑i=1N wt(i) δ(xt − xt(i)), where ∑i=1N wt(i) = 1 and wt(i) ≥ 0,

and δ(·) denotes the Dirac delta measure.

Sequential Importance Sampling, Weight Degeneracy, and Resampling

Sequential Importance Sampling (SIS)

In Sequential Importance Sampling (SIS), each particle trajectory x0:t(i) is extended at step t by drawing a new state xt(i) ∼ q(xt | xt−1(i), yt) from a user-chosen proposal (importance) distribution q. The unnormalized importance weight is updated recursively by:

w̃t(i) = wt−1(i) · [p(yt | xt(i)) p(xt(i) | xt−1(i))] / q(xt(i) | xt−1(i), yt),

followed by normalization wt(i) = w̃t(i) / ∑j=1N w̃t(j). In the widely used Bootstrap Particle Filter (Gordon et al., 1993), the proposal distribution is chosen directly as the transition prior q(xt | xt−1(i), yt) = p(xt | xt−1(i)), simplifying the weight update to the observation likelihood alone: w̃t(i) = wt−1(i) p(yt | xt(i)).

Weight Degeneracy and the SIR Resampling Step

Without intervention, pure SIS suffers from an unavoidable flaw: the variance of the importance weights increases stochastically with time t. Within a few dozen time steps, one particle accumulates normalized weight wt(k) ≈ 1 while the remaining N − 1 particles decay to wt(i) ≈ 0—a phenomenon known as weight degeneracy. The degree of degeneracy is quantified by Kong's Effective Sample Size (ESS):

Neff ≈ 1 / ∑i=1N (wt(i))2, where 1 ≤ Neff ≤ N.

Whenever Neff drops below a threshold (typically N/2), the Sequential Importance Resampling (SIR) algorithm draws N new particles with replacement from the discrete distribution {(xt(i), wt(i))} and resets all weights to uniform wt(i) = 1/N. Low-variance systematic resampling and stratified resampling perform this selection in O(N) time using a single uniform random number u0 ∼ Uniform(0, 1/N], eliminating particles in low-probability regions and duplicating particles in high-likelihood regions.

Bayesian Filtering MethodState & Noise AssumptionsMultimodal Posterior SupportComputational Cost per StepFailure Mode in High Dimensions
Linear Kalman FilterLinear dynamics, Gaussian noiseNo (single Gaussian)O(d3) via CholeskyDiverges on nonlinear dynamics
Extended Kalman Filter (EKF)Locally linearizable (Jacobians)No (single Gaussian)O(d3)Linearization bias on strong curvature
Unscented Kalman Filter (UKF)Unscented sigma points (2d + 1)No (Gaussian moment match)O(d3)Misses bimodal / multi-hypothesis splits
Bootstrap Particle Filter (SIR)Arbitrary nonlinear, non-GaussianYes (N weighted samples)O(N)Weight collapse when d > 20
Rao–Blackwellized Particle FilterConditionally linear-Gaussian substructureYes (particles × Kalman banks)O(N dlin3)Requires factored state structure

Sample Impoverishment, Rao–Blackwellization, and Particle MCMC

Repeated resampling introduces a secondary challenge called sample impoverishment (or lineage collapse): if process noise is small, resampling duplicates identical particles so that after k steps most particles share a single common ancestor at time t − k. Advanced SMC variants mitigate impoverishment and high-dimensional weight collapse through three strategies:

  1. Auxiliary Particle Filter (Pitt & Shephard, 1999): Looks one step ahead using the current observation yt to weight particles before propagating and resampling them, steering particles toward high-likelihood regions.
  2. Resample-Move and Particle Markov Chain Monte Carlo (PMCMC): Applies a Markov chain Monte Carlo (Metropolis–Hastings) jitter kernel after resampling to restore particle diversity, or uses the unbiased marginal likelihood estimator p̂(y1:T) = ∏t=1T [(1/N) ∑i w̃t(i)] inside Particle Marginal Metropolis–Hastings (PMMH) (Andrieu, Doucet, & Holenstein, 2010) to perform exact Bayesian parameter inference in nonlinear stochastic differential equations and epidemiological SIR models.
  3. Rao–Blackwellized Particle Filtering (FastSLAM): In mobile robotics Simultaneous Localization and Mapping (SLAM), the robot's 3-DoF trajectory x1:t is tracked by N particles while thousands of landmark coordinates conditioned on each trajectory are updated analytically by independent 2 × 2 Kalman filters, dramatically reducing the variance of the Monte Carlo estimator.

Frequently Asked Questions

Why is systematic resampling preferred over multinomial resampling?

Multinomial resampling draws N independent uniform random numbers and searches the cumulative weight array in O(N log N) time, introducing unnecessary Monte Carlo sampling variance even when all weights are equal (wt(i) = 1/N). Systematic resampling lays down an evenly spaced comb of N points with spacing 1/N in O(N) time, achieving zero sampling variance when weights are uniform and minimizing variance across all unbiased resampling schemes.

How does the particle filter estimate the marginal likelihood of a model?

At each time step t, prior to resampling, the average of the unnormalized weights Ẑt = (1/N) ∑i=1N w̃t(i) estimates the predictive likelihood p(yt | y1:t−1). By Del Moral's theorem, the product Ẑ1:T = ∏t=1T Ẑt is an unbiased estimator of the total marginal likelihood p(y1:T) for any finite particle count N ≥ 1.

References

  1. Gordon, N. J., Salmond, D. J., & Smith, A. F. M. (1993). Novel approach to nonlinear/non-Gaussian Bayesian state estimation. IEE Proceedings F (Radar and Signal Processing), 140(2), 107–113. https://doi.org/10.1049/ip-f-2.1993.0015
  2. Pitt, M. K., & Shephard, N. (1999). Filtering via simulation: Auxiliary particle filters. Journal of the American Statistical Association, 94(446), 590–599. https://doi.org/10.1080/01621459.1999.10474153
  3. Doucet, A., Godsill, S., & Andrieu, C. (2000). On sequential Monte Carlo sampling methods for Bayesian filtering. Statistics and Computing, 10(3), 197–208. https://doi.org/10.1023/A:1008935410038
  4. Andrieu, C., Doucet, A., & Holenstein, R. (2010). Particle Markov chain Monte Carlo methods. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 72(3), 269–342. https://doi.org/10.1111/j.1467-9868.2009.00736.x
🧬 Support Open Science
Explore interactive science games on LowKey Games or browse scientific apparel & accessories in the CRV Science Shop.
💡 Spot an inaccuracy or have primary literature to expand this article?
Submit a citation or revision note using your shared CRV Science / LowKey Games profile ID.
Suggest Revision