/TimesNet

About Code release for "TimesNet: Temporal 2D-Variation Modeling for General Time Series Analysis" (ICLR 2023), https://openreview.net/pdf?id=ju_Uqw384Oq

MIT LicenseMIT

🚩 The complete code and scripts of TimesNet have been included in [Time-Series-Library].

🚩 The complete code and scripts of TimesNet have been included in [Time-Series-Library].

🚩 The complete code and scripts of TimesNet have been included in [Time-Series-Library].

TimesNet: Temporal 2D-Variation Modeling for General Time Series Analysis [ICLR 2023]

In this paper, we present TimesNet as a powerful foundation model for general time series analysis, which can

  • 🏆 Achieve the consistent state-of-the-art in five main-stream tasks: Long- and Short-term Forecasting, Imputation, Anomaly Detection and Classification.
  • 🌟 Directly take advantage of booming vision backbones by transforming the 1D time series into 2D space.

Temporal 1D-Variation vs. 2D-Variation

Temporal variation modeling is the common key problem of extensive analysis tasks. Previous methods attempt to accomplish this directly from the 1D time series, which is extremely challenging due to the intricate temporal patterns. Based on the observation of multi-periodicity in time series, we present the TimesNet to transform the origianl 1D-timeseries into 2D Space, which can unfiy the intraperiod- and interperiod-variations.

General Representation Learning Capacity

To demonstrate the model capacity in representation learning, we calculate the CKA similarity between representations from the bottom and top layer of each model. A smaller CKA similarity means that the representations of bottom and top layer are more distinct, indicating the hierarchical representations. From this representation analysis, We find that:

  • Forecasting and anomaly detection tasks require the low-level representations.
  • Imputation and classification tasks expect the hierarchical representations.

Benefiting from 2D kernel design, TimesNet (marked by red stars) can learn appropriate representations for different tasks, demonstrating its task generality as a foundation model.

Leaderboard for Time Series Analysis

In this paper, we also provide a comprehensive benchmark to evaluate different backbones. More than 15 advanced baselines are compared. Till February 2023, the top three models for five different tasks are:

Model
Ranking
Long-term
Forecasting
Short-term
Forecasting
Imputation Classification Anomaly
Detection
🥇 1st TimesNet TimesNet TimesNet TimesNet TimesNet
🥈 2nd DLinear Non-stationary
Transformer
Non-stationary
Transformer
Non-stationary
Transformer
FEDformer
🥉 3rd Non-stationary
Transformer
FEDformer Autoformer Informer Autoformer

See our paper for the comprehensive benchmark.

Citation

If you find this repo useful, please cite our paper.

@inproceedings{wu2023timesnet,
  title={TimesNet: Temporal 2D-Variation Modeling for General Time Series Analysis},
  author={Haixu Wu and Tengge Hu and Yong Liu and Hang Zhou and Jianmin Wang and Mingsheng Long},
  booktitle={International Conference on Learning Representations},
  year={2023},
}

Contact

If you have any questions, please contact wuhx23@mails.tsinghua.edu.cn.

Acknowledgement

We appreciate the following github repos for their valuable codebase: