Giter VIP home page Giter VIP logo

sl-gad's Introduction

SL-GAD

A PyTorch implementation of "Generative and Contrastive Self-Supervised Learning for Graph Anomaly Detection", IEEE Transactions on Knowledge and Data Engineering (TKDE).

Dependencies

  • python==3.6.1
  • dgl==0.4.1
  • matplotlib==3.3.4
  • networkx==2.5
  • numpy==1.19.2
  • pyparsing==2.4.7
  • scikit-learn==0.24.1
  • scipy==1.5.2
  • sklearn==0.24.1
  • torch==1.8.1
  • tqdm==4.59.0

To install all dependencies:

pip install -r requirements.txt

Usage

To train and evaluate on BlogCatalog:

python run.py --device cuda:0 --expid 1 --dataset BlogCatalog --runs 5 --auc_test_rounds 256 --alpha 1.0 --beta 0.6

To train and evaluate on Flickr:

python run.py --device cuda:0 --expid 2 --dataset Flickr --runs 5 --auc_test_rounds 256 --alpha 1.0 --beta 0.6

To train and evaluate on Cora:

python run.py --device cuda:0 --expid 3 --dataset cora --runs 5 --auc_test_rounds 256 --alpha 1.0 --beta 0.6

To train and evaluate on CiteSeer:

python run.py --device cuda:0 --expid 4 --dataset citeseer --runs 5 --auc_test_rounds 256 --alpha 1.0 --beta 0.4

To train and evaluate on PubMed:

python run.py --device cuda:0 --expid 5 --dataset pubmed --runs 5 --auc_test_rounds 256 --alpha 1.0 --beta 0.4

To train and evaluate on ACM:

python run.py --device cuda:0 --expid 6 --dataset ACM --runs 5 --auc_test_rounds 256 --alpha 1.0 --beta 0.2

Citation

If you use our code in your research, please cite the following article:

@article{zheng2021generative,
  title={Generative and Contrastive Self-Supervised Learning for Graph Anomaly Detection},
  author={Zheng, Yu and Jin, Ming and Liu, Yixin and Chi, Lianhua and Phan, Khoa T and Chen, Yi-Ping Phoebe},
  journal={IEEE Transactions on Knowledge and Data Engineering (TKDE)},
  year={2021}
}

sl-gad's People

Contributors

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