V erifi NER : Verification-augmented NER via Knowledge-grounded Reasoning with Large Language Models (2024)

Abstract: Recent approaches in domain-specific named entity recognition (NER), such as biomedical NER, have shown remarkable advances. However, they still lack of faithfulness, producing erroneous predictions. We assume that knowledge of entities can be useful in verifying the correctness of the predictions. Despite the usefulness of knowledge, resolving such errors with knowledge is nontrivial, since the knowledge itself does not directly indicate the ground-truth label. To this end, we propose VerifiNER, a post-hoc verification framework that identifies errors from existing NER methods using knowledge and revises them into more faithful predictions. Our framework leverages the reasoning abilities of large language models to adequately ground on knowledge and the contextual information in the verification process. We validate effectiveness of VerifiNER through extensive experiments on biomedical datasets. The results suggest that VerifiNER can successfully verify errors from existing models as a model-agnostic approach. Further analyses on out-of-domain and low-resource settings show the usefulness of VerifiNER on real-world applications.

## introduction named entity recognition (ner) is a fundamental task in natural language processing that aims to identify entity mentions in input text and assign them to specific types @xcite . previous works solve ner tasks by training models on human-annotated datasets @xcite @xcite , improving neural model architectures @xcite , or leveraging external knowledge @xcite 2020; @xcite . more recently, simply prompting large language models (llms) without training can also perform ner tasks @xcite . despite the promising results of these approaches, they still produce plausible but imprecise outputs. the risk to produce such errors is especially salient in domains that require expert-level knowledge such as the biomedical domain. taking figure 1 for example, "nf-kappa b" is incorrectly labeled as "rna" type and "endothelia cells" is identified with wrong span. erroneous prediction is a significant threat to their application in domains where high precision is required @xcite . in this paper, we seek to minimize these errors by incorporating knowledge into the inference process. figure 1 suggests that knowledge can serve as a useful evidence for humans to verify that the type of "nf-kappa b" is "protein". however, avoiding the errors during inference time is challenging for neural models, because they lack in 7 . to resolve the aforementioned challenge, we aim to propose a post-hoc verification framework that identifies errors from existing ner methods and revises them into more faithful predictions. we employ knowledge base (kb) to provide factual evidence to existing ner systems, and leverage reasoning and in-context learning ability of llms to verify entities via knowledge-grounded reasoning. by verifying errors of the previous models in a post-hoc manner, our work exhibits remarkable performance without re-training models. to this end, we introduce verifiner, a novel verification-augmented ner via knowledgegrounded reasoning. with the notion that the errors can be alleviated with factual knowledge and contextual cue, our framework verifies entities in terms of factuality and contextual relevance. for factuality verification, verifiner formulates queries from each predicted entity to retrieve knowledge from kb, then reassigns its span and type based on the knowledge. the contextual relevance verification module employs the reasoning ability of llms to consider input context when selecting correct entity from candidates that are passed from previous step. for effective demonstration of our framework, we conduct experiments on biomedical ner which requires domain-expert knowledge to solve the task. while our approach is model-agnostic, we validate that verifiner can be applied to both fine-tuned models @xcite and a llm-based ner method (wang et al., 2023a) with significant improvement. in addition, we evaluate our framework under out-ofdistribution and low-resource settings, showing its advantages on real-world scenarios. to the best of our knowledge, this is the first work that solves ner with a verification module that exploits reasoning ability of llms. the main contributions of this work are as follows: ## preliminary analysis in this section, we first define the common error types of ner we aim to resolve. then, we provide further analysis on error cases in existing models to gain insight on how to rectify the errors. error types in ner. for evaluating ner model predictions against the gold annotations, error cases can be categorized as either false positives (fp) or false negatives (fn) based on whether the model incorrectly identifies entities or fails to recognize the gold entities that is present. within the fp, errors can occur from mismatches of type or span. depending on the combinations of these mismatches, errors are classified into more finegrained error types, including type, span, type&span and spurious errors. we provide definitions and examples of each error type in ## verifiner in this section, we propose verifiner, a framework that verifies errors from ner models with external knowledge and the reasoning ability of llms. in this paper, we define the term verification as a process that also includes revision. motivated by the observations in section 2, we design our framework to particularly focus on enhancing precision; that is, we first identify errors in predicted entities and then correct them into accurate outputs. the overall framework is illustrated in figure 4 . formally, given an input sequence @xmath0, x 2 , • • • , x n } of n tokens and a predefined type set t , our goal is to produce a revised entity prediction ē by verifying an entity @xmath1, t) that is originally predicted by an off-the-shelf ner model, where @xmath2: x end ] and t (∈ t ) represent its span and type, respectively. in this sense, the verification process targets both the span and type of the entity. note that span verification must precede type verification, because predicting the type t of an entity e depends on the semantics of e from its span s. for example, the type of "pebp2" is "protein", but a longer span, "pebp2 site", is classified as "dna"; thus, we first identify spans and then proceed to determine types. specifically, we first verify the factuality of the span and type (sections 3.1 and 3.2), then verify whether the factually approved entity is relevant to the input context (section 3.3) for precise revision. ## experiments in this section, we design our experiments to answer the following research questions: • rq1: can verifiner faithfully identify and revise errors? • rq2: can verifiner induce generalizability to fine-tuned models in various test distributions? • rq3: can verifiner effectively mitigate the low-resource challenge in domain-specific ner? ## conclusion in this paper, we present verifiner, a verification framework that identifies errors from existing ner methods and revises them into more faithful predictions via knowledge-grounded reasoning. it is the first attempt to solve ner with verification. specifically, we introduce verifiner, a plug-and-play verification module which verifies the factuality and contextual relevance of entity with knowledge-grounded reasoning. through extensive experiments, we demonstrate effectiveness of our framework over baselines. it is worth noting that verifiner is also robust in out-of-domain settings and low-resource scenarios with remarkable performance. considering the feasibility of verifiner as a model-agnostic approach and its demonstrated generalization capabilities, we expect our work will enhance reliability in ner and be applicable to other domains in future research.