Searching for a Search Method: Benchmarking Search Algorithms for Generating NLP Adversarial Examples

Jin Yong Yoo, John Morris, Eli Lifland, Yanjun Qi


Abstract
We study the behavior of several black-box search algorithms used for generating adversarial examples for natural language processing (NLP) tasks. We perform a fine-grained analysis of three elements relevant to search: search algorithm, search space, and search budget. When new search algorithms are proposed in past work, the attack search space is often modified alongside the search algorithm. Without ablation studies benchmarking the search algorithm change with the search space held constant, one cannot tell if an increase in attack success rate is a result of an improved search algorithm or a less restrictive search space. Additionally, many previous studies fail to properly consider the search algorithms’ run-time cost, which is essential for downstream tasks like adversarial training. Our experiments provide a reproducible benchmark of search algorithms across a variety of search spaces and query budgets to guide future research in adversarial NLP. Based on our experiments, we recommend greedy attacks with word importance ranking when under a time constraint or attacking long inputs, and either beam search or particle swarm optimization otherwise.
Anthology ID:
2020.blackboxnlp-1.30
Volume:
Proceedings of the Third BlackboxNLP Workshop on Analyzing and Interpreting Neural Networks for NLP
Month:
November
Year:
2020
Address:
Online
Editors:
Afra Alishahi, Yonatan Belinkov, Grzegorz Chrupała, Dieuwke Hupkes, Yuval Pinter, Hassan Sajjad
Venue:
BlackboxNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
323–332
Language:
URL:
https://aclanthology.org/2020.blackboxnlp-1.30
DOI:
10.18653/v1/2020.blackboxnlp-1.30
Bibkey:
Cite (ACL):
Jin Yong Yoo, John Morris, Eli Lifland, and Yanjun Qi. 2020. Searching for a Search Method: Benchmarking Search Algorithms for Generating NLP Adversarial Examples. In Proceedings of the Third BlackboxNLP Workshop on Analyzing and Interpreting Neural Networks for NLP, pages 323–332, Online. Association for Computational Linguistics.
Cite (Informal):
Searching for a Search Method: Benchmarking Search Algorithms for Generating NLP Adversarial Examples (Yoo et al., BlackboxNLP 2020)
Copy Citation:
PDF:
https://aclanthology.org/2020.blackboxnlp-1.30.pdf
Optional supplementary material:
 2020.blackboxnlp-1.30.OptionalSupplementaryMaterial.pdf
Code
 QData/TextAttack +  additional community code
Data
SNLI