Transformer通过上下文学习隐式估计状态,无需模型知识即可预测动态系统输出。
Transformers as Implicit State Estimators: In-Context Learning in Dynamical Systems
- 用上下文学习的Transformer隐式推断系统隐藏状态
- 线性系统表现接近卡尔曼滤波,非线性系统接近EKF和粒子滤波
- 对缺失参数有鲁棒性,适合无模型建模场景
从过去输出的噪声观测中预测动态系统行为是工程与科学中的经典问题。对于具有高斯输入的线性系统,卡尔曼滤波是贝叶斯意义下的最优线性最小均方误差状态估计器。对于非线性系统,通常采用扩展卡尔曼滤波(EKF)等近似启发式方法或粒子滤波(PF)等数值方法。本文表明,在上下文学习(ICL)设置下,冻结的Transformer可隐式推断隐藏状态,以预测广泛动态系统的输出,无需测试时梯度更新或系统模型的显式知识。具体而言,当提供短序列的历史输入-输出对及可选系统参数时,冻结的Transformer能准确预测当前输出。在线性高斯情形下,其预测结果接近卡尔曼滤波;在非线性情形下,性能逼近EKF和PF。此外,当关键参数(如状态转移矩阵)未提供时,预测精度仍能平稳下降,体现出鲁棒性与隐式参数推断能力。这些发现表明,变压器的上下文学习为动态系统输出预测提供了一种灵活、非参数化的替代方案,其基础是隐式潜在状态估计。
原文摘要 · Abstract (English)
Predicting the behavior of a dynamical system from noisy observations of its past outputs is a classical problem encountered across engineering and science. For linear systems with Gaussian inputs, the Kalman filter -- the best linear minimum mean-square error estimator of the state trajectory -- is optimal in the Bayesian sense. For nonlinear systems, Bayesian filtering is typically approached using suboptimal heuristics such as the Extended Kalman Filter (EKF), or numerical methods such as particle filtering (PF). In this work, we show that transformers, employed in an in-context learning (ICL) setting, can implicitly infer hidden states in order to predict the outputs of a wide family of dynamical systems, without test-time gradient updates or explicit knowledge of the system model. Specifically, when provided with a short context of past input-output pairs and, optionally, system parameters, a frozen transformer accurately predicts the current output. In linear-Gaussian regimes, its predictions closely match those of the Kalman filter; in nonlinear regimes, its performance approaches that of EKF and PF. Moreover, prediction accuracy degrades gracefully when key parameters, such as the state-transition matrix, are withheld from the context, demonstrating robustness and implicit parameter inference. These findings suggest that transformer in-context learning provides a flexible, non-parametric alternative for output prediction in dynamical systems, grounded in implicit latent-state estimation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。