alexfanjn / GANI

The relevant codes for "GANI: Global Attacks on Graph Neural Networks via Imperceptible Node Injections".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GANI: Global Attacks via Node Injections

The relevant codes for "GANI: Global Attacks on Graph Neural Networks via Imperceptible Node Injections". [arXiv]

Fig. 1. A systematic framework of GANI and corresponding evaluations. The red marks indicate the corresponding generated fake node including both features and neighbors. The colors of nodes represent the classes, and the cloud-shaped circle means a wrong classification of the node.

  • Requirements

    • torch == 1.8.0

    • deeprobust == 0.2.1

    • Other packages will be installed together when installing deeprobust

  • Code illustrations

    • data: Folder to save the generated adversarial data after attacks.

    • dataset: Folder of clean datasets.

    • ori_model: Folder of original models trained from the clean data.

    • ga_homophily.py: The genetic algorithm for neighbor selection of GANI.

    • main.py: Examples for using GANI to achieve node injection attacks.

    • node_injection.py: Main codes for GANI.

    • utils.py: Main codes for evaluation.

  • Run the demo

    python main.py
    
  • Cite

    If you find this work is helpful, please cite our paper, Thank you.

    TBA
    

About

The relevant codes for "GANI: Global Attacks on Graph Neural Networks via Imperceptible Node Injections".

License:GNU General Public License v3.0


Languages

Language:Python 100.0%