Character-level White-Box Adversarial Attacks against Transformers via Attachable Subwords Substitution
Liu, Aiwei, Yu, Honghai, Hu, Xuming, Li, Shu'ang, Lin, Li, Ma, Fukun, Yang, Yawen, Wen, Lijie
–arXiv.org Artificial Intelligence
We propose the first character-level white-box adversarial attack method against transformer models. The intuition of our method comes from the observation that words are split into subtokens before being fed into the transformer models and the substitution between two close subtokens has a similar effect to the character modification. Our method mainly contains three steps. First, a gradient-based method is adopted to find the most vulnerable words in the sentence. Then we split the selected words into subtokens to replace the origin tokenization result from the transformer tokenizer. Finally, we utilize an adversarial loss to guide the substitution of attachable subtokens in which the Gumbel-softmax trick is introduced to ensure gradient propagation. Meanwhile, we introduce the visual and length constraint in the optimization process to achieve minimum character modifications. Extensive experiments on both sentence-level and token-level tasks demonstrate that our method could outperform the previous attack methods in terms of success rate and edit distance. Furthermore, human evaluation verifies our adversarial examples could preserve their origin labels.
arXiv.org Artificial Intelligence
Oct-30-2022
- Country:
- Oceania > Australia
- North America
- Dominican Republic (0.04)
- Canada (0.04)
- United States
- New York (0.04)
- Oregon > Multnomah County
- Portland (0.04)
- New Mexico > Santa Fe County
- Santa Fe (0.04)
- Minnesota > Hennepin County
- Minneapolis (0.14)
- California
- San Francisco County > San Francisco (0.14)
- San Diego County > San Diego (0.04)
- Alameda County > Berkeley (0.04)
- Europe
- Asia > China
- Africa > Ethiopia
- Addis Ababa > Addis Ababa (0.04)
- Genre:
- Research Report (0.82)
- Industry:
- Information Technology > Security & Privacy (1.00)
- Government > Military (0.71)
- Technology: