All models

TSLib NonstationaryTransformer

A forecasting Transformer that normalizes each series and feeds its removed statistics back into attention.

Time series · 181 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (15 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
2M
Operations
181
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2022
Cited by
620 (as of 23 October 2026)
Authors
Yong Liu, Haixu Wu, Jianmin Wang, Mingsheng Long
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m3039
Graph hash
ba8dabc5c7b878400b8ca6e04877c77f6b7ff810dd5693604a9fca750bb871d9
Skeleton hash
3d9af20d753b789fc8b536991d33b9928589df50c28c03b2acc17d75b2f9cbf5
Architecture hash
24e5da6d679bdb37743674939535eea81d76eb7c35e5bb33e2c4c0ad1613138d
Diagram SHA-256
c1efaadeebe8ec74f966b44fc69caaa1bbf43c142be04b5438cb330e3f0faeb6
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Non-stationary Transformer is a time series forecasting Transformer built for non-stationary real-world data, in which the joint distribution changes over time. Earlier work normalized each series to make it more predictable, but the paper observes that Transformers trained on such stationarized series tend to generate indistinguishable attentions for different series. The paper names this problem over-stationarization.

The framework involves two interdependent modules, Series Stationarization and De-stationary Attention. Series Stationarization normalizes each input series and de-normalizes the output, unifying the key statistics of each series without extra parameters. De-stationary Attention replaces self-attention: a multilayer perceptron projector learns de-stationary factors, a scaling scalar and a shifting vector, from the statistics of the series before normalization, and these rescale the attention scores. The factors are shared by the De-stationary Attention of all layers.

This model is the canonical form, in which the vanilla Transformer is wrapped by Series Stationarization at input and output and its self-attention is replaced by De-stationary Attention. The paper evaluates the framework on six real-world benchmarks: Electricity, ETT, Exchange, ILI, Traffic and Weather. It reports that the framework reduces MSE by 49.43% on Transformer, 47.34% on Informer and 46.89% on Reformer.

Key idea. Non-stationary Transformers pair Series Stationarization, which normalizes inputs and restores output statistics, with De-stationary Attention, which brings the removed non-stationary information back into the attention calculation.

  • non-stationary transformer
  • nonstationary transformer
  • non-stationary transformers
  • de-stationary attention
  • series stationarization
  • over-stationarization
  • time series forecasting
  • non-stationary time series

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

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