Home

Awesome

Anomaly Detection on Attributed Networks via Contrastive Self-Supervised Learning

This is the source code of TNNLS paper Anomaly Detection on Attributed Networks via Contrastive Self-Supervised Learning (CoLA).

The proposed framework

Requirments

This code requires the following:

Running the experiments

Step 1: Anomaly Injection

This is a pre-processing step which injects anomalies into the original clean datasets. Take Cora dataset as an example:

python inject_anomaly.py --dataset cora

After anomaly injection, the disturbed datasets are saved into "dataset" folder.

Note that the disturbed ACM dataset is directly borrowed from the code of DOMINANT and do not need injection.

Step 2: Anomaly Detection

This step is to run the CoLA framework to detect anomalies in the network datasets. Take Cora dataset as an example:

python run.py --dataset cora

The hyperparameters are set to be the values reported in our paper. You can change the default values of other parameters to simulate different conditions.

Cite

If you compare with, build on, or use aspects of CoLA framework, please cite the following:

@article{liu2021anomaly,
  title={Anomaly Detection on Attributed Networks via Contrastive Self-Supervised Learning},
  author={Liu, Yixin and Li, Zhao and Pan, Shirui and Gong, Chen and Zhou, Chuan and Karypis, George},
  journal={IEEE Transactions on Neural Networks and Learning Systems},
  year={2021},
  publisher={IEEE}
}