multiresolution-time-series-transformer: Long-term Forecasting with MTST

This repository profile is provided by osrepos.com, an open source repository discovery platform.

multiresolution-time-series-transformer: Long-term Forecasting with MTST

Summary

This repository provides a PyTorch implementation of the Multi-Resolution Time-Series Transformer (MTST) for long-term forecasting. Based on the Zhang et al. (2024) paper, MTST processes temporal data at different resolutions to effectively capture both short-term and long-term patterns. It offers a flexible and robust solution for advanced time series prediction tasks.

Repository Information

Analyzed by OSRepos on November 30, 2025

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

The multiresolution-time-series-transformer repository presents a PyTorch implementation of the Multi-Resolution Time-Series Transformer (MTST) model, designed for accurate long-term forecasting. Inspired by the paper by Zhang et al. (2024), this model addresses the challenge of capturing diverse temporal patterns in time series data by processing information at multiple resolutions.

Unlike traditional methods, MTST employs a multi-resolution approach, utilizing stride-based subsampling to analyze data at high, mid, and low temporal scales. This allows the model to effectively capture both fine-grained, short-term fluctuations and broader, long-term trends. The architecture integrates these multi-resolution features through interpolation and concatenation, feeding them into a series of transformer blocks for robust sequence modeling.

Installation

To get started with the MTST implementation, follow these simple steps:

git clone https://github.com/VenkatachalamSubramanianPeriyaSubbu/multiresolution-time-series-transformer
cd multiresolution-time-series-transformer
pip install -r requirements.txt

This will clone the repository and install all necessary dependencies, preparing your environment for model training and inference.

Examples

Quick Start

Here's a quick example to initialize the MTST model and perform a forward pass:

import torch
from src.model.mtst import MTST

# Initialize model
model = MTST(
    input_dim=6,      # Number of input features
    embed_dim=64,     # Embedding dimension
    heads=8,          # Attention heads
    dropout=0.1,      # Dropout rate
    n_layers=10,      # Transformer layers
    output_len=5,     # Forecast horizon
    max_len=5000      # Max sequence length
)

# Example input: (batch_size, seq_len, input_dim)
x = torch.randn(32, 30, 6)

# Forward pass with resolution factors
forecast = model(x, high_res=1, mid_res=4, low_res=10)
print(f"Forecast shape: {forecast.shape}")  # [32, 5]

Training

To run the complete training pipeline, including data preprocessing, model initialization, and evaluation, execute the train.py script:

python train.py

This script handles data loading, model training, loss tracking, and saves the trained model and visualizations.

Why Use MTST?

The Multi-Resolution Time-Series Transformer offers several compelling advantages for long-term forecasting tasks:

  • Multi-Resolution Processing: It captures patterns at different temporal scales, from fine-grained details to long-term trends, leading to more comprehensive understanding of the data.
  • Transformer-Based Architecture: Leveraging the power of attention mechanisms, MTST excels at modeling complex dependencies within sequences, a hallmark of modern deep learning for sequential data.
  • Intelligent Feature Fusion: The model intelligently combines features from different resolutions through interpolation and concatenation, ensuring that all temporal insights are effectively integrated.
  • Robust Performance: Based on the original paper's findings, MTST demonstrates state-of-the-art performance on various benchmarks, consistently outperforming single-resolution transformers and showing strong capabilities across different prediction horizons.
  • Flexibility and Customization: With configurable parameters for embedding dimensions, attention heads, and layers, the model can be adapted to a wide range of time series datasets and forecasting challenges.

Links

Related repositories

Similar repositories that may be relevant next.

DA-Forge: Streamlining Declarative Agent Creation for Copilot Notebooks

DA-Forge: Streamlining Declarative Agent Creation for Copilot Notebooks

September 12, 2026

DA-Forge is a Python-based tool by Microsoft designed to automate the creation and deployment of Declarative Agents for Copilot Notebooks. It significantly reduces the manual effort and time required to set up AI assistants with specific grounding references, transforming an 85-minute process into just a few minutes. This tool is essential for developers and researchers working with Copilot Notebooks and Declarative Agents.

PythonMicrosoft 365Copilot
Curie: Automated and Rigorous Scientific Experimentation with AI Agents

Curie: Automated and Rigorous Scientific Experimentation with AI Agents

September 12, 2026

Curie is an innovative AI-agent framework designed for automating rigorous scientific experimentation. It streamlines the entire research lifecycle, from hypothesis formulation to result interpretation, ensuring precision, reliability, and reproducibility. This empowers scientists to accelerate their research processes significantly.

AI AgentsAI for ScienceArtificial Intelligence
Tau: A Minimalist Python Coding Agent for Your Terminal

Tau: A Minimalist Python Coding Agent for Your Terminal

September 8, 2026

Tau is a Python port of Pi's minimalist coding agent, designed to live in your terminal. It allows users to make requests like "explain this repo" or "add tests," and it can read files, edit code, and run commands. Beyond its utility, Tau also serves as a teaching project, demonstrating how coding agents are built with a small, readable codebase.

PythonAICoding Agent
Awesome Harness Engineering: Building Reliable AI Agent Systems

Awesome Harness Engineering: Building Reliable AI Agent Systems

September 7, 2026

Awesome Harness Engineering is a comprehensive curated list dedicated to the discipline of designing robust AI agent harnesses. It offers a wealth of resources, patterns, and templates essential for building reliable AI agent systems. Developers can explore tools, best practices, and foundational concepts across various critical areas of agent development.

agent-harnessai-agentsawesome-list

Source repository

Open the original repository on GitHub.

17 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️