Kalman Smoother

The Kalman smoother computes the posterior for every : the smoother distribution of each state given the entire observation record, including observations after time . This is the right Bayesian quantity when all the data is in hand and the goal is the best possible estimate at every time point retrospectively, as opposed to the filter distribution which uses only data up through .

The standard implementation is the Rauch-Tung-Striebel (RTS) algorithm, a backward pass that runs after the forward Kalman filter and refines the filter’s estimates using future observations. The recursion starts at the last time step (where smoother and filter agree, from the filter) and walks backward, updating each using both the filter result and the next step’s smoother result :

where the smoother gain is

The quantity is the smoother correction (the change in the next state’s estimate once the future was incorporated), and propagates that correction back to time through the dynamics.

Because the backward pass needs the filter’s stored at every , the smoother runs in time and memory: the time matches the filter, but the memory grows linearly in because the entire filter trajectory must be saved. The output is a sequence of Gaussian posteriors with at every , since adding future data can only reduce uncertainty.

Smoother is Strictly Offline before it can compute , which means the smoother cannot produce its output for time until after time . Use the filter for any application that needs estimates as the data arrives. The smoother is appropriate only when the entire record is available before the analysis begins.

The RTS recursion needs

Intuition

The filter and the smoother answer different questions about the same model. The filter asks “what is my best guess for given everything I have seen so far?”, a question whose answer can change as new data arrives. The smoother asks “what is my best guess for given the entire record?”, a question whose answer is fixed once the record is complete. The smoother is more accurate at every because it uses strictly more information; the filter is more useful at every because the smoother’s answer is not yet computable in real time.

The backward-pass recipe makes the information flow explicit. The forward filter passes information from past to present along the dynamics: by the end of the forward pass, every observation through time has been absorbed into the filter estimate . The backward smoother then passes information from future to present along the time-reversed dynamics, so that observations after time refine the estimate at . The smoother gain is the time-reversed analogue of the Kalman gain: it weighs how much the prediction error at should be propagated back to correct the estimate at . When the dynamics are highly informative ( is much larger than ), the smoother changes the filter estimate substantially; when the dynamics are weak, the smoother barely updates the filter result.

Properties

(Backward Recursion After Forward Filter) The smoother needs the entire filter trajectory in memory.

Each backward step at time requires the filter outputs and the prediction , plus the next smoother output from the previous backward step. Standard implementations run the filter forward, store all intermediate quantities, then run the backward pass. Memory cost is , manageable for typical state-space problems but prohibitive for very long records with high-dimensional states. Streaming variants (fixed-lag smoother) trade some accuracy for memory by only smoothing steps back from the current time.

(Smoother Variance is Always Smaller) in the matrix-inequality sense.

Adding the future observations to the conditioning information can only sharpen the posterior. The smoother variance equals the filter variance only at the last time point (, where there is no future to add) and gets strictly smaller for when the dynamics are informative enough that future observations carry information about . This monotonicity is the formal Bayesian statement of “more data, less uncertainty,” propagated through the dynamics by the smoother gain.

(Smoother Gain as Time-Reversed Filter Gain) is the Kalman gain for the reversed dynamics.

The Kalman filter’s gain has the form (prior covariance)(observation Jacobian)/(observation noise covariance). The smoother’s gain has the structurally identical form (filter covariance)(reverse-dynamics Jacobian)/(forward-prediction covariance). The smoother is the Kalman filter run backward through time, where the “observation” at the new step is the smoothed estimate from the future step. This duality is why RTS is so cheap: it is a second Kalman filter, not a fundamentally new algorithm.

(Equality at ) The smoother and filter produce identical estimates at the final time point.

At there are no observations after the current time, so the smoother distribution coincides with the filter distribution. The backward recursion is initialized at (the filter result, which is also the smoother result) and produces non-trivial corrections only for . This makes the smoother appear to “fix” past estimates as new data comes in, while leaving the most recent estimate alone, an information-flow pattern that matches the dynamics of the underlying Bayesian update.

(EM Algorithm E-Step) The smoother is the E-step of EM for state-space model parameter estimation.

When the model parameters are unknown, fitting them by maximum likelihood requires the EM algorithm. The E-step requires the posterior for every , exactly what the smoother computes, including the cross-time covariances that the EM update equations need. The M-step then updates by solving the Gaussian likelihood-maximization given the smoothed sufficient statistics. EM iteration is the standard way to learn state-space parameters when the structure but not the values of are known.

(Missing Data Interpolation) The smoother fills gaps by propagating information through the dynamics from both directions.

When some are missing, the filter handles them by skipping the update step at those times, leaving large posterior variance there. The smoother then uses observations both before and after the gap to interpolate, which can dramatically reduce the variance at the missing time points. This is the canonical use case for the smoother in scientific applications: a partial record (e.g., 40% missing biomarker measurements after day 35 in the bone-marrow transplant example) becomes a complete inferred trajectory with honest uncertainty bands.

(Cost is Linear in ) Backward pass is , same as forward filter.

Each backward step inverts a matrix and does a constant number of matrix products, for per step. Total , identical to the filter’s cost. So running the full filter-smoother pair takes about twice as long as just the filter, a small price for the much more accurate state estimates that the smoother provides at every .

Examples

See Also