Inferensys

Glossary

Particle Filter

A particle filter is a sequential Monte Carlo method for state estimation that represents a system's probable state using a set of random samples, or particles.
Developer building agentic RAG system, retrieval pipeline diagram on laptop, technical workspace with notes.
REAL-TIME ROBOTIC PERCEPTION

What is a Particle Filter?

A particle filter is a sequential Monte Carlo method used for state estimation that represents the posterior probability distribution of a system's state using a set of random samples, or particles, making it effective for highly nonlinear and non-Gaussian problems.

A particle filter is a sequential Monte Carlo algorithm for estimating the state of a dynamic system. It represents the system's posterior probability distribution using a set of discrete samples, called particles, each with an associated weight. This approach excels in nonlinear and non-Gaussian scenarios where analytical solutions like the Kalman filter fail, making it a cornerstone of robotic localization and sensor fusion.

The algorithm operates in a predict-update cycle. First, particles are propagated forward using a motion model. Then, their weights are updated based on the likelihood of new sensor measurements. Finally, a resampling step replicates high-weight particles and discards low-weight ones, focusing computational resources on the most probable state hypotheses. This makes it robust to multi-modal distributions and sensor noise in complex environments.

SEQUENTIAL MONTE CARLO METHODS

Core Characteristics of Particle Filters

Particle filters are a powerful class of algorithms for state estimation in nonlinear, non-Gaussian systems. Their defining characteristics stem from their use of a weighted set of samples to represent complex probability distributions.

01

Sequential Importance Sampling (SIS)

The core mechanism of a particle filter. It sequentially updates a set of weighted particles (samples) to approximate the posterior distribution p(x_t | z_{1:t}), where x_t is the state and z_{1:t} are all measurements up to time t.

  • Particles: Each particle is a hypothesis of the system's state.
  • Importance Weights: Each particle has a weight representing its likelihood given the latest sensor observation.
  • Recursive Update: At each time step, particles are propagated through the motion model (prediction) and then re-weighted using the sensor model (update).

This allows the filter to track multi-modal distributions that a single Gaussian (as in a Kalman Filter) cannot represent.

02

Resampling to Mitigate Degeneracy

A critical step to combat particle degeneracy, where after a few iterations, all weight concentrates on a single particle, making the approximation useless.

  • Process: Low-weight particles are discarded, and high-weight particles are duplicated. The new set of particles is then assigned uniform weights.
  • Algorithms: Common methods include multinomial resampling, systematic resampling, and residual resampling.
  • Trade-off: While essential, resampling introduces sample impoverishment, where diversity is lost if the particle cloud is too small. Adaptive strategies trigger resampling only when effective sample size falls below a threshold.
03

Non-Parametric Representation

Particle filters make no parametric assumptions (e.g., Gaussian) about the shape of the underlying probability distribution. The distribution is represented entirely by the empirical set of samples.

  • Flexibility: This enables tracking of arbitrary, complex distributions, including multi-modal distributions (multiple hypotheses, like a robot being in one of several rooms) and highly non-Gaussian noise.
  • Curse of Dimensionality: The number of particles required for a good approximation grows exponentially with state dimension, making them computationally challenging for very high-dimensional states.
  • Approximation Error: The error is governed by the number of particles, not by a fixed parametric form.
04

Motion & Sensor Models as Core Components

The filter's performance is fundamentally tied to the accuracy of its two probabilistic models:

  • Process Model (Motion Model): p(x_t | x_{t-1}). Defines how the state evolves over time, incorporating control inputs and process noise. For a robot, this predicts its next pose based on wheel odometry.
  • Measurement Model (Sensor Model): p(z_t | x_t). Defines the likelihood of receiving a sensor observation z_t given a hypothetical state x_t. This is used to compute particle weights.

These models can be highly nonlinear and are often the most domain-specific part of implementing a particle filter, such as using a LiDAR beam model or a camera projection model.

05

Comparison to Kalman Filters

Particle filters address key limitations of the Kalman Filter (KF) and its nonlinear variant, the Extended Kalman Filter (EKF).

CharacteristicKalman/Extended KFParticle Filter
Distribution AssumptionUnimodal GaussianAny (Non-Parametric)
Model LinearityKF: Linear, EKF: Locally LinearAny Nonlinear
Computational CostO(n^2) (state dimension)O(N) (number of particles)
Primary Use CaseSmooth, well-modeled systemsHighly nonlinear, multi-hypothesis, or non-Gaussian systems

Particle filters are the preferred choice for problems like global robot localization (the 'kidnapped robot problem') where the initial belief is spread over the entire map.

06

Common Variants & Optimizations

Several algorithms build upon the basic Sequential Importance Resampling (SIR) filter to improve efficiency and accuracy.

  • Rao-Blackwellized Particle Filter (RBPF): Marginalizes out analytically tractable parts of the state (e.g., map features in SLAM), using particles only for the remaining state (e.g., robot pose), drastically reducing dimensionality.
  • Unscented Particle Filter (UPF): Uses an Unscented Kalman Filter to generate a better proposal distribution for each particle than the simple motion model, leading to more efficient sampling.
  • Regularized Particle Filter: After resampling, particles are jittered using a kernel to restore diversity and mitigate sample impoverishment.
  • Adaptive Particle Filters: Dynamically adjust the number of particles based on the estimated uncertainty or localization error.
STATE ESTIMATION ALGORITHMS

Particle Filter vs. Kalman Filter: A Comparison

A technical comparison of two fundamental algorithms for real-time state estimation in robotics and perception systems.

Feature / PropertyParticle Filter (Sequential Monte Carlo)Kalman Filter (Linear)Extended Kalman Filter (EKF)

Core Mathematical Assumption

None (non-parametric)

Linear dynamics & Gaussian noise

Locally linearized dynamics & Gaussian noise

State Distribution Representation

Set of weighted samples (particles)

Single Gaussian (mean & covariance)

Single Gaussian (mean & covariance)

Handles Nonlinear Systems

Handles Non-Gaussian Noise

Theoretical Optimality

Asymptotically optimal (with infinite particles)

Optimal for linear Gaussian systems

Suboptimal (approximation error from linearization)

Computational Complexity

O(N) where N = number of particles

O(n³) where n = state dimension

O(n³) where n = state dimension

Typical Memory Footprint

High (stores N particles)

Low (stores mean vector & covariance matrix)

Low (stores mean vector & covariance matrix)

Prediction Step Method

Sample propagation through dynamics model

Analytic linear transformation

Analytic linearization & transformation

Update (Correction) Step Method

Importance weighting based on measurement likelihood

Analytic Bayesian update (Kalman gain)

Analytic linearized update (Kalman gain)

Susceptibility to Sample Impoverishment

Common Use Cases in Robotics

Global localization, SLAM with loop closure, multi-modal tracking

Tracking with well-modeled linear dynamics (e.g., constant velocity)

Visual-inertial odometry (VIO), GPS/IMU fusion, simple robot odometry

PARTICLE FILTER

Frequently Asked Questions

A particle filter is a sequential Monte Carlo method for state estimation in nonlinear, non-Gaussian systems. These questions address its core mechanics, applications, and trade-offs in real-time robotic perception.

A particle filter is a sequential Monte Carlo method for estimating the state of a dynamic system by representing its posterior probability distribution with a set of random samples called particles. It works through a recursive predict-update cycle: first, particles are propagated forward in time using a motion model to predict new states. Then, each particle's prediction is weighted according to how well it aligns with a new sensor measurement via a measurement model. Finally, a resampling step discards low-weight particles and duplicates high-weight ones, concentrating computational resources on the most probable state hypotheses.

This process allows the filter to maintain multiple hypotheses about the system's state, making it exceptionally robust for problems where noise is non-Gaussian (not following a simple bell curve) and system dynamics are highly nonlinear.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.