Prompt learning is a new paradigm for utilizing pre-trained language models and has achieved great success in many tasks. To adopt prompt learning in the NER task, two kinds of methods have been explored from a pair of symmetric perspectives, populating the template by enumerating spans to predict their entity types or constructing type-specific prompts to locate entities. However, these methods not only require a multi-round prompting manner with a high time overhead and computational cost, but also require elaborate prompt templates, that are difficult to apply in practical scenarios. In this paper, we unify entity locating and entity typing into prompt learning, and design a dual-slot multi-prompt template with the position slot and type slot to prompt locating and typing respectively. Multiple prompts can be input to the model simultaneously, and then the model extracts all entities by parallel predictions on the slots. To assign labels for the slots during training, we design a dynamic template filling mechanism that uses the extended bipartite graph matching between prompts and the ground-truth entities. We conduct experiments in various settings, including resource-rich flat and nested NER datasets and low-resource in-domain and cross-domain datasets. Experimental results show that the proposed model achieves a significant performance improvement, especially in the cross-domain few-shot setting, which outperforms the state-of-the-art model by +7.7% on average.
翻译:提示学习是利用预训练语言模型的新范式,已在多项任务中取得显著成功。为将提示学习应用于命名实体识别任务,研究者从两个对称视角探索了两类方法:通过枚举片段填充模板以预测其实体类型,或构建类型特定提示以定位实体。然而,这些方法不仅需要多轮提示模式,带来高昂的时间开销和计算成本,还需精心设计提示模板,难以在实际场景中应用。本文统一了实体定位与实体分类的提示学习过程,设计了一种双槽多提示模板,其中位置槽和类型槽分别用于提示定位与分类。多个提示可同时输入模型,模型通过对槽的并行预测提取所有实体。为在训练过程中为槽分配标签,我们提出动态模板填充机制,利用提示与真实实体间的扩展二分图匹配。我们在多种设置下进行实验,包括资源丰富的扁平化和嵌套命名实体识别数据集,以及低资源领域内和跨领域数据集。实验结果表明,所提模型在性能上取得显著提升,尤其在跨领域少样本场景下,平均性能比当前最优模型高出7.7%。