facebookresearch / text-adversarial-attack

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

Implementation of "query" #7

Closed sullendhy closed 1 year ago

sullendhy commented 1 year ago

Thank you for your wonderful job and code. when I try to reproduce your result, i can not find the result of "query" metric. So what does the "query" metric mean in the paper. And i will appreciate it if you can tell me the specific implementation of calculating "query". Thanks again for your nice job !

cg563 commented 1 year ago

Thank you for your interest in our paper!

Query refers to the number of black-box queries to the target model before successfully attacking it. This is only relevant for the transfer attack experiment. You can extract the number of queries from the result of the evaluate_adv_samples.py as follows.

Hope this helps.