← Open Source
thuml

Nonstationary_Transformers

Code release for "Non-stationary Transformers: Exploring the Stationarity in Time Series Forecasting" (NeurIPS 2022), https://arxiv.org/abs/2205.14415.

Model DevelopmentArchitecturePython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
567
Stars
102
Forks
+0
This week
1
Contributors
Created 2022-09-30 · Updated 2026-10-01 · #16894 today
Top developers

thuml/Nonstationary_Transformers is ranked 16,894 with 567 stars.

Same-category comparison

thuml/Nonstationary_Transformers is ranked 16,894 among these 8 peers; suriyadeepan/practical_seq2seq is ranked 16,893.

Same-category comparison
NameRankMetrics
assafshocher/ResizeRight16,886
Language:
Python
Stars:
567
Forks:
52
Description:
The correct way to resize images or tensors. For Numpy or Pytorch (differentiable).
google-research-datasets/conceptual-captions16,890
Language:
Shell
Stars:
567
Forks:
25
Description:
Conceptual Captions is a dataset containing (image-URL, caption) pairs designed for the training and evaluation of machine learned image captioning systems.
hkchengrex/STCN16,891
Language:
Python
Stars:
567
Forks:
73
Description:
[NeurIPS 2021] Rethinking Space-Time Networks with Improved Memory Coverage for Efficient Video Object Segmentation.
suriyadeepan/practical_seq2seq16,893
Language:
Jupyter Notebook
Stars:
567
Forks:
263
Description:
A simple, minimal wrapper for tensorflow's seq2seq module, for experimenting with datasets rapidly.
cszn/FFDNet16,901
Language:
MATLAB
Stars:
566
Forks:
135
Description:
FFDNet: Toward a Fast and Flexible Solution for CNN based Image Denoising (TIP, 2018).
jhoffman/cycada_release16,905
Language:
Python
Stars:
566
Forks:
128
Description:
Code to accompany ICML 2018 paper.
katerakelly/pytorch-maml16,906
Language:
Jupyter Notebook
Stars:
566
Forks:
123
Description:
PyTorch implementation of MAML: https://arxiv.org/abs/1703.03400.
linkedin/FastTreeSHAP16,907
Language:
Python
Stars:
566
Forks:
38
Description:
Fast SHAP value computation for interpreting tree-based models.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryModel Development
SubcategoryArchitecture
KeywordsTimeseries
Stars567
Forks102
Contributors1
Created date2022-09-30
Updated date2026-10-01
Stars in 1 day0
Stars in 7 days0
Rank16,894
Previous rank16,687
Rank change-207
7-day stars rank15,791
Previous 7-day stars rank15,797
7-day stars rank change6
Total stars rank17,568
Previous total stars rank17,540
Total stars rank change-28
CountryChina
README summary

Non-stationary Transformers This is the codebase for the paper: Non-stationary Transformers: Exploring the Stationarity in Time Series Forecasting, NeurIPS 2022. [[Slides]]( [[Poster]]( :triangular_flag_on_post: **News** (2023. 02) Non-stationary Transformer has been included in [[Time-Series-Library]]( which covers long- and short-term forecasting, imputation, anomaly detection, and classification. Discussions There are already several discussions about our paper, we appreciate a lot for their valuable comments and efforts: [[Official]]( [[OpenReview]]( [[Zhihu]]( Architecture Series Stationarization Series Stationarization

unifies the statistics of each input and converts the output with restored statistics for better predictability. De-stationary Attention De-stationary Attention is devised to recover the intrinsic non-stationary information into temporal dependencies by approximating distinguishable attentions learned from unstationarized series. All the six benchmark datasets can be obtained from Google Drive or Tsinghua Cloud. Training scripts Non-stationary Transformer We provide the Non-stationary Transformer experiment scripts and hyperparameters of all benchmark dataset under the folder . Non-stationary

framework to promote other Attention-based models We also provide the scripts for other Attention-based models (Informer, Autoformer), for example: Experiment Results Main Results For multivariate forecasting results, the vanilla Transformer equipped with our framework consistently achieves state-of-the-art performance in all six benchmarks and prediction lengths. Model Promotion By applying our framework to six mainstream Attention-based models. Our method consistently improves the forecasting ability. 51%** on FEDformer, making each of them surpass previous state-of

-the-art. Future Work We will keep equip the following models with our proposed Non-stationary Transformers framework: [x] Transformer [x] iTransformer [x] Informer [x] Autoformer [x] FEDformer [x] Crossformer [x] Reformer [x] . Note: Series Stationarization as an architecture-free module has been widely applied for addressing non-stationarity in time series. Please refer to time-series-library for the implementationdetails. Citation If you find this repo useful, please cite our paper. Contact If you have any questions or want

to use the code, please contact liuyong21@mails. Acknowledgement This repo is built on the Autoformer repo, we appreciate the authors a lot for their valuable code and efforts.

Frequently asked questions

How many stars and forks are recorded?

thuml/Nonstationary_Transformers has 567 stars and 102 forks.

What is the repository rank?

thuml/Nonstationary_Transformers is ranked 16,894.

What language and category are recorded?

thuml/Nonstationary_Transformers has 567 stars, uses Python and belongs to Model Development.

Which repository is closest in rank?

thuml/Nonstationary_Transformers is compared with suriyadeepan/practical_seq2seq, ranked 16,893 with 567 stars.

README

Non-stationary Transformers

This is the codebase for the paper: Non-stationary Transformers: Exploring the Stationarity in Time Series Forecasting, NeurIPS 2022. [Slides], [Poster].

:triangular_flag_on_post: News (2023.02) Non-stationary Transformer has been included in [Time-Series-Library], which covers long- and short-term forecasting, imputation, anomaly detection, and classification.

Discussions

There are already several discussions about our paper, we appreciate a lot for their valuable comments and efforts: [Official], [OpenReview], [Zhihu].

Architecture

Series Stationarization

Series Stationarization unifies the statistics of each input and converts the output with restored statistics for better predictability.

De-stationary Attention

De-stationary Attention is devised to recover the intrinsic non-stationary information into temporal dependencies by approximating distinguishable attentions learned from unstationarized series.

Showcases

Preparation

  1. Install Python 3.7 and neccessary dependencies.
pip install -r requirements.txt
  1. All the six benchmark datasets can be obtained from Google Drive or Tsinghua Cloud.

Training scripts

Non-stationary Transformer

We provide the Non-stationary Transformer experiment scripts and hyperparameters of all benchmark dataset under the folder ./scripts.

# Transformer with our framework
bash ./scripts/ECL_script/ns_Transformer.sh
bash ./scripts/Traffic_script/ns_Transformer.sh
bash ./scripts/Weather_script/ns_Transformer.sh
bash ./scripts/ILI_script/ns_Transformer.sh
bash ./scripts/Exchange_script/ns_Transformer.sh
bash ./scripts/ETT_script/ns_Transformer.sh
# Transformer baseline
bash ./scripts/ECL_script/Transformer.sh
bash ./scripts/Traffic_script/Transformer.sh
bash ./scripts/Weather_script/Transformer.sh
bash ./scripts/ILI_script/Transformer.sh
bash ./scripts/Exchange_script/Transformer.sh
bash ./scripts/ETT_script/Transformer.sh

Non-stationary framework to promote other Attention-based models

We also provide the scripts for other Attention-based models (Informer, Autoformer), for example:

# Informer promoted by our Non-stationary framework
bash ./scripts/Exchange_script/Informer.sh
bash ./scripts/Exchange_script/ns_Informer.sh

# Autoformer promoted by our Non-stationary framework
bash ./scripts/Weather_script/Autoformer.sh
bash ./scripts/Weather_script/ns_Autoformer.sh

Experiment Results

Main Results

For multivariate forecasting results, the vanilla Transformer equipped with our framework consistently achieves state-of-the-art performance in all six benchmarks and prediction lengths.

Model Promotion

By applying our framework to six mainstream Attention-based models. Our method consistently improves the forecasting ability. Overall, it achieves averaged 49.43% promotion on Transformer, 47.34% on Informer, 46.89% on Reformer, 10.57% on Autoformer, 5.17% on ETSformer and 4.51% on FEDformer, making each of them surpass previous state-of-the-art.

Future Work

We will keep equip the following models with our proposed Non-stationary Transformers framework:

  • [x] Transformer
  • [x] iTransformer
  • [x] Informer
  • [x] Autoformer
  • [x] FEDformer
  • [x] Crossformer
  • [x] Reformer
  • [x] ......

Note: Series Stationarization as an architecture-free module has been widely applied for addressing non-stationarity in time series. Please refer to time-series-library for the implementationdetails.

Citation

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

@article{liu2022non,
  title={Non-stationary Transformers: Exploring the Stationarity in Time Series Forecasting},
  author={Liu, Yong and Wu, Haixu and Wang, Jianmin and Long, Mingsheng},
  booktitle={Advances in Neural Information Processing Systems},
  year={2022}
}

Contact

If you have any questions or want to use the code, please contact liuyong21@mails.tsinghua.edu.cn.

Acknowledgement

This repo is built on the Autoformer repo, we appreciate the authors a lot for their valuable code and efforts.

Nearby in the ranking
Similar items