Giter Site home page Giter Site logo

121644048 / gdn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from d-ailin/gdn

0.0 0.0 0.0 393 KB

Implementation code for the paper "Graph Neural Network-Based Anomaly Detection in Multivariate Time Series"

License: MIT License

Python 96.15% Shell 3.85%

gdn's Introduction

GDN

Code implementation for : Graph Neural Network-Based Anomaly Detection in Multivariate Time Series(AAAI'21)

Installation

Requirements

Install packages

    # run after installing correct Pytorch package
    bash install.sh

Quick Start

Run to check if the environment is ready

    bash run.sh cpu msl
    # or with gpu
    bash run.sh <gpu_id> msl    # e.g. bash run.sh 1 msl

Usage

We use part of msl dataset(refer to telemanom) as demo example.

Data Preparation

# put your dataset under data/ directory with the same structure shown in the data/msl/

data
 |-msl
 | |-list.txt    # the feature names, one feature per line
 | |-train.csv   # training data
 | |-test.csv    # test data
 |-your_dataset
 | |-list.txt
 | |-train.csv
 | |-test.csv
 | ...

Notices:

  • The first column in .csv will be regarded as index column.
  • The column sequence in .csv don't need to match the sequence in list.txt, we will rearrange the data columns according to the sequence in list.txt.
  • test.csv should have a column named "attack" which contains ground truth label(0/1) of being attacked or not(0: normal, 1: attacked)

Run

    # using gpu
    bash run.sh <gpu_id> <dataset>

    # or using cpu
    bash run.sh cpu <dataset>

You can change running parameters in the run.sh.

Others

SWaT and WADI datasets can be requested from iTrust

Citation

If you find this repo or our work useful for your research, please consider citing the paper

@inproceedings{Deng2021GDN,
  title={Graph Neural Network-Based Anomaly Detection in Multivariate Time Series},
  author={Deng, Ailin and Hooi, Bryan},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  year={2021}
}

gdn's People

Contributors

d-ailin avatar

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.