Inferensys

Glossary

Bayesian Filtering

Bayesian filtering is a general probabilistic framework for recursively estimating the unknown state of a dynamic system from a sequence of noisy sensor observations.
Developer building agentic RAG system, retrieval pipeline diagram on laptop, technical workspace with notes.
PROBABILISTIC STATE ESTIMATION

What is Bayesian Filtering?

Bayesian filtering is the foundational probabilistic framework for estimating the hidden state of a dynamic system from a sequence of noisy sensor observations.

Bayesian filtering is a general probabilistic framework for estimating the hidden state (e.g., position, velocity) of a dynamic system by recursively applying Bayes' theorem. It operates in a predict-update cycle: a process model predicts the state forward, and a measurement model updates this prediction with new sensor data. This yields a posterior probability distribution representing belief about the state, incorporating both uncertainty in motion and sensor noise. The Kalman filter, particle filter, and unscented Kalman filter are all specific implementations under different assumptions about linearity and noise.

In robotics and autonomous systems, Bayesian filters are the core of sensor fusion and state estimation for tasks like visual-inertial odometry and SLAM. They provide a mathematically rigorous way to combine data from heterogeneous sensors (e.g., IMU, LiDAR, camera) into a single, coherent estimate. The recursive nature makes them computationally efficient for real-time applications. The filter's output is not just a point estimate but a full distribution, enabling reasoning about uncertainty, which is critical for robust motion planning and safe operation in unpredictable environments.

IMPLEMENTATION FRAMEWORKS

Key Bayesian Filtering Algorithms

Bayesian filtering provides a unified probabilistic framework for state estimation. These specific algorithms implement the core prediction and update cycle under different assumptions about system linearity and noise.

01

Kalman Filter (KF)

The Kalman Filter is the optimal recursive estimator for linear dynamic systems with Gaussian noise. It operates in two steps: a prediction step that projects the state forward using a linear motion model, and an update step that corrects the prediction with a new measurement.

  • Assumptions: Requires a known linear process model and measurement model.
  • Optimality: Provides the minimum mean-square error estimate for linear Gaussian systems.
  • Core Output: A Gaussian posterior distribution, fully characterized by a mean (state estimate) and a covariance matrix (uncertainty).
  • Primary Use: Foundational algorithm for tracking and navigation where linearity is a valid approximation.
02

Extended Kalman Filter (EKF)

The Extended Kalman Filter is the de facto standard for nonlinear state estimation. It linearizes the nonlinear process and measurement models around the current state estimate using a first-order Taylor expansion (the Jacobian). It then applies the standard Kalman filter equations to this local linear approximation.

  • Core Mechanism: Employs Jacobian matrices for linearization at each timestep.
  • Limitation: Linearization errors can cause filter divergence if the system is highly nonlinear or the initial estimate is poor.
  • Ubiquity: Historically the most widely used algorithm for robotic state estimation (e.g., Visual-Inertial Odometry).
03

Unscented Kalman Filter (UKF)

The Unscented Kalman Filter addresses the linearization errors of the EKF by using a deterministic sampling approach called the unscented transform. It selects a minimal set of sigma points that capture the mean and covariance of the state distribution, propagates these points through the true nonlinear functions, and then recomputes the mean and covariance of the transformed points.

  • Advantage over EKF: Provides more accurate estimation of the posterior mean and covariance for strong nonlinearities, without requiring Jacobian calculations.
  • Computational Cost: Similar to the EKF, but often more robust.
  • Typical Application: Attitude estimation, GPS-INS integration, and other systems with significant nonlinearities.
04

Particle Filter

The Particle Filter is a sequential Monte Carlo method that represents the posterior probability distribution using a set of random samples called particles. Each particle is a hypothesis of the system's state with an associated weight. The algorithm involves prediction, weight update based on sensor likelihood, and resampling to avoid degeneracy.

  • Key Strength: Makes no assumptions of linearity or Gaussian noise; can model arbitrary distributions.
  • Computational Demand: Accuracy scales with the number of particles, making it more computationally intensive than Kalman-family filters.
  • Classic Use Case: Monte Carlo Localization for robots, tracking in cluttered environments, and any problem with multi-modal distributions (e.g., global localization).
05

Information Filter

The Information Filter is the algebraic dual of the Kalman filter. Instead of representing the state estimate with a mean and covariance (the moment form), it uses an information vector and an information matrix (the inverse of the covariance matrix).

  • Key Advantage: The update step is computationally simpler, as measurements are additive in the information form. This makes it efficient for sensor networks and decentralized fusion.
  • Disadvantage: The prediction step becomes more complex.
  • Primary Role: Foundational for multi-robot systems and distributed state estimation architectures.
06

Error State Kalman Filter (ESKF)

The Error State Kalman Filter is a specialized variant designed for robust navigation, particularly attitude estimation. It maintains a nominal state (propagated with kinematics) and a separate, small error state (estimated by the filter). The error state is always kept close to zero, where linearization is valid.

  • Core Benefit: Excellent numerical stability for orientation estimation using quaternions or rotation matrices, avoiding singularities and normalization issues.
  • Common Framework: The standard implementation for modern Visual-Inertial Odometry (VIO) and LiDAR-Inertial Odometry (LIO) systems like FAST-LIO.
  • Process: The filter estimates the error; this error is then used to correct the nominal state, which is then reset.
CORE MECHANISM

How Bayesian Filtering Works: The Recursive Cycle

Bayesian filtering is not a single algorithm but a recursive probabilistic framework for estimating the hidden state of a dynamic system from noisy sensor data.

The core mechanism is a recursive predict-update cycle. The predict step uses a process model to propagate the previous state estimate forward in time, incorporating control inputs and adding process noise uncertainty. This yields a prior belief about the current state before any new measurement arrives. The update step then uses Bayes' theorem to correct this prior with a new sensor observation, defined by a measurement model, to produce a refined posterior belief.

This cycle is optimal in the Bayesian sense, meaning it produces the best possible estimate given the defined models and noise statistics. Different filters, like the Kalman filter or particle filter, are specific implementations of this framework under different assumptions (linear/Gaussian vs. nonlinear/non-Gaussian). The recursive nature makes it computationally efficient, as it only requires the previous state estimate and the latest measurement, avoiding reprocessing the entire history of data.

PRACTICAL DOMAINS

Applications of Bayesian Filtering

Bayesian filtering provides a foundational probabilistic framework for estimating the state of dynamic systems. Its recursive, prediction-update cycle is implemented across numerous fields where uncertainty must be quantified and managed in real-time.

IMPLEMENTATION ASSUMPTIONS

Comparison of Common Bayesian Filters

A technical comparison of the primary Bayesian filtering algorithms used for state estimation in robotics, highlighting their underlying assumptions, computational characteristics, and typical applications.

AlgorithmKalman Filter (KF)Extended Kalman Filter (EKF)Unscented Kalman Filter (UKF)Particle Filter (PF)

Core Assumption

Linear dynamics & measurement models

Weakly nonlinear models (1st-order Taylor approx.)

Nonlinear models (deterministic sampling)

Arbitrary nonlinear & non-Gaussian models

State Distribution Representation

Single Gaussian (mean & covariance)

Single Gaussian (mean & covariance)

Single Gaussian (via sigma points)

Set of weighted particles (empirical distribution)

Computational Complexity

O(n³) for covariance update

O(n³) + Jacobian calculation

O(n³) for 2n+1 sigma points

O(N * n) for N particles

Typical Real-Time Performance

< 1 ms

1-10 ms

5-50 ms

10 ms - 1 sec (varies with N)

Handles Non-Gaussian Noise

Primary Failure Mode

Model linearity violation

Jacobian linearization error

Poor sigma point propagation

Particle deprivation / degeneracy

Common Robotic Application

GPS-INS fusion, basic tracking

Visual-inertial odometry (VIO)

LiDAR-inertial odometry (LIO)

Global localization, SLAM with multi-modal distributions

BAYESIAN FILTERING

Frequently Asked Questions

Bayesian filtering is the foundational probabilistic framework for estimating the state of a dynamic system from noisy sensor data. This FAQ addresses common questions about its mechanisms, applications, and relationship to key algorithms in robotics and autonomous systems.

Bayesian filtering is a general probabilistic framework for recursively estimating the unknown, time-varying state (e.g., position, velocity) of a dynamic system from a sequence of noisy sensor observations. It works by applying Bayes' theorem in two repeating steps: prediction and update. The prediction step uses a process model to forecast the state forward in time, incorporating control inputs and process noise. The update step (or correction step) then uses a measurement model to adjust this prediction based on new sensor data, weighting the new evidence against the prior belief. This recursive cycle produces a posterior probability distribution over the possible states, representing both the best estimate and its uncertainty.

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.