Large Language Models (LLMs) have supplanted traditional methods in numerous natural language processing tasks. Nonetheless, in Named Entity Recognition (NER), existing LLM-based methods underperform compared to baselines and require significantly more computational resources, limiting their application. In this paper, we introduce the task of generation-based extraction and in-context classification (GEIC), designed to leverage LLMs' prior knowledge and self-attention mechanisms for NER tasks. We then propose CascadeNER, a universal and multilingual GEIC framework for few-shot and zero-shot NER. CascadeNER employs model cascading to utilize two small-parameter LLMs to extract and classify independently, reducing resource consumption while enhancing accuracy. We also introduce AnythingNER, the first NER dataset specifically designed for LLMs, including 8 languages, 155 entity types and a novel dynamic categorization system. Experiments show that CascadeNER achieves state-of-the-art performance on low-resource and fine-grained scenarios, including CrossNER and FewNERD. Our work is openly accessible.
翻译:大语言模型(LLMs)已在众多自然语言处理任务中取代传统方法。然而,在命名实体识别(NER)任务中,现有基于LLM的方法相较于基线模型表现欠佳,且需要显著更多的计算资源,限制了其实际应用。本文提出了基于生成的抽取与上下文分类(GEIC)任务,旨在利用LLMs的先验知识与自注意力机制进行NER处理。我们进一步提出了CascadeNER——一个适用于少样本与零样本场景的通用多语言GEIC框架。CascadeNER采用模型级联策略,通过两个小参数规模的LLM分别执行抽取与分类,在降低资源消耗的同时提升准确率。我们还构建了首个专为LLM设计的NER数据集AnythingNER,涵盖8种语言、155种实体类型及创新的动态分类体系。实验表明,CascadeNER在低资源与细粒度场景(包括CrossNER与FewNERD)中取得了最先进的性能。本研究已开源。