English

HotFlip: White-Box Adversarial Examples for Text Classification

Computation and Language 2018-05-25 v2 Machine Learning

Abstract

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.

Keywords

Cite

@article{arxiv.1712.06751,
  title  = {HotFlip: White-Box Adversarial Examples for Text Classification},
  author = {Javid Ebrahimi and Anyi Rao and Daniel Lowd and Dejing Dou},
  journal= {arXiv preprint arXiv:1712.06751},
  year   = {2018}
}
R2 v1 2026-06-22T23:22:30.355Z