Adversity-aware Few-shot Named Entity Recognition via Augmentation Learning

Li Huang, Haowen Liu, Qiang Gao, Jiajing Yu, Guisong Liu, Xueqin ChenAAAI 2025 · DOI

Introduction

Named Entity Recognition (NER) is a fundamental task in Natural Language Processing, identifying entities like names, locations, and organizations. While deep learning has advanced NER, standard models require vast amounts of labeled data. Few-shot NER addresses this by learning from minimal examples, but these models are often "brittle" and susceptible to adversarial attacks. Specifically, synonym substitution—where a word like "parkway" is replaced with a contextually similar but misleading term—can significantly degrade performance. This vulnerability stems from an over-reliance on surface-level word features rather than deep semantic context.

To address this, we present Adversity-aware Augment Learning (AAL), a framework designed to enhance model resilience in uncertain, cross-domain environments through novel prompt-based data augmentation and prototype refinement.

The AAL Framework

The AAL architecture operates through a two-stage paradigm of training and fine-tuning. It integrates support and query sets with a specialized augmentation pipeline to build a more robust representation of entity types.

The overall architecture of the AAL framework, illustrating the flow from input context through the pretrained model to span detection and entity type classification.

Augmentation Learning via Dual Prompts

A core contribution of AAL is its dual-prompt strategy, which forces the model to prioritize context and structure over individual word tokens:

  1. Context-enhancing Prompt ($E_c$): This generates diverse training examples by substituting entities with others of the same type. By doing so, the model is forced to learn the surrounding semantic context that defines an entity, making it harder to fool with synonyms.
  2. Oriented-inducing Prompt ($E_o$): This strategy explicitly links entity tokens with their positional tags (e.g., B, I, O, E, S) using a [SEP] token. This helps the model internalize the underlying structural patterns of entities across different domains.
Detailed breakdown of the Dual Prompt augmentation strategy, showing how source sentences are transformed into context-enhancing and oriented-inducing prompts.

Prototype Learning and Refinement

Beyond augmentation, AAL employs Domain-oriented Prototype Refinement. Instead of simple token matching, the model identifies "prototypes" (representative vectors) for each entity type using Jenson-Shannon divergence. By injecting noise during training and using a refinement module, the model ensures that knowledge transferred from a source domain remains stable even when the target domain contains adversarial manipulations.

Experimental Results

The researchers evaluated AAL against state-of-the-art models like MANNER on the SNIPS and Cross-Dataset benchmarks, including an adversarial benchmark using the Bert-Attack algorithm.

  • Superior Performance in Clean Conditions: On the SNIPS 1-shot task, AAL achieved an average F1-score improvement of 6.27% over previous benchmarks. In the "Service" domain, this improvement reached 12.68%.
  • Resilience Under Attack: While leading models saw F1-score drops of 8-9% when subjected to synonym substitution attacks, AAL maintained significantly higher resilience, outperforming baselines by a wide margin in "uncertain" conditions.
  • Cross-Domain Adaptation: On the Wiki 1-shot task, AAL improved the F1-score by 8.05%, demonstrating its effectiveness in adapting to entirely new domains with minimal supervision.

Conclusion

AAL represents a significant step forward in making few-shot NER models deployment-ready for real-world, noisy environments. By shifting the focus from surface features to positional structure and semantic prototypes, AAL achieves both high accuracy and robust defense against adversarial manipulation. Future work may explore the framework's performance against character-level perturbations and its scalability to broader NLP tasks.

Summary updated

BibTeX
@inproceedings{huang2025adversity,
  author = {Li Huang and Haowen Liu and Qiang Gao and Jiajing Yu and Guisong Liu and Xueqin Chen},
  title = {{Adversity-aware Few-shot Named Entity Recognition via Augmentation Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i23.34588},
}
Figure