Skip to content

Commit 3e502bf

Browse files
committed
Add HACUD model
1 parent b0739e6 commit 3e502bf

13 files changed

Lines changed: 83 additions & 14 deletions

File tree

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
**Introduction**
2828

29-
**DGFraud** is a Graph Neural Network (GNN) based toolbox for fraud detection. It integrates the implementation & comparison of state-of-the-art GNN-based fraud detection models. It also includes several utility functions such as graph preprocessing, graph sampling, and performance evaluation. The introduction of implemented models can be found [here](#implemented-models). <!-- (Add introduction blogs links). -->
29+
**DGFraud** is a Graph Neural Network (GNN) based toolbox for fraud detection. It integrates the implementation & comparison of state-of-the-art GNN-based fraud detection models. The introduction of implemented models can be found [here](#implemented-models). <!-- (Add introduction blogs links). -->
3030

3131
We welcome contributions on adding new fraud detectors and extending the features of the toolbox. Some of the planned features are listed in [TODO list](#todo-list).
3232

@@ -41,6 +41,7 @@ If you use the toolbox in your project, please cite the [paper](https://arxiv.or
4141
```
4242

4343
**Useful Resources**
44+
- [UGFraud: An Unsupervised Graph-based Toolbox for Fraud Detection](https://github.com/safe-graph/UGFraud)
4445
- [Graph-based Fraud Detection Paper List](https://github.com/safe-graph/graph-fraud-detection-papers)
4546
- [Awesome Fraud Detection Papers](https://github.com/benedekrozemberczki/awesome-fraud-detection-papers)
4647
- [Attack and Defense Papers on Graph Data](https://github.com/safe-graph/graph-adversarial-learning-literature)
@@ -71,7 +72,7 @@ python setup.py install
7172
* tensorflow>=1.14.0,<2.0
7273
* numpy>=1.16.4
7374
* scipy>=1.2.0
74-
networkx<=1.11
75+
* networkx<=1.11
7576
```
7677
## Datasets
7778

@@ -144,7 +145,7 @@ The repository is organized as follows:
144145
| **GEM** | [Heterogeneous Graph Neural Networks for Malicious Account Detection](https://arxiv.org/pdf/2002.12307.pdf) | CIKM 2018 |[BibTex](https://github.com/safe-graph/DGFraud/blob/master/reference/gem.txt) |
145146
| **GraphSAGE** | [Inductive Representation Learning on Large Graphs](https://arxiv.org/pdf/1706.02216.pdf) | NIPS 2017 | [BibTex](https://github.com/safe-graph/DGFraud/blob/master/reference/graphsage.txt) |
146147
| **GraphConsis** | [Alleviating the Inconsistency Problem of Applying Graph Neural Network to Fraud Detection](https://arxiv.org/pdf/2005.00625.pdf) | SIGIR 2020 | [BibTex](https://github.com/safe-graph/DGFraud/blob/master/reference/graphconsis.txt) |
147-
<!--| **HACUD** | [Cash-Out User Detection Based on Attributed Heterogeneous Information Network with a Hierarchical Attention Mechanism](https://aaai.org/ojs/index.php/AAAI/article/view/3884) | AAAI 2019 | Bibtex |-->
148+
| **HACUD** | [Cash-Out User Detection Based on Attributed Heterogeneous Information Network with a Hierarchical Attention Mechanism](https://aaai.org/ojs/index.php/AAAI/article/view/3884) | AAAI 2019 | [BibTex](https://github.com/safe-graph/DGFraud/blob/master/reference/hacud.txt) |
148149

149150

150151
## Model Comparison
@@ -158,7 +159,7 @@ The repository is organized as follows:
158159
| **GEM** | Financial Fraud | Heterogeneous |GCN |
159160
| **GraphSAGE** | Opinion Fraud | Homogeneous | GraphSAGE |
160161
| **GraphConsis** | Opinion Fraud | Heterogeneous | GraphSAGE |
161-
<!--| **HACUD** | | | |-->
162+
| **HACUD** | Financial Fraud | Heterogeneous | GAT |
162163

163164

164165
## TODO List
@@ -170,8 +171,8 @@ The repository is organized as follows:
170171
- Benchmarking SOTA models
171172
- Scalable implementation
172173
- TensorFlow 2.0+ implementation
173-
- Pytorch version
174+
- Pytorch implementation
174175

175176
## How to Contribute
176-
You are welcomed to contribute to this open-source toolbox. The detailed instructions will be released soon. Currently, you can create issues or send email to [ytongdou@gmail.com](mailto:ytongdou@gmail.com) for inquiry.
177+
You are welcomed to contribute to this open-source toolbox. The detailed instructions will be released soon. Currently, you can create issues or send email to [bdscsafegraph@gmail.com](mailto:bdscsafegraph@gmail.com) for inquiry.
177178

algorithms/GraphConsis/neigh_samplers.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
'''
2+
This code is due to Zhiwei Liu (@JimLiu96) and UIC BDSC Lab
3+
DGFraud (A Deep Graph-based Toolbox for Fraud Detection)
4+
https://github.com/safe-graph/DGFraud
5+
'''
16
from __future__ import division
27
from __future__ import print_function
38

algorithms/GraphConsis/supervised_models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
'''
2+
This code is due to Zhiwei Liu (@JimLiu96) and UIC BDSC Lab
3+
DGFraud (A Deep Graph-based Toolbox for Fraud Detection)
4+
https://github.com/safe-graph/DGFraud
5+
'''
16
import tensorflow as tf
27
import models as models
38
import layers as layers

algorithms/GraphSage/README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
# Description
1+
# GraphSAGE
2+
3+
## Paper
4+
The GraphSAGE model is proposed by the [paper](http://papers.nips.cc/paper/6703-inductive-representation-learning-on-large-graphs.pdf) below:
5+
```bibtex
6+
@inproceedings{hamilton2017inductive,
7+
title={Inductive representation learning on large graphs},
8+
author={Hamilton, Will and Ying, Zhitao and Leskovec, Jure},
9+
booktitle={Advances in neural information processing systems},
10+
pages={1024--1034},
11+
year={2017}
12+
}
13+
```
14+
15+
# Brief Introduction
216
We revise the original code of [graphsage](https://github.com/williamleif/GraphSAGE/tree/master/graphsage) so that it can load our data format and train the model.
317

418
# Run the code
@@ -10,4 +24,4 @@ line 28 in `utils.py` file
1024
```python
1125
rownetworks = [data['net_rur']]
1226
```
13-
- Before running the code, please remember unzip the given dataset.
27+
- Before running the code, please remember unzip the given YelpChi dataset.

algorithms/HACUD/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The HACUD model is proposed by the [paper](https://aaai.org/ojs/index.php/AAAI/article/view/3884) below:
66

7-
```
7+
```bibtex
88
@inproceedings{DBLP:conf/aaai/HuZSZLQ19,
99
author = {Binbin Hu and
1010
Zhiqiang Zhang and

algorithms/HACUD/data_loader.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
'''
2+
This code is due to Hengrui Zhang (@hengruizhang98) and UIC BDSC Lab
3+
DGFraud (A Deep Graph-based Toolbox for Fraud Detection)
4+
https://github.com/safe-graph/DGFraud
5+
'''
16
import numpy as np
27
from sklearn.model_selection import train_test_split
38
import scipy.io as sio

algorithms/HACUD/get_data.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
'''
2+
This code is due to Hengrui Zhang (@hengruizhang98) and UIC BDSC Lab
3+
DGFraud (A Deep Graph-based Toolbox for Fraud Detection)
4+
https://github.com/safe-graph/DGFraud
5+
'''
16
import numpy as np
27
import random as rd
38
import scipy.sparse as sp

algorithms/HACUD/main.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
'''
2+
This code is due to Hengrui Zhang (@hengruizhang98) and UIC BDSC Lab
3+
DGFraud (A Deep Graph-based Toolbox for Fraud Detection)
4+
https://github.com/safe-graph/DGFraud
5+
'''
16
import numpy as np
27
import pandas as pd
38
import os

algorithms/HACUD/model.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
'''
2+
This code is due to Hengrui Zhang (@hengruizhang98) and UIC BDSC Lab
3+
DGFraud (A Deep Graph-based Toolbox for Fraud Detection)
4+
https://github.com/safe-graph/DGFraud
5+
'''
16
import tensorflow as tf
27
import os
38
import sys

algorithms/HACUD/parse.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
'''
2+
This code is due to Hengrui Zhang (@hengruizhang98) and UIC BDSC Lab
3+
DGFraud (A Deep Graph-based Toolbox for Fraud Detection)
4+
https://github.com/safe-graph/DGFraud
5+
'''
16
import argparse
27

38
def parse_args():

0 commit comments

Comments
 (0)