hanjun-dai / graph_adversarial_attack Goto Github PK
View Code? Open in Web Editor NEWAdversarial Attack on Graph Structured Data (https://arxiv.org/abs/1806.02371)
License: MIT License
Adversarial Attack on Graph Structured Data (https://arxiv.org/abs/1806.02371)
License: MIT License
When I run
git clone [email protected]:Hanjun-Dai/graph_adversarial_attack --recursive
It says permission denied. I need to git clone pytorch_structure2vec separately
The isTerminal(self)
function is in located at graph_adversarial_attack/code/graph_attack/rl_common.py
.
def isTerminal(self):
if self.n_steps == 2 * self.n_edges:
return True
return False
When initializing, self.n_edges
is set 1
, so isTerminal(self)
would return true when self.n_steps
is 2
.
Does this mean that after the two hierarchical actions are completed, the MDP ends, and there is only one state transition for a simulation in run_simulation(self)
function which is located at graph_adversarial_attack/code/graph_attack/dqn.py
?
If this is the case, isn't it inconsistent with the description "Once the agent modifies m edges, the process stops." in section 3.1 of the paper?
Looking forward to your reply, thank you Hanjun.
I am able to successfully run the graph classification, but when I try to attack the graph, I get this error: undefined symbol: __cudaRegisterFatBinaryEnd
This error occurs with each attack method except for the genetic algorithm which works successfully. The error also occurs when running the node_classification.
I am using CUDA 9.1, pytorch 0.3.1, and cffi 1.11.2
Hi, it seems the code only modifies one edge per graph. Is there a simpler way to change the code to multiple edges modification? I have not found a parameter in the code to control the edge budget. Thanks.
Hi, hanjun. Thanks a lot for your great work! I have a question about the hierarchical Q-Learning mentioned in the paper. In equation 11, there are 2M Q functions and the paper claims only two distinct parametrizations are enough. However, when I read the code /node_attack/q_net_node.py, in line 163, there initialize num_steps Q networks which are different from the paper. Does my understanding have any mistakes? Looking forward to your reply!!
Hello! I meet a problem when running the codes:
In custom_func.py, there is a code : "from _ext import my_lib", however, I can't find this pakage named "_ext", could you tell me how can I get it?
During make the codes, I got a mistake, too:
~/RS/graph_adversarial_attack/code/common$ make /bin/nvcc --default-stream per-thread -I/include -I/mkl/include -I/tbb/include -Iinclude -std=c++11 --use_fast_math --compiler-options '-fPIC' -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 -M src/custom_kernel.cu -o _ext/custom_kernel.d -odir _ext make: /bin/nvcc: Command not found make: *** [Makefile:42: _ext/custom_kernel.o] Error 127
I guess it is because there is no pakage named "_ext", so again I wonder how to get this pakage.
I hope that you could reply, thanks!
Hi, the graph embedding used in the paper is structure2vec embedding. Do you know where there is a python 3 implementation of structure2vec without using c++?
I tried to replace the embedding with 2 two layer GCN of hidden dim 64, but I have not get it working. Theoretically I think it should work. Can you please give suggestions on the embedding?
Thanks.
graph_adversarial_attack/code/graph_attack/nstep_replay_mem.py
Lines 54 to 66 in 57b2853
Is this hash function problematic? It seems that this function is equivalent to key = a_t % base
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.