Skip to content

Gaoyj-Min/GADY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GADY: Unsupervised Anomaly Detection on Dynamic Graphs

This is a demo for "GADY: Unsupervised Anomaly Detection on Dynamic Graphs"

This version follows the same evaluation setup as GADY, so our code are based on the GADY

Data

You can download the datasets from:

Once you do so, place the files in the 'data' folder and run, e.g:

python prepare_data.py --dataset uci

Preprocessing

To run GADY on any dataset, we first precompute the positional features. We'll use uci as a running example. We start off doing so for the training data:

python preproc_new.py --data uci --gpu 0 --r_dim 4 --data_split train --anomaly_per 0.1
python preproc_new.py --data uci --gpu 0 --r_dim 4 --data_split train --anomaly_per 0.05
python preproc_new.py --data uci --gpu 0 --r_dim 4 --data_split train --anomaly_per 0.01

The flag 'r-dim' sets the dimension of positional features.

Then, we do the same for the test splits:

python preproc_new.py --data uci --gpu 0 --r_dim 4 --data_split test --anomaly_per 0.1
python preproc_new.py --data uci --gpu 0 --r_dim 4 --data_split test --anomaly_per 0.05
python preproc_new.py --data uci --gpu 0 --r_dim 4 --data_split test --anomaly_per 0.01

Running GADY

With the precomputed positional features at hand, we run GADY using the following commands.

For UCI:

python train.py --data uci --mode 0 --gpu 0 --anomaly_per 0.1 --alpha 0.1 --betaa 10 --gamma 0.1 --n_layer 2 --use_memory --beta 0.00001 --n_epoch 50 --patience 5 --n_runs 6 --n_degree 10 --memory_dim 172 

For btc_otc:

python train.py --data btc_otc --mode 0 --gpu 0 --anomaly_per 0.1 --alpha 0.1 --betaa 10 --gamma 0.1 --n_layer 2 --use_memory --beta 0.00001 --n_epoch 50 --patience 5 --n_runs 6 --n_degree 10 --memory_dim 172

For email_dnc:

python train.py --data email_dnc --mode 0 --gpu 0 --anomaly_per 0.1 --alpha 0.1 --betaa 10 --gamma 0.1 --n_layer 2 --use_memory --beta 0.00001 --n_epoch 50 --patience 5 --n_runs 6 --n_degree 10 --memory_dim 172

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages