A Time Series is Worth 64 Words: Long-term Forecasting with Transformers

Yuqi Nie, Nam H. Nguyen, Phanwadee Sinthong, Jayant Kalagnanam
11/27/2022
cs.LGcs.AI

Official code: yuqinie98/PatchTST (2,709 stars, Apache-2.0, last commit 2024-08-12).

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.

View on arXivView PDF

Code Implementations(1)

yuqinie98/PatchTSTOfficial100%
Apache-2.0

An offical implementation of PatchTST: "A Time Series is Worth 64 Words: Long-term Forecasting with Transformers." (ICLR 2023) https://arxiv.org/abs/2211.14730

2,709452Shell, PythonOct 25, 20222 years agoApache-2.0

Similar Papers

Cite this paper

@article{nie2022time,
  title  = {A Time Series is Worth 64 Words: Long-term Forecasting with Transformers},
  author = {Yuqi Nie and Nam H. Nguyen and Phanwadee Sinthong and Jayant Kalagnanam},
  year   = {2022},
  eprint = {2211.14730},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.14730}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2211.14730.svg)](https://codeofpaper.com/paper/2211.14730)

Discussion