Code implementation of the paper: Graph Structure Reshaping Against Adversarial Attacks on Graph Neural Networks, which has been accepted by TKDE 2024.
python 3.6.7numpy 1.15.4scipy 1.1.0scikit-learn 0.20.2matplotlib 3.0.2torch 1.0.0tqdm 4.31.1
All experiments are conducted on a server with the following configurations:
- Operating System:
CentOS Linux release 7.4.1708 - CPU:
Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.20GHz - GPU:
GeForce GTX TITAN X
To try our code, you can use the IPython notebook demo.ipynb.
In the folder ./data, we provide the following datasets:
cora.npz, citeseer.npz and coraml.npz
[dataset]_[attack_ratio]edges_Meta-Self.npy
[dataset]_[attack_ratio]edges_Meta-Train.npy
[dataset]_[attack_ratio]_minmax.npy
We use the following publicly available implementation of baseline methods and adversarial attack methods:
- Meta-Train && Meta-Self: https://github.com/danielzuegner/gnn-meta-attack
- Min-Max Attack: https://github.com/KaidiXu/GCN_ADV_Train
- NETTACK: https://github.com/danielzuegner/nettack
- RGCN: https://github.com/thumanlab/nrlweb/blob/master/static/assets/download/RGCN.zip
- VPN: https://www.dropbox.com/sh/p36pzx1ock2iamo/AABEr7FtM5nqwC4i9nICLIsta?dl=0
- LinkPred && SubGLinkPred: https://openreview.net/pdf?id=HJxdAoCcYX
- PreProcess: https://arxiv.org/pdf/1903.01610.pdf
