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.

oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory

oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory

September 17, 2026

oh-my-hermes is an all-in-one plugin designed to significantly enhance the Hermes Agent. It provides advanced coding intelligence, a robust long-term memory system, and optimized workflow packages, transforming standard Hermes requests into structured, actionable tasks with clear operational layers.

AI AgentHermes AgentAI Tools
ASC: A Super Fast Android Decompiler for Mobile Reverse Engineering

ASC: A Super Fast Android Decompiler for Mobile Reverse Engineering

September 17, 2026

ASC is an innovative and exceptionally fast Android decompiler front-end, specifically designed for mobile researchers and agents. It redefines traditional decompilation by directly querying compiled artifacts, offering on-demand code extraction and analysis without heavy preprocessing. This approach results in significantly reduced memory usage and lightning-fast performance, even on large APKs.

AndroidDecompilerReverse Engineering
Open Index: A Deterministic Memory Layer for Your AI Agents

Open Index: A Deterministic Memory Layer for Your AI Agents

September 16, 2026

Open Index is a powerful tool for building domain-specific, accurate, and structured data that AI agents can effectively operate on. It enables the creation of a "brain," a searchable and continuously improving context graph tailored to any domain. This system ensures agents have access to reliable, up-to-date information, enhancing their capabilities and decision-making processes.

AI AgentsKnowledge GraphAgent Memory
tooltrim: Drastically Reduce LLM Agent Tool Output Tokens, Improve Accuracy

tooltrim: Drastically Reduce LLM Agent Tool Output Tokens, Improve Accuracy

September 16, 2026

tooltrim provides drop-in compression for LLM agent tool outputs, drastically cutting tokens while often improving answer accuracy. This provider-agnostic solution offers content-aware compression, faithfulness benchmarks, and seamless integration with popular frameworks or as an OpenAI-compatible proxy.

PythonLLM AgentsContext Compression

Source repository

Open the original repository on GitHub.

19 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 ❤️