English

$k$NN-NER: Named Entity Recognition with Nearest Neighbor Search

Computation and Language 2022-04-01 v1

Abstract

Inspired by recent advances in retrieval augmented methods in NLP~\citep{khandelwal2019generalization,khandelwal2020nearest,meng2021gnn}, in this paper, we introduce a kk nearest neighbor NER (kkNN-NER) framework, which augments the distribution of entity labels by assigning kk nearest neighbors retrieved from the training set. This strategy makes the model more capable of handling long-tail cases, along with better few-shot learning abilities. kkNN-NER requires no additional operation during the training phase, and by interpolating kk nearest neighbors search into the vanilla NER model, kkNN-NER consistently outperforms its vanilla counterparts: we achieve a new state-of-the-art F1-score of 72.03 (+1.25) on the Chinese Weibo dataset and improved results on a variety of widely used NER benchmarks. Additionally, we show that kkNN-NER can achieve comparable results to the vanilla NER model with 40\% less amount of training data. Code available at \url{https://github.com/ShannonAI/KNN-NER}.

Keywords

Cite

@article{arxiv.2203.17103,
  title  = {$k$NN-NER: Named Entity Recognition with Nearest Neighbor Search},
  author = {Shuhe Wang and Xiaoya Li and Yuxian Meng and Tianwei Zhang and Rongbin Ouyang and Jiwei Li and Guoyin Wang},
  journal= {arXiv preprint arXiv:2203.17103},
  year   = {2022}
}

Comments

preprint

R2 v1 2026-06-24T10:33:29.367Z