A particle filter is a sequential Monte Carlo method that approximates the changing probability distribution of a hidden state with a set of weighted random samples, called particles, and updates those samples each time a new observation arrives. Among probabilistic models in artificial intelligence, it is the standard tool for recursive Bayesian estimation in state-space models that are nonlinear or non-Gaussian, where exact formulas such as the Kalman filter no longer apply.
The simplest version, the bootstrap filter, was introduced in the early 1990s and remains the reference design. Particle filters are used in robot localization, object tracking, navigation, econometrics and epidemiology, and they also serve as building blocks inside larger inference schemes such as particle Markov chain Monte Carlo.
How a particle filter updates its belief
A particle filter repeats a predict, weight and resample cycle at every time step. It assumes a state-space model with a transition model that describes how the hidden state evolves and an observation model that gives the likelihood of a measurement for any candidate state. The particles together represent the posterior distribution of the state given all observations so far.
- Predict: move each particle forward by sampling from the transition model, which spreads the cloud to reflect process noise.
- Weight: multiply each particle’s weight by the likelihood of the new observation and normalize the weights so they sum to one.
- Resample: draw a new set of particles in proportion to the weights, which discards unlikely hypotheses and duplicates likely ones.
- Estimate: compute the weighted mean, mode or any other summary of the particle set.
Formally, the weighting step is importance sampling applied sequentially: the transition model acts as the proposal distribution, and the observation likelihood corrects for the mismatch between proposal and target. As the number of particles grows, the approximation converges to the true filtering distribution under mild conditions.
Key parameters and design choices
The behavior of a particle filter depends mainly on particle count, proposal distribution and resampling policy. These choices trade accuracy against compute and decide whether the filter stays stable over long sequences. The table below summarizes the main settings and their effects.
| Setting | Typical values | Effect of the choice |
|---|---|---|
| Number of particles | Hundreds to tens of thousands | More particles reduce variance but raise cost linearly |
| Proposal distribution | Transition prior or an optimal proposal | Better proposals need fewer particles |
| Resampling scheme | Multinomial, systematic, stratified, residual | Systematic and stratified add less noise |
| Resampling trigger | Effective sample size below N/2 | Avoids needless loss of diversity |
| Roughening or jitter | Small added noise after resampling | Counters sample impoverishment |
The effective sample size is the most useful diagnostic. It is computed as one divided by the sum of squared normalized weights and ranges from one to N. A value near one signals weight degeneracy, where a single particle carries almost all weight and the filter has effectively lost its representation of uncertainty.
Particle filter variants
Many variants modify the proposal or the resampling step to fight degeneracy or to handle high-dimensional or partly linear models. They share the same sequential importance sampling core but differ in how intelligently they place particles.
| Variant | Main idea | When it helps |
|---|---|---|
| Bootstrap filter | Uses the transition model as proposal | Simple models with informative dynamics |
| Auxiliary particle filter | Looks ahead at the next observation before resampling | Sharp or outlying observations |
| Rao-Blackwellized filter | Solves linear parts exactly with Kalman filters | Mixed linear and nonlinear states, such as SLAM |
| Regularized particle filter | Resamples from a smoothed kernel density | Low process noise and impoverishment |
| Particle smoother | Uses future observations as well | Offline analysis of recorded data |
Comparison with related filtering methods
A particle filter is the most general member of the Bayesian filtering family, and it pays for that generality with computation. The Kalman filter is exact for linear Gaussian models, while extended and unscented Kalman filters approximate mildly nonlinear models with a single Gaussian. Hidden Markov models with discrete states can be filtered exactly with the forward algorithm, which the particle filter generalizes to continuous or mixed states.
| Method | Model assumptions | Distribution shape | Relative cost |
|---|---|---|---|
| Kalman filter | Linear dynamics, Gaussian noise | Single Gaussian | Very low |
| Extended Kalman filter | Mildly nonlinear, Gaussian noise | Single Gaussian | Low |
| Unscented Kalman filter | Moderately nonlinear, Gaussian noise | Single Gaussian | Low to moderate |
| Forward algorithm | Discrete hidden states | Exact discrete distribution | Grows with state count |
| Particle filter | Any model that can be sampled and evaluated | Arbitrary, including multimodal | Moderate to high |
The decisive advantage is the ability to represent multimodal beliefs. A robot that could be in either of two identical corridors needs two separate clusters of probability, which a single Gaussian cannot express but a particle set handles naturally.
Limitations and common mistakes
The main limitation is the curse of dimensionality. The number of particles needed for a fixed accuracy typically grows exponentially with the state dimension, so plain particle filters work best for states with roughly one to a dozen dimensions. Practitioners also report a set of recurring implementation errors.
- Resampling at every step without checking the effective sample size, which needlessly reduces diversity.
- Computing weights without log-space arithmetic, which causes numerical underflow when likelihoods are very small.
- Overconfident observation models, which make weights collapse onto a few particles after a single measurement.
- Ignoring path degeneracy, where resampling leaves all particles with the same ancestor and makes smoothing estimates unreliable.
- Treating results from a single run as final, although Monte Carlo variance differs between random seeds.
Understanding it simply
Imagine trying to find a friend in a large park when you only get short text hints. You place many small guesses on a map. Each time a hint arrives, you keep the guesses that fit it and drop the ones that do not.
Then you copy the good guesses and move them a little, because your friend keeps walking. Over time, the guesses gather around the true location. That is a particle filter: many guesses, scored by evidence and refreshed over time.
Applied in practice
A warehouse operator runs a fleet of mobile robots that move shelves between storage zones. Each robot uses a particle filter for localization with about 2,000 particles. Wheel odometry drives the prediction step, and a laser scanner provides the observations, which are compared against a stored map of the walls and racks to compute particle weights.
When a robot is restarted in the middle of an aisle, its particles are first spread over the whole map. Within a few meters of travel, the cloud collapses onto the correct position, even though several aisles look almost identical. In normal operation, the filter keeps the position error within a few centimeters, and an alarm triggers whenever the effective sample size drops sharply, which usually signals that a shelf has been moved and the map needs updating.