Skip to content

Anomaly-Transformer 를 활용한 스마트팜 센서값 데이터로부터 이상치를 탐지하는 프로젝트.

License

Notifications You must be signed in to change notification settings

roll4ward/AnomalyEnvDetector

Repository files navigation

AnomalyEnvDetector

본 프로젝트는 스마트팜 환경 센서 데이터셋을 사용하여 Anomaly-Transormer 를 학습시키고 이상치를 탐지하는 모델을 구현하는 것이 목표이다.

To-Do

  • [2024-05-06] 스마트팜 데이터셋 API를 활용하여 다운로드 받은 데이터 중 일부를 샘플링하여 기존 Anomaly-Transformer 코드에 학습시키고 inference.
  • 성능 지표를 결정하고 더 많은 데이터로 학습 데이터를 구성하여 성능 측정.

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 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/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 wuhx23@mails.tsinghua.edu.cn.

About

Anomaly-Transformer 를 활용한 스마트팜 센서값 데이터로부터 이상치를 탐지하는 프로젝트.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published