AI Glossary / Probabilistic machine learning / Advanced
Rauch-Tung-Striebel smoother
Definition
The Rauch-Tung-Striebel smoother is a backward-recursion algorithm that refines past state estimates using observations from an entire time interval. For a linear Gaussian state-space model, it computes exact smoothed state means and covariances after a forward Kalman filter pass.
What it means
A filter estimates the state at time t using measurements available through t. A smoother revisits that state after later measurements have arrived. The later evidence can clarify an earlier ambiguous position, temperature, inventory level, or other hidden quantity.
Smoothing here does not simply mean drawing a visually smoother line. It means conditioning a state estimate on additional observations under a probabilistic model. The standard fixed-interval procedure is retrospective: its estimate for an earlier time must not be presented as information that was available to a live decision maker then.
How it works
First run a Kalman filter forward, retaining filtered means and covariances and the one-step predictions needed for the backward pass. At the final time, initialize the smoothed estimate with the final filtered estimate. Then work backward through the stored sequence.
For transition matrix F_t, the smoother gain is G_t = P_t F_t^T (P_pred_next)^(-1), where P_t is filtered covariance and P_pred_next is the next predicted covariance. Correct the current filtered mean by G_t times the difference between the next smoothed mean and the next predicted mean.
The covariance correction is G_t (P_smooth_next - P_pred_next) G_t^T, added to P_t. These equations use the model's cross-time dependence. Numerical implementations should solve linear systems instead of explicitly forming matrix inverses. Exact Gaussian smoothing requires the corresponding linear Gaussian model assumptions; extended or unscented variants approximate nonlinear cases.
Three practical examples
- Vehicle trajectory reconstruction: after a completed journey, later location readings help revise positions estimated during temporary weak reception.
- Sensor-history analysis: an engineer reconstructs the evolution of a hidden process variable using the complete batch of measurements, including readings recorded after an uncertain interval.
- Model fitting: a research team uses smoothed latent-state moments inside a parameter-estimation procedure, distinguishing estimated states from the observed measurements that informed them.
Think of it this way
Think of reconstructing a journey after reading the whole travel diary. A later landmark can resolve which branch was probably taken earlier. That is different from navigating with only the pages written so far. The analogy concerns retrospective information, not changing the actual past or treating later observations as perfectly reliable.
Worked example
Consider an original scalar example. After observations through time 1, the filtered state has mean m_1 = 0 and variance P_1 = 2. The transition is x_2 = x_1 + w, with independent Gaussian process noise of variance 1. Therefore the time-2 prediction has mean 0 and variance 3.
Now observe y_2 = 4 through y_2 = x_2 + v, with independent Gaussian measurement noise of variance 1. The Kalman gain is 3/(3 + 1) = 3/4. The time-2 filtered mean is 3 and variance is 3/4. Since time 2 is the final time, these are also its smoothed values.
The backward gain is G_1 = 2/3. The smoothed mean at time 1 is 0 + (2/3)(3 - 0) = 2. Its smoothed variance is 2 + (2/3)^2(3/4 - 3) = 1.
Later evidence changes the earlier estimate from mean 0, variance 2 to mean 2, variance 1. It does not establish that the true earlier state was exactly 2. Independently, Cov(x_1,y_2) = 2 and Var(y_2) = 4 give the same conditional mean and variance directly.
Illustrative case study
In a fictional project, Harbor Mapping reconstructs a delivery robot's completed route from noisy position readings. Its live controller used filtered estimates during the journey. An analyst later applies an RTS smoother to the stored observations and motion model to prepare a route-quality report.
The team keeps the live and retrospective estimates in separate fields. It evaluates reconstructed positions against independent reference measurements and examines segments where motion assumptions fail. A narrower model-based interval is investigated if reference positions frequently fall outside it. The case illustrates honest retrospective analysis rather than claiming that smoothing always improves every realized estimate.
Common misconceptions and mistakes
Running a Kalman filter backward on the measurements is not generally the same as applying the RTS recursion. Replacing the next predicted covariance with the next filtered covariance in the gain is another common implementation error.
Under the correctly specified linear Gaussian model, smoothing covariance is no greater than filtering covariance in the positive-semidefinite sense. This does not guarantee a smaller realized error for every state or compensate for a wrong model. At the final time, filtered and smoothed estimates coincide. Missing observations may be accommodated through appropriate filtering steps; they should not simply be fabricated as measurements.
Business use
Use the smoother for completed-event reconstruction, offline quality analysis, and latent-state estimation where later data are legitimately available. Define the observation cutoff and distinguish final reconstructions from provisional operational records. In evaluation, prevent future-informed states from leaking into historical forecasting features.
Store enough forward-pass information for reproducibility, including transition and noise assumptions. Check covariance symmetry and numerical stability, and compare a small implementation with direct Gaussian conditioning. For very long records, consider memory requirements or an appropriate fixed-lag alternative when a limited delay is acceptable.
People also ask
Can it improve a live estimate without future observations?
It cannot use observations that have not arrived. A delayed or fixed-lag workflow can revise recent estimates once additional measurements exist.
Does smoothing remove all uncertainty?
No. The result remains a distribution with uncertainty from the model and observations.
Is ordinary RTS exact for any nonlinear system?
No. Nonlinear extensions introduce approximations unless a special exact solution is available.
Check your understanding
In the worked example, which estimate of the time-1 state was available before observing y_2?
Answer: The filtered mean 0 with variance 2. The smoothed mean 2 with variance 1 uses y_2 and would leak future information if treated as the original live estimate.
Related terms
- Kalman filter
- Fixed-lag smoothing
- Data leakage
- state-space model
- smoothing gain
- filtering distribution
- fixed-interval smoothing
- process noise
- measurement noise
Learn next
Reproduce the scalar example using both the backward recursion and direct conditioning of a joint Gaussian. Then extend to a two-dimensional position-and-velocity model and compare filtered and smoothed uncertainty ellipses.
More in Probabilistic machine learning
- Random-walk Metropolis - Random-walk Metropolis is a Markov chain Monte Carlo algorithm that proposes a new state by adding a random increment to the current state.
- Randomized prior network - A randomized prior network is a randomly initialized neural network whose parameters remain fixed and whose output is added to a trainable model.
- Rational quadratic kernel - The rational quadratic kernel is a covariance function that combines smooth relationships across a range of length scales.
- Recurrent state space model - A recurrent state space model is a learned sequence model that combines a deterministic recurrent memory with a stochastic latent state.
- Recursive least squares - Recursive least squares is an algorithm for updating a least-squares parameter estimate as new observations arrive.
- Reference prior - A reference prior is a prior distribution constructed by a formal information-based procedure to provide a baseline Bayesian analysis for a specified...
Sources
Sarkka, Bayesian Filtering and Smoothing, Chapter 8, Theorem 8.2 and its derivation: https://users.aalto.fi/~ssarkka/pub/cup_book_online_20131111.pdf FilterPy, official KalmanFilter and RTS smoother implementation interface: https://filterpy.readthedocs.io/en/latest/kalman/KalmanFilter.html Sarkka Theorem 8.2 and its Gaussian-conditioning derivation were independently consulted.
Previous: Rationality Next: RDBMS