
Non-stationary Transformers:
Exploring the Stationarity in Time Series Forecasting
Yong Liu
∗
, Haixu Wu
∗
, Jianmin Wang, Mingsheng Long
B
School of Software, BNRist, Tsinghua University, China
{liuyong21,whx20}@mails.tsinghua.edu.cn, {jimwang,mingsheng}@tsinghua.edu.cn
Abstract
Transformers have shown great power in time series forecasting due to their
global-range modeling ability. However, their performance can degenerate ter-
ribly on non-stationary real-world data in which the joint distribution changes
over time. 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 statis-
tics 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.
1 Introduction
Time series forecasting has become increasingly ubiquitous in real-world applications, such as weather
forecasting, energy consumption planning, and financial risk assessment. Recently, Transformers [
34
]
have achieved progressive breakthrough on extensive areas [
12
,
13
,
10
,
24
]. Especially in time
series forecasting, credited to their stacked structure and the capability of attention mechanisms,
Transformers can naturally capture the temporal dependencies from deep multi-level features [
39
,
19
,
22, 37], thereby fitting the series forecasting task perfectly.
Despite the remarkable architectural design, it is still challenging for Transformers to predict real-
world time series because of the non-stationarity of data. Non-stationary time series is characterized
by the continuous change of statistical properties and joint distribution over time, which makes
the time series less predictable [
6
,
16
]. Besides, it is a fundamental problem to make deep models
generalize well on a varying distribution [
28
,
21
,
5
]. In previous work, it is generally acknowledged
to pre-process the time series by stationarization [
26
,
29
,
17
], which can attenuate the non-stationarity
of raw time series for better predictability and provide more stable data distribution for deep models.
∗
Equal Contribution
36th Conference on Neural Information Processing Systems (NeurIPS 2022).
arXiv:2205.14415v3 [cs.LG] 18 Oct 2022
评论