Gradient-based Adversarial Attacks against Text Transformers

Chuan Guo, Alexandre Sablayrolles, Hervé Jégou, Douwe Kiela
4/15/2021
354 citations
cs.CLcs.AIcs.CR
transformer-attention

Official code: facebookresearch/text-adversarial-attack (113 stars, Python, last commit 2022-12-28).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

Repo for arXiv preprint "Gradient-based Adversarial Attacks against Text Transformers"

11318PythonApr 14, 20213 years agoNOASSERTION

Similar Papers

Cite this paper

@article{guo2021gradientbased,
  title  = {Gradient-based Adversarial Attacks against Text Transformers},
  author = {Chuan Guo and Alexandre Sablayrolles and Hervé Jégou and Douwe Kiela},
  year   = {2021},
  eprint = {2104.13733},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2104.13733}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2104.13733.svg)](https://codeofpaper.com/paper/2104.13733)

Discussion