Skip to main content
ToolPotion
AI Advisor
Submit a Tool (Free)

PatchTST

AI ModelsAI Models & LLMsOpen source · Web

PatchTST is an official implementation of a Transformer-based model for long-term time series forecasting. It segments time series into patches and processes them independently, offering efficient and effective predictions. The project provides code for both supervised and self-supervised learning approaches, enabling robust forecasting capabilities.

View Model
Share
View Model
Share

PatchTST is an official implementation of the "A Time Series is Worth 64 Words: Long-term Forecasting with Transformers" paper. This AI model is designed for long-term time series forecasting, leveraging the power of Transformer architectures. The core innovation lies in its "patching" mechanism, which segments time series into subseries-level patches that are then treated as input tokens for the Transformer.

Read More

Key design principles include channel-independence, where each channel represents a single univariate time series. These series share the same embedding and Transformer weights across all inputs, promoting efficient learning. The project is structured into two main folders: PatchTST_supervised and PatchTST_self_supervised, catering to different learning paradigms.

For supervised learning, users can install requirements, download datasets from sources like Autoformer, and initiate training using provided scripts. Hyperparameters such as patch length, look-back windows, and prediction lengths can be adjusted. The repository also includes codes for baseline models for comparative analysis.

In the self-supervised learning domain, PatchTST offers pre-training and fine-tuning capabilities. The pre-training script, `patchtst_pretrain.py`, trains the model using a specified mask ratio. The resulting pre-trained models are saved for downstream tasks. The `patchtst_finetune.py` script then facilitates either linear probing or full network fine-tuning on these pre-trained models.

The project acknowledges valuable contributions from several GitHub repositories, including LTSF-Linear, Informer2020, Autoformer, FEDformer, Pyraformer, RevIN, and tsai, highlighting its integration within the broader time series research community. This makes PatchTST a powerful tool for researchers and practitioners focused on accurate and scalable long-term time series forecasting.

  • CategoryAI Models & LLMs
  • Pricing ModelOpen source
  • DeploymentCloud, Self-hosted
  • PlatformsWeb

  • Transformer-based architecture for time series forecasting

  • Segmentation of time series into subseries-level patches

  • Channel-independence for efficient weight sharing

  • Official implementation of the PatchTST paper

  • Support for supervised learning

  • Support for self-supervised learning (pre-training and fine-tuning)

  • Adjustable hyperparameters for patch length, look-back, and prediction windows

  • Inclusion of baseline models for comparison

  • Codebase available on GitHub

  • Model weights saved for downstream tasks

  • Linear probing and full network fine-tuning options

  1. Integrate: Access the GitHub repository for the PatchTST code.

  2. Set up environment: Install necessary Python packages using `pip install -r requirements.txt`.

  3. Download data: Obtain time series datasets and place them in a `./dataset` folder.

  4. Supervised Training: Run training scripts from the `./scripts/PatchTST` directory, e.g., `sh ./scripts/PatchTST/weather.sh`.

  5. Self-supervised Pre-training: Execute `python patchtst_pretrain.py` with dataset and mask ratio parameters.

  6. Self-supervised Fine-tuning: Use `python patchtst_finetune.py` with the pre-trained model name and dataset.

  • Long-term forecasting
  • Time series analysis
  • Forecasting with Transformers
  • Self-supervised learning
  • Supervised learning
  • Multivariate forecasting

Popular AI Tools Like PatchTST

FEDformer

AI GitHub Repos

FEDformer is a Frequency Enhanced Decomposed Transformer designed for efficient long-term time series forecasting. It achieves linear complexity with sequence length,…

AI Models & LLMs
View Tool

AI GitHub Repos

Frequency Enhanced Decomposed Transformer designed for efficient long-term time series forecasting. It achieves linear complexity with sequence length,…FEDformer is a Frequency Enhanced Decomposed Transformer designed for efficient long-term time series forecasting. It achieves linear complexity with sequence length,…

AI Models & LLMs
See the Top 250 AI GitHub Repos

LTSF-Linear

AI GitHub Repos

LTSF-Linear is an official PyTorch implementation for "Are Transformers Effective for Time Series Forecasting?". It introduces a family of linear models (Linear, DLinear, NLinear)…

AI Models & LLMs
View Tool

AI GitHub Repos

Official PyTorch implementation for "Are Transformers Effective for Time Series Forecasting?". It introduces a family of linear models (Linear, DLinear, NLinear)…LTSF-Linear is an official PyTorch implementation for "Are Transformers Effective for Time Series Forecasting?". It introduces a family of linear models (Linear, DLinear, NLinear)…

AI Models & LLMs
See the Top 250 AI GitHub Repos

Autoformer

AI GitHub Repos

Autoformer is an AI model for long-term time series forecasting, leveraging decomposition transformers and auto-correlation mechanisms. It achieves state-of-the-art results across…

AI Models & LLMs
View Tool

AI GitHub Repos

AI model for long-term time series forecasting, leveraging decomposition transformers and auto-correlation mechanisms. It achieves state-of-the-art results across…Autoformer is an AI model for long-term time series forecasting, leveraging decomposition transformers and auto-correlation mechanisms. It achieves state-of-the-art results across…

AI Models & LLMs
See the Top 250 AI GitHub Repos

TimesNet

AI Models

TimesNet is a foundation model for general time series analysis, transforming 1D series into 2D space for enhanced modeling. It achieves state-of-the-art results in forecasting,…

AI Models & LLMs
View Tool

AI Models

Foundation model for general time series analysis, transforming 1D series into 2D space for enhanced modeling. It achieves state-of-the-art results in forecasting,…TimesNet is a foundation model for general time series analysis, transforming 1D series into 2D space for enhanced modeling. It achieves state-of-the-art results in forecasting,…

AI Models & LLMs
See the Top 5 AI Models

LSTNet

AI GitHub Repos

LSTNet is a deep learning model designed for time series forecasting. It effectively models both long-term and short-term temporal patterns using a combination of recurrent neural…

AI Models & LLMs
View Tool

AI GitHub Repos

Deep learning model designed for time series forecasting. It effectively models both long-term and short-term temporal patterns using a combination of recurrent neural…LSTNet is a deep learning model designed for time series forecasting. It effectively models both long-term and short-term temporal patterns using a combination of recurrent neural…

AI Models & LLMs
See the Top 250 AI GitHub Repos

GluonTS

AI Frameworks

GluonTS is a Python package for probabilistic time series modeling, leveraging deep learning models built on PyTorch and MXNet. It facilitates accurate forecasting by generating…

AI Models & LLMs
View Tool

AI Frameworks

Python package for probabilistic time series modeling, leveraging deep learning models built on PyTorch and MXNet. It facilitates accurate forecasting by generating…GluonTS is a Python package for probabilistic time series modeling, leveraging deep learning models built on PyTorch and MXNet. It facilitates accurate forecasting by generating…

AI Models & LLMs
See the Top 50 AI Frameworks

Informer2020

AI GitHub Repos

The Informer2020 GitHub repository provides the PyTorch implementation for the Informer model, designed for efficient long sequence time-series forecasting. It features ProbSparse…

AI Models & LLMs
View Tool

AI GitHub Repos

The Informer2020 GitHub repository provides the PyTorch implementation for the Informer model, designed for efficient long sequence time-series forecasting. It features ProbSparse…

AI Models & LLMs
See the Top 250 AI GitHub Repos

Funnel-Transformer

AI GitHub Repos

Funnel-Transformer is an AI model that compresses hidden states to reduce computation cost. It allows for deeper or wider models with the same FLOPs and can recover token-level…

AI Models & LLMs
View Tool

AI GitHub Repos

AI model that compresses hidden states to reduce computation cost. It allows for deeper or wider models with the same FLOPs and can recover token-level…Funnel-Transformer is an AI model that compresses hidden states to reduce computation cost. It allows for deeper or wider models with the same FLOPs and can recover token-level…

AI Models & LLMs
See the Top 250 AI GitHub Repos
1 of 8