All models

patchtst_classification

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

Time series · 126 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 (21 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.3K
Operations
126
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
m8138
Graph hash
6f60cbc9ef1a5006588ca83a4571578ec75746ea59677f76c5ec6c46541dafda
Skeleton hash
b1fde4001d9eb534acb30e63b68d5f3641190d27b03cfdb52829c11b58e77180
Architecture hash
5fb221d97baed02968ee060f03cec93369eb5d839054c6b610f6b2a664276e88
Diagram SHA-256
d450b3dce582facb390fa8ff0cbc2796b843ccec19b25e2053380a2cbd643cef
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.