AnalysisBySynthesis icon indicating copy to clipboard operation
AnalysisBySynthesis copied to clipboard

Really slow attacks with demo code

Open renebidart opened this issue 6 years ago • 3 comments

I'm trying to run the demo in attacks.ipynb, but it is really slow, taking over 30 minutes to run the PointwiseAttack.

I'm using GPU and running the classification was quite fast, but I'm wondering if I may be doing something wrong, or is it normally like this?

Thanks

renebidart avatar Oct 24 '18 02:10 renebidart

@lukas-schott Could you take a look?

wielandbrendel avatar Nov 19 '18 13:11 wielandbrendel

I am not using GPU but I am also thinking something might be wrong on my end if after 20min I still did not get the adversarial example.

Edit: got it after about 20 hours (just one example). Would be cool to know if this is normal time taken.

jaks19 avatar Nov 21 '18 02:11 jaks19

Yes, the pointwise attack is quite slow ~30 min / adversarial on a Titan X.

I implemented some speedups: switched to an attack which requires less iterations and changed the default model to an approximation of the ABS model (n_iter=10 instead of n_iter=50). It should now take ~1-5 min to create an adversarials on a GPU with the provided code.

lukas-schott avatar Nov 28 '18 14:11 lukas-schott