Punctuation Matters! Stealthy Backdoor Attack for Language Models

Xuan Sheng, Zhicheng Li, Zhaoyang Han, Xiangmao Chang, Piji Li
12/26/2023
cs.CLcs.CR

No confident code implementation found for this paper.

Abstract

Recent studies have pointed out that natural language processing (NLP) models are vulnerable to backdoor attacks. A backdoored model produces normal outputs on the clean samples while performing improperly on the texts with triggers that the adversary injects. However, previous studies on textual backdoor attack pay little attention to stealthiness. Moreover, some attack methods even cause grammatical issues or change the semantic meaning of the original texts. Therefore, they can easily be detected by humans or defense systems. In this paper, we propose a novel stealthy backdoor attack method against textual models, which is called \textbf{PuncAttack}. It leverages combinations of punctuation marks as the trigger and chooses proper locations strategically to replace them. Through extensive experiments, we demonstrate that the proposed method can effectively compromise multiple models in various tasks. Meanwhile, we conduct automatic evaluation and human inspection, which indicate the proposed method possesses good performance of stealthiness without bringing grammatical issues and altering the meaning of sentences.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{sheng2023punctuation,
  title  = {Punctuation Matters! Stealthy Backdoor Attack for Language Models},
  author = {Xuan Sheng and Zhicheng Li and Zhaoyang Han and Xiangmao Chang and Piji Li},
  year   = {2023},
  eprint = {2312.15867},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.15867v1}
}

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/2312.15867.svg)](https://codeofpaper.com/paper/2312.15867)

Discussion