Table of Contents
Fetching ...

PaAno: Patch-Based Representation Learning for Time-Series Anomaly Detection

Jinju Park, Seokho Kang

TL;DR

PaAno tackles the inefficiency and limited gains of large-scale models in time-series anomaly detection by proposing a patch-based representation learning framework. It learns a discriminative embedding space for short temporal patches using a lightweight 1D-CNN, trained with a triplet loss and an early-stage pretext task, and builds a compact memory bank of normal patches for fast inference. The approach achieves state-of-the-art performance on the rigorous TSB-AD benchmark for both univariate and multivariate data while delivering superior runtime efficiency compared to Transformer-based methods. This method enables reliable, real-time anomaly detection in resource-constrained environments and supports online memory-bank updates to adapt to non-stationary normal patterns, making it highly practical for real-world deployments.

Abstract

Although recent studies on time-series anomaly detection have increasingly adopted ever-larger neural network architectures such as transformers and foundation models, they incur high computational costs and memory usage, making them impractical for real-time and resource-constrained scenarios. Moreover, they often fail to demonstrate significant performance gains over simpler methods under rigorous evaluation protocols. In this study, we propose Patch-based representation learning for time-series Anomaly detection (PaAno), a lightweight yet effective method for fast and efficient time-series anomaly detection. PaAno extracts short temporal patches from time-series training data and uses a 1D convolutional neural network to embed each patch into a vector representation. The model is trained using a combination of triplet loss and pretext loss to ensure the embeddings capture informative temporal patterns from input patches. During inference, the anomaly score at each time step is computed by comparing the embeddings of its surrounding patches to those of normal patches extracted from the training time-series. Evaluated on the TSB-AD benchmark, PaAno achieved state-of-the-art performance, significantly outperforming existing methods, including those based on heavy architectures, on both univariate and multivariate time-series anomaly detection across various range-wise and point-wise performance measures.

PaAno: Patch-Based Representation Learning for Time-Series Anomaly Detection

TL;DR

PaAno tackles the inefficiency and limited gains of large-scale models in time-series anomaly detection by proposing a patch-based representation learning framework. It learns a discriminative embedding space for short temporal patches using a lightweight 1D-CNN, trained with a triplet loss and an early-stage pretext task, and builds a compact memory bank of normal patches for fast inference. The approach achieves state-of-the-art performance on the rigorous TSB-AD benchmark for both univariate and multivariate data while delivering superior runtime efficiency compared to Transformer-based methods. This method enables reliable, real-time anomaly detection in resource-constrained environments and supports online memory-bank updates to adapt to non-stationary normal patterns, making it highly practical for real-world deployments.

Abstract

Although recent studies on time-series anomaly detection have increasingly adopted ever-larger neural network architectures such as transformers and foundation models, they incur high computational costs and memory usage, making them impractical for real-time and resource-constrained scenarios. Moreover, they often fail to demonstrate significant performance gains over simpler methods under rigorous evaluation protocols. In this study, we propose Patch-based representation learning for time-series Anomaly detection (PaAno), a lightweight yet effective method for fast and efficient time-series anomaly detection. PaAno extracts short temporal patches from time-series training data and uses a 1D convolutional neural network to embed each patch into a vector representation. The model is trained using a combination of triplet loss and pretext loss to ensure the embeddings capture informative temporal patterns from input patches. During inference, the anomaly score at each time step is computed by comparing the embeddings of its surrounding patches to those of normal patches extracted from the training time-series. Evaluated on the TSB-AD benchmark, PaAno achieved state-of-the-art performance, significantly outperforming existing methods, including those based on heavy architectures, on both univariate and multivariate time-series anomaly detection across various range-wise and point-wise performance measures.
Paper Structure (57 sections, 14 equations, 8 figures, 17 tables, 2 algorithms)

This paper contains 57 sections, 14 equations, 8 figures, 17 tables, 2 algorithms.

Figures (8)

  • Figure 1: Illustrative results of PaAno, demonstrating strong capability in detecting diverse types of time-series anomalies. Datasets from TSB-AD-U liu2024tsbad.
  • Figure 2: Anomaly detection performance of PaAno and recent methods on TSB-AD-M.
  • Figure 3: Training procedure of PaAno. The training dataset is split into patches. Using the patch set, three model components—a patch encoder, a projection head, and a classification head—are trained with the training objective that consists of two losses. Triplet loss encourages temporally similar patches to have closer embeddings in the projected space, and pretext loss guides the patch encoder to learn temporal relationships by predicting whether two patches are consecutive.
  • Figure 4: Anomaly detection procedure of PaAno.
  • Figure 5: Sensitivity analysis on Top-$k$ and memory bank size of PaAno across TSB-AD-U/M.
  • ...and 3 more figures