HyperAIHyperAI

Command Palette

Search for a command to run...

5 months ago

Are Transformers Effective for Time Series Forecasting?

Ailing Zeng; Muxi Chen; Lei Zhang; Qiang Xu

Are Transformers Effective for Time Series Forecasting?

Abstract

Recently, there has been a surge of Transformer-based solutions for the long-term time series forecasting (LTSF) task. Despite the growing performance over the past few years, we question the validity of this line of research in this work. Specifically, Transformers is arguably the most successful solution to extract the semantic correlations among the elements in a long sequence. However, in time series modeling, we are to extract the temporal relations in an ordered set of continuous points. While employing positional encoding and using tokens to embed sub-series in Transformers facilitate preserving some ordering information, the nature of the \emph{permutation-invariant} self-attention mechanism inevitably results in temporal information loss. To validate our claim, we introduce a set of embarrassingly simple one-layer linear models named LTSF-Linear for comparison. Experimental results on nine real-life datasets show that LTSF-Linear surprisingly outperforms existing sophisticated Transformer-based LTSF models in all cases, and often by a large margin. Moreover, we conduct comprehensive empirical studies to explore the impacts of various design elements of LTSF models on their temporal relation extraction capability. We hope this surprising finding opens up new research directions for the LTSF task. We also advocate revisiting the validity of Transformer-based solutions for other time series analysis tasks (e.g., anomaly detection) in the future. Code is available at: \url{https://github.com/cure-lab/LTSF-Linear}.

Code Repositories

jafarbakhshaliyev/wave-augs
pytorch
Mentioned in GitHub
cure-lab/ltsf-linear
pytorch
Mentioned in GitHub
Hannibal046/GridTST
pytorch
Mentioned in GitHub
taohan10200/weather-5k
pytorch
Mentioned in GitHub
remigenet/TLN
jax
Mentioned in GitHub
honeywell21/DLinear
pytorch
Mentioned in GitHub
master-plc/fredf
pytorch
Mentioned in GitHub
cure-lab/DLinear
pytorch
Mentioned in GitHub
WenjieDu/PyPOTS
Official
pytorch
ioannislivieris/dlinear
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
time-series-forecasting-on-electricity-192DLinear
MSE: 0.153
time-series-forecasting-on-electricity-336DLinear
MSE: 0.169
time-series-forecasting-on-electricity-720DLinear
MSE: 0.203
time-series-forecasting-on-electricity-96DLinear
MSE: 0.14
time-series-forecasting-on-etth1-192-1DLinear
MAE: 0.416
MSE: 0.405
time-series-forecasting-on-etth1-192-1NLinear
MAE: 0.415
MSE: 0.408
time-series-forecasting-on-etth1-192-2DLinear
MAE: 0.204
MSE: 0.071
time-series-forecasting-on-etth1-336-1NLinear
MAE: 0.427
MSE: 0.429
time-series-forecasting-on-etth1-336-1DLinear
MAE: 0.443
MSE: 0.439
time-series-forecasting-on-etth1-336-2NLinear
MAE: 0.226
MSE: 0.081
time-series-forecasting-on-etth1-336-2DLinear
MAE: 0.244
MSE: 0.098
time-series-forecasting-on-etth1-720-1DLinear
MAE: 0.49
MSE: 0.472
time-series-forecasting-on-etth1-720-1NLinear
MAE: 0.453
MSE: 0.44
time-series-forecasting-on-etth1-720-2DLinear
MAE: 0.359
MSE: 0.189
time-series-forecasting-on-etth1-720-2NLinear
MAE: 0.226
MSE: 0.08
time-series-forecasting-on-etth1-96-2DLinear
MAE: 0.18
MSE: 0.056
time-series-forecasting-on-etth1-96-2NLinear
MAE: 0.177
MSE: 0.053
time-series-forecasting-on-etth2-192-1DLinear
MAE: 0.418
MSE: 0.383
time-series-forecasting-on-etth2-192-1NLinear
MAE: 0.381
MSE: 0.344
time-series-forecasting-on-etth2-192-2NLinear
MAE: 0.324
MSE: 0.169
time-series-forecasting-on-etth2-192-2DLinear
MAE: 0.329
MSE: 0.176
time-series-forecasting-on-etth2-336-1DLinear
MAE: 0.465
MSE: 0.448
time-series-forecasting-on-etth2-336-1NLinear
MAE: 0.4
MSE: 0.357
time-series-forecasting-on-etth2-336-2DLinear
MAE: 0.367
MSE: 0.209
time-series-forecasting-on-etth2-336-2NLinear
MAE: 0.355
MSE: 0.194
time-series-forecasting-on-etth2-720-1NLinear
MAE: 0.436
MSE: 0.394
time-series-forecasting-on-etth2-720-1DLinear
MAE: 0.551
MSE: 0.605
time-series-forecasting-on-etth2-720-2NLinear
MAE: 0.381
MSE: 0.225
time-series-forecasting-on-etth2-720-2DLinear
MAE: 0.426
MSE: 0.276
time-series-forecasting-on-etth2-96-1NLinear
MAE: 0.338
MSE: 0.277
time-series-forecasting-on-etth2-96-1DLinear
MAE: 0.353
MSE: 0.289
time-series-forecasting-on-etth2-96-2DLinear
MAE: 0.279
MSE: 0.131
time-series-forecasting-on-etth2-96-2NLinear
MAE: 0.278
MSE: 0.129
time-series-forecasting-on-weather-192DLinear
MSE: 0.22
time-series-forecasting-on-weather-336DLinear
MSE: 0.265
time-series-forecasting-on-weather-720DLinear
MSE: 0.323
time-series-forecasting-on-weather-96DLinear
MSE: 0.176

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
Are Transformers Effective for Time Series Forecasting? | Papers | HyperAI