PatchAD: Patch-based MLP-Mixer for Time Series Anomaly Detection

Zhijie Zhong, Zhiwen Yu, Yiyuan Yang, Weizheng Wang, Kaixiang Yang · DOI

Abstract

Time Series Anomaly Detection (TSAD) is essential for monitoring complex systems, yet existing deep learning models often struggle with computational overhead and model degradation. This paper introduces PatchAD, a lightweight, purely MLP-based architecture that leverages multi-scale patching and a novel "Inter-Intra Discrepancy" contrastive learning strategy. By identifying anomalies as data points with inconsistent representations across different temporal views, PatchAD achieves state-of-the-art performance across eight benchmark datasets. With only 0.403M parameters and a processing latency of 7.67 ms, PatchAD offers a highly efficient solution for real-time edge deployment.

Introduction

Time Series Anomaly Detection is critical for diverse applications, from industrial IoT monitoring to cybersecurity. However, the field faces three primary challenges: representation complexity due to the dynamic nature of anomalies, high computational overhead in modern deep learning models (like Transformers), and model degradation or "feature collapse" in unsupervised learning. Existing reconstruction-based models often over-fit on anomalies, reducing the effectiveness of reconstruction error as a detection signal. PatchAD addresses these issues by being lightweight, fast, and theoretically grounded to avoid trivial solutions.

Methodology

PatchAD utilizes a purely MLP-based architecture, avoiding the complexity of Transformers or CNNs. The model processes data through several specialized stages:

  1. Multi-scale Patching: The time series is broken into non-overlapping patches of various sizes to capture both local fluctuations and global trends.
  2. Specialized Mixers: The core architecture features four MLP-Mixer types:
  3. Channel Mixer: Learns correlations between different sensor dimensions.
  4. Inter Mixer: Captures detailed local features by focusing on relationships between patches.
  5. Intra Mixer: Captures generalized global trends by focusing on relationships within a single patch.
  6. MixRep Mixer: Unifies these views into a single representation space.
  7. Inter-Intra Discrepancy: This core strategy minimizes the discrepancy between Inter and Intra views for normal data. Anomalies, being chaotic, naturally cause these views to diverge, providing a strong detection signal.
  8. Dual Project Constraint: A projection head constraint ensures learned features remain informative, preventing model collapse.
PatchAD Architecture and Motivation

Experimental Results

The model was evaluated on eight benchmark datasets, including MSL, SMAP, SWAT, WADI, and PSM, covering satellite, industrial, and server monitoring scenarios.

Key Performance and Efficiency

PatchAD demonstrates a significant leap in both accuracy and efficiency:

  • Performance: It outperformed over 30 comparative algorithms, improving the classical F1 score by 6.84%, Aff-F1 by 4.27%, and V-ROC by 2.49% over previous best-performing models.
  • Efficiency: With only 0.403M parameters, it is substantially smaller than competitors like AnomTrans or GPT2-Adapter.
  • Speed: It achieves a processing latency of 7.67 ms for a 105-length window and a 1.45x training speedup compared to models like DCdetector.
Performance and Efficiency Benchmarks

Discussion and Future Work

PatchAD demonstrates that well-designed MLP-Mixers can surpass Transformers in both speed and accuracy for temporal data. By exploiting the inherent entropy difference between normal data and anomalies, the model creates an effective contrastive pair without manual negative sampling.

While highly effective, the model's performance can be sensitive to threshold hyperparameters in extremely noisy environments. Additionally, its theoretical basis assumes Gaussian data distributions, which may not hold for all real-world "heavy-tailed" data. Future research may explore more complex inter-channel dependencies or the integration of lightweight Large Language Models (LLMs) for even higher-dimensional sensor data.

Summary updated

BibTeX
@article{zhong2025patchad,
  author = {Zhijie Zhong and Zhiwen Yu and Yiyuan Yang and Weizheng Wang and Kaixiang Yang},
  title = {{PatchAD: Patch-based MLP-Mixer for Time Series Anomaly Detection}},
  journal = {IEEE Trans. big Data},
  year = {2025},
  doi = {10.1109/tbdata.2025.3596745},
}
Figure