Sailing Towards Zero-Shot State Estimation using Foundation Models Combined with a UKF

Tobin Holtmann, David Stenger, Andres Posada-Moreno, Friedrich Solowjow, Sebastian Trimpe

TL;DR

The paper introduces the Foundation Model Unscented Kalman Filter (FM-UKF), a hybrid state estimator that pairs a transformer-based foundation model for system dynamics with a classical Unscented Kalman Filter (UKF). This architecture enables zero-shot state estimation across completely unseen system dynamics and allows for seamless adaptation to new sensor configurations without any retraining.

What Problem Does This Paper Address?

State estimation—the art of reconstructing hidden system states from noisy sensor data—is crucial for control systems and robotics. Traditionally, engineers rely on Kalman filters, which require precise mathematical models of both the system's dynamics and its sensors. Deriving these models via manual system identification is tedious and time-consuming.

Recently, deep learning researchers have proposed end-to-end transformer models that bypass this manual step by learning to map control inputs and sensor measurements directly to state estimates. Thanks to in-context learning, these foundation models can generalize to unseen system dynamics in a zero-shot manner. However, they suffer from a major flaw: they are rigidly tied to the specific sensor configuration they were trained on. If a sensor breaks, or if a new hardware layout is introduced, the entire end-to-end model must be retrained from scratch.

Overview of different state estimation approaches, highlighting how FM-UKF bridges the gap between data-driven dynamics and analytical sensor models.

Methods

To solve this rigidity problem, the authors decouple the problem: they use a foundation model to learn the complex, generalized system dynamics, but retain classical analytical models for the sensors.

The proposed FM-UKF integrates a decoder-only transformer (inspired by the TimesFM architecture) directly into the prediction step of a modified Unscented Kalman Filter.

Here is how it works during runtime:

  1. Sigma Point Generation: The UKF samples a set of state trajectories (sigma points) representing the current state estimate and its uncertainty.
  2. Foundation Model Prediction: Instead of passing these points through a traditional physics equation, they are fed into the dynamics foundation model along with historical context. The transformer predicts the next state for each sigma point.
  3. Measurement Update: The predicted states are passed through an analytically known sensor model ($h_\xi$) using the standard Unscented Transform to map states to expected measurements, which are then corrected using actual sensor readings.

To train the dynamics transformer effectively, the authors utilize Masked Long-Horizon Prediction (MLHP), forcing the model to predict future states using only control inputs after an initial context window. They also employ a normalized Huber loss to handle outliers and stabilize training.

The FM-UKF architecture diagram showing the integration of the Dynamics FM within the UKF loop.

Datasets

The authors introduced and open-sourced a new, highly complex synthetic benchmark dataset:

  • Container Ship Zero-Shot State Estimation Benchmark: Comprises 400,000 trajectories (each 384 time-steps long) generated from 1,000 unique parameter configurations of a non-linear container ship model.
  • Complexity: The system features a 10-dimensional state space governed by 70 highly sensitive hydrodynamic parameters, making it a substantially more rigorous testbed than the simple 2D systems used in prior literature.

Key Insights and Ideas

  • Decoupling is Key for Modularity: By separating the dynamics model from the sensor model, FM-UKF can incorporate new sensor configurations on the fly without retraining the neural network.
  • Transformers Struggle with Pure Integration: A major "aha moment" occurred when evaluating highly integrated states like position and yaw angle. The pure transformer-based dynamics model performed poorly here. The authors realized that indefinite integration is difficult for transformers to learn natively. By adding a simple first-order midpoint kinematic integrator to process the transformer's predicted velocities, performance drastically improved.

Key Results

The framework was evaluated against classical baselines (Base-UKF with incorrect parameters, Constant Velocity CV-UKF) and an end-to-end transformer baseline across two sensor configurations: $h_1$ (all sensors active) and $h_2$ (no velocity measurements).

  • Robustness to Missing Sensors ($h_2$): In the challenging scenario where surge and sway velocities were unmeasured, the FM-UKF significantly outperformed both the Base-UKF and CV-UKF baselines, demonstrating that the foundation model successfully internalized and generalized the underlying ship dynamics.
  • The Flexibility Advantage: While the end-to-end transformer achieved slightly better raw accuracy, it required being explicitly trained on both sensor configurations simultaneously. The FM-UKF achieved competitive accuracy while remaining completely modular.
Error distributions (MAE) across different states for the evaluated observers under two sensor configurations.

Limitations and Future Work

While promising, the current iteration of FM-UKF has a few limitations:

  • Process Noise Tuning: The filter's process noise covariance matrices were manually tuned and held constant across all test cases. This means the results represent a lower bound on the FM-UKF's potential performance.
  • Computational Overhead: Running multiple sigma points through a transformer at every time step increases computational complexity compared to analytical filters.

Future Directions: The authors suggest exploring architectures where the dynamics foundation model directly predicts the covariance matrices alongside the state transitions, or utilizing online adaptive filtering to tune noise parameters automatically.

Summary updated

BibTeX
@inproceedings{holtmann2025sailing,
  author = {Tobin Holtmann and David Stenger and Andres Posada-Moreno and Friedrich Solowjow and Sebastian Trimpe},
  title = {{Sailing Towards Zero-Shot State Estimation using Foundation Models Combined with a UKF}},
  booktitle = {CDC},
  year = {2025},
  doi = {10.1109/cdc57313.2025.11313025},
}
Figure