thuml/Anomaly-Transformer
thuml/Anomaly-Transformer has 1,050 GitHub stars and 270 forks. GitHot measured +1 stars in 24 hours. Last checked 2026-11-09 11:33 UTC. Last push 2023-12-29.
About Code release for "Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy" (ICLR 2022 Spotlight), https://openreview.net/forum?id=LzQQ89U1qm_
Measured star growth
- in 24h
- +1
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalAnomaly-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
- Install Python 3.6, PyTorch >= 1.4.0. (Thanks Élise for the contribution in solving the environment. See this issue for details.)
- Download data. You can obtain four benchmarks from Google Cloud. All the datasets are well pre-processed. For the SWaT dataset, you can apply for it by following its official tutorial.
- 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/SMD.sh
bash ./scripts/MSL.sh
bash ./scripts/SMAP.sh
bash ./scripts/PSM.sh
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.
Citation
If you find this repo useful, please cite our paper.
@inproceedings{
xu2022anomaly,
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},
year={2022},
url={https://openreview.net/forum?id=LzQQ89U1qm_}
}
Contact
If you have any question, please contact [email protected].
Explore related projects
tensorflow/tensorflow
An Open Source Machine Learning Framework for Everyone
201,427 starshuggingface/transformers
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.
168,711 starsAUTOMATIC1111/stable-diffusion-webui
Stable Diffusion web UI
165,261 starsComfy-Org/ComfyUI
The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
145,835 stars