Learning In-context Learning for Named Entity Recognition

Jiawei Chen, Yaojie Lu, Hongyu Lin, Jie Lou, Wei Jia +5 more
5/18/2023
cs.CL

No official code found. Best implementation: chen700564/metaner-icl (40 stars, last commit 2023-06-16).

Abstract

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{ λ_ {\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{ (λ. 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.

View on arXivView PDF

Code Implementations(1)

403Shell, PythonMay 10, 20233 years agoNOASSERTION

Similar Papers

Cite this paper

@article{chen2023learning,
  title  = {Learning In-context Learning for Named Entity Recognition},
  author = {Jiawei Chen and Yaojie Lu and Hongyu Lin and Jie Lou and Wei Jia and Dai Dai and Hua Wu and Boxi Cao and Xianpei Han and Le Sun},
  year   = {2023},
  eprint = {2305.11038},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.11038v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.11038.svg)](https://codeofpaper.com/paper/2305.11038)

Discussion