RockNER: A Simple Method to Create Adversarial Examples for Evaluating the Robustness of Named Entity Recognition Models

Bill Yuchen Lin, Wenyang Gao, Jun Yan, Ryan Moreno, Xiang Ren
9/12/2021
cs.CL

Official code: INK-USC/rockner (11 stars, Python, last commit 2021-10-03).

Abstract

To audit the robustness of named entity recognition (NER) models, we propose RockNER, a simple yet effective method to create natural adversarial examples. Specifically, at the entity level, we replace target entities with other entities of the same semantic class in Wikidata; at the context level, we use pre-trained language models (e.g., BERT) to generate word substitutions.

Show full abstract

Together, the two levels of attack produce natural adversarial examples that result in a shifted distribution from the training data on which our target models have been trained. We apply the proposed method to the OntoNotes dataset and create a new benchmark named OntoRock for evaluating the robustness of existing NER models via a systematic evaluation protocol. Our experiments and analysis reveal that even the best model has a significant performance drop, and these models seem to memorize in-domain entity patterns instead of reasoning from the context. Our work also studies the effects of a few simple data augmentation methods to improve the robustness of NER models.

View on arXivView PDF

Code Implementations(1)

INK-USC/rocknerOfficial100%
112PythonSep 6, 20215 years ago

Similar Papers

Cite this paper

@article{lin2021rockner,
  title  = {RockNER: A Simple Method to Create Adversarial Examples for Evaluating the Robustness of Named Entity Recognition Models},
  author = {Bill Yuchen Lin and Wenyang Gao and Jun Yan and Ryan Moreno and Xiang Ren},
  year   = {2021},
  eprint = {2109.05620},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2109.05620}
}

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

Discussion