All models

time_series_transformer

A vanilla encoder-decoder Transformer with a distribution head for probabilistic forecasting.

Time series · 306 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 (18 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
119.7K
Operations
306
Framework
PyTorch
Recurrent
No
Published
2017
License
Apache-2.0
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
m10538
Graph hash
45d541dbcc7783b6396e1ccb42c0e490600c4e67224522bd0d82d6b2df164009
Skeleton hash
e4201237819375306011b5d91b8e4ebfee5342789a5f41efc72d545cbbd34de3
Architecture hash
d6accec413992a1aa43eda124d3863399b2f51d35a80bd632676336a8907e617
Diagram SHA-256
747b131e62f24124376509a5f2518aac01dec82252cbe8c2766771117fb8bed9
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

About this model's family

The Time Series Transformer is a vanilla encoder-decoder Transformer for time series forecasting. The base model is the raw Transformer without any head, and the prediction variant adds a distribution head on top so it can be used for forecasting. That makes it a probabilistic rather than point forecasting model: it learns a distribution from which one can sample, and does not directly output values. The encoder takes a context_length of past values, and the decoder predicts a prediction_length of values into the future.

Temporal features such as day of the month and month of the year serve as positional encodings for the Transformer encoder. Static categorical features, such as the store ID or region ID that identifies a series, can be attached as well. Training uses teacher-forcing, as a Transformer is trained for machine translation. At inference the model samples a prediction for the next time step and feeds it back to the decoder to make the next, which the docs call autoregressive generation.

Key idea. The Time Series Transformer applies the plain encoder-decoder Transformer to forecasting with a distribution head, so it learns a distribution over future values instead of point forecasts.

  • time series transformer
  • timeseriestransformer
  • time_series_transformer
  • probabilistic forecasting
  • time series forecasting
  • encoder-decoder transformer
  • transformers

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