AUTHOR=Shen Siyuan , Chen Jichen , Yu Guanfeng , Zhai Zhengjun , Han Pujie TITLE=KalmanFormer: using transformer to model the Kalman Gain in Kalman Filters JOURNAL=Frontiers in Neurorobotics VOLUME=Volume 18 - 2024 YEAR=2025 URL=https://www.frontiersin.org/journals/neurorobotics/articles/10.3389/fnbot.2024.1460255 DOI=10.3389/fnbot.2024.1460255 ISSN=1662-5218 ABSTRACT=IntroductionTracking the hidden states of dynamic systems is a fundamental task in signal processing. Recursive Kalman Filters (KF) are widely regarded as an efficient solution for linear and Gaussian systems, offering low computational complexity. However, real-world applications often involve non-linear dynamics, making it challenging for traditional Kalman Filters to achieve accurate state estimation. Additionally, the accurate modeling of system dynamics and noise in practical scenarios is often difficult. To address these limitations, we propose the KalmanFormer, a hybrid model-driven and data-driven state estimator. By leveraging data, the KalmanFormer promotes the performance of state estimation under non-linear conditions and partial information scenarios.MethodsThe proposed KalmanFormer integrates classical Kalman Filter with a Transformer framework. Specifically, it utilizes the Transformer to learn the Kalman Gain directly from data without requiring prior knowledge of noise parameters. The learned Kalman Gain is then incorporated into the standard Kalman Filter workflow, enabling the system to better handle non-linearities and model mismatches. The hybrid approach combines the strengths of data-driven learning and model-driven methodologies to achieve robust state estimation.Results and discussionTo evaluate the effectiveness of KalmanFormer, we conducted numerical experiments in both synthetic and real-world dataset. The results demonstrate that KalmanFormer outperforms the classical Extended Kalman Filter (EKF) in the same settings. It achieves superior accuracy in tracking hidden states, demonstrating resilience to non-linearities and imprecise system models.