Anomaly Transformer

About Code release for "Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy" (ICLR 2022 Spotlight),
Alternatives To Anomaly Transformer
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Pycaret7,087137 hours ago83June 06, 2022263mitJupyter Notebook
An open-source, low-code machine learning library in Python
Darts5,58879 hours ago25June 22, 2022211apache-2.0Python
A python library for user-friendly forecasting and anomaly detection on time series.
5 days ago14June 28, 202214bsd-3-clausePython
Merlion: A Machine Learning Framework for Time Series Intelligence
Awesome Ts Anomaly Detection2,320
6 months ago1
List of tools & datasets for anomaly detection on time-series data.
Flow Forecast1,371
3 days ago87gpl-3.0Python
Deep learning PyTorch library for time series forecasting, classification, and anomaly detection (originally for flood forecasting).
8 months ago22apache-2.0JavaScript
Kibana Alert & Report App for Elasticsearch
a year ago2December 22, 202123gpl-3.0Java
A Java package to automatically detect anomalies in large scale time-series data
Luminol1,0431417 months ago5December 11, 201732apache-2.0Python
Anomaly Detection and Correlation library
Time Series Transformers Review949
a month ago1mit
A professionally curated list of awesome resources (paper, code, data, etc.) on transformers in time series.
7 days ago59apache-2.0Python
TODS: An Automated Time-series Outlier Detection System
Alternatives To Anomaly Transformer
Select To Compare

Alternative Project Comparisons

Anomaly-Transformer (ICLR 2022 Spotlight)

Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy

Unsupervised detection of anomaly points in time series is a challenging problem, which requires the model to learn informative representation and derive a distinguishable criterion. In this paper, we propose the Anomaly Transformer in these three folds:

  • An inherent distinguishable criterion as Association Discrepancy for detection.
  • A new Anomaly-Attention mechanism to compute the association discrepancy.
  • A minimax strategy to amplify the normal-abnormal distinguishability of the association discrepancy.

Get Started

  1. Install Python 3.6, PyTorch >= 1.4.0. (Thanks lise for the contribution in solving the environment. See this issue for details.)
  2. Download data. You can obtain four benchmarks from Tsinghua Cloud or Google Cloud. All the datasets are well pre-processed. For the SWaT dataset, you can apply for it by following its official tutorial.
  3. Train and evaluate. We provide the experiment scripts of all benchmarks under the folder ./scripts. You can reproduce the experiment results as follows:
bash ./scripts/
bash ./scripts/
bash ./scripts/
bash ./scripts/

Especially, we use the adjustment operation proposed by Xu et al, 2018 for model evaluation. If you have questions about this, please see this issue or email us.

Main Result

We compare our model with 15 baselines, including THOC, InterFusion, etc. Generally, Anomaly-Transformer achieves SOTA.


If you find this repo useful, please cite our paper.

title={Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy},
author={Jiehui Xu and Haixu Wu and Jianmin Wang and Mingsheng Long},
booktitle={International Conference on Learning Representations},


If you have any question, please contact [email protected], [email protected].

Popular Time Series Projects
Popular Anomaly Detection Projects
Popular Data Storage Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Deep Learning
Time Series
Anomaly Detection