ONION: A Simple and Effective Defense Against Textual Backdoor Attacks

Fanchao Qi, Yangyi Chen, Mukai Li, Yuan Yao, Zhiyuan Liu +1 more
11/20/2020
476 citations
cs.CLcs.CY

Official code: thunlp/ONION (40 stars, Python, MIT, last commit 2021-11-03).

Abstract

Backdoor attacks are a kind of emergent training-time threat to deep neural networks (DNNs). They can manipulate the output of DNNs and possess high insidiousness.

Show full abstract

In the field of natural language processing, some attack methods have been proposed and achieve very high attack success rates on multiple popular models. Nevertheless, there are few studies on defending against textual backdoor attacks. In this paper, we propose a simple and effective textual backdoor defense named ONION, which is based on outlier word detection and, to the best of our knowledge, is the first method that can handle all the textual backdoor attack situations. Experiments demonstrate the effectiveness of our model in defending BiLSTM and BERT against five different backdoor attacks. All the code and data of this paper can be obtained at https://github.com/thunlp/ONION.

View on arXivView PDF

Code Implementations(1)

thunlp/ONIONOfficial100%
MIT

Official implementation of the EMNLP 2021 paper "ONION: A Simple and Effective Defense Against Textual Backdoor Attacks"

402PythonSep 8, 20215 years agoMIT

Similar Papers

Cite this paper

@article{qi2020onion,
  title  = {ONION: A Simple and Effective Defense Against Textual Backdoor Attacks},
  author = {Fanchao Qi and Yangyi Chen and Mukai Li and Yuan Yao and Zhiyuan Liu and Maosong Sun},
  year   = {2020},
  eprint = {2011.10369},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2011.10369}
}

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

Discussion