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. 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.
翻译:为了审计名称实体识别(NER)模型的稳健性,我们建议RockNER,这是创建自然对抗性实例的简单而有效的方法。具体地说,在实体一级,我们用维基数据中同一语义类的其他实体取代目标实体;在上下文一级,我们使用预先培训的语言模型(如BERT)来产生词替代。同时,两个攻击级别产生了自然对抗性实例,导致从培训目标模型的培训数据中转移了分布。我们把拟议的方法应用于OntoNotes数据集,并建立了一个名为OntoRock的新基准,用于通过系统评估协议评估现有ERM模型的稳性。我们的实验和分析表明,即使最佳模型也有显著的性能下降,这些模型似乎会将内部实体模式混为一模,而不是从上下文推理。我们的工作还研究了一些简单的数据增强方法的影响,以提高NER模型的稳性。