arXiv:2510.09776cs.LGcs.AI2025-10被引 8

揭示Transformer在时间序列预测中表现不佳的根本原因

Why Do Transformers Fail to Forecast Time Series In-Context?

  • 从上下文学习理论出发,分析自注意力机制的局限性
  • 长上下文下线性注意力渐近逼近最优线性模型
  • 链式推理导致预测坍缩至均值,适合关注理论缺陷的研究者

时间序列预测(TSF)仍是机器学习中的难题,尽管近期大量研究借助大语言模型(LLM),而后者主要基于Transformer架构。实证表明,即使强大的Transformer也常无法超越简单线性模型。本文从上下文学习(ICL)理论视角,对Transformer在TSF中的局限性进行理论分析。针对自回归AR(p)数据,证明:(1) 线性自注意力(LSA)模型无法在上下文预测中实现低于经典线性模型的期望均方误差;(2) 当上下文长度趋于无穷时,LSA渐近恢复最优线性预测器;(3) 在链式思维(CoT)推理下,预测结果呈指数级坍缩至均值。通过精心设计的实验验证了这些发现。本理论不仅解释了若干未被充分探讨的现象,还为设计更有效的预测架构提供了实践启示。我们希望该工作能促使研究社区重新审视时间序列预测的基础理论局限,并审慎评估复杂架构的直接应用。

原文摘要 · Abstract (English)

Time series forecasting (TSF) remains a challenging and largely unsolved problem in machine learning, despite significant recent efforts leveraging Large Language Models (LLMs), which predominantly rely on Transformer architectures. Empirical evidence consistently shows that even powerful Transformers often fail to outperform much simpler models, e.g., linear models, on TSF tasks; however, a rigorous theoretical understanding of this phenomenon remains limited. In this paper, we provide a theoretical analysis of Transformers' limitations for TSF through the lens of In-Context Learning (ICL) theory. Specifically, under AR($p$) data, we establish that: (1) Linear Self-Attention (LSA) models $\textit{cannot}$ achieve lower expected MSE than classical linear models for in-context forecasting; (2) as the context length approaches to infinity, LSA asymptotically recovers the optimal linear predictor; and (3) under Chain-of-Thought (CoT) style inference, predictions collapse to the mean exponentially. We empirically validate these findings through carefully designed experiments. Our theory not only sheds light on several previously underexplored phenomena but also offers practical insights for designing more effective forecasting architectures. We hope our work encourages the broader research community to revisit the fundamental theoretical limitations of TSF and to critically evaluate the direct application of increasingly sophisticated architectures without deeper scrutiny.

时间序列Transformer理论分析上下文学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。