Textual Backdoor Attacks Can Be More Harmful via Two Simple Tricks

Yangyi Chen, Fanchao Qi, Hongcheng Gao, Zhiyuan Liu, Maosong Sun
10/15/2021
cs.CRcs.AIcs.CL

Official code: thunlp/StyleAttack (48 stars, Python, MIT, last commit 2022-10-12).

Abstract

Backdoor attacks are a kind of emergent security threat in deep learning. After being injected with a backdoor, a deep neural model will behave normally on standard inputs but give adversary-specified predictions once the input contains specific backdoor triggers.

Show full abstract

In this paper, we find two simple tricks that can make existing textual backdoor attacks much more harmful. The first trick is to add an extra training task to distinguish poisoned and clean data during the training of the victim model, and the second one is to use all the clean training data rather than remove the original clean data corresponding to the poisoned data. These two tricks are universally applicable to different attack models. We conduct experiments in three tough situations including clean data fine-tuning, low-poisoning-rate, and label-consistent attacks. Experimental results show that the two tricks can significantly improve attack performance. This paper exhibits the great potential harmfulness of backdoor attacks. All the code and data can be obtained at \url{https://github.com/thunlp/StyleAttack}.

View on arXivView PDF

Code Implementations(1)

thunlp/StyleAttackOfficial100%
MIT

Code and data of the EMNLP 2021 paper "Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style Transfer"

4810Python, ShellSep 7, 20214 years agoMIT

Similar Papers

Cite this paper

@article{chen2021textual,
  title  = {Textual Backdoor Attacks Can Be More Harmful via Two Simple Tricks},
  author = {Yangyi Chen and Fanchao Qi and Hongcheng Gao and Zhiyuan Liu and Maosong Sun},
  year   = {2021},
  eprint = {2110.08247},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2110.08247}
}

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

Discussion