MTSMAE: Masked Autoencoders for Multivariate Time-Series Forecasting

Peiwang Tang, Xianchao Zhang · DOI

TL;DR

MTSMAE (Masked Autoencoders for Multivariate Time-Series) brings the power of self-supervised pre-training to the world of complex time-series forecasting. By treating time-series data as "patches" and aggressively masking 85% of the data during training, the model learns deep structural representations that significantly outperform current state-of-the-art supervised models.

What Problem Does This Paper Address?

While Transformer architectures have revolutionized Natural Language Processing (NLP) and Computer Vision (CV) through self-supervised pre-training (like BERT or MAE), multivariate time-series data (MTSD) has remained a difficult nut to crack.

The authors identify two primary hurdles:

  1. Information Density: Unlike a word in a sentence or an object in an image, a single data point in a time-series is often highly redundant with its neighbors. If you mask only a small portion, the model can "cheat" by simply interpolating from adjacent points without learning any high-level logic.
  2. Multivariate Complexity: Time-series data often involves hundreds of variables (dimensions) at a single time point, making standard embedding and masking techniques from other fields ineffective.

Methods

The authors propose MTSMAE, a framework that adapts the Masked Autoencoder (MAE) approach specifically for time-series forecasting.

1. Patch Embedding

Instead of looking at individual time points, MTSMAE uses a two-step 1D convolutional process to create temporal "patches." This reduces the sequence length (saving memory) and allows the model to focus on local shapes and trends rather than noisy individual points.

2. High-Ratio Masking

To combat the redundancy problem, the authors use an aggressive 85% masking ratio during pre-training. By hiding the vast majority of the data, the model is forced to learn the underlying "semantics" of the system to reconstruct the missing pieces.

3. Asymmetric Architecture

  • Encoder: A standard Transformer encoder that operates only on the visible (unmasked) patches. This makes pre-training highly efficient.
  • Decoders: The authors use two different decoders. During pre-training, a lightweight "Rdecoder" reconstructs the original input. During fine-tuning, a "Pdecoder" is used to predict future values based on the learned representations.

4. Rich Embeddings

The input isn't just raw numbers; it combines:

  • Scalar Projections: The raw values.
  • Local Position Embeddings: To keep track of time within a sequence.
  • Global Time Stamp Embeddings: To capture seasonal information (month, day, hour, minute).

Datasets

The model was evaluated on four diverse real-world datasets:

  • ETT (Electricity Transformer Temperature): Data from power transformers (ETTh2 and ETTm1).
  • ECL (Electricity Consuming Load): Consumption data for 321 customers.
  • WTH (Weather): Local climatological data from nearly 1,600 locations in the US.

Key Insights and Ideas

  • The "Aha" Moment on Masking: In NLP, masking 15% is standard. In CV, it's often 75%. For time-series, the authors found 85% is the sweet spot. This confirms that time-series data is incredibly redundant; you have to remove almost everything before the model starts working hard enough to learn something useful.
  • Patching is Essential: Moving from point-wise processing to patch-based processing is what allows the Transformer to handle long-range dependencies in time-series without exploding in computational cost.
  • Decoder Depth Matters: A decoder that is too deep can actually hinder the encoder. The authors found that a lightweight decoder allows the encoder to focus on abstract, transferable features rather than getting bogged down in the minutiae of reconstruction.

Key Results

MTSMAE consistently outperformed established models like Informer, Reformer, LogTrans, and LSTM across almost all benchmarks.

  • Superior Accuracy: In a head-to-head comparison across 35 different test scenarios (different datasets and prediction lengths), MTSMAE achieved the best results in 31 of them.
  • Pre-training vs. Supervised: The authors compared MTSMAE against "PatchTrans" (the same architecture but without the self-supervised pre-training). MTSMAE showed significant performance gains, proving that the masking task successfully teaches the model valuable features.
  • Denoising Ability: Sensitivity analysis showed that as the input sequence length increases, MTSMAE’s performance continues to improve or stay stable, whereas other models often degrade due to increased noise.

Limitations and Future Work

  • Hardware Constraints: The authors noted that GPU memory limitations forced them to cap their batch size at 64, suggesting that even better results might be possible with more compute.
  • Decoder Sensitivity: While the model is flexible, the depth of the decoder must be carefully tuned for different types of multivariate data to avoid affecting the encoder's learned semantics.
  • Future Directions: The paper suggests that exploring different types of masking (perhaps non-random or structured masking) could further improve the model's understanding of specific domain-related patterns.

Summary updated

Abstract

Large-scale self-supervised pre-training Transformer architecture have significantly boosted the performance for various tasks in natural language processing (NLP) and computer vision (CV). However, there is a lack of researches on processing multivariate time-series by pre-trained Transformer, and especially, current study on masking time-series for self-supervised learning is still a gap. Different from language and image processing, the information density of time-series increases the difficulty of research. The challenge goes further with the invalidity of the previous patch embedding and mask methods. In this paper, according to the data characteristics of multivariate time-series, a patch embedding method is proposed, and we present an self-supervised pre-training approach based on Masked Autoencoders (MAE), called MTSMAE, which can improve the performance significantly over supervised learning without pre-training. Evaluating our method on several common multivariate time-series datasets from different fields and with different characteristics, experiment results demonstrate that the performance of our method is significantly better than the best method currently available.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
ETTh2PatchTrans (MTSMAE without pre-training)MSE3.087Time Series Forecasting · split: test · input-length=1440 · multivariate=true · prediction-length=480
Source quote
L193: \multirow{2}{*}{PatchTrans} │ MSE │ 3.588 │ 3.996 │ 3.919 │ 2.963 │ 2.937 │ 3.588 │ 3.453 │ 3.069 │ 2.900 │ 2.789 │ 3.087
ETTh2PatchTrans (MTSMAE without pre-training)MAE1.451Time Series Forecasting · split: test · input-length=1440 · multivariate=true · prediction-length=480
Source quote
L194: MAE │ 1.613 │ 1.681 │ 1.673 │ 1.465 │ 1.408 │ 1.563 │ 1.615 │ 1.423 │ 1.438 │ 1.370 │ 1.451
ETTh2PatchTrans (MTSMAE without pre-training)MSE3.588Time Series Forecasting · split: test · input-length=1440 · multivariate=true · prediction-length=336
Source quote
L193: \multirow{2}{*}{PatchTrans} │ MSE │ 3.588 │ 3.996 │ 3.919 │ 2.963 │ 2.937 │ 3.588 │ 3.453 │ 3.069 │ 2.900 │ 2.789 │ 3.087
BibTeX
@misc{tang2022mtsmae,
  author = {Peiwang Tang and Xianchao Zhang},
  title = {{MTSMAE: Masked Autoencoders for Multivariate Time-Series Forecasting}},
  year = {2022},
  eprint = {2210.02199},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.02199},
}
Figure