Source-linked AI summary

KalmanNet: Neural Network Aided Kalman Filtering for Partially Known Dynamics

Guy Revach, Nir Shlezinger, Xiaoyong Ni, Adria Lopez Escoriza, Ruud J. G. van Sloun, Yonina C. Eldar

arXiv:2107.10043v3eess.SPcs.LGstat.ML

TL;DR

State estimation is difficult when dynamics are nonlinear and the state-space model or noise statistics are only partially known. KalmanNet combines the structural EKF flow with an RNN that learns the Kalman gain from data, and numerical studies show robustness to nonlinearities and model mismatch. Its filtering scope remains distinct from smoothing and prediction tasks.

  • Problem

    Classical Kalman filtering requires linear dynamics and accurate state-space and noise knowledge, conditions that often fail in practice.

    Source: §I · p. 1, E. Discussion · p. 7
  • Method

    KalmanNet integrates a dedicated RNN into the EKF flow to learn the Kalman gain while using partial state-space information.

    Source: E. Discussion · p. 7
  • Results

    KalmanNet overcomes nonlinearities and model mismatch while retaining real-time filtering, interpretability, and data efficiency across evaluated settings.

    Source: E. Discussion · p. 7, 3) Partial Information · p. 9, §V · p. 14
  • Takeaways & Limitations

    The learned-gain hybrid can provide real-time state estimates on computationally limited devices and may also support confidence measures related to the estimate covariance.

    Source: E. Discussion · p. 7, §V · p. 14

    KalmanNet is designed for filtering and cannot directly substitute its unestimated state-space parameters into algorithms for smoothing or prediction.

    Source: E. Discussion · p. 7

Abstract

from arXiv · show

State estimation of dynamical systems in real-time is a fundamental task in signal processing. For systems that are well-represented by a fully known linear Gaussian state space (SS) model, the celebrated Kalman filter (KF) is a low complexity optimal solution. However, both linearity of the underlying SS model and accurate knowledge of it are often not encountered in practice. Here, we present KalmanNet, a real-time state estimator that learns from data to carry out Kalman filtering under non-linear dynamics with partial information. By incorporating the structural SS model with a dedicated recurrent neural network module in the flow of the KF, we retain data efficiency and interpretability of the classic algorithm while implicitly learning complex dynamics from data. We demonstrate numerically that KalmanNet overcomes non-linearities and model mismatch, outperforming classic filtering methods operating with both mismatched and accurate domain knowledge.

I. INTRODUCTION

State estimation is important for real-time signal-processing and control applications, but classical filters require assumptions that often fail in practice. KalmanNet addresses these limitations by combining partial state-space knowledge with data-driven learning.

  • The Kalman filter is a low-complexity MMSE estimator for time-varying discrete-time systems with linear state-space models and additive white Gaussian noise.Source: §I · p. 1
  • Nonlinear dynamics motivated extensions including the EKF, UKF, and particle filters for nonlinear or non-Gaussian state-space models.Source: §I · p. 1
  • Model-based filters depend critically on accurate domain knowledge and model assumptions, with performance degrading under model mismatch.Source: §I · p. 1
  • Deep neural networks offer a data-driven alternative that can capture complex processes without explicitly characterizing the domain.Source: §I · p. 1
  • KalmanNet combines the low complexity and structural soundness of the KF with the model-agnostic nature of DNNs for partially known dynamics.Source: §I · pp. 1–2
  • The paper evaluates KalmanNet on synthetic systems, the chaotic Lorenz system, and localization using the Michigan NCLT data set.Source: §I · p. 2

B. Data-Aided Filtering Problem Formulation

The paper formulates online filtering for partially known, possibly nonlinear state-space models and reviews model-based approaches. Classical KF and EKF methods are efficient but require accurate models and can degrade with mismatch or nonlinearities.

B. Data-Aided Filtering Problem Formulation

C. Related Work

  • Model-based filtering includes EKF, UKF, quadrature, cubature, and particle-filter variants, with particle filters relatively computationally heavy and model-based methods sensitive to mismatch.Source: C. Related Work · p. 3
  • Related approaches estimate missing state-space parameters using expectation maximization, Bayesian methods, model selection, or training-data tuning.Source: C. Related Work · p. 3
  • Robust filters minimize worst-case error across assumed models, typically trading performance against operation with the true model.Source: C. Related Work · p. 3
  • DNN-based approaches may track states in a learned latent space or estimate state-space parameters, whereas this work targets partial domain knowledge.Source: C. Related Work · p. 3

III. KALMANNET

KalmanNet augments the EKF flow with an RNN that learns the Kalman gain from data while retaining model-based prediction and update steps. This hybrid design targets nonlinear dynamics and partial information.

B. Input Features

KalmanNet’s RNN receives feature differences that expose observation, state-evolution, and estimation uncertainty, then learns the Kalman gain through recurrent architectures aligned with Kalman filtering computations.

  • The RNN input features capture statistical information needed to track the Kalman gain from observations and state-process behavior.Source: B. Input Features · p. 5
  • F1 and F3 describe state-evolution differences, whereas F2 and F4 describe differences associated with state-estimate uncertainty.Source: B. Input Features · p. 5
  • Difference operations remove predictable components, leaving time series primarily affected by the noise statistics being learned.Source: B. Input Features · p. 5
  • Empirically useful feature combinations include {F1, F2, F4} and {F1, F3, F4}, while Fig. 3 illustrates an architecture using F2 and F4.Source: B. Input Features · p. 5, Figure 3 · p. 5
  • Architecture #1 uses fully connected input and output layers around a GRU whose hidden state implicitly tracks the required second-order moments.Source: C. Neural Network Architecture · p. 5
  • Architecture #2 uses three GRUs with dedicated fully connected layers to separately track Q, predicted state moments, and observation-related moments.Source: C. Neural Network Architecture · p. 6, Figure 4 · p. 6
  • Architecture #2 is more closely tailored to the state-space and Kalman-filter formulation, requiring fewer trainable parameters but learning a more constrained mapping family.Source: C. Neural Network Architecture · p. 6

D. Training Algorithm

KalmanNet is trained end-to-end on labeled trajectories using squared-error state-estimation loss, ℓ2 regularization, mini-batches, and backpropagation through time with several trajectory-unrolling strategies.

  • KalmanNet uses supervised labeled data and computes loss from the final state estimate rather than the internal RNN output.Source: D. Training Algorithm · p. 6
  • End-to-end training backpropagates the state-estimation loss to the Kalman-gain computation without requiring externally supplied ground-truth gains.Source: D. Training Algorithm · p. 6
  • The training set contains N trajectories with potentially varying lengths, and the objective uses an ℓ2-regularized mean-squared error.Source: D. Training Algorithm · p. 6
  • Training optimizes the RNN parameters with mini-batch stochastic gradient descent over selected trajectories.Source: D. Training Algorithm · p. 6
  • BPTT unfolds the recursive filter across time with shared parameters and computes forward and backward gradient passes.Source: D. Training Algorithm · p. 6
  • V1 uses full trajectories, V2 truncates long trajectories into shuffled short segments, and V3 trains on fixed relatively short trajectories.Source: D. Training Algorithm · p. 6
  • Because full-trajectory BPTT may be expensive and unstable, the favored procedure warms up with V2 before tuning with V1.Source: D. Training Algorithm · p. 7

E. Discussion

KalmanNet replaces noise-dependent EKF computations with a learned recurrent module while preserving the model-based filtering flow, yielding interpretable state estimation and reported gains across synthetic and real-world settings.

  • KalmanNet integrates dedicated deep-learning modules into the EKF flow instead of linearizing the state-space model or imposing an explicit statistical noise model.Source: E. Discussion · p. 7
  • The method learns the Kalman gain from data when noise statistics are unspecified, while retaining partially known state-transition and observation mappings.Source: E. Discussion · p. 7
  • Its model awareness and Kalman-filter flow distinguish KalmanNet from black-box end-to-end state estimation.Source: E. Discussion · p. 7
  • KalmanNet improves MSE over end-to-end RNN state estimation and approaches the MB KF’s MMSE performance in linear Gaussian state-space models.Source: E. Discussion · p. 7
  • Preserving the EKF flow gives intermediate exchanged features specific operational meanings and may support confidence measures through the learned Kalman gain.Source: E. Discussion · p. 7
  • In autonomous-racing velocity estimation, an early KalmanNet version improved real-time tracking over model-based techniques on a hardware-limited vehicle control unit.Source: E. Discussion · p. 7
  • The presented design assumes approximately known state-transition and observation mappings, leaving learning those mappings and extension beyond filtering for future work.Source: E. Discussion · pp. 7–8
  • The study evaluates linear models, nonlinear sinusoidal and Lorenz systems, and Michigan NCLT localization against model-based and RNN baselines.Source: §IV · p. 8

A. Experimental Setting

The experiments evaluate several KalmanNet configurations and compare them with model-based filters under synthetic linear-system settings. Performance is measured primarily by MSE, with implementation details including optimizer choice and covariance tuning specified.

Noise model

Configurations

  • Experiments consider three KalmanNet configurations that vary architecture, input features, and training algorithm.The listed configurations use architecture #1 or #2 with feature sets {F2, F4}, {F1, F3, F4}, or all features, combined with training algorithms V1–V3.Source: 1) KalmanNet Setting · p. 8

Training

Baselines

  • The study compares KalmanNet with model-based filters, tuning covariance matrices under model uncertainty and sometimes for long trajectories.For trajectories with T > 1500, tuning was sometimes needed even with full information to compensate for inaccurate uncertainty propagation.Source: 2) Model-Based Filters · p. 8

Linear experiments

1) Full Information:

Under full information, KalmanNet reaches the MMSE of the model-based KF and its design choices improve convergence and transfer across trajectory lengths. Under state-evolution or state-observation mismatch, it remains close to the MMSE and can outperform the model-based KF.

Full information

  • KalmanNet achieves the MMSE of the model-based KF across tested linear-system dimensions and trajectory lengths under full information.The evaluation covers m × n ∈ {2 × 2, 5 × 5, 10 × 1} and T ∈ {50, 100, 150, 200}.Source: 1) Full Information · p. 8

Neural model selection

  • In end-to-end comparisons, the MB RNN outperforms the vanilla RNN, but both converge slowly and fail to achieve the MMSE.Source: 2) Neural Model Selection · p. 9
  • Using difference features notably improves MB RNN convergence, while recovering the KG within the KF flow further improves learning.Source: 2) Neural Model Selection · p. 9

Generalization

  • For trajectories with T = 200 after training on T = 20, KalmanNet remains near the MB KF, whereas vanilla and MB RNNs are more than 50 [dB] from the MMSE.Difference features make the DD systems applicable to longer trajectories, with KalmanNet achieving MSE within a minor gap of the MB KF.Source: 2) Neural Model Selection · p. 9

Partial information

  • 3 [dB] gain over the MB KF is achieved by KalmanNet under state-evolution mismatch, with MSE within a minor gap of the MMSE.Source: 3) Partial Information · p. 9
  • Under state-observation mismatch, KalmanNet converges within a minor gap of the MMSE and reaches the MMSE lower bound when using an estimated observation matrix.Source: 3) Partial Information · p. 9

C. Synthetic Non-Linear Model

The synthetic non-linear study tests KalmanNet on sinusoidal state evolution and polynomial observations, including model mismatch and a discretized chaotic Lorenz system. KalmanNet matches or exceeds model-based baselines while remaining close to full-information performance under partial information.

Toy non-linear model

  • The toy non-linear model uses sinusoidal state evolution and a second-order polynomial observation mapping, evaluated over T = 100 steps.KalmanNet uses configuration C4, with ν = −20 [dB].Source: C. Synthetic Non-Linear Model · p. 10

Full information

Partial information

  • With partial model information, model mismatch notably degrades model-based filters, while KalmanNet remains within a small gap of full-information performance.Source: C. Synthetic Non-Linear Model · p. 10

Lorenz attractor

  • The Lorenz attractor provides a highly non-linear tracking task and exposes mismatch from sampling a continuous-time signal into discrete time.Source: D. Lorenz Attractor · p. 10
  • The discretized Lorenz evolution model uses J = 5 Taylor order and ∆τ = 0.02 sampling interval unless otherwise stated.Source: D. Lorenz Attractor · p. 10

1) Full Information:

The experiments evaluate KalmanNet under nonlinear dynamics and several model mismatches. Across these settings, KalmanNet learns to overcome mismatches and can outperform model-based filters, including those using full information.

Noisy observations

  • KalmanNet achieves MSE comparable to EKF for noisy state observations while outperforming UKF and PF.The model uses identity observations, ν = −20 [dB], and T = 2000; KalmanNet was trained on trajectories of T = 100.Source: 1) Full Information · p. 11
  • In nonlinear observation setups, KalmanNet substantially outperforms sub-optimal model-based approaches operating with full SS-model information.The observations use a Cartesian-to-spherical-coordinate transformation with T = 20 and ν = 0 [dB].Source: 1) Full Information · p. 11

Partial information

  • With state-evolution mismatch from using J = 2 instead of the data-generating J = 5 Taylor approximation, KalmanNet partially overcomes the mismatch and outperforms model-based counterparts.This experiment uses identity observations, T = 2000, and ν = −20 [dB].Source: 2) Partial Information · p. 11
  • A rotation of θ = 1° in the observation model causes severe degradation for model-based filters, whereas KalmanNet learns to overcome the mismatch and outperforms them.The rotation represents sensor misalignment of approximately 0.55%; KalmanNet trained on T = 100 was tested on T = 1000.Source: 2) Partial Information · pp. 11–12
  • Under continuous-to-discrete sampling mismatch, KalmanNet achieves a substantial processing gain over model-based alternatives and improves tracking relative to end-to-end neural baselines.The experiment uses decimated observations with T = 3000; a fully model-agnostic RNN diverged on the task, while KalmanNet inferred faster than classical methods.Source: 2) Partial Information · pp. 11–12

E. Real World Dynamics: Michigan NCLT Data Set

The Michigan NCLT experiment tests real-time Segway localization from noisy sensor readings, particularly odometry without direct position measurements. KalmanNet provides the most accurate locations, overcoming odometry errors where the model-based KF and vanilla RNN fail.

Data and task

  • Odometry-only localization is challenging because integrated noisy velocity readings typically drift, especially when direct positioning measurements are unavailable.The assumed model uses a linear Wiener velocity model with position and velocity states.Source: E. Real World Dynamics: Michigan NCLT… · p. 13

Experimental setup

  • The trajectory was split into 85% training, 10% validation, and 5% testing, and KalmanNet was compared with a vanilla RNN and model-based KF.The experiment used 23 training sequences, 2 validation sequences, and 1 test sequence.Source: E. Real World Dynamics: Michigan NCLT… · p. 13

Results

V. CONCLUSIONS

The paper concludes that KalmanNet combines deep learning with model-based Kalman filtering by replacing model-dependent computations with a dedicated RNN. Numerical results indicate real-time estimation that handles model mismatch and nonlinearities with compact, efficient learning.

Conclusions

  • KalmanNet is a hybrid combination of deep learning with the classic model-based EKF.Its design replaces SS-model-dependent EKF computations with a dedicated RNN operating on features needed for filtering.Source: §V · p. 13
  • The numerical study shows that KalmanNet performs real-time state estimation while learning to overcome model mismatches and nonlinearities.The paper evaluates this behavior in experiments including Lorenz-attractor mismatch cases and real-world NCLT data.Source: §V · p. 14, Figure 10 · p. 14, Figure 11 · p. 14
  • KalmanNet uses a relatively compact RNN, can be trained with relatively small data sets, and has reduced inference complexity.These properties support applicability to high-dimensional SS models and computationally limited devices.Source: §V · p. 14
Loading 2107.10043v3…