arXiv:2510.06680cs.LG2025-10被引 9

TimeFormer通过时间特性改进注意力机制,提升时序预测精度。

TimeFormer: Transformer with Attention Modulation Empowered by Temporal Characteristics for Time Series Forecasting

  • 引入时间衰减与单向影响先验,设计双调制自注意力机制。
  • 在多个数据集上将均方误差降低最多7.45%,94%指标达新基准。
  • 适用于各类时序预测任务,可通用增强其他Transformer模型。

尽管Transformer在自然语言处理中表现优异,但其在时序预测中的应用仍面临挑战,主要源于对文本与时间模态差异考虑不足。本文提出针对时序数据的新型Transformer架构TimeFormer,旨在最大化其表征能力。我们识别出时序数据两个常被忽视的特性:(1) 过去对未来的单向影响;(2) 影响随时间衰减。基于此,提出带有双重调制项(MoSA)的自注意力机制,结合霍克斯过程约束与因果掩码,有效捕捉时序先验。此外,引入多尺度子序列分析框架,以捕获不同时间尺度上的语义依赖关系,丰富时序建模。在多个真实世界数据集上的大量实验表明,TimeFormer显著优于现有先进方法,相较最优基线最高降低7.45%的均方误差(MSE),并在94.04%的评估指标上刷新记录。同时证明,MoSA机制可广泛用于提升其他基于Transformer的模型性能。

原文摘要 · Abstract (English)

Although Transformers excel in natural language processing, their extension to time series forecasting remains challenging due to insufficient consideration of the differences between textual and temporal modalities. In this paper, we develop a novel Transformer architecture designed for time series data, aiming to maximize its representational capacity. We identify two key but often overlooked characteristics of time series: (1) unidirectional influence from the past to the future, and (2) the phenomenon of decaying influence over time. These characteristics are introduced to enhance the attention mechanism of Transformers. We propose TimeFormer, whose core innovation is a self-attention mechanism with two modulation terms (MoSA), designed to capture these temporal priors of time series under the constraints of the Hawkes process and causal masking. Additionally, TimeFormer introduces a framework based on multi-scale and subsequence analysis to capture semantic dependencies at different temporal scales, enriching the temporal dependencies. Extensive experiments conducted on multiple real-world datasets show that TimeFormer significantly outperforms state-of-the-art methods, achieving up to a 7.45% reduction in MSE compared to the best baseline and setting new benchmarks on 94.04\% of evaluation metrics. Moreover, we demonstrate that the MoSA mechanism can be broadly applied to enhance the performance of other Transformer-based models.

时序预测Transformer注意力机制时间衰减

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