One Filters All: A Generalist Filter for State Estimation

TL;DR

Introduces LLM-Filter, leveraging pretrained large language models for state estimation, outperforming traditional and learning-based filters with strong generalization.

cs.LG πŸ”΄ Advanced 2025-09-24 53 views
Shiqi Liu Wenhan Cao Chang Liu Zeyu He Tianyi Zhang Shengbo Eben Li
state estimation large language models deep learning filtering generalization

Key Findings

Methodology

The approach embeds noisy observations as text prototypes processed by a frozen LLM (e.g., LLaMA). It employs System-as-Prompt (SaP) prompts to encode task instructions, enabling the model to understand and adapt to different systems. Observations are segmented and embedded into the model's latent space, with core layers predicting tokens that are mapped to state estimates via a projection layer. Only the embedding and projection layers are trained, preserving pretrained knowledge. This design allows cross-system generalization without retraining.

Key Results

  • In low-dimensional nonlinear systems like Hopf oscillators, RMSE reduced by up to 32%, with an average improvement of 21.65% over Bayes filters. In high-dimensional chaotic systems (Lorenz96, VL20), performance surpassed Kalman filters and learning methods, with runtime around 1ms/step. Larger models and longer training enhanced accuracy, demonstrating clear scaling laws.
  • Across system changes and unseen environments, LLM-Filter showed exceptional robustness, maintaining accuracy with minimal degradation. It outperformed robust filters under model mismatch and cross-system scenarios, confirming its strong adaptability.
  • Ablation studies confirmed the importance of SaP prompts and modality alignment. The model achieved high accuracy without fine-tuning, highlighting the potential of pretrained large models for dynamic system filtering.

Significance

This work pioneers integrating pretrained large language models into the filtering domain, enabling zero-shot, cross-system state estimation. It addresses longstanding challenges of model dependence and poor generalization, offering a flexible, accurate, and computationally feasible solution. The approach opens new avenues for intelligent perception in robotics, meteorology, and autonomous systems, leveraging the reasoning and inference capabilities of large models. It signifies a paradigm shift from model-specific filters to universal, knowledge-based estimators, promising broad impact across scientific and engineering fields.

Technical Contribution

The paper introduces a novel framework that transforms observations into text tokens processed by a pretrained LLM, with a task-specific prompt guiding inference. It innovates by freezing the model and only training lightweight embedding and projection layers, enabling cross-system generalization. The SaP prompt design encodes task instructions and examples, facilitating in-context learning. Experimental results validate superior accuracy, robustness, and efficiency, establishing a new direction for data-driven filtering leveraging large models' reasoning abilities.

Novelty

This is the first work to embed noisy system observations as text for large language model-based filtering, leveraging in-context prompts for generalization across unseen systems. Unlike prior methods relying on system-specific training, this approach exploits pretrained knowledge and prompt engineering, representing a fundamental innovation in applying NLP models to control and estimation tasks.

Limitations

  • High computational cost due to reliance on large pretrained models, limiting real-time deployment in resource-constrained environments. Performance may degrade under extreme noise or severe model mismatch. Prompt sensitivity requires careful design, and current training is limited to embedding and projection layers, restricting adaptation scope. Further research is needed on efficient model fine-tuning and robustness enhancement.

Future Work

Future directions include integrating reinforcement learning to optimize prompts dynamically, extending multimodal inputs (visual, tactile), and developing lightweight versions for embedded systems. Exploring transfer learning and continual learning strategies could further improve adaptability. Additionally, applying this framework to more complex, real-world scenarios such as autonomous driving and climate modeling will be pursued.

AI Executive Summary

State estimation is fundamental for controlling and understanding dynamic systems, yet traditional methods like Kalman filters struggle with nonlinearity and high dimensionality. Recent deep learning approaches improve accuracy but often lack generalization, requiring retraining for new systems. This paper introduces LLM-Filter, a novel framework that leverages pretrained large language models (e.g., LLaMA) for universal state estimation.

The core idea is to convert noisy observations into text prototypes embedded into the model's latent space, guided by System-as-Prompt (SaP) instructions that encode task-specific knowledge. The model's core layers, frozen during training, process these inputs to generate tokens representing the system state, which are then mapped to actual estimates via a lightweight projection layer. This design preserves the pretrained reasoning capabilities of large models, enabling zero-shot generalization across diverse systems.

Extensive experiments on classical nonlinear and chaotic systems demonstrate that LLM-Filter outperforms state-of-the-art Bayesian and learning-based filters in accuracy, robustness, and computational efficiency. Notably, the model maintains high performance even under system mismatches and unseen environments, validating its strong generalization ability. Larger models and longer training times further improve results, revealing clear scaling laws.

This research marks a paradigm shift, transforming the role of large models from language understanding to dynamic system inference. It opens new possibilities for intelligent, adaptable, and resource-efficient filtering solutions in robotics, meteorology, and beyond. Future work will focus on multimodal integration, prompt optimization, and real-world deployment, promising a new era of knowledge-driven dynamic estimation.

Deep Dive

Abstract

Estimating hidden states in dynamical systems, also known as optimal filtering, is a long-standing problem in various fields of science and engineering. In this paper, we introduce a general filtering framework, \textbf{LLM-Filter}, which leverages large language models (LLMs) for state estimation by embedding noisy observations with text prototypes. In various experiments for classical dynamical systems, we find that first, state estimation can significantly benefit from the reasoning knowledge embedded in pre-trained LLMs. By achieving proper modality alignment with the frozen LLM, LLM-Filter outperforms the state-of-the-art learning-based approaches. Second, we carefully design the prompt structure, System-as-Prompt (SaP), incorporating task instructions that enable the LLM to understand the estimation tasks. Guided by these prompts, LLM-Filter exhibits exceptional generalization, capable of performing filtering tasks accurately in changed or even unseen environments. We further observe a scaling-law behavior in LLM-Filter, where accuracy improves with larger model sizes and longer training times. These findings make LLM-Filter a promising foundation model of filtering.

cs.LG cs.AI