Open machanic opened 4 years ago
First attack information is printed out at https://github.com/IBM/Autozoom-Attack/blob/d9e94f3b7ed67eb7db4b375344297bed0a391534/blackbox_attack.py#L294
@chunchentu, I am written a paper to compare your method.
The autozoom-attack is not a l-p constraint attack method, if we use the code of line 294 you mentioned to count query number for reporting, the l2 distortion is too large because I found the l2dist (also loss2) number is very large in my experiment. Thus it is not fair to use this query to compare with l-p $\epsilon$-bounded attack.
I carefully read your paper, I notice in Table 1 and Table 2 of paper, you count two types of query count number: (1) mean query count of initial success , and (2) query count of per-pixel L2 distortion <= 0.0015.
(1) Is the line 294 (following link) calculating query count of initial success? https://github.com/IBM/Autozoom-Attack/blob/d9e94f3b7ed67eb7db4b375344297bed0a391534/blackbox_attack.py#L294
(2) How to calculate query count of per-pixel L2 distortion <= 0.0015? Should I write only if o_bestl2 <= 0.0015
, we then calculate the query count. To this end, we need to add counting code in
https://github.com/IBM/Autozoom-Attack/blob/d9e94f3b7ed67eb7db4b375344297bed0a391534/blackbox_attack.py#L298
Am I right?
Can you help me please, I will cite your paper. Thank you.
We write the code to parse the printed log. You can insert code to record the query counts when it first reach your predefined criteria. If you are looking for some l-p norm, you have to add the calculations.
Hello, I am re-implementing autozoom attack into pytorch version. I want to add the code for counting query times when the input has firstly been successful attacked, as reported by the paper's table.
However, I found that your code does not have
early abort
mechanism which break the for-loop when the input has been already attacked successfully? It means when I setmax_iterations=1000
, The final query number is always2 x 1000
orbatch_size x 2 x 1000
according todef get_eval_costs
.How to count the real query number when the input has firstly been successful attacked.