# Named Entity Recognition Based on Multi-Class Label Prompt Selection and Core Entity Replacement
###### Abstract  
At present, researchers are showing a marked interest in the topic of few-shot named entity recognition (NER). Previous studies have demonstrated that prompt-based learning methods can effectively improve the performance of few-shot NER models and can reduce the need for annotated data. However, the contextual information of the relationship between core entities and a given prompt may not have been considered in these studies; moreover, research in this field continues to suffer from the negative impact of a limited amount of annotated data. A multi-class label prompt selection and core entity replacement-based named entity recognition (MPSCER-NER) model is proposed in this study. A multi-class label prompt selection strategy is presented, which can assist in the task of sentence-word representation. A long-distance dependency is formed between the sentence and the multi-class label prompt. A core entity replacement strategy is presented, which can enrich the word vectors of training data. In addition, a weighted random algorithm is used to retrieve the core entities that are to be replaced from the multi-class label prompt. The experimental results show that, when implemented on the CoNLL-2003, Ontonotes 5.0, Ontonotes 4.0, and BC5 CDR datasets under 5-Way \(k\)-Shot (\(k\) = 5, 10), the MPSCER-NER model achieves minimum \(F1\)-score improvements of 1.32%, 2.14%, 1.05%, 1.32%, 0.84%, 1.46%, 1.43%, and 1.11% in comparison with NNshot, StructShot, MatchingCNN, ProtoBERT, DNER, and SRNER, respectively. few-shot named entity recognition; multi-class label prompt selecting; demonstration prompt; core entity replacement +
Footnote †: journal: Applied sciences  
0
Footnote 0: _Article_  
0
Footnote 0: _Article_  
learning is introduced into the LLM to recognize named entities and reduce the need for a large amount of labeled data. Good prompts can prevent the need for many annotated examples, and can thus contribute to improved performance [5]. Additionally, data augmentation methods can also increase sample diversity, enhancing performance in the context of few-shot NER. These methods play a crucial role in the further development of named entity recognition. The main contributions of this study are as follows:  
* A model is designed to address the NER task in few-shot scenarios. A multi-class label prompt selection strategy is designed to select an annotated instance with a clear sentence structure for demonstration. The entity context information between the sentence and the multi-class label prompts is enhanced to improve the accuracy of core entity recognition. The optimization effect of multi-class label prompt demonstrations on word vector representations for entities in target sentences is empirically validated. The low-density core entity demonstrations empirically prove that prompts with clearer sentence structures can effectively enhance the accuracy of core entity recognition. * A core entity replacement strategy is designed to increase the diversity of input word vectors during training. A weighted random algorithm is employed to retrieve the core entities that are to be replaced in the prompt. The core entities selected in the multi-class label prompt are updated during each the training epoch. The vector of each token in the training data is updated. The core entity replacement method dynamically updates word vector labels in demonstration prompts. A novel approach to enrich input data in few-shot learning scenarios is proposed. * Experiments on the CoNLL-2003, OntoNotes 5.0, OntoNotes 4.0, and BC5 CDR datsets showed the superiority of our model in few-shot NER. The rest of the study is organized as follows: Section 2 reviews the literature related to the research conducted in the present study. Section 3 details the structure of the MPSCER-NER (multi-class label prompt selecting with core entity replacement for named entity recognition) model, and the working principle of the model is described in detail. Section 4 presents the results and analysis of the modeling experiments.