A Multi-Task Semantic Decomposition Framework with Task-specific Pre-training for Few-Shot NER

Guanting Dong, Zechen Wang, Jinxu Zhao, Gang Zhao, Daichi Guo, Dayuan Fu, Tingfeng Hui, Chen Zeng, Keqing He, Xuefeng Li, Liwen Wang, Xinyue Cui, Weiran Xu · DOI

Abstract

Few-shot Named Entity Recognition (NER) aims to identify entities with minimal labeled data. Existing two-stage models often struggle with span over-prediction and semantic collapse in the embedding space. We present the Multi-Task Semantic Decomposition Framework (MSDP), which introduces task-specific pre-training and a novel semantic decomposition strategy. MSDP utilizes demonstration-based masked language modeling and class contrastive discrimination to refine entity boundaries and class representations. Furthermore, it decomposes entity semantics into original, class-oriented, and contextual fusion prototypes. Experimental results on Few-NERD and CrossNER benchmarks demonstrate that MSDP achieves state-of-the-art performance, outperforming previous methods by up to 9.7% in F1 score.

Introduction

Named Entity Recognition (NER) is a fundamental task in Natural Language Processing (NLP). While standard models perform well with large datasets, they often fail in low-resource scenarios. Few-shot NER addresses this by learning from a few examples. However, current two-stage approaches—extracting spans and then classifying them—face two primary challenges:

  1. Span Over-prediction: Models often lack sharp boundary awareness, leading to redundant or overlapping segments being flagged as entities.
  2. Prototype Classification Disarray: Different entity classes often cluster too closely in the embedding space, causing "semantic collapse" and misclassification.
Figure 2: Illustration of Span Over-prediction and Prototype Classification Disarray in few-shot NER.

Methodology

The MSDP framework addresses these issues through two main components: Task-specific Pre-training and Downstream Semantic Decomposition.

Task-specific Pre-training

To better align Pre-trained Language Models (PLMs) with NER requirements, MSDP employs two pre-training tasks:

  • Demonstration-based MLM: This task uses templates (e.g., "[SEP] Obama is PER") as demonstrations during masked language modeling. This teaches the model the structural relationship between text spans and entity labels.
  • Class Contrastive Discrimination: This utilizes contrastive learning to pull representations of the same entity class together while pushing different classes and non-entities apart, enhancing class discriminability.

Semantic Decomposition

During the downstream few-shot task, MSDP decomposes entity information into three distinct prototypes to capture robust features:

  • Original Prototype: The standard mean embedding of the target entity.
  • Class-oriented Prototype: Generated by masking all other entities in the sentence, focusing the model on the target class signal.
  • Contextual Fusion Prototype: Generated by masking all entities in the sentence, forcing classification based on the surrounding context.
Figure 6: The MSDP framework architecture, showing the training pipeline with semantic decomposition and the inference process.

Key Insights

The success of MSDP lies in its ability to treat NER as more than just a classification task. By recognizing that span over-prediction is a boundary-learning failure, the authors use "demonstrations" to instill a sense of entity "shape" before fine-tuning. Furthermore, the semantic decomposition strategy leverages the fact that entity identity and sentence context provide orthogonal information. By isolating these signals through masking, the model avoids relying on spurious correlations that often plague few-shot learners. Ablation studies confirm that these components are synergistic; removing either the pre-training or the decomposition leads to a significant performance drop.

Evaluation

The framework was evaluated on the Few-NERD (Intra and Inter settings) and CrossNER datasets. MSDP consistently outperformed existing baselines. On the Few-NERD "Inter" setting (5-way 1-2 shot), it achieved an F1 score of 76.86, significantly higher than the previous state-of-the-art, SpanProto (73.36). On CrossNER, MSDP showed superior domain adaptation, exceeding baselines by an average of 3.9%. Qualitative analysis using t-SNE confirmed that MSDP effectively separates entity clusters, mitigating the "Prototype Disarray" problem.

Conclusion

MSDP provides a robust solution for few-shot NER by combining specialized pre-training with a multi-view semantic decomposition strategy. While it sets new benchmarks, challenges remain in the "Intra" setting where transferring across coarse-grained categories is difficult. Future research will focus on improving cross-domain logic and optimizing pre-training efficiency.

Summary updated

BibTeX
@inproceedings{dong2023multi,
  author = {Guanting Dong and Zechen Wang and Jinxu Zhao and Gang Zhao and Daichi Guo and Dayuan Fu and Tingfeng Hui and Chen Zeng and Keqing He and Xuefeng Li and Liwen Wang and Xinyue Cui and Weiran Xu},
  title = {{A Multi-Task Semantic Decomposition Framework with Task-specific Pre-training for Few-Shot NER}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2023},
  doi = {10.1145/3583780.3614766},
}
Figure