KDEGroup / CMT

Source code for DASFAA'24 paper "Crowdsourcing Fraud Detection over Heterogeneous Temporal MMMA Graph"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CMT

Source code for DASFAA'24 paper "Crowdsourcing Fraud Detection over Heterogeneous Temporal MMMA Graph" [arXiv preprint].

package requirement

  • python==3.8.13
  • dgl==0.8.1
  • numpy==1.21.5
  • pandas==1.4.3
  • pytorch==1.10.1

data

Download data from the competition website: https://ai.ppdai.com/mirror/goToMirrorDetailSix?mirrorId=28.

Download the raw data to a directory, and replace the corresponding directory in Input.py

Update: The original download link has expired. Please download the data from: https://dgraph.xinye.com/dataset.

run

Before running any method below, replace the corresponding directory for storing log file and trained model file in each python file.

GCN

python GCN.py

GAT

python GAT.py

RGCN

python RGCN.py

AddGraph_homo

python AddGraph/run.py

AddGraph_hetero

python AddGraph/run_hetero.py

DCI

python DCI/main.py

GeniePath

python GeniePath/main.py

SimpleHGN

python SimpleHGN.py

CMT

HG_Encoder

python HG_Encoder.py

Temporal Snapshot Sequence (TSS)

  1. Get the representation for each user under different snapshots:

    python pretrainHeteroDynamic.py
  2. Run Transformer Encoder to transform the obtained user behavioral sequences into constructed tss feature:

    python TFEncoder_tss.py

User Relation Sequence (URS)

  1. Construct and sample the user relation sequence for each user:

    # run user_seq_construct()
    python Input.py
  2. Run Transformer Encoder to transform the obtained user relation sequence into constructed tss feature:

    python TFEncoder_urs.py

Sequence Constrastive Learning

run the following scipt to acquire the sequential feautre transformed with Transformer Encoder by multi-task learning with contrastive learning.

# Temporal Snapshot Sequence
python contrastive/tss.py
# User Relation Sequence
python contrastive/urs.py

Combine Together

Concatenate the two sequential features (tss and urs) with raw feature as the input of graph classification model at current timestamp.

python concat/tss_cl_urs_cl.py

About

Source code for DASFAA'24 paper "Crowdsourcing Fraud Detection over Heterogeneous Temporal MMMA Graph"

License:MIT License


Languages

Language:Python 100.0%