Code implementation of the paper: Graph Structure Reshaping Against Adversarial Attacks on Graph Neural Networks, which has been submitted to TKDE for review.
python 3.6.7
numpy 1.15.4
scipy 1.1.0
scikit-learn 0.20.2
matplotlib 3.0.2
torch 1.0.0
tqdm 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