Non-stationary Transformers: Exploring the Stationarity in Time Series Forecasting

Yong Liu, Haixu Wu, Jianmin Wang, Mingsheng Long
5/28/2022
1,148 citations
cs.LGeess.SP
transformer-attention

Official code: thuml/Nonstationary_Transformers (568 stars, Python, MIT, last commit 2024-08-19). Most starred: WenjieDu/PyPOTS, a community implementation (2,093 stars, Python, BSD-3-Clause, PyTorch, last commit 2026-05-04, 3.7× the official stars). 1 more implementation below.

Abstract

Transformers have shown great power in time series forecasting due to their global-range modeling ability. However, their performance can degenerate terribly on non-stationary real-world data in which the joint distribution changes over time.

Show full abstract

Previous studies primarily adopt stationarization to attenuate the non-stationarity of original series for better predictability. But the stationarized series deprived of inherent non-stationarity can be less instructive for real-world bursty events forecasting. This problem, termed over-stationarization in this paper, leads Transformers to generate indistinguishable temporal attentions for different series and impedes the predictive capability of deep models. To tackle the dilemma between series predictability and model capability, we propose Non-stationary Transformers as a generic framework with two interdependent modules: Series Stationarization and De-stationary Attention. Concretely, Series Stationarization unifies the statistics of each input and converts the output with restored statistics for better predictability. To address the over-stationarization problem, De-stationary Attention is devised to recover the intrinsic non-stationary information into temporal dependencies by approximating distinguishable attentions learned from raw series. Our Non-stationary Transformers framework consistently boosts mainstream Transformers by a large margin, which reduces MSE by 49.43% on Transformer, 47.34% on Informer, and 46.89% on Reformer, making them the state-of-the-art in time series forecasting. Code is available at this repository: https://github.com/thuml/Nonstationary_Transformers.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
thuml/Nonstationary_TransformersOfficial568PythonMIT2024-08-19
WenjieDu/PyPOTSCommunity2,093PythonBSD-3-Clause2026-05-04
MIT

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

568103Python, ShellSep 30, 20222 years agoMIT
deep-learningforecastingnon-stationarytime-series
WenjieDu/PyPOTSCommunity100%
PyTorchBSD-3-Clause

A Python toolkit/library for reality-centric machine/deep learning & data mining on partially-observed time series, with 50+ SOTA neural network models for scientific analysis tasks (imputation, classification, clustering, forecasting, anomaly detection, cleaning) on incomplete industrial irregularly-sampled multivariate TS with NaN missing values

2,093195Python, ShellMar 29, 20227 months agoBSD-3-Clause
anomaly-detectionclassificationclusteringdata-analysisdata-mining+10 more

Similar Papers

Cite this paper

@article{liu2022nonstationary,
  title  = {Non-stationary Transformers: Exploring the Stationarity in Time Series Forecasting},
  author = {Yong Liu and Haixu Wu and Jianmin Wang and Mingsheng Long},
  year   = {2022},
  eprint = {2205.14415},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.14415}
}

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/2205.14415.svg)](https://codeofpaper.com/paper/2205.14415)

Discussion