Skip to main content
QUICK REVIEW

[论文解读] A Time Series is Worth 64 Words: Long-term Forecasting with Transformers

Yuqi Nie, Nam Hoai Nguyen|arXiv (Cornell University)|Nov 27, 2022
Time Series Analysis and Forecasting被引用 534
一句话总结

PatchTST 引入时间序列打补丁与 Transformer 模型的通道无关性,以提升多变量时间序列的长期预测和自监督表征学习。

ABSTRACT

We propose an efficient design of Transformer-based models for multivariate time series forecasting and self-supervised representation learning. It is based on two key components: (i) segmentation of time series into subseries-level patches which are served as input tokens to Transformer; (ii) channel-independence where each channel contains a single univariate time series that shares the same embedding and Transformer weights across all the series. Patching design naturally has three-fold benefit: local semantic information is retained in the embedding; computation and memory usage of the attention maps are quadratically reduced given the same look-back window; and the model can attend longer history. Our channel-independent patch time series Transformer (PatchTST) can improve the long-term forecasting accuracy significantly when compared with that of SOTA Transformer-based models. We also apply our model to self-supervised pre-training tasks and attain excellent fine-tuning performance, which outperforms supervised training on large datasets. Transferring of masked pre-trained representation on one dataset to others also produces SOTA forecasting accuracy. Code is available at: https://github.com/yuqinie98/PatchTST.

研究动机与目标

  • 推动使用 Transformer 架构提升多变量时间序列的长期预测准确性。
  • 通过打补丁减少输入令牌来探索效率和内存方面的收益。
  • 研究将通道间的权重共享作为跨系列通道的通道独立性策略。
  • 展示通过打补丁级掩蔽实现的自监督表征学习以及迁移学习能力。

提出的方法

  • 将多变量时间序列分割为每个通道的单变量序列,共享嵌入层和 Transformer 权重(通道独立性)。
  • 将每个单变量序列分段为 patch 以形成输入令牌,将注意力复杂度从 O(N^2) 降低至类似 O((L/S)^2) 的行为。
  • 使用带有打补丁嵌入和位置编码的常规 Transformer 编码器来预测未来值。
  • 在打补丁之前对每个时间序列应用实例归一化以稳定分布。
  • 跨通道使用 MSE 损失进行训练,并使用融合头部来输出多步预测。
  • 对于自监督学习,掩蔽一部分 patch 并训练模型重构它们(无预测头)。
  • 在迁移学习场景中评估监督预测和自监督预训练。

实验结果

研究问题

  • RQ1与点对点令牌相比,基于打补丁的令牌化是否在时间序列 Transformer 中提升信息保留和预测准确性?
  • RQ2实施通道独立性(每通道令牌共享权重)是否改善多变量序列的可扩展性和性能?
  • RQ3自监督的 PatchTST 表征能否跨数据集迁移并超过有监督基线或其他基于 Transformer 的模型?
  • RQ4更长的历史窗口如何与打补丁交互,影响预测准确性和效率?

主要发现

  • PatchTST 在多个数据集上超过了最先进的 Transformer 基线,取得显著的准确性提升(例如 PatchTST/64 相较最佳 Transformer 基线的 MSE 降幅达 21.0%、MAE 降幅达 16.7%)。
  • 打补丁减少输入令牌以及注意力内存/计算量,使得可以使用更长的回顾窗口来改进预测(例如 L 从 96 增至 336,MSE 从 0.518 提升至 0.397)。
  • 通道独立性与打补丁结合,在多个数据集上提升性能并实现可扩展架构。
  • 自监督 PatchTST 提供了最先进的表征学习和迁移学习性能,通常超过在大数据集上进行的有监督训练。
  • 在一个数据集上进行预训练,再对其他数据集进行微调或迁移表征,相较从头训练可以保持或提高预测准确性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。