All models

SageFormer (Graph-enhanced Transformer)

A Transformer forecaster for multivariate time series that links the series through a learned graph.

Time series · 124 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 (11 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
8M
Operations
124
Framework
PyTorch
Recurrent
No
Published
IEEE Internet of Things Journal 2024
Cited by
96 (as of 24 October 2026)
Authors
Zhenwei Zhang, Linghang Meng, Yuantao Gu
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
m20240
Graph hash
1cf50af19f5be793ea421d63725cf0c4c09ccb770a039e226a1d6c04fbe68824
Skeleton hash
7b2033ecd773e8d0a6eaba85d61ce1ed8f4d3c3399421d33e9d5c0f13026fc50
Architecture hash
1938b3304f6cfb39f84df6961efe119757c47353bab53ff318ecddaad6093f30
Diagram SHA-256
e516efb8e5617c7a1edc047a755bfef494c2c3597512abb2f17837ea5e844e74
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

SageFormer is a Transformer for long-term forecasting of multivariate time series that also models how the individual series depend on one another. The paper places it between two existing designs. Models that mix all series into one temporal embedding do not model inter-series dependencies explicitly, and series-independent models leave those dependencies out altogether.

The mechanism is a set of learnable global tokens placed in front of each series' input tokens. In every layer the global tokens of all series are gathered and passed through a graph neural network, then returned to their own series, where self-attention spreads the information to the other tokens. The graph is not supplied by hand: the adjacency matrix is learned end-to-end, without prior knowledge of how the series relate. The overall structure is a Transformer encoder, and a linear head replaces the usual Transformer decoder.

The experiments cover Weather, Traffic, Electricity, ILI and four ETT datasets, plus two synthetic ones. The authors report their largest gains on datasets with many series, naming Traffic with 862 predictive variables and Electricity with 321.

Key idea. SageFormer adds learnable global tokens to each series and passes them through a learned graph, so a Transformer forecaster can model dependencies between series as well as within them.

  • sageformer
  • series-aware framework
  • series-aware graph-enhanced transformer
  • multivariate time series forecasting
  • long-term forecasting
  • inter-series dependencies
  • global tokens
  • graph structure learning

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

Cite the paper

@misc{zhang2024sageformerseriesawareframeworklongterm,
      title={SageFormer: Series-Aware Framework for Long-term Multivariate Time Series Forecasting}, 
      author={Zhenwei Zhang and Linghang Meng and Yuantao Gu},
      year={2024},
      eprint={2307.01616},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      doi={https://doi.org/10.1109/JIOT.2024.3363451},
      url={https://arxiv.org/abs/2307.01616}, 
}