A Context Aware Approach for Generating Natural Language Attacks

Rishabh Maheshwary, Saket Maheshwary, Vikram Pudi
12/24/2020
cs.CL

Official code: RishabhMaheshwary/contextattack (6 stars, Python, last commit 2020-12-16).

Abstract

We study an important task of attacking natural language processing models in a black box setting. We propose an attack strategy that crafts semantically similar adversarial examples on text classification and entailment tasks.

Show full abstract

Our proposed attack finds candidate words by considering the information of both the original word and its surrounding context. It jointly leverages masked language modelling and next sentence prediction for context understanding. In comparison to attacks proposed in prior literature, we are able to generate high quality adversarial examples that do significantly better both in terms of success rate and word perturbation percentage.

View on arXivView PDF

Code Implementations(1)

A Context Aware Approach for Generating Natural Language Attacks.

60Python, ShellNov 5, 20205 years ago
adversarial-attacksbertdeep-learningmachine-learningmasked-language-models+1 more

Similar Papers

Cite this paper

@article{maheshwary2020context,
  title  = {A Context Aware Approach for Generating Natural Language Attacks},
  author = {Rishabh Maheshwary and Saket Maheshwary and Vikram Pudi},
  year   = {2020},
  eprint = {2012.13339},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2012.13339}
}

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

Discussion