Generating Natural Language Adversarial Examples through Probability Weighted Word Saliency

Shuhuai Ren, Yihe Deng, Kun He, Wanxiang Che


Abstract
We address the problem of adversarial attacks on text classification, which is rarely studied comparing to attacks on image classification. The challenge of this task is to generate adversarial examples that maintain lexical correctness, grammatical correctness and semantic similarity. Based on the synonyms substitution strategy, we introduce a new word replacement order determined by both the word saliency and the classification probability, and propose a greedy algorithm called probability weighted word saliency (PWWS) for text adversarial attack. Experiments on three popular datasets using convolutional as well as LSTM models show that PWWS reduces the classification accuracy to the most extent, and keeps a very low word substitution rate. A human evaluation study shows that our generated adversarial examples maintain the semantic similarity well and are hard for humans to perceive. Performing adversarial training using our perturbed datasets improves the robustness of the models. At last, our method also exhibits a good transferability on the generated adversarial examples.
Anthology ID:
P19-1103
Volume:
Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics
Month:
July
Year:
2019
Address:
Florence, Italy
Venue:
ACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
1085–1097
Language:
URL:
https://aclanthology.org/P19-1103
DOI:
10.18653/v1/P19-1103
Bibkey:
Cite (ACL):
Shuhuai Ren, Yihe Deng, Kun He, and Wanxiang Che. 2019. Generating Natural Language Adversarial Examples through Probability Weighted Word Saliency. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1085–1097, Florence, Italy. Association for Computational Linguistics.
Cite (Informal):
Generating Natural Language Adversarial Examples through Probability Weighted Word Saliency (Ren et al., ACL 2019)
Copy Citation:
PDF:
https://aclanthology.org/P19-1103.pdf
Video:
 https://vimeo.com/384478489
Code
 JHL-HUST/PWWS
Data
IMDb Movie ReviewsYahoo! Answers