Few-shot named entity recognition can identify new types of named entities based on a few labeled examples. Previous methods employing token-level or span-level metric learning suffer from the computational burden and a large number of negative sample spans. In this paper, we propose the Hybrid Multi-stage Decoding for Few-shot NER with Entity-aware Contrastive Learning (MsFNER), which splits the general NER into two stages: entity-span detection and entity classification. There are 3 processes for introducing MsFNER: training, finetuning, and inference. In the training process, we train and get the best entity-span detection model and the entity classification model separately on the source domain using meta-learning, where we create a contrastive learning module to enhance entity representations for entity classification. During finetuning, we finetune the both models on the support dataset of target domain. In the inference process, for the unlabeled data, we first detect the entity-spans, then the entity-spans are jointly determined by the entity classification model and the KNN. We conduct experiments on the open FewNERD dataset and the results demonstrate the advance of MsFNER.
翻译:少样本命名实体识别能够基于少量标注样本识别新类型的命名实体。先前采用词元级或跨度级度量学习的方法存在计算负担重以及负样本跨度数量庞大的问题。本文提出基于实体感知对比学习的少样本命名实体识别混合多阶段解码方法(MsFNER),将通用命名实体识别任务拆分为两个阶段:实体跨度检测与实体分类。MsFNER的引入包含三个流程:训练、微调与推理。在训练流程中,我们采用元学习方法在源域上分别训练并获得最优的实体跨度检测模型与实体分类模型,其中我们构建了对比学习模块以增强实体分类的实体表示。在微调阶段,我们在目标域的支持数据集上对两个模型进行微调。在推理流程中,对于未标注数据,我们首先检测实体跨度,随后通过实体分类模型与KNN算法联合确定实体类型。我们在公开的FewNERD数据集上进行实验,结果证明了MsFNER的先进性。