sgmath12 / efficient-decision-based-black-box-adversarial-attacks-on-face-recognition

28 stars 5 forks source link

A question in generate_adv.py criterion() function #1

Closed Lan555 closed 3 years ago

Lan555 commented 3 years ago

why if cosdistance < best_thresh, C=0. If I choose the Impersonation attack, should I change it to cosdistance > best_thresh?

sgmath12 commented 3 years ago

yes, In case of the impersnonation attack, you sholud increase cosine distance between x_adv and the target image.

Since my code is the implementation of dodging attack, we should decrease cosine distance.

thanks

Lan555 commented 3 years ago

So I increase cosine distance, and put x_adv = y as the initial point of x_adv rather than x_adv = radom. But problem is x_adv will become x, why?

sgmath12 commented 3 years ago

So your objective is make a x_adv that looks like x but classified as y. isn't it ? Since there is distance loss between x and x_adv, the image will get closer to x. Consider distance loss and not just cosine distance

Lan555 commented 3 years ago

So you mean in order to generate the impersnonation attack, It's not only just changing inital x_adv and "cosdistance < best_thresh" to "cosdistance > best_thresh", but also have some other operation?

sgmath12 commented 3 years ago

I think you're right. According the original paper, changing the initial x_adv and increasing cos distance will be enough. If it doesn't work well, I think the problem will come from other parts like covariance or p_c . Thanks.