facebookresearch / text-adversarial-attack

Repo for arXiv preprint "Gradient-based Adversarial Attacks against Text Transformers"
Other
95 stars 11 forks source link

Hyperparameter "gumbel_samples" #8

Open sullendhy opened 1 year ago

sullendhy commented 1 year ago

Thanks for your perfect work! As a junior student, I have learned a lot from your work. And I would like to know a little more in depth. In your source code file "white_attack.py" and "evaluate_adv_samples.py", what does the last hyperparameter "gumbel_samples" mean? I am not sure whether "gumbel_samples" refers to the number of sampled adversarial samples from adversarial distribution for each benign input. And how can this hyperparameter influence the attack performance? Thank you.

cg563 commented 1 year ago

Yes, the hyperparameter gumbel_samples influences how many adversarial examples are drawn at test time. Once the adversarial distribution is optimized, one can theoretically draw infinitely many adversarial examples from it, but in the experiments we set it to 1000 as going beyond this number won't have much effect on success rate.

sullendhy commented 1 year ago

Thank you very much for your prompt reply and your patience as always. By the way, is there any other similar paper on adversarial attack and defense in your lab that you can recommend for my study. Thank you.