---
title: Variational Bayesian Adaptive Kalman Filter
url: https://www.emergentmind.com/topics/variational-bayesian-adaptive-kalman-filter-vb-akf
type: topic
---

# Variational Bayesian Adaptive Kalman Filter

Variational Bayesian Adaptive Kalman Filtering (VB-AKF) denotes a class of filtering schemes that treat unknown noise covariances as random variables and infer them online via variational Bayesian updates while performing Kalman state estimation [2309.02789]. In the nonlinear formulation developed by Särkkä and Hartikainen, VB-AKF jointly estimates the state and a time-varying measurement noise covariance in a nonlinear stochastic state-space model by approximating the filtering posterior $p(x_k,R_k \mid y_{1:k})$ with a mean-field factorization $q(x_k)q(R_k)$, where $q(x_k)$ is Gaussian and $q(R_k)$ is inverse-Wishart; the process noise covariance $Q_k$ is assumed known and is not adapted in the validated algorithm [1302.0681]. The method is often described more precisely as a variational Bayesian adaptive Gaussian filter, because the state update is realized through Gaussian filtering rules based on unscented, cubature, Gauss–Hermite, or Taylor-series approximations [1302.0681].

## 1. State-space model and adaptive covariance dynamics

The canonical nonlinear VB-AKF is posed for the state-space model
$$
x_k = f_{k-1}(x_{k-1}) + w_{k-1}, \qquad w_{k-1} \sim N(0,Q_k),
$$
$$
y_k = h_k(x_k) + v_k, \qquad v_k \sim N(0,R_k),
$$
with $x_k \in \mathbb{R}^{n_x}$, $y_k \in \mathbb{R}^{n_y}$, known $Q_k$, and unknown, time-varying $R_k$. The construction assumes the usual conditional independence and Markov properties: given $x_{k-1}$, $x_k$ is conditionally independent of past measurements $y_{1:k-1}$, and given $x_k$ and $R_k$, $y_k$ is conditionally independent of past states and measurements. The filtering priors are approximated as
$$
p(x_{k-1}\mid y_{1:k-1}) \approx N(m_{k-1},P_{k-1}),
$$
$$
p(R_{k-1}\mid y_{1:k-1}) \approx \mathrm{IW}(\nu_{R,k-1},S_{R,k-1}).
$$
These assumptions define the adaptive target: recursive estimation of both the latent state and the contemporaneous measurement covariance [1302.0681].

A distinctive element of the method is the covariance-evolution model for $R_k$. The transition density $p(R_k\mid R_{k-1})$ is not written explicitly; instead, the sufficient statistics of the inverse-Wishart prior are propagated through a discounting rule chosen so that inverse-Wishart priors remain closed under prediction:
$$
\nu_{R,k\mid k-1} = \rho(\nu_{R,k-1}-n_y-1)+n_y+1,
$$
$$
S_{R,k\mid k-1} = B S_{R,k-1} B^\top,
$$
with $B$ typically chosen as $B=\sqrt{\rho}\,I$ and $\rho \in (0,1]$. When $\rho=1$, the covariance is stationary; values close to $1$ yield smoother covariance evolution, while smaller values allow faster adaptation. This discounting mechanism is the operational dynamic model for the measurement covariance in the original nonlinear VB-AKF [1302.0681].

## 2. Variational Bayes formulation

The central approximation is the mean-field factorization
$$
p(x_k,R_k \mid y_{1:k}) \approx q(x_k)\,q(R_k),
$$
with the variational families
$$
q(x_k)=N(m_k,P_k), \qquad q(R_k)=\mathrm{IW}(\nu_{R,k},S_{R,k}).
$$
Coordinate-ascent variational Bayes yields the fixed-point equations
$$
q(x_k) \propto \exp\!\big(E_{q(R_k)}[\log p(y_k,x_k,R_k\mid y_{1:k-1})]\big),
$$
$$
q(R_k) \propto \exp\!\big(E_{q(x_k)}[\log p(y_k,x_k,R_k\mid y_{1:k-1})]\big).
$$
The Gaussian factor is updated through a Kalman-type correction that uses the current expectation of $R_k$, while the inverse-Wishart factor is updated from the expected squared measurement residual under the current Gaussian state posterior [1302.0681].

For an inverse-Wishart distribution $\mathrm{IW}(\nu,S)$ on an $n_y\times n_y$ covariance matrix, the required expectations are
$$
E[R_k] = \frac{S_{R,k}}{\nu_{R,k}-n_y-1},
\qquad
E[R_k^{-1}] = (\nu_{R,k}-n_y-1)S_{R,k}^{-1}.
$$
The moment conditions are explicit: $\nu_{R,k}>n_y+1$ is required for $E[R_k]$ to exist, and $\nu_{R,k}>n_y-1$ is required for $E[R_k^{-1}]$ to exist. These constraints are not merely formal; they determine whether the adaptive covariance entering the Gaussian filtering step is well-defined [1302.0681].

The measurement-covariance posterior update has a closed form. After the Gaussian state update,
$$
\nu_{R,k} = \nu_{R,k\mid k-1}+1,
$$
$$
S_{R,k} = S_{R,k\mid k-1} + E_{q(x_k)}\!\left[\varepsilon_k^{(R)}\varepsilon_k^{(R)\top}\right],
\qquad
\varepsilon_k^{(R)} = y_k-h_k(x_k).
$$
In the nonlinear case, the expectation is the integral
$$
E\!\left[\varepsilon_k^{(R)}\varepsilon_k^{(R)\top}\right]
=
\int (y_k-h(x))(y_k-h(x))^\top N(x\mid m_k,P_k)\,dx,
$$
which is approximated by Gaussian integration. The variational structure therefore couples a Gaussian state posterior with an inverse-Wishart covariance posterior through expected residual statistics [1302.0681].

## 3. Gaussian filtering realization in nonlinear models

The nonlinear VB-AKF is implemented through Gaussian filtering approximations. From $q(x_{k-1})=N(m_{k-1},P_{k-1})$, the prediction step computes
$$
m_{k\mid k-1} \approx E[f_{k-1}(x_{k-1})],
\qquad
P_{k\mid k-1} \approx \mathrm{Cov}[f_{k-1}(x_{k-1})] + Q_k.
$$
From the predicted state distribution, the method forms the measurement statistics
$$
y_{k\mid k-1} \approx E[h_k(x_k)],
$$
$$
S_{y,k} \approx \mathrm{Cov}[h_k(x_k)] + E[R_k],
$$
$$
P_{xy,k} \approx \mathrm{Cov}[x_k,h_k(x_k)],
$$
followed by the usual Gaussian correction
$$
K_k=P_{xy,k}S_{y,k}^{-1},
\qquad
m_k=m_{k\mid k-1}+K_k(y_k-y_{k\mid k-1}),
$$
$$
P_k=P_{k\mid k-1}-K_kS_{y,k}K_k^\top.
$$
The nonlinear integrals can be approximated by the unscented transform, cubature integration, Gauss–Hermite integration, or Taylor/EKF linearization. In the UKF realization, for example, $2n_x+1$ sigma points are propagated through $f$ and $h$; CKF uses $2n_x$ spherical-radial points; Gauss–Hermite uses tensor-product quadrature; EKF replaces the nonlinear measurement map with its Jacobian $H_k$ evaluated at $m_{k\mid k-1}$ [1302.0681].

Because $q(x_k)$ depends on $E[R_k]$ and $q(R_k)$ depends on $q(x_k)$, the algorithm uses inner variational iterations at each time step. A standard realization is:

1. Predict the state to obtain $(m_{k\mid k-1},P_{k\mid k-1})$.
2. Predict the covariance hyperparameters $(\nu_{R,k\mid k-1},S_{R,k\mid k-1})$ by discounting.
3. Precompute $y_{k\mid k-1}$, $T_k=\mathrm{Cov}[h_k(x_k)]$, and $P_{xy,k}$ from the predicted state.
4. Initialize
   $$
   m_k^{(0)}=m_{k\mid k-1}, \quad P_k^{(0)}=P_{k\mid k-1}, \quad
   \nu_{R,k}=\nu_{R,k\mid k-1}+1, \quad S_{R,k}^{(0)}=S_{R,k\mid k-1}.
   $$
5. Iterate for $i=0,\dots,N-1$:
   $$
   S_{y,k}^{(i+1)} = T_k + \frac{S_{R,k}^{(i)}}{\nu_{R,k}-n_y-1},
   $$
   $$
   K_k^{(i+1)} = P_{xy,k}[S_{y,k}^{(i+1)}]^{-1},
   $$
   $$
   m_k^{(i+1)} = m_{k\mid k-1}+K_k^{(i+1)}(y_k-y_{k\mid k-1}),
   $$
   $$
   P_k^{(i+1)} = P_{k\mid k-1}-K_k^{(i+1)}S_{y,k}^{(i+1)}K_k^{(i+1)\top},
   $$
   $$
   S_{R,k}^{(i+1)} = S_{R,k\mid k-1} + \int (y_k-h_k(x))(y_k-h_k(x))^\top N(x\mid m_k^{(i)},P_k^{(i)})\,dx.
   $$
6. Output
   $$
   q(x_k)=N(m_k,P_k), \qquad q(R_k)=\mathrm{IW}(\nu_{R,k},S_{R,k}),
   $$
   with $m_k=m_k^{(N)}$, $P_k=P_k^{(N)}$, and $S_{R,k}=S_{R,k}^{(N)}$.

The stopping rule may be a fixed $N$ or a tolerance on the relative change in $S_{R,k}$ or $m_k$; in practice, $N=1$–$3$ is often sufficient, while the paper also notes examples such as $N=1$–$5$ [1302.0681].

## 4. Special cases, interpretation, and numerical issues

In linear models with $f(x)=Ax$ and $h(x)=Hx$, the Gaussian integrals are exact and the method reduces to a linear VB-AKF. In that case, the adaptive covariance recursion becomes
$$
\nu_{R,k}=\nu_{R,k\mid k-1}+1,
$$
$$
S_{R,k}=S_{R,k\mid k-1}+H P_k H^\top +(y_k-Hm_k)(y_k-Hm_k)^\top.
$$
The state update is then the Kalman filter with an adaptive measurement covariance equal to $E[R_k]$. This linear reduction clarifies that the nonlinear algorithm is not a distinct estimator family, but a Gaussian-filter generalization of the same variational construction [1302.0681].

The original method also sits in a well-defined relation to classical adaptive Kalman filtering and expectation-maximization. Classical adaptive KF schemes often tune covariances heuristically or by covariance matching, while EM estimates static $Q$ and $R$ in batch by maximizing likelihood. VB-AKF is instead recursive, online, Bayesian, and explicitly quantifies uncertainty in $R_k$ through the inverse-Wishart posterior. A common misconception is that the nonlinear algorithm jointly adapts both process and measurement covariances; in the validated formulation, only the measurement covariance is adapted. The paper states that extending VB adaptation to $Q_k$ is not straightforward because $Q_k$ appears in the dynamic model in a non-conjugate way relative to a tractable $q(x_{k-1},x_k)$, and a rigorous derivation leads away from the simple filtering recursion. The same section notes that simultaneous estimation of $Q_k$ and $R_k$ can be ill-posed without strong priors or constraints, so restricting adaptation to $R_k$ avoids confounding [1302.0681].

Numerically, the method requires maintaining $\nu_{R,k}>n_y+1$, enforcing symmetry and positive definiteness of $S_{R,k}$, and computing square roots and inverses stably, typically by Cholesky factorization. Near-singular innovation covariances $S_{y,k}$ may require regularization, for example by adding a small jitter term $\lambda I$. These considerations are integral to practical implementations, since the covariance adaptation is embedded directly inside the Kalman correction loop [1302.0681].

## 5. Empirical behavior in the original nonlinear study

The original paper evaluates the method in two nonlinear tracking scenarios. The first is range-only tracking in a non-homogeneous noise field, where a 2D target is tracked by range-only sensors and the measurement covariance exhibits spatially varying correlations induced by a structured random field along signal paths. The comparison includes UKF with true $R_k$ (UKF-t), UKF with fixed diagonal $R$ (UKF-o), VB-AUKF with full adaptive $R$ (VB-AUKF-f), and VB-AUKF with diagonal adaptive $R$ (VB-AUKF-d). VB-AUKF-f improves RMSE over VB-AUKF-d and UKF-o, while UKF-t performs best, as expected. The estimated covariance entries track the true time variation reasonably, and larger $\rho$ yields smoother but lagged covariance estimates [1302.0681].

The second scenario is multi-sensor bearings-only tracking with a coordinated turn model in 2D and four sensors. Here the measurement noise has time-varying variances and cross-correlations. The comparison includes CKF with true $R_k$ (CKF-t), CKF with fixed diagonal $R$ (CKF-o), VB-ACKF with full adaptive $R$ (VBCKF-f), and VB-ACKF with diagonal adaptive $R$ (VBCKF-d). VBCKF-f outperforms VBCKF-d and CKF-o, while CKF-t again provides the best performance. In this setting, the advantage of estimating the full covariance rather than only diagonal terms is clear in RMSE. These experiments establish the characteristic empirical pattern of the method: adaptive full-covariance estimation is beneficial when measurement noise varies over time and sensor correlations matter, but performance remains bounded above by an oracle filter using the true covariance [1302.0681].

## 6. Extensions, variants, and related research directions

Subsequent work has extended the basic VB-AKF template in several directions.

| Direction | Main modification | Representative paper |
|---|---|---|
| Adaptive MCMC | Uses VB-AKF to update the Metropolis proposal covariance inside the variational Bayesian adaptive Metropolis algorithm; proves a strong law of large numbers for VBAM | [1308.5875] |
| Correntropy-based robustness | Integrates VB-AKF with MCCKF to form VB-AMCCKF, adapts both $Q_k$ and $R_k$ on a sliding window with forgetting, and reports CPU usage of 58%/65% for VB-AMCCKF versus 40%/46% for R-AMCCKF on UAV/Husky platforms | [2103.15354] |
| Threshold-gated variance learning | Proposes threshold-based VB Kalman filtering that updates measurement-noise hyperparameters only for residuals classified as background; reported RMSE improvements include 1.6187 to 0.4218 in one Gaussian-mixture case | [2309.02789] |
| Huber and conformal protection | Combines VB parameter learning, Huber M-estimation, and Conformal Outlier Detection; fingerprint matching accuracy increases from 81.25% to 93.75%, and positioning errors decrease from 0.62–6.87 m to 0.03–0.35 m | [2505.08639] |
| Distributed sensing with missing and corrupted data | Introduces a dual-mask generative model with observable dropouts and latent authenticity variables, jointly estimating $Q_k$, $R_k$, network survival rate, and clean rate; numerical experiments report asymptotic convergence toward the oracle lower bound as the number of sensors increases | [2604.02738] |
| Unified robust-adaptive filtering | Builds a variational robust Kalman filter from a Student’s $t$-distribution induced loss and switching rules; the framework recovers conventional KF, robust KF, and adaptive KF by adjusting parameters | [2512.15419] |
| Alternative variance-latent formulation | Represents process and measurement variances through auxiliary Gaussian latent variables and online variational Bayes; in a replication of the Särkkä setting, RMSE is 0.6859 versus 0.6858 for VB-AKF | [2104.10777] |

These variants preserve the core VB-AKF idea—recursive variational estimation of latent states together with unknown noise statistics—while changing the observation model, the sufficient statistics, or the robustness mechanism. This suggests a broader interpretation of VB-AKF as a variational design pattern rather than a single fixed algorithm. In that broader usage, the original nonlinear filter of Särkkä and Hartikainen remains the reference point for mean-field Gaussian/inverse-Wishart recursion with Gaussian integration, while later work extends the framework to sliding-window smoothing, non-Gaussian robustness, distributed sensing, conformal gating, and adaptive proposal construction in MCMC.

Source: https://www.emergentmind.com/topics/variational-bayesian-adaptive-kalman-filter-vb-akf