adversarial-examples icon indicating copy to clipboard operation
adversarial-examples copied to clipboard

How to implement a new model in the adversarial-example model

Open sebastianwgm opened this issue 1 year ago • 3 comments

Dear authors

We are currently working on a black-box adversarial attack on the model code2vec based on this code. We trained a code2vec substitute model based on a different attention method (where we used as input the predicted output from code2vec).

We are trying to implement our pretrained substitute model in the adversarial-example code. However, we have the following questions:

Why are you calculating the gradient in the test graph? (method build_test_graph_with_loss)

We want to use our substitute model to get the gradient w.r.t inputs and then test your pretrained model (code2vec) with our updated adversarial code. We are not sure where to make changes on model.py to include our model.

Thank you

sebastianwgm avatar Apr 08 '23 17:04 sebastianwgm