---
title: Optimized Kalman Smoother (OKS)
url: https://www.emergentmind.com/topics/optimized-kalman-smoother-oks
type: topic
---

# Optimized Kalman Smoother (OKS)

Optimized Kalman Smoother (OKS) denotes a class of Kalman-smoothing formulations in which smoothing is treated as an explicit optimization, tuning, or implementation-design problem rather than as a fixed recursion with hand-set parameters. In a narrow usage, OKS refers to learning or tuning the parameters of a linear-Gaussian smoother directly from data by minimizing held-out prediction error [1910.08615]. In a broader usage, the term also covers batch MAP formulations for nonlinear smoothing, robust and sparse generalized smoothers, and numerically optimized square-root or parallel implementations [2510.03846, 1303.1993, 2207.13526, 2502.11686].

## 1. Nomenclature and scope

The literature does not present a single universally fixed definition of OKS. One explicit use of the name appears in work comparing the “Optimized Kalman Smoother (OKS)” against unscented smoothing for nonlinear systems [2510.03846]. A second, closely related usage appears in the data-driven tuning framework of “Fitting a Kalman Smoother to Data,” which develops what can reasonably be called an optimized Kalman smoother because it chooses smoother parameters from held-out predictive performance rather than manual tuning [1910.08615]. Other papers do not use the exact label, but adopt the same optimization viewpoint for smoothing [1303.1993, 1111.2730].

| Usage of OKS | Representative papers | Characteristic mechanism |
|---|---|---|
| Data-driven tuned smoother | [1910.08615] | minimize held-out prediction loss over smoother parameters |
| Nonlinear batch MAP smoother | [2510.03846], [2306.09148] | Gauss–Newton or Newton iterations over the full trajectory |
| Robust or sparse smoother | [1001.3907], [1111.2730], [1903.08605] | replace quadratic penalties by Student’s \(t\), PLQ, or \(L_1\) terms |
| Numerically optimized smoother | [2207.13526], [2502.11686] | orthogonal transformations, sparse QR, or parallel-in-time execution |

Taken together, these papers suggest that OKS is best understood as an umbrella concept for optimization-oriented Kalman smoothing. This also clarifies what it is not. A paper may use a standard Kalman filter or smoother in an application without proposing a new OKS method; for example, the causal digital twin bearing study is explicitly useful as a modeling and application reference, but not as a source of a new smoother derivation or optimization method [2105.05236].

## 2. Linear-Gaussian foundations and the optimization viewpoint

A core OKS formulation begins from the standard finite-horizon linear state-space model
$$
x_{t+1}=Ax_t+w_t,\qquad y_t=Cx_t+v_t,
$$
with \(w_t\sim \mathcal N(0,W)\) and \(v_t\sim \mathcal N(0,V)\), and parameter vector
$$
\theta=(A,W^{-1/2},C,V^{-1/2})
$$
as used in the data-fitting framework [1910.08615]. In that paper, smoothing with missing measurements is written as a constrained least-squares problem:
$$
\begin{array}{ll}
\text{minimize} & \displaystyle \sum_{t=1}^{T-1} \left\|W^{-1/2}(\hat x_{t+1}-A\hat x_t)\right\|_2^2 + \sum_{t=1}^T \left\|V^{-1/2}(\hat y_t-C\hat x_t)\right\|_2^2 \\
\text{subject to} & (\hat y_t)_i = (y_t)_i,\qquad (i,t)\in\mathcal K.
\end{array}
$$
This is exactly the MAP or maximum-likelihood smoothing problem for the linear-Gaussian model [1910.08615].

The broader optimization viewpoint goes back at least to the batch least-squares formulation
$$
\min_x \; \frac12 \|Hx-z\|_{R^{-1}}^2 + \frac12 \|Gx-w\|_{Q^{-1}}^2,
$$
where the full trajectory is stacked into a single vector and the normal equations are symmetric positive definite and block tridiagonal [1303.1993]. A central result of that work is that the classical Rauch–Tung–Striebel smoother is equivalent to applying a block tridiagonal solver to this batch system [1303.1993]. This viewpoint is foundational for later OKS variants because it makes the smoother a structured optimizer over an entire trajectory rather than only a recursive estimator.

## 3. Data-driven parameter tuning

The clearest “tuned from data” OKS is the auto-tuning framework of [1910.08615]. Its central idea is to hide a subset of observed entries, smooth using the remaining data, and tune smoother parameters to reconstruct the hidden entries accurately. If \(\mathcal M\subseteq \mathcal K\) is the held-out mask, the prediction loss is
$$
L(\theta)=\sum_{(i,t)\in\mathcal M}\left((\hat y_t)_i-(y_t)_i\right)^2.
$$
The full tuning problem is
$$
\min_{\theta}\; F(\theta)=L(\theta)+r(\theta),
$$
with \(\theta\in\Theta\), where \(\Theta\) can impose structure such as diagonal \(W\) and \(V\), nonnegative \(A\), or fixed \(A\) and \(C\), and \(r\) can encode regularization or hard constraints [1910.08615].

A technical contribution of that paper is differentiating the held-out loss through the smoother solve by implicit differentiation of the KKT system. After the forward smoothing solve, an adjoint linear system with the same sparse KKT matrix is solved, so the gradient is obtained at “little to no additional cost” [1910.08615]. Parameters are then updated by proximal gradient:
$$
\theta^{k+1}=\operatorname{prox}_{t^k r}\!\left(\theta^k-t^k\nabla_\theta L(\theta^k)\right).
$$
Because the KKT matrix has chain and banded sparsity, the per-iteration cost scales essentially linearly in the horizon \(T\) [1910.08615].

The two reported demonstrations are population migration in the United States and vehicle smoothing from IMU+GPS data. In the population experiment, over 50 iterations with \(t_0=10^{-4}\), prediction error dropped from \(0.0097\) to \(0.0058\), and test error from \(0.0041\) to \(0.0030\), in 31 seconds [1910.08615]. In the vehicle experiment, running 25 iterations with \(t_0=10^{-2}\) reduced prediction error from \(13.23\) to \(2.97\) and test error from \(16.57\) to \(1.37\), in 135 seconds [1910.08615]. The associated implementation is the open-source Python package `auto_ks` [1910.08615].

## 4. Nonlinear OKS: batch MAP, Gauss–Newton, and Newton recursions

In nonlinear settings, OKS is formulated as a batch MAP problem over the full trajectory. The explicit OKS formulation in [2510.03846] starts from
$$
x_{k+1}=g_k(x_k)+\epsilon_k,\qquad z_k=h_k(x_k)+\nu_k,
$$
and solves
$$
\min_x \; \frac12 \|G(x)\|_{Q^{-1}}^2 + \frac12 \|H(x)-z\|_{R^{-1}}^2.
$$
A central claim of that paper is that extended Kalman smoothing can be viewed as one Gauss–Newton step on this objective, whereas OKS continues the Gauss–Newton iterations with Armijo line search [2510.03846]. The paper reports that in linear systems OKS and EKS are identical up to machine precision, while in a highly nonlinear non-harmonic oscillator OKS substantially improves over both EKS and UKS. For example, at parameter set \((0.025,1)\), position error is \(0.90901\) for EKS, \(0.90347\) for UKS, and \(0.42640\) for OKS [2510.03846].

A second line of work replaces Gauss–Newton by full Newton while preserving recursive structure. “A Recursive Newton Method for Smoothing in Nonlinear State Space Models” shows that the full Newton step can be implemented as smoothing on a modified affine model augmented by a pseudo-measurement [2306.09148]. The curvature correction appears through
$$
z_k \approx x_k + e_k,\qquad e_k\sim \mathcal N\!\left(0,(\Lambda_k+\Psi_k)^{-1}\right),
$$
where \(\Lambda_k\) and \(\Psi_k\) collect second-derivative terms from the measurement and dynamics models [2306.09148]. The paper emphasizes automatic differentiation and uses JAX for first and second derivatives [2306.09148].

These nonlinear OKS formulations retain the temporal sparsity of classical smoothing. In [2510.03846], each Gauss–Newton step leads to a block-tridiagonal linear system. In [2306.09148], the full Newton Hessian is also block tridiagonal, and the recursive implementation avoids forming a dense batch Hessian. This suggests that the main distinction between nonlinear OKS and classical nonlinear smoothers is not the abandonment of Kalman structure, but the explicit exploitation of that structure inside iterative nonlinear optimization.

## 5. Robust, sparse, and constrained extensions

A major extension of OKS is the replacement of quadratic penalties by robust or sparsity-promoting penalties. In [1001.3907], the T-Robust smoother models measurement noise with Student’s \(t\) and Gaussian process noise, while the T-Trend smoother uses Student’s \(t\) process noise and Gaussian measurement noise. Both are solved by structured iterations that preserve a block-tridiagonal positive definite subproblem. The reported complexity remains \(O(n^3N)\) [1001.3907]. In the linear outlier experiment with \(p=0.5\) and contaminating \(N(0,100)\), the MSEs are \(7.7\) for KS, \(0.21\) for the \(\ell_1\)-Laplace smoother, and \(0.09\) for the T-Robust smoother [1001.3907].

A broader convex framework is built from piecewise linear quadratic penalties. “A statistical and computational theory for robust and sparse Kalman smoothing” develops a MAP smoother with PLQ losses such as \(L_2\), \(L_1\), Huber, and Vapnik, and proves that the resulting interior-point method maintains complexity
$$
O(Nn^3+Nm)
$$
under the stated finite-valuedness and nondegeneracy condition \(\mathrm{Null}(M)\cap U^\infty=\{0\}\) [1111.2730]. The related optimization viewpoint of [1303.1993] extends smoothing to nonlinear models, linear and nonlinear inequality constraints, systems with outliers in the measurements or sudden changes in the state, and systems where the sparsity of the state sequence must be accounted for, while preserving the computational efficiency associated with block-tridiagonal structure.

Sparsity can also be imposed by variable splitting. In [1903.08605], the regularized objective
$$
\frac{1}{2}\sum_{t=1}^{T}\|\mathbf{y}_t-\mathbf{h}_t(\mathbf{x}_t)\|_{\mathbf{R}_t^{-1}}^2
+\frac{1}{2}\sum_{t=2}^{T}\|\mathbf{x}_t-\mathbf{a}_t(\mathbf{x}_{t-1})\|_{\mathbf{Q}_t^{-1}}^2
+\frac{1}{2}\|\mathbf{x}_1-\mathbf{m}_1\|_{\mathbf{P}_1^{-1}}^2
+\lambda \sum_{t=1}^{T}\|\mathbf{\Omega}_t \mathbf{x}_t\|_1
$$
is solved by KS-ADMM or IEKS-ADMM, where the smoother handles the quadratic subproblem and soft-thresholding handles the \(L_1\) term [1903.08605]. In the linear case, the paper gives global convergence under detectability; in the nonlinear case, convergence is local [1903.08605].

A different robust interpretation appears in [1204.3358], where robustness is defined distributionally for additive outliers and innovation outliers. The AO-robust smoother is recommended empirically, while the IO-robust smoother is reported as less convincing and in need of further research [1204.3358].

## 6. Numerical linear algebra and high-performance implementations

Another branch of OKS research optimizes the smoother numerically rather than statistically. “UltimateKalman” reformulates linear Kalman filtering and smoothing as a weighted least-squares problem solved incrementally by orthogonal transformations [2207.13526]. Its general model is
$$
H_i u_i = F_i u_{i-1} + c_i + \epsilon_i,\qquad o_i = G_i u_i + \delta_i,
$$
which allows varying state dimensions, varying numbers of observations, missing observations, and unknown initial-state expectation [2207.13526]. The implementation supports filtering, prediction, fixed-lag smoothing, and whole-track smoothing. The paper reports a C implementation runtime of about \(8\,\mu s\)/step for filtering at \(n_i=6\), and smoothing examples of 5 million steps with \(n_i=m_i=6\) in about 96 s and 100,000 steps with \(n_i=m_i=48\) in 84 s, both under 16 GB memory [2207.13526].

Parallel runtime optimization is developed in “Parallel-in-Time Kalman Smoothing Using Orthogonal Transformations” [2502.11686]. That paper solves the standard linear smoothing problem
$$
\hat u=\arg\min_u \|U(Au-b)\|_2^2
$$
by a recursive odd-even sparse QR factorization plus selective inversion for covariance recovery [2502.11686]. The reported implementation, using TBB, achieves speedups of up to 47x on 64 cores, but is 1.8x to 2.5x slower on a single core because it performs more arithmetic than sequential smoothers [2502.11686]. The paper also states that the new algorithm is faster and scales better than the parallel Kalman smoother proposed by Särkkä and García-Fernández in 2021 [2502.11686].

A lighter-weight real-time example appears in lidar-inertial odometry. FR-LIO uses a tightly-coupled iterated error-state Kalman smoother over lidar sub-frames spanning at least three full scans, with RTS-style backward smoothing and reported “Backward smooth + constraint integrity analysis” times of 0.53 ms, 0.65 ms, and 0.52 ms on three sequences [2302.04031]. This suggests that OKS ideas can also be implemented as local fixed-lag refinement rather than as large batch solves.

## 7. Applications, limitations, and common misconceptions

Application papers show that OKS-style methods are not confined to generic benchmarks. In causal digital twin estimation for connected bearings, an SVAR causal model is recast as the state-space system
$$
x[n+1]=Ax[n]+w[n],\qquad A=I,\qquad y[n]=H[n]x[n]+\varepsilon[n],
$$
with a 24-dimensional latent state of time-varying causal factors estimated by a Kalman filter and smoother [2105.05236]. That paper reports that the previous neural network algorithm and Kalman smoother produced very similar results, and that Kalman may perform better for noisy industrial IoT data, but it does not propose a modified or optimized smoother [2105.05236]. In spaceborne gravitational-wave data analysis, a three-state local Taylor model is combined with Kalman filtering, RTS smoothing, and EM-based tuning of \(Q\) and \(R\), with the EM iteration count set empirically to 5; the method mitigates parameter-estimation biases from data gaps, but degrades for long gaps near coalescence time \(t_c\) [2507.02458]. In evolutionary inverse problems, an augmented iterated Kalman smoother includes time-dependent coefficients in the state vector and updates slowly varying mean temperature and conductivity by averaging the smoother estimates [1803.03911].

A common misconception is to treat OKS as a single named algorithm. The papers summarized here suggest a more heterogeneous picture. In some works, “optimized” means direct hyperparameter tuning from held-out prediction error [1910.08615]. In others, it means batch MAP refinement for nonlinear smoothing [2510.03846], full Newton recursion [2306.09148], robust or sparse reformulation [1001.3907, 1111.2730], or numerical optimization of the linear algebra through orthogonal transformations and parallel sparse QR [2207.13526, 2502.11686]. Another misconception is that any application of a Kalman smoother is automatically an OKS; the causal digital twin paper is explicitly valuable as a state-space template and industrial use case, but not as a source of a new smoother derivation or optimization methodology [2105.05236].

The main limitations recur across these formulations. The outer optimization is often nonconvex in nonlinear settings, so initialization matters and global optimality is not claimed [1910.08615, 2510.03846]. Robust and sparse models improve fit under outliers or abrupt changes, but add tuning and can require specialized solvers [1001.3907, 1111.2730]. Numerically optimized implementations improve conditioning, flexibility, or parallel depth, but may incur higher single-core cost or require nonsingular covariance structures [2207.13526, 2502.11686]. The resulting picture is not of a monolithic smoother, but of a research program: Kalman smoothing treated as an optimization problem whose statistical objective, parameterization, regularization, and numerical realization can all be redesigned.

Source: https://www.emergentmind.com/topics/optimized-kalman-smoother-oks