
HF PatchTST
Time series122 ops599.2K params
A channel-independent Transformer that reads time series as patches for long-term forecasting.
Time series · 126 operations Checked
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.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
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.
AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.