All models

HF PatchTST

A channel-independent Transformer that reads time series as patches for long-term forecasting.

Time series · 122 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 (22 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

Family
patchtst
Parameters
599.2K
Operations
122
Framework
PyTorch
Recurrent
No
Published
2023
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
m1295
Graph hash
2b583b8cb79db0b8bf85edfda2021ef1f8741652bf1d90b5bfbb69c49ee28572
Skeleton hash
e294c454bcce40f6fec9ded126c3c85b900e903eb024e7cbebd367a69ebaa54e
Architecture hash
cbebce41eca9a8a078e06cb518886d1da1a3d1f5efaf9f0e747b4458bb635e07
Diagram SHA-256
3e292f0bbe15e3bb6b1d9c66e6512c6c050a80802ae9c6459e9c119afd511d61
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

PatchTST is a Transformer designed for multivariate time series forecasting and self-supervised representation learning. It chops each series into patches of a given size, encodes the resulting sequence of vectors with a Transformer, and outputs the forecast through a head. The two key components are segmentation into subseries-level patches that serve as input tokens, and channel-independence, where each channel is a single univariate series sharing the same embedding and Transformer weights. Patching keeps local semantic information in the embedding, cuts attention computation and memory quadratically for the same look-back window, and lets the model attend to longer history.

The paper behind it is A Time Series is Worth 64 Words: Long-term Forecasting with Transformers. Self-supervised pre-training with the model gave fine-tuning results that outperform supervised training on large datasets. Beyond forecasting, the library offers classification and regression heads, and the traced members include the classification variant.

Key idea. PatchTST tokenizes time series as subseries-level patches and treats channels independently, improving long-term forecasting accuracy significantly over state-of-the-art Transformer-based models.

  • patchtst
  • patch tst
  • patch time series transformer
  • a time series is worth 64 words
  • long-term forecasting
  • time series forecasting
  • transformers

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