[论文解读] PromptNER: Prompt Locating and Typing for Named Entity Recognition
PromptNER 提出了一种统一的一轮提示学习框架,用于命名实体识别,通过使用包含位置 [P] 和类型 [T] 插槽的双槽多提示模板,同时定位和识别实体。通过实现所有实体的并行预测,并采用基于扩展二分图匹配的动态模板填充机制,PromptNER 在少样本跨领域设置下实现了最先进性能,平均 F1 提升 7.7%。
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.
研究动机与目标
- 解决现有命名实体识别提示学习方法在推理中需要多轮推理所导致的效率低下和计算成本过高的问题。
- 通过将实体定位与类型识别统一为单一并行预测框架,克服基于跨度和基于类型的提示方法的局限性。
- 提升在低资源和跨领域 NER 场景下的性能,其中少样本泛化能力至关重要。
- 设计一种动态标签分配机制,实现在无需预先对应关系的情况下将提示与真实实体进行匹配。
- 通过消除对实体跨度或类型上迭代或自回归生成的需求,实现高效可扩展的推理。
提出的方法
- 引入包含 [P](用于实体位置)和 [T](用于实体类型)的双槽多提示模板,实现所有实体的一次前向传播中同时预测。
- 采用每个输入对应 M 个提示的多提示设置,其中每个提示包含唯一的 [P] 和 [T] 插槽对,以覆盖潜在的实体。
- 设计基于扩展二分图匹配的动态模板填充机制,在训练过程中将真实标签分配给 [P] 和 [T] 插槽。
- 将标签分配建模为一对多匹配问题,允许多个提示预测同一个实体,以提升鲁棒性和覆盖度。
- 利用预训练语言模型(如 BERT)对 [T] 插槽执行掩码语言建模,同时通过 [P] 插槽注意力预测跨度边界。
- 使用可微分损失函数端到端优化模型,该损失函数结合二分图匹配代价,使预测插槽与真实实体对齐。
实验结果
研究问题
- RQ1能否在单一提示学习框架中有效统一实体定位与类型识别,从而消除多轮推理?
- RQ2如何在无需预设对应关系的情况下,实现提示与真实实体之间的动态标签分配?
- RQ3所提出的双槽多提示设计是否能在平面和嵌套 NER 基准上均提升性能,尤其是在低资源和跨领域设置下?
- RQ4与自回归或迭代提示基线相比,该模型的推理效率提升程度如何?
- RQ5模型性能对提示模板设计的敏感程度如何,特别是对上下文标记的使用?
主要发现
- 在跨领域少样本 NER 设置下,PromptNER 相较于之前的 SOTA 模型,平均 F1 提升了 +7.7%。
- 在 CoNLL03 数据集上,由于采用一轮并行预测,PromptNER 的推理速度比 TemplateNER 快 48.23 倍,比 MRC 快 25.86 倍,比 BARTNER 快 20.17 倍。
- 仅包含 [P] 和 [T] 插槽的默认模板(无上下文标记)优于添加了标记的硬模板和软模板,可能由于 BERT 的序列长度限制。
- 软模板相比硬模板略有性能提升,但最佳结果仍由最小化、仅含插槽的模板设计实现。
- 采用一对多分配的扩展二分图匹配机制显著提升了标签分配准确率和实体覆盖度。
- PromptNER 在多种设置下泛化能力出色,包括平面、嵌套、域内和跨域 NER,展现出强大的鲁棒性和数据效率。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。