The Rauch–Tung–Striebel (RTS) smoother (a.k.a. the Kalman smoother) is the closed-form solution to the Bayesian smoothing problem for a linear-Gaussian model: it computes p(xk∣y1:T), the posterior of each state given the entire data record, not just the past. It is a backward recursion run after the forward Kalman filter: starting from the last filtered estimate it sweeps k=T−1,…,0, correcting each filtered (mk,Pk) using future information through a smoother gainGk. Smoothed estimates are always at least as precise as filtered ones.
Overview
The Kalman filter gives the filtering distribution p(xk∣y1:k) — conditioned only on data up to k. Bayesian smoothing instead conditions on all T measurements, p(xk∣y1:T) with T>k, so each state estimate benefits from future observations. This is the natural object for retrospective / counterfactual analysis (e.g. inferring a latent trend across a whole sample). Särkkä derives the general backward recursion (Thm. 8.1) then its linear-Gaussian special case, the RTS smoother (Thm. 8.2).
where p(xk∣y1:k) is the filtering distribution and p(xk+1∣y1:k) is the one-step prediction. It is run backwards, initialized at the filtering distribution of the last step p(xT∣y1:T).
Theorem: RTS smoother (Särkkä Thm. 8.2)
For the linear-Gaussian model, the smoothed distribution is Gaussian, p(xk∣y1:T)=N(xk∣mks,Pks), computed by the backward recursion for k=T−1,…,0:
where mk,Pk are the filtered mean/covariance from the Kalman filter. The recursion is initialized at the last time step with mTs=mT, PTs=PT.
Reading the equations
The first two lines are exactly the Kalman prediction step (Eq. 4.20); since the filter already computes mk+1−,Pk+1−, they can be stored during the forward pass to avoid recomputation. The gains Gk can likewise be precomputed.
Gk=PkAkT[Pk+1−]−1 is the smoother gain; the bracket mk+1s−mk+1− is the discrepancy between the smoothed future and what the filter predicted for it — the correction that future data injects into the present.
Smoothing never increases uncertainty:Pks⪯Pk for k<T, with equality only at k=T (the endpoint, which has no future to borrow from). This is the forward–backward structure: one Kalman pass forward, one RTS pass backward.
Derivation (Särkkä §8.2): via the Gaussian conditioning lemmas applied to p(xk,xk+1∣y1:k) and the Markov property p(xk∣xk+1,y1:T)=p(xk∣xk+1,y1:k).
An alternative two-filter smoother (Fraser–Potter / Kitagawa) factors p(xk∣y1:T)∝p(xk∣y1:k−1)p(yk:T∣xk) combining a forward and a backward filter; Särkkä prefers the RTS forward–backward form (§8.3).
Algorithm
run Kalman filter forward, store m_k, P_k, m⁻_{k+1}, P⁻_{k+1} for all kinitialize m_T^s = m_T , P_T^s = P_Tfor k = T-1 down to 0: G_k = P_k Aᵀ (P⁻_{k+1})⁻¹ m_k^s = m_k + G_k (m_{k+1}^s − m⁻_{k+1}) P_k^s = P_k + G_k (P_{k+1}^s − P⁻_{k+1}) G_kᵀ
Examples
RTS smoother for the Gaussian random walk (Särkkä Ex. 8.1)
For the scalar local-level model the backward recursion is
where mk,Pk are the filtered values from Kalman Ex. 4.2. Särkkä’s Fig. 8.2 shows the smoother variance is uniformly below the filter variance, except at the final step where they coincide.
RTS smoother for car tracking (Särkkä Ex. 8.2)
Applying the backward recursion to the 4-D car-tracking filter lowers the position RMSE from 0.43 (Kalman filter) to 0.27 (RTS smoother): conditioning each position on the whole trajectory produces a visibly smoother, more accurate estimate.
Connections
The Kalman Filter — supplies the filtered (mk,Pk) and predicted (mk+1−,Pk+1−) this recursion consumes
MCMC Inference for CausalImpact — the Durbin–Koopman simulation smoother draws state trajectories; the RTS smoother gives their conditional means/covariances