Skip to content

[软件学报 (Journal of Software) 2025] 基于链路聚合的图欺诈检测 (Path Aggregation-Based Graph Fraud Detection)

License

Notifications You must be signed in to change notification settings

horrible-dong/PA-GNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

基于链路聚合的图欺诈检测 (Path Aggregation-Based Graph Fraud Detection)

journalcode-frameworkdoclicense

Authors: Tian Qiu, Lingxiang Jia, Yang Gao, Zunlei Feng, Yi Gao, Mingli Song
Affiliation: Zhejiang University

Installation

The development environment of this project is python 3.8 & pytorch 1.13.1+cu117 & dgl 1.1.3+cu117.

  1. Create your conda environment.
conda create -n qtcls python==3.8 -y
  1. Enter your conda environment.
conda activate qtcls
  1. Install PyTorch.
pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117

Or you can refer to PyTorch to install newer or older versions. Please note that if pytorch ≥ 1.13, then python ≥ 3.7.2 is required.

  1. Install DGL.
pip install dgl==1.1.3+cu117 -f https://data.dgl.ai/wheels/cu117/repo.html
pip install torch-scatter==2.0.9 -f https://pytorch-geometric.com/whl/torch-1.13.1+cu117.html
pip install torch-sparse==0.6.15 -f https://pytorch-geometric.com/whl/torch-1.13.1+cu117.html
pip install torch-cluster==1.6.0 -f https://pytorch-geometric.com/whl/torch-1.13.1+cu117.html
pip install torch-spline-conv==1.2.1 -f https://pytorch-geometric.com/whl/torch-1.13.1+cu117.html
pip install torch-geometric
  1. Install necessary dependencies.
pip install -r requirements.txt

Data Preparation

  1. Download the zip file from [百度网盘] / [Google Drive] and put the file into data/raw.

  2. Unzip the file.

cd data/raw
unzip amazon_elliptic_tfinance_tsocial_yelpchi.zip
cd ../..

Training

Import the config file (.py) from configs.

python main.py --config /path/to/config.py

or

python main.py -c /path/to/config.py

During training, the config file, checkpoints (.pth), logs, and other outputs will be stored in --output_dir.

Evaluation

python main.py --config /path/to/config.py --resume /path/to/checkpoint.pth --eval

or

python main.py -c /path/to/config.py -r /path/to/checkpoint.pth --eval

License

Our code is released under the Apache 2.0 license. Please see the LICENSE file for more information.

Copyright (c) QIU Tian and ZJU-VIPA Lab. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Citation

If you find the paper useful in your research, please consider citing:

Coming soon...

About

[软件学报 (Journal of Software) 2025] 基于链路聚合的图欺诈检测 (Path Aggregation-Based Graph Fraud Detection)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages