Giter Club home page Giter Club logo

cola's Introduction

Anomaly Detection on Attributed Networks via Contrastive Self-Supervised Learning

This is the source code of TNNLS paper Anomaly Detection on Attributed Networks via Contrastive Self-Supervised Learning (CoLA).

The proposed framework

Requirments

This code requires the following:

  • Python>=3.7
  • PyTorch>=1.8.1
  • Numpy>=1.19.2
  • Scipy>=1.6.2
  • Scikit-learn>=0.24.1
  • Networkx>=2.5.1
  • Tqdm>=4.59.0
  • DGL==0.4.0 (Do not use the version which is newer than that!)

Running the experiments

Step 1: Anomaly Injection

This is a pre-processing step which injects anomalies into the original clean datasets. Take Cora dataset as an example:

python inject_anomaly.py --dataset cora

After anomaly injection, the disturbed datasets are saved into "dataset" folder.

Note that the disturbed ACM dataset is directly borrowed from the code of DOMINANT and do not need injection.

Step 2: Anomaly Detection

This step is to run the CoLA framework to detect anomalies in the network datasets. Take Cora dataset as an example:

python run.py --dataset cora

The hyperparameters are set to be the values reported in our paper. You can change the default values of other parameters to simulate different conditions.

Cite

If you compare with, build on, or use aspects of CoLA framework, please cite the following:

@article{liu2021anomaly,
  title={Anomaly Detection on Attributed Networks via Contrastive Self-Supervised Learning},
  author={Liu, Yixin and Li, Zhao and Pan, Shirui and Gong, Chen and Zhou, Chuan and Karypis, George},
  journal={IEEE Transactions on Neural Networks and Learning Systems},
  year={2021},
  publisher={IEEE}
}

cola's People

Contributors

yixinliu233 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.