A Context Aware Approach for Generating Natural Language Attacks

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. 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.

Cite

Text

Maheshwary et al. "A Context Aware Approach for Generating Natural Language Attacks." AAAI Conference on Artificial Intelligence, 2021. doi:10.1609/AAAI.V35I18.17916

Markdown

[Maheshwary et al. "A Context Aware Approach for Generating Natural Language Attacks." AAAI Conference on Artificial Intelligence, 2021.](https://mlanthology.org/aaai/2021/maheshwary2021aaai-context/) doi:10.1609/AAAI.V35I18.17916

BibTeX

@inproceedings{maheshwary2021aaai-context,
  title     = {{A Context Aware Approach for Generating Natural Language Attacks}},
  author    = {Maheshwary, Rishabh and Maheshwary, Saket and Pudi, Vikram},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year      = {2021},
  pages     = {15839-15840},
  doi       = {10.1609/AAAI.V35I18.17916},
  url       = {https://mlanthology.org/aaai/2021/maheshwary2021aaai-context/}
}