Learning to Discriminate Perturbations for Blocking Adversarial Attacks in Text Classification

Yichao Zhou, Jyun-Yu Jiang, Kai-Wei Chang, Wei Wang
9/6/2019
cs.CL

Official code: joey1993/bert-defender (15 stars, Python, last commit 2020-02-25).

Abstract

Adversarial attacks against machine learning models have threatened various real-world applications such as spam filtering and sentiment analysis. In this paper, we propose a novel framework, learning to DIScriminate Perturbations (DISP), to identify and adjust malicious perturbations, thereby blocking adversarial attacks for text classification models.

Show full abstract

To identify adversarial attacks, a perturbation discriminator validates how likely a token in the text is perturbed and provides a set of potential perturbations. For each potential perturbation, an embedding estimator learns to restore the embedding of the original word based on the context and a replacement token is chosen based on approximate kNN search. DISP can block adversarial attacks for any NLP model without modifying the model structure or training procedure. Extensive experiments on two benchmark datasets demonstrate that DISP significantly outperforms baseline methods in blocking adversarial attacks for text classification. In addition, in-depth analysis shows the robustness of DISP across different situations.

View on arXivView PDF

Code Implementations(1)

codes for paper "learning to discriminate perturbations for blocking adversarial attacks in text classification" in EMNLP19

153PythonJan 19, 20206 years ago

Similar Papers

Cite this paper

@article{zhou2019learning,
  title  = {Learning to Discriminate Perturbations for Blocking Adversarial Attacks in Text Classification},
  author = {Yichao Zhou and Jyun-Yu Jiang and Kai-Wei Chang and Wei Wang},
  year   = {2019},
  eprint = {1909.03084},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1909.03084}
}

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

Discussion