Few-shot Named Entity Recognition (NER), the task of identifying named entities with only a limited amount of labeled data, has gained increasing significance in natural language processing. While existing methodologies have shown some effectiveness, such as enriching label semantics through various prompting modes or employing metric learning techniques, their performance exhibits limited robustness across diverse domains due to the lack of rich knowledge in their pre-trained models. To address this issue, we propose CLLMFS, a Contrastive Learning enhanced Large Language Model (LLM) Framework for Few-Shot Named Entity Recognition, achieving promising results with limited training data. Considering the impact of LLM's internal representations on downstream tasks, CLLMFS integrates Low-Rank Adaptation (LoRA) and contrastive learning mechanisms specifically tailored for few-shot NER. By enhancing the model's internal representations, CLLMFS effectively improves both entity boundary awareness ability and entity recognition accuracy. Our method has achieved state-of-the-art performance improvements on F1-score ranging from 2.58\% to 97.74\% over existing best-performing methods across several recognized benchmarks. Furthermore, through cross-domain NER experiments conducted on multiple datasets, we have further validated the robust generalization capability of our method. Our code will be released in the near future.
翻译:少样本命名实体识别(NER)是指在仅有少量标注数据的情况下识别命名实体的任务,在自然语言处理领域日益重要。尽管现有方法(例如通过各种提示模式丰富标签语义或采用度量学习技术)已显示出一定效果,但由于其预训练模型缺乏丰富的知识,其性能在不同领域间的鲁棒性有限。为解决此问题,我们提出了CLLMFS,一种用于少样本命名实体识别的对比学习增强型大语言模型(LLM)框架,该框架在有限训练数据下取得了有希望的结果。考虑到LLM内部表示对下游任务的影响,CLLMFS集成了专门为少样本NER设计的低秩自适应(LoRA)和对比学习机制。通过增强模型的内部表示,CLLMFS有效提升了实体边界感知能力和实体识别准确率。在多个公认基准测试中,我们的方法相较于现有最佳方法,在F1分数上实现了从2.58%到97.74%的先进性能提升。此外,通过在多个数据集上进行的跨领域NER实验,我们进一步验证了本方法的强大泛化能力。我们的代码将在近期发布。