English

Gradient-based Adversarial Attacks against Text Transformers

Computation and Language 2021-04-29 v1 Artificial Intelligence Cryptography and Security Machine Learning

Abstract

We propose the first general-purpose gradient-based attack against transformer models. Instead of searching for a single adversarial example, we search for a distribution of adversarial examples parameterized by a continuous-valued matrix, hence enabling gradient-based optimization. We empirically demonstrate that our white-box attack attains state-of-the-art attack performance on a variety of natural language tasks. Furthermore, we show that a powerful black-box transfer attack, enabled by sampling from the adversarial distribution, matches or exceeds existing methods, while only requiring hard-label outputs.

Keywords

Cite

@article{arxiv.2104.13733,
  title  = {Gradient-based Adversarial Attacks against Text Transformers},
  author = {Chuan Guo and Alexandre Sablayrolles and Hervé Jégou and Douwe Kiela},
  journal= {arXiv preprint arXiv:2104.13733},
  year   = {2021}
}
R2 v1 2026-06-24T01:35:52.280Z