All models

tsai TST

TST is a transformer encoder for multivariate time series, pre-trained by predicting masked input values.

Time series · 127 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 (17 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
420.2K
Operations
127
Framework
PyTorch
Recurrent
No
Published
KDD 2021
Cited by
1,263 (as of 18 October 2026)
Authors
George Zerveas, Srideepika Jayaraman, Dhaval Patel and others
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
m10714
Graph hash
65e5f006049bfa09ba58558a38fc41e64b883097695698c2e51b2578c8961091
Skeleton hash
a89449337edd3382f0a33085e55a725908ef72a8a5d030368f752bec1e38544b
Architecture hash
74201d5e9e6391bd64c3c9cae9afbdbebec750ea70f3a9b3b2edfb256ed3ab5b
Diagram SHA-256
308c36f3243dc6bf1fe51e03f944ef20966ad46b12775ccd1b205b340b9dc155
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

TST is a transformer-based framework for unsupervised representation learning of multivariate time series. The models are named TST, for Time Series Transformer. Pre-trained models can be used for downstream tasks such as regression and classification, forecasting and missing value imputation. This matters because labeled multivariate time series data is far more limited than unlabeled data, since extensive data labeling is often prohibitively expensive or impractical.

At the core is a transformer encoder as described in the original transformer work, without the decoder part of the architecture. Each time step's feature vector is normalized and linearly projected onto a d-dimensional vector space, where d is the model dimension. Fully learnable positional encodings are used instead of deterministic sinusoidal ones, because they performed better for all datasets in the work. Batch normalization replaces layer normalization because it can mitigate the effect of outlier values in time series. For regression and classification, the final representation vectors of all time steps are concatenated into a single vector that feeds a linear output layer. For classification the predictions are passed through a softmax to obtain a distribution over classes, trained with cross-entropy. Unsupervised pre-training uses an input denoising task: part of the input is set to 0 and the model predicts the masked values. The masked segment length parameter lm was set to 3 for all presented experiments. The masking proportion r was empirically chosen as 0.15. Only the predictions on the masked values are considered in the Mean Squared Error loss.

On the regression datasets the transformer models rank first on all but two, achieving an average rank of 1.33. On multivariate classification they performed best on 7 out of the 11 datasets, with an average rank of 1.7, followed by ROCKET. Pre-trained transformer models outperform the fully supervised ones in 3 out of 6 regression datasets even though no additional samples are used for pre-training. The models use at most hundreds of thousands of parameters and can be practically trained even on CPUs. A dropout of 10% is used when training all supervised and unsupervised models.

Key idea. TST's key contribution is a generally applicable framework that first trains a transformer to extract dense vector representations of multivariate time series through an input denoising objective, then applies it to downstream tasks. Unsupervised pre-training offers a substantial performance benefit over fully supervised learning even without additional unlabeled data, by reusing the same data samples through the unsupervised objective.

  • tst
  • time series transformer
  • mvts_transformer
  • tstransformerencoder
  • transformer-based framework
  • multivariate time series
  • representation learning
  • unsupervised pre-training
  • input denoising
  • time series classification
  • time series regression
  • tsai
  • learnable positional encodings
  • batch normalization

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

Cite the paper

@misc{zerveas2020transformerbasedframeworkmultivariatetime,
      title={A Transformer-based Framework for Multivariate Time Series Representation Learning}, 
      author={George Zerveas and Srideepika Jayaraman and Dhaval Patel and Anuradha Bhamidipaty and Carsten Eickhoff},
      year={2020},
      eprint={2010.02803},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2010.02803}, 
}