SOTAVerified

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

2022-11-27Code Available5· sign in to hype

Yuqi Nie, Nam H. Nguyen, Phanwadee Sinthong, Jayant Kalagnanam

Code Available — Be the first to reproduce this paper.

Reproduce

Code

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.

Tasks

Benchmark Results

DatasetModelMetricClaimedVerifiedStatus
Electricity (192)PatchTST/64MSE0.15Unverified
Electricity (336)PatchTST/64MSE0.16Unverified
Electricity (720)PatchTST/64MSE0.2Unverified
Electricity (96)PatchTST/64MSE0.13Unverified
ETTh1 (192) MultivariatePatchTST/64MSE0.41Unverified
ETTh1 (192) UnivariatePatchTST/64MSE0.07Unverified
ETTh1 (336) MultivariatePatchTST/64MSE0.42Unverified
ETTh1 (336) UnivariatePatchTST/64MSE0.08Unverified
ETTh1 (720) MultivariatePatchTST/64MSE0.45Unverified
ETTh1 (720) UnivariatePatchTST/64MSE0.09Unverified
ETTh1 (96) MultivariatePatchTST/64MSE0.37Unverified
ETTh1 (96) UnivariatePatchTST/64MSE0.06Unverified
ETTh2 (192) MultivariatePatchTST/64MSE0.34Unverified
ETTh2 (192) UnivariatePatchTST/64MSE0.17Unverified
ETTh2 (336) MultivariatePatchTST/64MSE0.33Unverified
ETTh2 (336) UnivariatePatchTST/64MSE0.17Unverified
ETTh2 (720) MultivariatePatchTST/64MSE0.38Unverified
ETTh2 (720) UnivariatePatchTST/64MSE0.22Unverified
ETTh2 (96) MultivariatePatchTST/64MSE0.27Unverified
ETTh2 (96) UnivariatePatchTST/64MSE0.13Unverified
Weather (192)PatchTST/64MSE0.19Unverified
Weather (336)PatchTST/64MSE0.25Unverified
Weather (720)PatchTST/64MSE0.31Unverified
Weather (96)PatchTST/64MSE0.15Unverified

Reproductions