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.

  • Method

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

  • Results

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

  • 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.

  • Takeaways & Limitations

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

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.
  • Nonlinear dynamics motivated extensions including the EKF, UKF, and particle filters for nonlinear or non-Gaussian state-space models.
  • Model-based filters depend critically on accurate domain knowledge and model assumptions, with performance degrading under model mismatch.
  • Deep neural networks offer a data-driven alternative that can capture complex processes without explicitly characterizing the domain.
  • KalmanNet combines the low complexity and structural soundness of the KF with the model-agnostic nature of DNNs for partially known dynamics.
  • The paper evaluates KalmanNet on synthetic systems, the chaotic Lorenz system, and localization using the Michigan NCLT data set.

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: Filtering maps incoming observations y_t to state estimates x̂_t over a finite time horizon and is central to real-time tracking.
  • B. Data-Aided Filtering Problem Formulation: The target setting assumes known or approximated transition and observation functions, while noise distributions are unavailable.
  • B. Data-Aided Filtering Problem Formulation: The transition and observation functions may mismatch true dynamics because of discretization, sensor misalignment, or other approximation errors.
  • B. Data-Aided Filtering Problem Formulation: Training uses labeled observation sequences paired with ground-truth states, which may come from extra sensors or offline computational methods.
  • 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.
  • C. Related Work: Related approaches estimate missing state-space parameters using expectation maximization, Bayesian methods, model selection, or training-data tuning.
  • C. Related Work: Robust filters minimize worst-case error across assumed models, typically trading performance against operation with the true model.
  • C. Related Work: DNN-based approaches may track states in a learned latent space or estimate state-space parameters, whereas this work targets partial domain knowledge.

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.

  • KalmanNet is a hybrid, interpretable, data-efficient architecture for real-time state estimation in nonlinear systems with partial domain knowledge.
  • It identifies unavailable EKF computations and replaces them with an RNN integrated into the EKF flow.
  • The RNN learns the Kalman gain from data because the noise covariance matrices Q and R are unavailable.
  • At each time step, KalmanNet performs prediction and update, retaining the EKF prediction step for first-order statistical moments.
  • Unlike model-based counterparts, KalmanNet does not require noise-distribution knowledge or maintain an explicit estimate of second-order moments.
  • The RNN’s recurrent memory implicitly tracks second-order statistical information needed for Kalman-gain computation.

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.
  • F1 and F3 describe state-evolution differences, whereas F2 and F4 describe differences associated with state-estimate uncertainty.
  • Difference operations remove predictable components, leaving time series primarily affected by the noise statistics being learned.
  • Empirically useful feature combinations include {F1, F2, F4} and {F1, F3, F4}, while Fig. 3 illustrates an architecture using F2 and F4.
  • Architecture #1 uses fully connected input and output layers around a GRU whose hidden state implicitly tracks the required second-order moments.
  • Architecture #2 uses three GRUs with dedicated fully connected layers to separately track Q, predicted state moments, and observation-related moments.
  • 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.

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.
  • End-to-end training backpropagates the state-estimation loss to the Kalman-gain computation without requiring externally supplied ground-truth gains.
  • The training set contains N trajectories with potentially varying lengths, and the objective uses an ℓ2-regularized mean-squared error.
  • Training optimizes the RNN parameters with mini-batch stochastic gradient descent over selected trajectories.
  • BPTT unfolds the recursive filter across time with shared parameters and computes forward and backward gradient passes.
  • V1 uses full trajectories, V2 truncates long trajectories into shuffled short segments, and V3 trains on fixed relatively short trajectories.
  • Because full-trajectory BPTT may be expensive and unstable, the favored procedure warms up with V2 before tuning with V1.

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.
  • The method learns the Kalman gain from data when noise statistics are unspecified, while retaining partially known state-transition and observation mappings.
  • Its model awareness and Kalman-filter flow distinguish KalmanNet from black-box end-to-end state estimation.
  • KalmanNet improves MSE over end-to-end RNN state estimation and approaches the MB KF’s MMSE performance in linear Gaussian state-space models.
  • Preserving the EKF flow gives intermediate exchanged features specific operational meanings and may support confidence measures through the learned Kalman gain.
  • In autonomous-racing velocity estimation, an early KalmanNet version improved real-time tracking over model-based techniques on a hardware-limited vehicle control unit.
  • The presented design assumes approximately known state-transition and observation mappings, leaving learning those mappings and extension beyond filtering for future work.
  • The study evaluates linear models, nonlinear sinusoidal and Lorenz systems, and Michigan NCLT localization against model-based and RNN baselines.

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: Synthetic experiments use diagonal process- and observation-noise covariance matrices, Q = q2 · I and R = r2 · I.
  • 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.
  • Training: KalmanNet is trained with the Adam optimizer in all experiments.
  • 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.
  • Linear experiments: The linear-system study uses controllable-canonical F and evaluates different system dimensions and trajectory lengths.

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}.
  • 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.
  • Neural model selection: Using difference features notably improves MB RNN convergence, while recovering the KG within the KF flow further improves learning.
  • 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.
  • 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.
  • Partial information: 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.

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].
  • Full information: Under full information and low observation noise, KalmanNet achieves performance similar to the EKF, which has the lowest MSE among model-based filters.
  • Full information: At 1 r2 = −12.04 [dB], KalmanNet achieves superior MSE because the MB EKF suffers degraded performance from a non-linear effect.
  • Partial information: With partial model information, model mismatch notably degrades model-based filters, while KalmanNet remains within a small gap of full-information performance.
  • Lorenz attractor: The Lorenz attractor provides a highly non-linear tracking task and exposes mismatch from sampling a continuous-time signal into discrete time.
  • Lorenz attractor: The discretized Lorenz evolution model uses J = 5 Taylor order and ∆τ = 0.02 sampling interval unless otherwise stated.

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.
  • Noisy observations: 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].
  • 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].
  • Partial information: 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.
  • Partial information: 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.

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.
  • 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.
  • Results: KalmanNet provides the most accurate real-time locations, overcoming noisy odometer errors while the KF follows the drifting odometer and the vanilla RNN fails to localize.The comparison is reported in Fig. 11 and Table X.

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.
  • Conclusions: 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.
  • Conclusions: 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.
Loading 2107.10043v3…