All models

patchtst

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

Time series · 129 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 (25 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
602.3K
Operations
129
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
m8137
Graph hash
b743389a7115b18e755f1a8d90998ab27242b81ce4aa00d4f2e75161afaa3af2
Skeleton hash
f6692d04dea6ed0575e73df5be7562d7e69023947920dd16d9806cc6381853e3
Architecture hash
0ed37e78e39ed55959e73d339c127679b0576feba014f4a27ee8e2c7300d3ae1
Diagram SHA-256
85c92b3d03cc375385464bccd4413cdae97e62e34fa5020ea40a51270643bdbe
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.