Git Product home page Git Product logo

graph-anomaly-loss's Introduction

Error-Bounded Graph Anomaly Loss for GNNs

This repository contains the code package for the TNNLS paper:

A Synergistic Approach for Graph Anomaly Detection with Pattern Mining and Feature Learning.

and the CIKM'20 paper:

Error-Bounded Graph Anomaly Loss for GNNs.

Authors: Tong Zhao ([email protected]), Chuchen Deng, Kaifeng Yu, Tianwen Jiang, Daheng Wang, and Meng Jiang.

Usage

1. Dependencies

This code package was developed with Python 3.6.8 and PyTorch 1.0.1.post2. A detailed dependencies list can be found in requirements.txt and can be installed by:

pip install -r requirements.txt

2. Data

Data files are located at /data/[dataset]/, a simple example of loading the data can be found here. Specifically, [dataset]_graph_u2p.pkl is the pickled sparse adjacency matrix (csr_matrix) and [dataset]_labels_u.pkl is the pickled user labels.

3. Run

To train the model, run

python -m src.main

list of arguments can be found at here.

Cite

If you find this repository useful in your research, please cite our papers:

@ARTICLE{zhao2021synergistic,
  author={Zhao, Tong and Jiang, Tianwen and Shah, Neil and Jiang, Meng},
  journal={IEEE Transactions on Neural Networks and Learning Systems}, 
  title={A Synergistic Approach for Graph Anomaly Detection With Pattern Mining and Feature Learning}, 
  year={2021},
  volume={33},
  number={6},
  pages={2393-2405},
  doi={10.1109/TNNLS.2021.3102609}}

@inproceedings{zhao2020error,
  title={Error-Bounded Graph Anomaly Loss for GNNs},
  author={Zhao, Tong and Deng, Chuchen and Yu, Kaifeng and Jiang, Tianwen and Wang, Daheng and Jiang, Meng},
  booktitle={Proceedings of the 29th ACM International Conference on Information \& Knowledge Management},
  pages={1873--1882},
  year={2020}
}

graph-anomaly-loss's People

Contributors

zhao-tong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

graph-anomaly-loss's Issues

dataset format

Thanks for your excellent work!
But what's the dataset format about these confused .pkl files? For example, why graph_u2u file in alpha dataset is not used on GNN model but used in weibo dataset.
If there are some stupid mistakes I had made, please remind me!
Thanks a lot!!!

Question for Item feature

Thanks a lot for providing the code for this awesome study. I am wondering if it is possible for items to also have feature vectors? I notice users in the dataset have features in both datasets.

FileNotFoundError: [Errno 2] No such file or directory: './results/debug_weibo_s_bigal_all_loss1010_2layers_simi-cos_none_12-07_12-49'

I cloned the repo in my local and run the commands as provided.
But when I tried ti train the model with the command : python -m src.main

i got the following error

File "/home/user/gnn/gnn_poc/src/main.py", line 70, in main
if not os.path.isdir(args.out_path): os.mkdir(args.out_path)
FileNotFoundError: [Errno 2] No such file or directory: './results/debug_weibo_s_bigal_all_loss1010_2layers_simi-cos_none_12-07_12-49'

Please help me to fix this.

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.