%0 Conference Proceedings %T HotFlip: White-Box Adversarial Examples for Text Classification %A Ebrahimi, Javid %A Rao, Anyi %A Lowd, Daniel %A Dou, Dejing %Y Gurevych, Iryna %Y Miyao, Yusuke %S Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers) %D 2018 %8 July %I Association for Computational Linguistics %C Melbourne, Australia %F ebrahimi-etal-2018-hotflip %X We propose an efficient method to generate white-box adversarial examples to trick a character-level neural classifier. We find that only a few manipulations are needed to greatly decrease the accuracy. Our method relies on an atomic flip operation, which swaps one token for another, based on the gradients of the one-hot input vectors. Due to efficiency of our method, we can perform adversarial training which makes the model more robust to attacks at test time. With the use of a few semantics-preserving constraints, we demonstrate that HotFlip can be adapted to attack a word-level classifier as well. %R 10.18653/v1/P18-2006 %U https://aclanthology.org/P18-2006 %U https://doi.org/10.18653/v1/P18-2006 %P 31-36