Code Monkey home page Code Monkey logo

graph_adversarial_attack's People

Contributors

hanjun-dai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

graph_adversarial_attack's Issues

Question on the "isTerminal" function

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.

Error with graph_attack and node_classification

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

multiple edges modification

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.

Question about hierarchical Q-Learning

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!!

Where is "_ext"?

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!

Graph embedding

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.

Question on the hash_state_action function

def hash_state_action(s_t, a_t):
key = s_t[0]
base = 179424673
for e in s_t[1].directed_edges:
key = (key * base + e[0]) % base
key = (key * base + e[1]) % base
if s_t[2] is not None:
key = (key * base + s_t[2]) % base
else:
key = (key * base) % base
key = (key * base + a_t) % base
return key

Is this hash function problematic? It seems that this function is equivalent to key = a_t % base.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.