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

Jinju Park, Seokho Kang

TL;DR

PaAno (Patch-based Anomaly detection) is a lightweight 1D-CNN framework demonstrating that massive Transformers or Foundation Models are not strictly necessary for state-of-the-art time-series anomaly detection. By learning discriminative patch-level embeddings through a combination of triplet and pretext losses, PaAno outperforms heavy architectures in both accuracy and speed, making it an ideal solution for real-time, resource-constrained deployments.

The Problem: The "Arms Race" in Time-Series Anomaly Detection

In the field of time-series anomaly detection (TSAD), there has been a growing trend toward adopting ever-larger neural network architectures. Researchers increasingly rely on Transformers and large-scale Foundation Models to capture complex temporal dependencies. However, this paper highlights two major issues with this trajectory:

  1. Computational Overkill: These large models are notoriously slow and memory-hungry. This makes them highly impractical for edge devices or real-time monitoring scenarios where resources are constrained.
  2. The Illusion of Progress: Recent meta-analyses suggest that many "sophisticated" models fail to actually outperform simpler methods when evaluated under rigorous protocols. Older benchmarks often suffer from structural flaws, and common evaluation tricks—like "point adjustment," which counts an entire anomaly segment as detected if even a single point is found—can misleadingly inflate performance scores.

PaAno aims to close this gap by providing a fast, efficient, and mathematically grounded method that focuses on local temporal dependencies—the fine-grained dynamics where anomalies typically hide.

The PaAno Approach: Local Patches over Global Sequences

PaAno shifts the focus from processing entire sequences globally to analyzing patches (short, overlapping temporal segments). Its architecture and training pipeline are built on three main pillars:

PaAno Training Architecture
  • Lightweight Encoder: Instead of relying on global attention mechanisms, PaAno utilizes a compact 1D-Convolutional Neural Network (1D-CNN). This provides a strong inductive bias toward locality, which is crucial for detecting sudden spikes or contextual shifts in time-series data.
  • Dual-Loss Training: To ensure the embeddings are highly informative, the model is trained simultaneously on two tasks:
  • Triplet Loss: A metric learning approach that ensures "temporally similar" patches are mapped close together in the vector space, while dissimilar patches are pushed apart.
  • Pretext Loss: A self-supervised task where the model predicts whether two patches are temporally consecutive. This helps the encoder learn the underlying "flow" and natural ordering of the data.
  • Coreset Memory Bank & Inference: After training, the model extracts embeddings for all "normal" patches in the training set. To keep the system fast, it uses K-means clustering to create a "reduced memory bank" of representative normal patterns. During inference, the model embeds a new patch and calculates its distance to the $k$-nearest neighbors in this memory bank. A high distance indicates an unseen pattern, flagging it as an anomaly.

Datasets and Evaluation

The authors evaluated PaAno on the TSB-AD benchmark, currently considered the gold standard for rigorous TSAD evaluation. It includes:

  • TSB-AD-U: 530 univariate time-series.
  • TSB-AD-M: 180 multivariate time-series.

Crucially, this benchmark avoids the "point adjustment" metric, ensuring a fair, realistic, and rigorous comparison of actual detection capabilities.

Key Insights

  • Locality Matters: Transformers often "dilute" local temporal dependencies because global self-attention is inherently locality-agnostic. By using a 1D-CNN on patches, PaAno stays focused on the immediate context where anomalies actually occur.
  • Pretext Tasks as Stabilizers: The "consecutive patch prediction" task stabilizes the representation learning in the early stages of training before the triplet loss fine-tunes the embedding space.
  • Efficiency via Subsampling: You don't need to memorize every single normal second of data. By reducing the memory bank to a "coreset" via K-means, PaAno achieves high accuracy with a tiny memory footprint.
  • Robustness: Sensitivity analyses show that PaAno maintains high performance across various patch sizes, memory bank sizes, and architectural widths.

Key Results

Performance Comparison Radar Chart
  • SOTA Performance: PaAno ranked #1 across all six performance measures (including VUS-PR, AUC-ROC, and RangeF1) on both univariate and multivariate datasets. It consistently beat heavyweights like Lag-Llama, MOMENT, and TimesFM.
  • Massive Speedup: On univariate data, PaAno's run time was roughly 6.9 seconds, compared to 1,220 seconds for Lag-Llama and 43 seconds for MOMENT.
  • Tiny Footprint: With only 0.3M parameters, PaAno is orders of magnitude smaller than Foundation Models like TimesFM (203M parameters), yet it delivers superior detection accuracy.

Limitations and Future Work

  • Non-Stationary Data: While the memory bank could theoretically be updated online to handle shifting data distributions, the paper does not provide an extensive long-term study on "concept drift."
  • Patch Length Selection: Although the model is robust, selecting the optimal patch length ($w$) still requires some domain knowledge or tuning to match the frequency of the underlying signal.
  • Cross-Variable Dependencies: In the multivariate case, the model treats variables jointly within the patch. Future iterations could explore more explicit modeling of how different sensors interact with one another (cross-channel dependencies).

Summary updated

BibTeX
@inproceedings{park2026paano,
  author = {Jinju Park and Seokho Kang},
  title = {{PaAno: Patch-Based Representation Learning for Time-Series Anomaly Detection}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=NXThkM7Iym},
}
Figure