Skip to content

QZ-WANG/ACT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cross-Domain Graph Anomaly Detection via Anomaly-aware Contrastive Alignment (ACT)

PyTorch

The official PyTorch implementation of Cross-Domain Graph Anomaly Detection via Anomaly-aware Contrastive Alignment, AAAI2023, to appear.

By Qizhou Wang, Guansong Pang, Mahsa Salehi, Wray Buntine and Christopher Leckie.

drawing

t-SNE visualisation of a CD GAD dataset before (a) and after (b) our anomaly-aware contrastive alignment. Compared to (a) where the two domains show clear discrepancies in different aspects like anomaly distribution, in (b) our domain alignment approach effectively aligns the normal class, while pushing away the anomalous nodes in both source and target domains from the normal class.

Requirements

  • python==3.8.12
  • pytorch==1.8.0
  • pytorch geometric==2.0.1
  • numpy==1.21.2
  • scipy==1.7.1
  • cudatoolkit==11.1.1
  • scikit-learn==1.0.1
  • geomloss==0.2.4

    Instructions

    Miniconda/Anaconda is recommended for setting up the dependencies.

    git clone https://github.com/QZ-WANG/ACT
    cd ACT
    conda env create -f env/environment.yml

    To set up the dataset directories, place the data files as the following:

    datasets/
    ├── Amazon
    │   └── Amazon.mat
    ├── YelpHotel
    │   └── YelpHotel.mat
    ├── YelpNYC
    │   └── YelpNYC.mat
    └── YelpRes
        └── YelpRes.mat
    

    The authors of COMMANDER (Ding et al. 2021) have kindly allowed us to share the datasets. Please ensure appropriate citations when using the datasets.

    Getting started

    To run the framework:

    chmod +x ./script/pipeline.sh
    ./script/pipeline.sh <name-of-pipeline-config-file>

    Please see the sample meta config file in ./exp/pipelines/config.

    Acknowledgement

    We thank the authors of COMMANDER (Ding et al. 2021) for sharing the datasets. This repository is developed using PyTorch Geometric.

  • About

    The official PyTorch implementation of Cross-Domain Graph Anomaly Detection via Anomaly-aware Contrastive Alignment (AAAI2023, to appear).

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published