Named entity recognition in real-world applications suffers from the diversity of entity types, the emergence of new entity types, and the lack of high-quality annotations. To address the above problems, this paper proposes an in-context learning-based NER approach, which can effectively inject in-context NER ability into PLMs and recognize entities of novel types on-the-fly using only a few demonstrative instances. Specifically, we model PLMs as a meta-function $\mathcal{ \lambda_ {\text{instruction, demonstrations, text}}. M}$, and a new entity extractor can be implicitly constructed by applying new instruction and demonstrations to PLMs, i.e., $\mathcal{ (\lambda . M) }$(instruction, demonstrations) $\to$ $\mathcal{F}$ where $\mathcal{F}$ will be a new entity extractor, i.e., $\mathcal{F}$: text $\to$ entities. To inject the above in-context NER ability into PLMs, we propose a meta-function pre-training algorithm, which pre-trains PLMs by comparing the (instruction, demonstration)-initialized extractor with a surrogate golden extractor. Experimental results on 4 few-shot NER datasets show that our method can effectively inject in-context NER ability into PLMs and significantly outperforms the PLMs+fine-tuning counterparts.
翻译:现实世界中的命名实体识别面临着实体类型多样性、新型实体涌现以及高质量标注数据匮乏的挑战。针对上述问题,本文提出了一种基于上下文学习的命名实体识别方法,该方法能有效将实体的上下文识别能力注入预训练语言模型,仅需少量示范样本即可实时识别新型实体。具体而言,我们将预训练语言模型建模为元函数$\mathcal{ \lambda_ {\text{指令,示范,文本}}. M}$,通过将新指令与示范应用于预训练语言模型,可隐式构建新型实体提取器:$\mathcal{ (\lambda . M) }$(指令,示范) $\to$ $\mathcal{F}$,其中$\mathcal{F}$即为新型实体提取器,满足$\mathcal{F}$: 文本 $\to$ 实体。为将上述上下文实体识别能力注入预训练语言模型,我们提出元函数预训练算法,通过比较指令-示范初始化提取器与代理黄金提取器来预训练语言模型。在4个小样本命名实体识别数据集上的实验结果表明,该方法能有效将上下文实体识别能力注入预训练语言模型,且显著优于预训练语言模型+微调的基准方法。