DSE-MSU / DeepRobust

A pytorch adversarial library for attack and defense methods on images and graphs
MIT License
994 stars 192 forks source link

The implement of topology attack on gat use this libraries #120

Open YaningJia opened 2 years ago

YaningJia commented 2 years ago

Hi, I'm trying to implement topology attack on gat, first, i use pyg to do it and use the same means as you, then to avoid the problem of adj, i use pytorch, but that both get rid of the gradients. How can i implement it?Thank you.

YaningJia commented 2 years ago

Hi,@ChandlerBang can the project support topology attack on gat now?

ChandlerBang commented 1 year ago

Hi,

Thanks for your interest in DeepRobust. I wanted to clarify a few points here:

  1. The most straightforward way to attack other models (GAT and GraphSAGE) is to use the attacked graph generated by GCN (which is the default backbone model). In detail, we first use attack methods to attack GCN model and obtain the attacked graph. Then we feed this attacked graph to other models. The attacked graph is shown to be able to transfer to attack other models.
  2. You can also use GraphSAGE/GAT as backbone models. But these models do not directly take the edge_weight as input, so we did modification on the model. An example is shown in test_prbcd_cora.py. Try:
    pip install deeprobust==0.2.8
    python examples/graph/test_prbcd_cora.py