IMBERT: Making BERT Immune to Insertion-based Backdoor Attacks

Xuanli He, Jun Wang, Benjamin Rubinstein, Trevor Cohn
5/25/2023
cs.CL

No confident code implementation found for this paper.

Abstract

Backdoor attacks are an insidious security threat against machine learning models. Adversaries can manipulate the predictions of compromised models by inserting triggers into the training phase. Various backdoor attacks have been devised which can achieve nearly perfect attack success without affecting model predictions for clean inputs. Means of mitigating such vulnerabilities are underdeveloped, especially in natural language processing. To fill this gap, we introduce IMBERT, which uses either gradients or self-attention scores derived from victim models to self-defend against backdoor attacks at inference time. Our empirical studies demonstrate that IMBERT can effectively identify up to 98.5% of inserted triggers. Thus, it significantly reduces the attack success rate while attaining competitive accuracy on the clean dataset across widespread insertion-based attacks compared to two baselines. Finally, we show that our approach is model-agnostic, and can be easily ported to several pre-trained transformer models.

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{he2023imbert,
  title  = {IMBERT: Making BERT Immune to Insertion-based Backdoor Attacks},
  author = {Xuanli He and Jun Wang and Benjamin Rubinstein and Trevor Cohn},
  year   = {2023},
  eprint = {2305.16503},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.16503v1}
}

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

Discussion