LLMs in Biomedicine: A study on clinical Named Entity Recognition

Masoud Monajatipoor, Jiaxin Yang, Joel Stremmel, Melika Emami, Fazlolah Mohaghegh, Mozhdeh Rouhsedaghat, Kai-Wei ChangarXiv 2024 · DOI

Abstract

Large Language Models (LLMs) have demonstrated remarkable versatility across general natural language processing tasks but often struggle in specialized domains such as biomedicine. This study investigates strategies to bridge the performance gap in biomedical Named Entity Recognition (NER). We evaluate the impact of input-output formatting, strategic in-context learning (ICL) via k-Nearest Neighbor Augmented in-conText Example selection (KATE), and a novel Dictionary-Infused Retrieval-Augmented Generation (DiRAG) method. Our results indicate that combining domain-specific example selection with external knowledge retrieval allows general-purpose models like GPT-4 to achieve state-of-the-art performance in complex clinical and biological domains.

Introduction

Biomedical Named Entity Recognition (NER) is a critical task for extracting structured information from clinical notes and research literature. However, LLMs face significant hurdles in this area due to data scarcity, linguistic complexity (synonyms and abbreviations), and a lack of deep domain-specific background knowledge. This research explores whether clever prompting, optimized example selection, and external knowledge integration can transform general LLMs into effective tools for clinical NER.

Methodology

The study examines three primary enhancement strategies:

Input-Output Formatting

Two distinct text-to-text formats were evaluated: TANL, which treats NER as a translation task by inserting tags directly into the source text, and DICE, which utilizes a template-based approach including explicit entity descriptions to guide the model.

Strategic In-Context Learning (ICL) via KATE

Rather than using random few-shot examples, the researchers employed KATE (k-Nearest Neighbor Augmented in-conText Example selection). By using specialized biomedical encoders like BioClinicalRoBERTa, the system retrieves the most semantically relevant training examples to provide context for a given query.

Dictionary-Infused Retrieval-Augmented Generation (DiRAG)

To address the "knowledge gap" in zero-shot scenarios, the authors introduced DiRAG. This method involves a multi-step pipeline: identifying potential medical tokens, retrieving their formal definitions from the Unified Medical Language System (UMLS), and re-prompting the LLM with the original sentence augmented by these definitions.

Overview of the DiRAG framework, illustrating how external dictionary definitions from UMLS are used to augment the prompt and improve entity classification.

Experimental Results

The models were benchmarked against three datasets: I2B2 (clinical records), NCBI-disease (PubMed abstracts), and BC2GM (gene mentions).

The Impact of Strategic Example Selection

The use of KATE provided a substantial performance boost, yielding a 15–20% increase in F1 score across all benchmarks compared to random example selection. Notably, the choice of encoder was critical; domain-specific encoders significantly outperformed general-domain ones, highlighting that medical "semantic similarity" requires specialized understanding.

Comparative performance of GPT-3.5 and GPT-4 using KATE versus Random Selection (RS). The table highlights the superiority of domain-specific encoders like BioClinicalRoBERTa in selecting relevant context.

Zero-Shot and SOTA Comparisons

The DiRAG method improved GPT-4’s zero-shot performance on the I2B2 dataset from an F1 score of 46.3 to 53.1. When combined with KATE, GPT-4 achieved results comparable to or exceeding previous state-of-the-art (SOTA) methods. While fine-tuned models like Llama 2-7B performed well on specific datasets (NCBI-disease), GPT-4 remained superior on more complex tasks like I2B2 and BC2GM.

Discussion and Conclusion

This study demonstrates that general-purpose LLMs can be highly effective in specialized medical domains when supported by strategic prompting and external knowledge. However, limitations remain. DiRAG’s current reliance on UMLS makes it less effective for biogenetics (BC2GM), where terminology may not be fully covered. Future work should explore integrating broader knowledge bases like specialized genomic databases and developing fallback strategies for terms missing from external dictionaries.

Summary updated

BibTeX
@misc{monajatipoor2024llms,
  author = {Masoud Monajatipoor and Jiaxin Yang and Joel Stremmel and Melika Emami and Fazlolah Mohaghegh and Mozhdeh Rouhsedaghat and Kai-Wei Chang},
  title = {{LLMs in Biomedicine: A study on clinical Named Entity Recognition}},
  year = {2024},
  eprint = {2404.07376},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.07376},
}
Figure