Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Jun:2025:352-358.
doi: 10.1109/ICHI64645.2025.00048. Epub 2025 Jul 22.

Do LLMs Surpass Encoders for Biomedical NER?

Affiliations

Do LLMs Surpass Encoders for Biomedical NER?

Motasem S Obeidat et al. Proc (IEEE Int Conf Healthc Inform). 2025 Jun.

Abstract

Recognizing spans of biomedical concepts and their types (e.g., drug or gene) in free text, often called biomedical named entity recognition (NER), is a basic component of information extraction (IE) pipelines. Without a strong NER component, other applications, such as knowledge discovery and information retrieval, are not practical. State-of-the-art in NER shifted from traditional ML models to deep neural networks with transformer-based encoder models (e.g., BERT) emerging as the current standard. However, decoder models (also called large language models or LLMs) are gaining traction in IE. But LLM-driven NER often ignores positional information due to the generative nature of decoder models. Furthermore, they are computationally very expensive (both in inference time and hardware needs). Hence, it is worth exploring if they actually excel at biomedical NER and assess any associated trade-offs (performance vs efficiency). This is exactly what we do in this effort employing the same BIO entity tagging scheme (that retains positional information) using five different datasets with varying proportions of longer entities. Our results show that the LLMs chosen (Mistral and Llama: 8B range) often outperform best encoder models (BERT-(un)cased, BiomedBERT, and DeBERTav3: 300M range) by 2-8% in F-scores except for one dataset, where they equal encoder performance. This gain is more prominent among longer entities of length ≥ 3 tokens. However, LLMs are one to two orders of magnitude more expensive at inference time and may need cost prohibitive hardware. Thus, when performance differences are small or real time user feedback is needed, encoder models might still be more suitable than LLMs.

Keywords: encoder models; large language models; named entity recognition.

PubMed Disclaimer

Figures

Fig. 1.
Fig. 1.
Sample prompt for the JNLPBA dataset for LLM driven NER

Similar articles

References

    1. Kim Y and Meystre SM, “Ensemble method–based extraction of medication and related information from clinical texts,” Journal of the American Medical Informatics Association, vol. 27, no. 1, pp. 31–38, 2020. - PMC - PubMed
    1. Leaman R, Islamaj Doğan R, and Lu Z, “Dnorm: disease name normalization with pairwise learning to rank,” Bioinformatics, vol. 29, no. 22, pp. 2909–2917, 2013. - PMC - PubMed
    1. Wei C-H, Luo L, Islamaj R, Lai P-T, and Lu Z, “Gnorm2: an improved gene name recognition and normalization system,” Bioinformatics, vol. 39, no. 10, p. btad599, 2023. - PMC - PubMed
    1. Raza S, Reji DJ, Shajan F, and Bashir SR, “Large-scale application of named entity recognition to biomedicine and epidemiology,” PLOS Digital Health, vol. 1, no. 12, pp. 1–18, December 2022. - PMC - PubMed
    1. Yang J, Liu C, Deng W, Wu D, Weng C, Zhou Y, and Wang K, “Enhancing phenotype recognition in clinical notes using large language models: Phenobcbert and phenogpt,” Patterns, vol. 5, no. 1, p. 100887, 2024. - PMC - PubMed

LinkOut - more resources