All Projects → safe-graph → RioGNN

safe-graph / RioGNN

Licence: Apache-2.0 license
Reinforced Neighborhood Selection Guided Multi-Relational Graph Neural Networks

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to RioGNN

HuaweiCodeCraft2020
2020华为软件精英挑战赛
Stars: ✭ 14 (-69.57%)
Mutual labels:  graph-algorithms, machine-learning-algorithms
xgboost-smote-detect-fraud
Can we predict accurately on the skewed data? What are the sampling techniques that can be used. Which models/techniques can be used in this scenario? Find the answers in this code pattern!
Stars: ✭ 59 (+28.26%)
Mutual labels:  machine-learning-algorithms, fraud-detection
Stellargraph
StellarGraph - Machine Learning on Graphs
Stars: ✭ 2,235 (+4758.7%)
Mutual labels:  machine-learning-algorithms, graph-neural-networks
DGFraud-TF2
A Deep Graph-based Toolbox for Fraud Detection in TensorFlow 2.X
Stars: ✭ 84 (+82.61%)
Mutual labels:  graph-algorithms, fraud-detection
ASAP
AAAI 2020 - ASAP: Adaptive Structure Aware Pooling for Learning Hierarchical Graph Representations
Stars: ✭ 83 (+80.43%)
Mutual labels:  graph-algorithms, graph-neural-networks
Literatures-on-GNN-Acceleration
A reading list for deep graph learning acceleration.
Stars: ✭ 50 (+8.7%)
Mutual labels:  graph-algorithms, graph-neural-networks
GraphLIME
This is a Pytorch implementation of GraphLIME
Stars: ✭ 40 (-13.04%)
Mutual labels:  graph-algorithms, graph-neural-networks
Verse
Reference implementation of the paper VERSE: Versatile Graph Embeddings from Similarity Measures
Stars: ✭ 98 (+113.04%)
Mutual labels:  graph-algorithms, machine-learning-algorithms
spotify-song-recommender
A Spotify song recommendation engine built with the power of graph analytics.
Stars: ✭ 34 (-26.09%)
Mutual labels:  graph-algorithms
bayes
naive bayes in php
Stars: ✭ 61 (+32.61%)
Mutual labels:  machine-learning-algorithms
Graph Data Science
Source code for the Neo4j Graph Data Science library of graph algorithms.
Stars: ✭ 251 (+445.65%)
Mutual labels:  graph-algorithms
php-kmeans
PHP K-Means
Stars: ✭ 81 (+76.09%)
Mutual labels:  machine-learning-algorithms
graph-neural-networks-for-drug-discovery
odr.chalmers.se/handle/20.500.12380/256629?locale=en
Stars: ✭ 78 (+69.57%)
Mutual labels:  graph-neural-networks
Pygraphblas
GraphBLAS for Python
Stars: ✭ 252 (+447.83%)
Mutual labels:  graph-algorithms
regression-python
In this repository you can find many different, small, projects which demonstrate regression techniques using python programming language
Stars: ✭ 15 (-67.39%)
Mutual labels:  machine-learning-algorithms
Link Prediction
Representation learning for link prediction within social networks
Stars: ✭ 245 (+432.61%)
Mutual labels:  graph-algorithms
Mug
A small Java 8 util library, complementary to Guava (BiStream, Substring, MoreStreams, Parallelizer).
Stars: ✭ 236 (+413.04%)
Mutual labels:  graph-algorithms
awesome-awesome-machine-learning
A curated list of awesome lists across all machine learning topics. | 机器学习/深度学习/人工智能一切主题 (学习范式/任务/应用/模型/道德/交叉学科/数据集/框架/教程) 的资源列表汇总。
Stars: ✭ 394 (+756.52%)
Mutual labels:  machine-learning-algorithms
disentangled graph collaborative filtering
Disentagnled Graph Collaborative Filtering, SIGIR2020
Stars: ✭ 118 (+156.52%)
Mutual labels:  graph-neural-networks
LR-GCCF
Revisiting Graph based Collaborative Filtering: A Linear Residual Graph Convolutional Network Approach, AAAI2020
Stars: ✭ 99 (+115.22%)
Mutual labels:  graph-neural-networks

RioGNN

Code for Reinforced Neighborhood Selection Guided Multi-Relational Graph Neural Networks.

Hao Peng, Ruitong Zhang, Yingtong Dou, Renyu Yang, Jingyi Zhang, Philip S. Yu.

Repo Structure

The repository is organized as follows:

  • data/: dataset folder
    • YelpChi.zip: Data of the dataset Yelp;
    • Amazon.zip: Data of the dataset Amazon;
    • Mimic.zip: Data of the dataset Mimic;
  • log/: log folder
  • model/: model folder
    • graphsage.py: model code for vanilla GraphSAGE model;
    • layers.py: RioGNN layers implementations;
    • model.py: RioGNN model implementations;
  • RL/: RL folder
    • actor_critic.py: RL algorithm, Actor-Critic;
    • rl_model.py: RioGNN RL Forest implementations;
  • utils/: functions folder
    • data_process.py: transfer sparse matrix to adjacency lists;
    • utils.py: utility functions for data i/o and model evaluation;
  • train.py: training and testing all models

Example Dataset

We build different multi-relational graphs for experiments in two task scenarios and three datasets:

Dataset Task Nodes Relation
Yelp Fraud Detection 45,954 rur, rtr, rsr, homo
Amazon Fraud Detection 11,944 upu, usu, uvu, homo
MIMIC-III Diabetes Diagnosis 28,522 vav, vdv, vpv, vmv, homo

Run on your Datasets

To run RioGNN on your datasets, you need to prepare the following data:

  • Multiple-single relation graphs with the same nodes where each graph is stored in scipy.sparse matrix format, you can use sparse_to_adjlist() in utils.py to transfer the sparse matrix into adjacency lists used by RioGNN;
  • A numpy array with node labels. Currently, RioGNN only supports binary classification;
  • A node feature matrix stored in scipy.sparse matrix format.

How to Run

You can download the project and and run the program as follows:

1. The dataset folder \data only contains two Fraud datasets, please use the following links to download the Mimic dataset (~700MB);

Google Drive: https://drive.google.com/file/d/1WvYtNSHcvSQr8fzI9ykpgjMBSPwCTW0h/view?usp=sharing

Baidu Cloud: https://pan.baidu.com/s/1iyaOqnkyYGqo1Mdwt4QYnQ Password: vbwn

* Note that all datasets need to be unzipped in the folder \data first;

2. Install the required packages using the requirements.txt;
pip3 install -r requirements.txt
3. Run data_process.py to generate adjacency lists of different dataset used by RioGNN;
python data_process.py
4. Run train.py to run RioGNN with default settings.
python train.py

* To run the code, you need to have at least Python 3.6 or later versions.

Important Parameters

  • Our model supports both CPU and GPU mode, you can change it through parameter --use_cuda and --device:
  • Set the --data as yelp, amazon or mimic to change different dataset.
  • Parameter --num_epochs is used to set the maximum number of iterative epochs. Note that the model will stop early when reinforcement learning has explored all depths.
  • The default value of parameter --ALAPHA is 10, which means that the accuracy of different depths of reinforcement learning tree will be progressive with 0.1, 0.01, 0.001, etc. If you want to conduct more width and depth experiments, please adjust here.

* For other dataset and parameter settings, please refer to the arg parser in train.py.

Preliminary Work

Our preliminary work, CAmouflage-REsistant Graph Neural Network (CARE-GNN), is a GNN-based fraud detector based on a multi-relation graph equipped with three modules that enhance its performance against camouflaged fraudsters.

Citation

If you use our code, please cite the paper below:

@article{peng2021reinforced,
  title={Reinforced Neighborhood Selection Guided Multi-Relational Graph Neural Networks},
  author={Peng, Hao and Zhang, Ruitong and Dou, Yingtong and Yang, Renyu and Zhang, Jingyi and Yu, Philip S.},
  journal={ACM Transactions on Information Systems (TOIS)},
  year={2021}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].