Skip to main content
QUICK REVIEW

[Paper Review] Attack Named Entity Recognition by Entity Boundary Interference

Yifei Yang, Hongqiu Wu|arXiv (Cornell University)|May 9, 2023
Topic ModelingComputer Science3 citations
TL;DR

This paper proposes Virtual Boundary Attack (ViBA), a novel one-word modification attack for Named Entity Recognition (NER) that exploits model sensitivity to entity boundary tokens, inducing mispredictions through strategic boundary insertion. ViBA achieves 70%-90% attack success rate on RoBERTa and DeBERTa models with minimal label shift and linear time complexity, outperforming prior methods in efficiency and validity.

ABSTRACT

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.

Motivation & Objective

  • To address the critical issue of label shift in existing NER adversarial attacks, which arises from word-level modifications disrupting entity boundaries and semantics.
  • To develop a robust, one-word modification attack that maintains semantic consistency while exploiting model vulnerability to entity boundary positions.
  • To analyze the root cause of Entity Boundary Interference (EBI), a non-robust behavior where boundary insertions disrupt NER predictions.
  • To propose effective defense strategies against ViBA, including boundary masking and hidden-state dropout, preserving model performance.

Proposed method

  • Propose Virtual Boundary Attack (ViBA), which inserts a single boundary token (e.g., the first or last token of an entity) into a sentence to trigger mispredictions.
  • Leverage the insight that NER models are highly sensitive to boundary tokens, causing incorrect predictions on the inserted word or other entities.
  • Design a validation mechanism to ensure candidate adversarial examples maintain label consistency, avoiding invalid examples caused by label shift.
  • Implement boundary masking during training, where boundary tokens are randomly masked with probability p to reduce model dependence on them.
  • Apply dropout on hidden states, specifically targeting boundary tokens, to improve robustness against ViBA.
  • Use adversarial training with mixed real and adversarial examples, labeling inserted boundary tokens as 'O' to reduce distinguishability.

Experimental results

Research questions

  • RQ1Why do existing NER attacks suffer from high label shift, and how does this undermine the validity of adversarial examples?
  • RQ2What underlying model behavior makes NER models vulnerable to boundary token manipulation, and how can it be systematically exploited?
  • RQ3Can a one-word modification attack achieve high success rates while preserving semantic and label consistency in NER?
  • RQ4How effective are boundary masking and hidden-state dropout in defending against ViBA without degrading model performance?
  • RQ5What is the relationship between model sensitivity to entity boundaries and the resulting adversarial vulnerability?

Key findings

  • ViBA achieves 70%-90% attack success rate on state-of-the-art models like RoBERTa and DeBERTa across both English and Chinese benchmarks.
  • The attack is significantly faster than prior methods, with near-linear time complexity due to single-word modification.
  • Boundary masking with p=0.5 reduces ViBA's attack success rate substantially while maintaining high F1 scores, indicating strong defense potential.
  • Hidden-state dropout on boundary tokens at p=0.5 reduces ASR and improves robustness without degrading F1, outperforming standard weight perturbation.
  • Adversarial training with mixed examples (labeling inserted boundaries as 'O') reduces ASR and preserves performance, especially on Chinese datasets.
  • The study identifies Entity Boundary Interference (EBI) as a key non-robust behavior: inserting a boundary token can flip predictions on unrelated entities or create false entities, even when the original entity remains valid.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.