Defending Against Backdoor Attacks in Natural Language Generation

Xiaofei Sun, Xiaoya Li, Yuxian Meng, Xiang Ao, Lingjuan Lyu +2 more
6/3/2021
cs.CL

Official code: ShannonAI/backdoor_nlg (18 stars, Shell, last commit 2021-07-01).

Abstract

The frustratingly fragile nature of neural network models make current natural language generation (NLG) systems prone to backdoor attacks and generate malicious sequences that could be sexist or offensive. Unfortunately, little effort has been invested to how backdoor attacks can affect current NLG models and how to defend against these attacks.

Show full abstract

In this work, by giving a formal definition of backdoor attack and defense, we investigate this problem on two important NLG tasks, machine translation and dialog generation. Tailored to the inherent nature of NLG models (e.g., producing a sequence of coherent words given contexts), we design defending strategies against attacks. We find that testing the backward probability of generating sources given targets yields effective defense performance against all different types of attacks, and is able to handle the {\it one-to-many} issue in many NLG tasks such as dialog generation. We hope that this work can raise the awareness of backdoor risks concealed in deep NLG systems and inspire more future work (both attack and defense) towards this direction.

View on arXivView PDF

Code Implementations(1)

180Shell, PythonJun 3, 20215 years ago

Similar Papers

Cite this paper

@article{sun2021defending,
  title  = {Defending Against Backdoor Attacks in Natural Language Generation},
  author = {Xiaofei Sun and Xiaoya Li and Yuxian Meng and Xiang Ao and Lingjuan Lyu and Jiwei Li and Tianwei Zhang},
  year   = {2021},
  eprint = {2106.01810},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.01810}
}

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

Discussion