Both generic and domain-specific BERT models are widely used for natural language processing (NLP) tasks. In this paper we investigate the vulnerability of BERT models to variation in input data for Named Entity Recognition (NER) through adversarial attack. Experimental results show that the original as well as the domain-specific BERT models are highly vulnerable to entity replacement: They can be fooled in 89.2 to 99.4% of the cases to mislabel previously correct entities. BERT models are also vulnerable to variation in the entity context with 20.2 to 45.0% of entities predicted completely wrong and another 29.3 to 53.3% of entities predicted wrong partially. Often a single change is sufficient to fool the model. BERT models seem most vulnerable to changes in the local context of entities. Of the two domain-specific BERT models, the vulnerability of BioBERT is comparable to the original BERT model whereas SciBERT is even more vulnerable. Our results chart the vulnerabilities of BERT models for NER and emphasize the importance of further research into uncovering and reducing these weaknesses.
翻译:在本文件中,我们调查了BERT模型在通过对抗性攻击改变命名实体识别(NER)输入数据方面的脆弱性。实验结果表明,原型和特定域的BERT模型极易被实体替换:在89.2%至99.4%的案件中,这些模型被误贴了先前正确的实体的标签。BERT模型也容易在实体方面出现差异,20.2%至45.0%的实体预测完全错误,另有29.3%至53.3%的实体预测部分错误。通常,单项变化足以愚弄模型。BERT模型似乎最易受实体当地背景下变化的影响。在两种特定领域的BERT模型中,BioBERT的脆弱性与原BERT模型相似,而SciBERT则更加脆弱。我们的结果显示,20.2%至45.0%的实体预测完全错误,另外29.3%至53.3%的实体预测部分错误。我们强调必须进一步研究发现和减少这些弱点。