[论文解读] Attack Named Entity Recognition by Entity Boundary Interference
本文提出虚拟边界攻击(ViBA),一种针对命名实体识别(NER)的新颖单字修改攻击方法,通过利用模型对实体边界标记的敏感性,战略性地插入边界标记以引发误预测。ViBA 在 RoBERTa 和 DeBERTa 模型上实现了 70%–90% 的攻击成功率,标签偏移极小,时间复杂度为线性,相较于先前方法在效率和有效性方面表现更优。
Named Entity Recognition (NER) is a cornerstone NLP task while its robustness has been given little attention. This paper rethinks the principles of NER attacks derived from sentence classification, as they can easily violate the label consistency between the original and adversarial NER examples. This is due to the fine-grained nature of NER, as even minor word changes in the sentence can result in the emergence or mutation of any entities, resulting in invalid adversarial examples. To this end, we propose a novel one-word modification NER attack based on a key insight, NER models are always vulnerable to the boundary position of an entity to make their decision. We thus strategically insert a new boundary into the sentence and trigger the Entity Boundary Interference that the victim model makes the wrong prediction either on this boundary word or on other words in the sentence. We call this attack Virtual Boundary Attack (ViBA), which is shown to be remarkably effective when attacking both English and Chinese models with a 70%-90% attack success rate on state-of-the-art language models (e.g. RoBERTa, DeBERTa) and also significantly faster than previous methods.
研究动机与目标
- 为解决现有 NER 对抗攻击中因词级修改破坏实体边界与语义而引发的标签偏移这一关键问题。
- 开发一种鲁棒的单字修改攻击方法,在保持语义一致性的同时,利用模型对实体边界位置的脆弱性。
- 分析实体边界干扰(EBI)的根本原因,即边界插入会破坏 NER 预测的非鲁棒行为。
- 提出有效的防御策略应对 ViBA,包括边界掩码和隐藏状态 dropout,同时保持模型性能。
提出的方法
- 提出虚拟边界攻击(ViBA),通过在句子中插入单个边界标记(如实体的第一个或最后一个标记)来触发误预测。
- 利用 NER 模型对边界标记高度敏感的洞察,导致插入词或其它实体的预测出错。
- 设计验证机制,确保候选对抗样本保持标签一致性,避免因标签偏移导致的无效样本。
- 在训练过程中实施边界掩码,以概率 p 随机掩码边界标记,以降低模型对它们的依赖。
- 对隐藏状态应用 dropout,特别针对边界标记,以提升对 ViBA 的鲁棒性。
- 使用混合真实与对抗样本进行对抗训练,将插入的边界标记标注为 'O',以降低可区分性。
实验结果
研究问题
- RQ1为何现有 NER 攻击存在高标签偏移?这如何损害对抗样本的有效性?
- RQ2何种底层模型行为使 NER 模型易受边界标记操纵?如何系统性地加以利用?
- RQ3能否通过单字修改攻击在保持语义与标签一致性的同时实现高成功率?
- RQ4边界掩码与隐藏状态 dropout 在防御 ViBA 时效果如何,是否在不降低模型性能的前提下有效?
- RQ5模型对实体边界的敏感性与由此产生的对抗脆弱性之间存在何种关系?
主要发现
- ViBA 在 RoBERTa 和 DeBERTa 等先进模型上,于英文与中文基准上均实现了 70%–90% 的攻击成功率。
- 该攻击显著快于先前方法,由于仅修改单个词,时间复杂度接近线性。
- 使用 p=0.5 的边界掩码可大幅降低 ViBA 的攻击成功率,同时保持高 F1 分数,表明其具有强大防御潜力。
- 在 p=0.5 的边界标记隐藏状态 dropout 可降低攻击成功率并提升鲁棒性,且不降低 F1,优于标准权重扰动。
- 通过混合样本进行对抗训练(将插入的边界标记标注为 'O')可降低攻击成功率并保持性能,尤其在中文数据集上表现更优。
- 本研究识别出实体边界干扰(EBI)为关键非鲁棒行为:插入边界标记可导致无关实体的预测翻转或生成虚假实体,即使原始实体仍有效。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。