HiMTM: Hierarchical Multi-Scale Masked Time Series Modeling with Self-Distillation for Long-Term Forecasting

Shubao Zhao, Ming Jin, Zhaoxiang Hou, Chengyi Yang, Zengxiang Li, Qingsong Wen, Yi Wang

TL;DR

This paper introduces HiMTM, a novel hierarchical multi-scale masked time series modeling approach with self-distillation for improved long-term forecasting. By effectively capturing temporal dependencies across different scales and leveraging self-supervision, HiMTM significantly outperforms existing state-of-the-art methods on various benchmark datasets.

What Problem Does This Paper Address?

Accurate long-term time series forecasting is crucial for many applications, from energy planning to financial analysis. While deep learning, particularly transformer-based models and self-supervised learning, has shown promise, existing methods often struggle to effectively capture the inherent multi-scale nature of time series data. Time series often exhibit patterns at various granularities (e.g., hourly, daily, yearly), and failing to model these simultaneously can lead to suboptimal forecasting performance. Furthermore, many self-supervised methods focus on fixed-scale reconstruction, limiting their ability to learn rich, hierarchical representations. This paper aims to bridge this gap by proposing a method that explicitly models multi-scale temporal information within a self-supervised framework.

Methods

The proposed HiMTM framework is built upon four key components:

  • Hierarchical Multi-Scale Transformer (HMT): This novel transformer architecture is designed to capture temporal information at different scales. It employs a hierarchical patch partitioning strategy where features from adjacent finer-grained patches are merged to form coarser-grained patches, allowing the model to process information at increasing levels of abstraction.
  • Decoupled Encoder-Decoder (DED): HiMTM separates the roles of the encoder and decoder. The encoder is primarily responsible for feature extraction, while the decoder focuses on the pretext task (reconstruction). This decoupling ensures that the encoder's learned representations are not overly optimized for reconstruction, allowing it to focus on generating robust multi-scale features.
  • Hierarchical Self-Distillation (HSD): To provide effective multi-stage supervision, HiMTM uses a self-distillation approach. A teacher encoder (sharing parameters with the student encoder but operating without backpropagation) processes masked patches to generate multi-scale feature-level supervision signals for the student encoder. This guides the student to learn more comprehensive multi-scale representations.
  • Cross-Scale Attention Fine-Tuning (CSA-FT): For downstream forecasting tasks, a fine-tuning mechanism is employed that uses cross-scale attention. This module explicitly models dependencies between features extracted at different scales, further enhancing the model's ability to make accurate long-term predictions.

Datasets

The paper evaluates HiMTM on seven mainstream time series datasets: ETTh1, ETTh2, ETTm1, ETTm2, Weather, Electricity, and Traffic. Additionally, they conduct experiments on ENN Natural Gas datasets for industrial application, specifically focusing on heating stations and community data for zero-shot learning tasks.

Key Insights and Ideas

  • The importance of multi-scale modeling: The paper strongly emphasizes that time series data is inherently multi-scale, and effectively capturing these different temporal granularities is crucial for accurate long-term forecasting.
  • Self-distillation for hierarchical supervision: Using a teacher-student setup with self-distillation allows for richer, feature-level supervision signals across multiple hierarchical levels, which is more effective than simple reconstruction-based losses for learning multi-scale representations.
  • Decoupling encoder and decoder benefits feature extraction: Separating the feature extraction (encoder) from the pretext task (decoder) allows the encoder to focus on learning robust, generalizable multi-scale features without being constrained by the reconstruction objective.
  • Cross-scale attention bridges the gap: The CSA-FT module effectively integrates features from different scales, enabling the model to leverage both fine-grained and coarse-grained temporal information for improved forecasting.

Key Results

HiMTM demonstrates significant improvements over state-of-the-art methods:

  • In-domain forecasting: HiMTM surpasses existing self-supervised learning methods by a margin of 3.16-68.54% on average across seven datasets.
  • Cross-domain forecasting: HiMTM outperforms the robust self-supervised learning method PatchTST by a significant margin of 2.3% in cross-domain forecasting tasks.
  • Ablation studies: Removing any of the four key components (HMT, DED, HSD, CSA-FT) leads to a significant increase in MSE and MAE, highlighting the effectiveness of each module.
  • Parameter sensitivity: HiMTM shows robustness to variations in masking ratio, look-back window, patch length, encoder depth, and representation dimensions, indicating its stable performance.
  • Industrial application: HiMTM shows significant improvements in zero-shot learning tasks on ENN Natural Gas datasets, demonstrating its practical applicability.

Limitations and Future Work

  • Limitations: The paper does not explicitly detail limitations beyond the inherent challenges of time series forecasting. The performance degradation observed with excessively long look-back windows (beyond 512) suggests a potential limitation in handling extremely long historical dependencies without further architectural modifications.
  • Future Work: The authors plan to extend HiMTM to other time series analysis tasks such as classification and anomaly detection. They also aim to scale HiMTM to large-scale, multi-domain time series datasets to develop a general foundational model for time series analysis.

Summary updated

BibTeX
@inproceedings{zhao2024himtm,
  author = {Shubao Zhao and Ming Jin and Zhaoxiang Hou and Chengyi Yang and Zengxiang Li and Qingsong Wen and Yi Wang},
  title = {{HiMTM: Hierarchical Multi-Scale Masked Time Series Modeling with Self-Distillation for Long-Term Forecasting}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2024},
  doi = {10.1145/3627673.3679741},
}
Figure