README.md
May 15, 2026 ยท View on GitHub
[ICLR 2026] PaAno: Patch-based Representation Learning for Time-Series Anomaly Detection
This repository is the official Pytorch implementation code of our "PaAno: Patch-based Representation Learning for Time-Series Anomaly Detection - Jinju Park, Seokho Kang". PaAno is a simple yet effective representation-based method for fast and efficient time-series anomaly detection. Our paper is available here: [Paper Link]
๐ [2026.1] PaAno has been accepted in ICLR 2026!
๐ ๏ธ [2026.5] We made minor implementation refinements to align this repo with the final paper.
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.
Installation
Clone the repository and set up the environment as follows:
# Make conda environment
conda create -n PaAno python=3.11 -y
conda activate PaAno
# Install dependencies
pip install -r requirements.txt
Quick Start
We provide a shell script for convenient execution. Once dependencies are installed, simply run:
# Univariate time-series anomaly detection
bash script/run_uni.sh
or
# Multivariate time-series anomaly detection
bash script/run_mul.sh
This will launch PaAno with the default configuration. Sample data from the TSB-AD benchmark are included in the data/ directory for quick and easy start.
Dataset
Please download data from https://github.com/thedatumorg/TSB-AD and move to data/.
Project Structure
PaAno/
โโโ affiliation/
โ โโโ __init__.py
โ โโโ affiliation_zone.py
โ โโโ integral_interval.py
โ โโโ single_ground_truth_event.py
โ โโโ generics.py
โ โโโ metrics.py
โ
โโโ assets/ # for README.md
โ โโโ mul_results.png
โ โโโ qualitative_results.png
โ โโโ train.png
โ โโโ uni_results.png
โ
โโโ data/
โ โโโ TSB-AD-M/
โ โโโ TSB-AD-U/
โ
โโโ script/
โ โโโ run_mul.sh
โ โโโ run_uni.sh
โ
โโโ utils/
โ โโโ __init__.py
โ โโโ basic_metrics.py
โ โโโ data_preprocess.py
โ โโโ evaluation.py
โ โโโ metrics.py
โ โโโ utils.py
โ
โโโ main.py
โโโ model.py
โโโ train.py
โโโ README.md
โโโ requirements.txt
Results
PaAno consistently outperforms 39 baseline methods on the TSB-AD benchmark for univariate time-series anomaly detection.
PaAno also robustly outperforms 31 baseline methods on the TSB-AD benchmark for multivariate time-series anomaly detection.
Furthermore, PaAno is shown to be effective in capturing various types of anomalies and yields stable performance across all six evaluation metrics compared with the five strong recent methods.
Citation
If you think our repo is useful, please cite our paper:
@inproceedings{park2026paano,
title={PaAno: Patch-based Representation Learning for Time-Series Anomaly Detection},
author={Park, Jinju and Kang, Seokho},
booktitle={Proceedings of International Conference on Learning Representations},
year={2026}
}
Acknowledgement
We sincerely appreciate the following GitHub repositories for their valuable contributions:
https://github.com/TheDatumOrg/TSB-AD
https://github.com/thuml/Time-Series-Library
https://github.com/decisionintelligence/CATCH