GithubHelp home page GithubHelp logo

enyandai / ganf Goto Github PK

View Code? Open in Web Editor NEW
137.0 3.0 24.0 315 KB

Offical implementation of "Graph-Augmented Normalizing Flows for Anomaly Detection of Multiple Time Series" (ICLR 2022)

Python 99.86% Shell 0.14%
graph anomaly-detection multiple-time-series

ganf's Introduction

GANF

Offical implementation of "Graph-Augmented Normalizing Flows for Anomaly Detection of Multiple Time Series" (ICLR 2022). [paper]

Requirements

torch==1.7.1

Overview

  • ./models: This directory includes the code of GANF as well as basline methods.
  • ./checkpoint: This directory stores the trained models. The trained models for the datasets SWaT and Metr-LA are given in ./checkpoint/eval.
  • ./train_water.py and ./train_traffic.py: These programs are used to train GANF on the corresponding datasets.
  • ./data: This directory is used to store the datasets.

Datasets

The paper uses three datasets for experiments:

  • SWaT: This water system dataset can be requested from iTrust. We utilze the attack_v0 data in Dec/2015 for experimentation. You may need to first convert the file format to .csv to use our code. Then, use ./dataset.py to perform train/val/test split.
  • Metr-LA: This traffic dataset does not include ground-truth outliers. It can be used for exploratory studies of density estimation. The dataset can be downloaded from this GitHub.
  • PMU: This power grid dataset is proprietary and we are unable to offer it for public use.

Experiments

To train a GANF model on SWaT, run the bash script:

bash train_water.sh

The training log will be located at ./log as a reference to reproduce the results in the paper.

We also provide trained models in ./checkpoint/eval for evaluation. You can call:

python eval_water.py

To train a GANF model on Metr-LA, run:

python train_traffic.py

Citation

If you find this repo useful, please cite the paper. Thank you!

@inproceedings{
dai2022graphaugmented,
title={Graph-Augmented Normalizing Flows for Anomaly Detection of Multiple Time Series},
author={Enyan Dai and Jie Chen},
booktitle={International Conference on Learning Representations},
year={2022},
url={https://openreview.net/forum?id=45L_dgP48Vd}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.