Prompt-based language models have produced encouraging results in numerous applications, including Named Entity Recognition (NER) tasks. NER aims to identify entities in a sentence and provide their types. However, the strong performance of most available NER approaches is heavily dependent on the design of discrete prompts and a verbalizer to map the model-predicted outputs to entity categories, which are complicated undertakings. To address these challenges, we present ContrastNER, a prompt-based NER framework that employs both discrete and continuous tokens in prompts and uses a contrastive learning approach to learn the continuous prompts and forecast entity types. The experimental results demonstrate that ContrastNER obtains competitive performance to the state-of-the-art NER methods in high-resource settings and outperforms the state-of-the-art models in low-resource circumstances without requiring extensive manual prompt engineering and verbalizer design.
翻译:摘要:基于提示的语言模型已在包括命名实体识别(NER)任务在内的众多应用中取得了令人鼓舞的成果。NER旨在识别句子中的实体并给出其类型。然而,现有大多数NER方法的强劲性能严重依赖于离散提示以及用于将模型预测输出映射到实体类别的语言器的设计——这两者均为复杂工程。为应对这些挑战,我们提出ContrastNER,一种基于提示的NER框架,该框架在提示中同时采用离散和连续标记,并利用对比学习方法学习连续提示及预测实体类型。实验结果表明,ContrastNER在高资源设定下能够达到与最先进NER方法相媲美的性能,且在低资源环境下无需进行大量人工提示工程和语言器设计即可超越现有最先进模型。