danielzuegner / nettack

Implementation of the paper "Adversarial Attacks on Neural Networks for Graph Data".
https://www.cs.cit.tum.de/daml/forschung/nettack/
MIT License
218 stars 56 forks source link

a problem about the node feature #10

Closed lushishuai closed 4 years ago

lushishuai commented 4 years ago

hi,I am honored to read your paper, and I would like to use your ideas in my own data set. But it didn't work very well. I think it's because of my data set. In my data set,the node feature is a number between -1 and 1 which is different from yours dataset. And when i set perturb_features = True,the program will always select the same feature of the same node to attack.which is this:

Starting attack
Attack node with ID 4544 using structure and feature perturbations
Attacking the node indirectly via 5 influencer nodes
Performing 100 perturbations

Influencer nodes: [3463 1829 3198 1837 4399]

...1/100 perturbations ...

Edge perturbation: [1837 1079]

...2/100 perturbations ...

Edge perturbation: [1837 1824]

...3/100 perturbations ...

Feature perturbation: [1829 35]

...4/100 perturbations ...

Feature perturbation: [1829 35]

...5/100 perturbations ...

Feature perturbation: [1829 35]

...6/100 perturbations ...

as you can see :in 3,4,5 and after,the network always select feature [1829,35] to attack. What do you think the problem is and how do I change the code?Looking forward to your reply!

danielzuegner commented 4 years ago

Hi,

thanks for your message. The feature attacks of nettack are only meant for binary node attributes. You can still run nettack with only structure perturbations, though.

Best,

Daniel