li attack clarification
gehuangyi20 opened this issue · 2 comments
gehuangyi20 commented
Would you like to explain the meaning of the following code?
nn_robust_attacks/li_attack.py
Line 135 in 87f8c65
For me, it does not make sense
step == CONST-1
, step is an integer related to iteration vs CONST is a float point value related to loss value.works
is the loss value of the instance. Why do you want to set the threshold of loss value to be0.0001*CONST
? I think your intuition is to pushloss2
to 0, andloss1
less than 0.0001. I am not sure whether this explanation makes sense.
carlini commented
-
The step/const thing there is a bug, thanks for catching that. It should be
step == self.MAX_ITERATIONS-1
. -
Exactly right -- we want it to be small. We check again on the following line that the argmax is what we want, so this line is just to optimize for not having to re-run a second time before checking the argmax.