arXiv:2602.08983cs.LGcs.AI2026-02被引 1

提出可自适应扭曲时间的注意力机制,提升复杂动态预测精度

StretchTime: Adaptive Time Series Forecasting via Symplectic Attention

  • 基于哈密顿力学设计新型时间编码SyPE,突破传统位置编码局限
  • 在多个基准数据集上达到当前最优性能,尤其擅长非平稳时间序列
  • 适合处理金融、生物等具有弹性周期的真实世界时序数据

Transformer架构在时序预测中表现优异,但普遍依赖假设时间均匀推进的位置编码。然而,真实系统如金融周期波动、生物节律变化常呈现“时间扭曲”现象,即时间流与采样索引脱节。本文首次形式化这一错配,并证明旋转位置编码(RoPE)无法表示非仿射时间扭曲。为此,我们提出对称性位置编码(SyPE),其源自哈密顿力学,将旋转群SO(2)扩展至辛群Sp(2,R),并引入输入相关的自适应扭曲模块。该机制使注意力能端到端地自适应拉伸或压缩时间坐标,捕捉局部变化的周期性,无需预设扭曲函数。我们在StretchTime中实现此机制,在标准基准上达到顶尖性能,尤其在非平稳时序数据上表现出更强鲁棒性。

原文摘要 · Abstract (English)

Transformer architectures have established strong baselines in time series forecasting, yet they typically rely on positional encodings that assume uniform, index-based temporal progression. However, real-world systems, from shifting financial cycles to elastic biological rhythms, frequently exhibit "time-warped" dynamics where the effective flow of time decouples from the sampling index. In this work, we first formalize this misalignment and prove that rotary position embedding (RoPE) is mathematically incapable of representing non-affine temporal warping. To address this, we propose Symplectic Positional Embeddings (SyPE), a learnable encoding framework derived from Hamiltonian mechanics. SyPE strictly generalizes RoPE by extending the rotation group $\mathrm{SO}(2)$ to the symplectic group $\mathrm{Sp}(2,\mathbb{R})$, modulated by a novel input-dependent adaptive warp module. By allowing the attention mechanism to adaptively dilate or contract temporal coordinates end-to-end, our approach captures locally varying periodicities without requiring pre-defined warping functions. We implement this mechanism in StretchTime, a multivariate forecasting architecture that achieves state-of-the-art performance on standard benchmarks, demonstrating superior robustness on datasets exhibiting non-stationary temporal dynamics.

时间序列注意力机制动态建模

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