PatchMixer: A Patch-Mixing Architecture for Long-Term Time Series Forecasting

Zeying Gong, Yujin Tang, Junwei Liang · DOI

Abstract

Long-term time series forecasting (LTSF) has recently seen a shift from complex Transformer models to simpler MLP-based architectures, and recently back to Transformers with the introduction of patching. This paper introduces PatchMixer, a novel CNN-based architecture that utilizes depthwise separable convolutions on patched data. PatchMixer demonstrates that the success of recent state-of-the-art models is primarily due to patch-based data representation rather than the attention mechanism itself. Our model outperforms leading Transformers and MLPs in accuracy while offering significantly faster training and inference speeds.

Introduction

Long-term time series forecasting is a critical task in various domains, from energy management to traffic planning. For years, Transformers were considered the gold standard due to their ability to capture global dependencies via self-attention. However, the emergence of simple MLP-based models like DLinear, which outperformed complex Transformers, sparked a debate: is the complexity of attention necessary? The recent success of PatchTST, a Transformer that processes data in "patches," suggested that the data representation might be more important than the core architecture. PatchMixer investigates this hypothesis by replacing the Transformer core with an efficient convolutional design.

Methodology: The PatchMixer Architecture

PatchMixer is built on the principle of "patch-mixing," using a lightweight convolutional backbone to process time series data. The architecture follows a multi-stage pipeline designed for efficiency and accuracy.

The PatchMixer architecture overview, highlighting the PatchMixer Block with depthwise and pointwise convolutions.
  1. Instance Normalization: The input is standardized to mitigate the effects of distribution shifts over time.
  2. Patching: The univariate series is broken into overlapping patches. This transformation preserves local semantic information while significantly reducing the sequence length for downstream processing.
  3. PatchMixer Block: The core of the model utilizes Depthwise Separable Convolutions (DWConv). A Depthwise Convolution operates across the patch dimension to capture intra-patch features, while a Pointwise Convolution captures correlations between different patches.
  4. Dual Forecasting Heads: To capture both global trends and local fluctuations, the model employs a dual-head strategy. A Linear Head focuses on long-term trends, while an MLP Head models complex nonlinear dynamics.
  5. Hybrid Loss Function: The model is trained using a 1:1 combination of Mean Squared Error (MSE) and Mean Absolute Error (MAE), which improves generalization across diverse datasets.

Theoretical Motivation: The Power of Patching

A key insight driving the PatchMixer design is the analysis of information density in time series data. Using Normalized Mutual Information (NMI), the authors demonstrated that information within a variable's temporal patches is significantly denser than the information shared between different variables in a multivariate set.

Heatmaps comparing inter-channel correlations (left) with intra-patch temporal correlations (right) across Weather, Traffic, and Electricity datasets.

As shown in the correlation heatmaps, the patch-wise temporal structure (right) exhibits much stronger and more organized patterns compared to the inter-channel correlations (left). This justifies the use of "channel independence"—treating each variable separately—and highlights why focusing on patch-based temporal dependencies is so effective for forecasting.

Experimental Results

PatchMixer was evaluated against seven large-scale multivariate benchmarks, including Weather, Traffic, and Electricity consumption datasets. The results confirm the model's superiority in both accuracy and efficiency:

  • Accuracy: PatchMixer achieved a relative MSE improvement of 3.9% over PatchTST (Transformer), 11.6% over DLinear (MLP), and 21.2% over TimesNet (CNN).
  • Computational Efficiency: By utilizing depthwise separable convolutions instead of self-attention, PatchMixer is 3x faster in inference and 2x faster in training than PatchTST.
  • Historical Robustness: Unlike traditional CNNs that struggle with long look-back windows, PatchMixer’s performance improves steadily as the historical context increases, proving its ability to capture long-term dependencies effectively.

Conclusion

PatchMixer demonstrates that for long-term time series forecasting, the method of data representation—specifically patching—is a more significant driver of performance than the choice between attention and convolution. By leveraging an efficient CNN-based patch-mixing block, PatchMixer provides a state-of-the-art solution that is both more accurate and significantly faster than existing Transformer-based models. Future work will explore moving beyond channel independence to capture inter-variable dependencies in more complex, highly coupled systems.

Summary updated

BibTeX
@misc{gong2023patchmixer,
  author = {Zeying Gong and Yujin Tang and Junwei Liang},
  title = {{PatchMixer: A Patch-Mixing Architecture for Long-Term Time Series Forecasting}},
  year = {2023},
  eprint = {2310.00655},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.00655},
}
Figure