Bayesian Filtering and Smoothing
Summary
On a linear-Gaussian state-space model, exact Bayesian inference over the latent states is carried out by the Kalman filter (a forward pass of alternating predict/update steps) and the RTS smoother (a backward pass). Both are just repeated application of Gaussian conditioning exploiting the Markov property, so the whole posterior stays Gaussian and inference costs in the number of time steps — the linear-time realisation of GP regression with Gauss–Markov priors.
Overview
A Markov chain plus local observations lets inference factorise into local messages passed along the chain (belief propagation / sum-product on a chain graph). When every factor is linear-Gaussian, these messages have closed Gaussian form. The forward pass is filtering; the backward pass is smoothing. This is what makes Gauss–Markov process inference scale linearly instead of the of general GP regression — the crucial property for numerical solvers that must run indefinitely and refine their estimate over time (quadrature, ODE solvers).
Main Content
Markov chain and message passing
Markov chain (Def. 5.1)
A set of latent states with joint density is a Markov chain if each state is conditionally independent of all earlier ones given its direct precursor:
Observations depend only on the local state: . These two structural restrictions make inference on the latent states linear in .
Recursive prediction follows from marginalising the chain:
(the Chapman–Kolmogorov equation), and updating by Bayes’ theorem:
The forward pass (“filtering”) produces ; a backward pass (“smoothing”) then computes the full marginals conditioned on all data via
Linear-Gaussian state-space model
Linear (time-invariant) Gaussian state-space model
Equivalently, dynamic model , , and measurement model , . Here = transition matrix, = measurement/observation matrix, = process-noise covariance, = observation-noise covariance (all from the discretised SDE, see Gauss-Markov Processes and SDEs). If the parameters are time-invariant (), the system is linear time-invariant (LTI).
The Kalman filter (predict/update)
Kálmán filter — one step
Under the linear-Gaussian model, predictive and updated marginals stay Gaussian. Predict (Chapman–Kolmogorov becomes):
Update (given the new observation ), with
For latent dimension and observation dimension , one filter step costs (matrix products in the predict, inversion of in the update); across steps the total is — linear in time , with constant memory (Algorithm 5.3, Predict).
The RTS smoother (backward pass)
Rauch–Tung–Striebel smoother — one step
The full posterior marginals (conditioned on all past and future data) are computed by a backward recursion from down to , using the filtering outputs and the next step’s predictive and smoothed :
The smoother, touching no observations directly, costs per step.
Equivalence to GP regression
Filter+smoother = linear-time GP regression
For a finite chain , the combined forward filter and backward smoother (Algorithm 5.4,
Infer) return posterior marginals whose means and variances are exactly equal to those of GP regression (§4.2) with the corresponding Gauss–Markov prior. ThusInferis nothing but an implementation of GP regression with Markov priors (versus for the dense Gram-matrix approach). Memory grows linearly in (to store all filtered/predicted parameters for the backward pass).
At each step, uncertainty (variance) drops from prediction → filtering (adding the local observation) → smoothing (adding future observations). The Kálmán gain is historically the “optimal gain”; in the PN interpretation the posterior is not merely optimal but the only meaningful probabilistic estimator given the model.
Beyond linear-Gaussian
Filters/smoothers are so efficient they are applied even when linearity/Gaussianity are violated. In numerics this case is especially strong: saved compute can be reinvested in finer discretisations, so almost all PN methods use Kálmán-type Gaussian filtering. The exception is highly nonlinear ODE dynamics, where sequential Monte Carlo (particle filters/smoothers) may be warranted (see ODE Filters and Smoothers).
Examples
Online quadrature / ODE marching
Running
Predict(Alg. 5.3) advances an integrator one grid point at a time at constant per-step cost, indefinitely refining the estimate — the “keep running and improve precision over time” property that motivated Gauss–Markov priors in the first place. For a finite curve,Infer(Alg. 5.4) does a forward filter then backward smooth to get the full posterior over the ODE solution. This is exactly the ODE Filters and Smoothers template (whose EKF0/EKS0 are the analogues for nonlinear vector fields).
Predict → update → smooth on one node
Suppose at step the prediction is and we observe . The innovation and gain pull the mean toward the data by an amount set by the ratio of prior to observation uncertainty; the update shrinks to . The later backward pass with gain further contracts it to using downstream evidence.
Connections
- Operates on the SDE models (its come from the discretised SDE).
- Is the realisation of Gaussian Process Regression (Theorem above) and reduces to repeated Gaussian conditioning.
- Hyperparameter () calibration during the filter pass is Hierarchical Inference in Gaussian Models (§6.3).
- Directly generalised to ODEs in ODE Filters and Smoothers and analysed in Theory of ODE Filters and Smoothers.
See Also
- Gauss-Markov Processes and SDEs — where come from.
- Gaussian Process Regression — the equivalent formulation.
- Gaussian Distributions and Algebra — the conditioning identity each step reuses.
- ODE Filters and Smoothers — filtering applied to differential equations.