[论文解读] Leveraging 2D Information for Long-term Time Series Forecasting with Vanilla Transformers
GridTST 提出了一种基于普通 Transformer 的模型,将多变量时间序列视为二维网格,利用水平注意力捕捉时间依赖性,利用垂直的、与变量相关的注意力捕捉变量间相关性。通过在时间与变量维度上联合建模,采用双向注意力机制,GridTST 在多种长期预测基准上实现了最先进性能。
Time series prediction is crucial for understanding and forecasting complex dynamics in various domains, ranging from finance and economics to climate and healthcare. Based on Transformer architecture, one approach involves encoding multiple variables from the same timestamp into a single temporal token to model global dependencies. In contrast, another approach embeds the time points of individual series into separate variate tokens. The former method faces challenges in learning variate-centric representations, while the latter risks missing essential temporal information critical for accurate forecasting. In our work, we introduce GridTST, a model that combines the benefits of two approaches using innovative multi-directional attentions based on a vanilla Transformer. We regard the input time series data as a grid, where the $x$-axis represents the time steps and the $y$-axis represents the variates. A vertical slicing of this grid combines the variates at each time step into a extit{time token}, while a horizontal slicing embeds the individual series across all time steps into a extit{variate token}. Correspondingly, a extit{horizontal attention mechanism} focuses on time tokens to comprehend the correlations between data at various time steps, while a extit{vertical}, variate-aware extit{attention} is employed to grasp multivariate correlations. This combination enables efficient processing of information across both time and variate dimensions, thereby enhancing the model's analytical strength. % We also integrate the patch technique, segmenting time tokens into subseries-level patches, ensuring that local semantic information is retained in the embedding. The GridTST model consistently delivers state-of-the-art performance across various real-world datasets.
研究动机与目标
- 解决现有基于 Transformer 的时间序列模型在变量特异性表征利用不足或忽略时间动态性方面的局限性。
- 克服在多变量时间序列中同时捕捉全局时间依赖性与学习有效变量中心表示之间的权衡。
- 开发一种方法,通过统一的普通 Transformer 架构,高效地同时建模时间与变量维度。
- 通过利用 BetterTransformer 和 FlashAttention 等现有优化生态系统,实现可扩展的、硬件兼容的推理。
- 在长期预测任务中,证明模型在不同数据集和任意回溯窗口长度下的泛化能力。
提出的方法
- 将输入时间序列表示为二维网格,时间步沿 x 轴排列,变量沿 y 轴排列。
- 通过垂直切片,将每个时间步的所有变量组合形成时间标记;通过水平切片,将单个序列在所有时间步上的聚合形成变量标记。
- 实现水平注意力,以建模不同时间戳之间时间标记间的相关性,捕捉时间动态性。
- 引入垂直的、与变量相关的注意力,以建模每个时间步上多个变量之间的相互依赖性。
- 借鉴视觉 Transformer 中的 Patching 技术,从子序列级别的补丁中提取局部语义模式。
- 利用标准前馈网络,从时间感知与变量感知特征中学习可泛化的联合表征。

实验结果
研究问题
- RQ1普通 Transformer 架构能否有效建模长期时间序列预测中的时间与多变量依赖性?
- RQ2结合水平与垂直注意力的双向注意力机制,相比单向方法,如何提升预测性能?
- RQ3GridTST 在不同数据集、变量及回溯窗口长度上的泛化能力如何?
- RQ4通过变量采样策略,模型能否在降低训练内存与延迟的同时保持高性能?
- RQ5在准确性、可扩展性与部署效率方面,GridTST 与最先进模型相比表现如何?
主要发现
- GridTST 在多个真实世界数据集(包括 ETTh1、ETTm1、Electricity 和 Traffic)上实现了最先进性能,且在所有基线模型上均保持一致的性能提升。
- 通道优先的注意力结构优于其他配置,在不同数据集与预测时长下的 16 项指标中,有 12 项达到最佳结果。
- 在 ETTh1 数据集、720 步预测时长下,GridTST 的 MAE 达到 0.451,优于所有基线模型,包括 iTransformer 和 TST。
- 模型展现出强大的可扩展性:借助 BetterTransformer,对于长序列(4096 个标记),GPU 上的推理速度提升达 2.62 倍,CPU 上达 1.20 倍。
- 变量采样训练策略在保持与全批量训练相当性能的同时,显著降低内存使用与训练延迟。
- 消融研究证实,水平与垂直注意力机制均不可或缺,其组合在多样化设置下表现出最稳健的性能。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。