A Unified Biomedical Named Entity Recognition Framework with Large Language Models

Tengxiao Lv, Ling Luo, Juntao Li, Yanhua Wang, Yuchen Pan, Chao Liu, Yanan Wang, Yan Jiang, Huiyi Lv, Yuanyuan Sun, Jian Wang, Hongfei LinarXiv 2025

TL;DR

This paper introduces a unified generative framework for Biomedical Named Entity Recognition (BioNER) that effectively handles both flat and nested entities across English and Chinese. By combining a lightweight symbolic tagging strategy, multi-dataset bilingual joint fine-tuning, and a novel contrastive entity selector, the framework achieves state-of-the-art performance and demonstrates exceptional zero-shot generalization on unseen medical corpora.

What Problem Does This Paper Address?

Biomedical Named Entity Recognition (BioNER) is essential for mining insights from electronic health records and medical literature. However, biomedical texts present unique challenges:

  1. Nested Entities: A single phrase can contain layers of entities (e.g., the DNA entity “IL-5 promoter/enhancer-luciferase gene construct” contains nested protein entities like “IL-5” and “luciferase”).
  2. Boundary Ambiguity: Determining exactly where a highly specialized medical term starts and ends is notoriously difficult.
  3. Cross-Lingual Generalization: Most existing models are tailored to a specific language or dataset, failing to transfer knowledge between languages like Chinese and English.

While Large Language Models (LLMs) excel at semantic understanding, they typically struggle with exact token-level boundary precision and often output entity names without their precise locations in the text. This paper bridges that gap.

Fig. 1. An example of the BioNER task from the GENIA dataset.

Methods

The authors reformulate BioNER as a text generation task and propose a three-part framework:

  1. Symbolic Tagging Strategy: Instead of relying on complex HTML tags or rigid JSON schemas with character indices, the authors use a simple symbolic format. The LLM is prompted to output the entity type followed by the original text sequence, using brackets [...] to mark boundaries (e.g., DNA: ...the [peri-kappa B] site is seen...).
  2. Multi-Dataset Joint LLM Training: The framework undergoes bilingual joint fine-tuning across multiple datasets using QLoRA (Quantized Low-Rank Adaptation). Training samples are mixed at the sentence level and alternated between Chinese and English to build balanced, cross-lingual semantic representations.
  3. Contrastive Entity Selector: To mitigate boundary errors, the authors introduce a post-processing filter. They fine-tune a GLM-4 model with a classification layer using positive (correctly annotated) and negative samples (where boundaries are artificially shifted by $\pm1$ or $\pm2$ tokens). This selector acts as a quality gate, filtering out spurious or poorly bounded predictions.
Fig. 2. Overview of our proposed BioNER framework. Blue represents entities in the training set, while green indicates correctly predicted entities and red indicates incorrectly predicted entities.

Datasets

The model was trained and evaluated on four distinct benchmark datasets:

  • CMeEE-V2: Chinese dataset featuring nested entities.
  • GENIA: English dataset featuring nested entities.
  • BioRED: English dataset featuring flat entities.
  • BC5CDR-Chemical (BC5-Chem): English dataset featuring flat entities.

To test zero-shot generalization, the authors evaluated the model on two completely unseen datasets without any additional fine-tuning:

  • CCKS2019-Anatomical Site (CCKS2019-AS): Chinese, flat entities.
  • NCBI-Disease: English, flat entities.

Key Insights and Ideas

  • Simplicity Beats Structure for LLMs: When comparing tagging formats, the symbolic strategy ([...]) consistently outperformed JSON and HTML. LLMs struggle to generate precise numerical indices (JSON) and get confused by the structural complexity of nested HTML tags, whereas lightweight symbols align naturally with autoregressive text generation.
  • The "Near-Miss" Boundary Phenomenon: An error analysis revealed that roughly 50% of the model's boundary errors occurred within a tiny deviation range of just 1 to 2 tokens. This "near-miss" insight justified the creation of the Contrastive Entity Selector, specifically training the model to recognize and reject these slight boundary misalignments.
Fig. 5. Summary of error analysis. These errors can be categorized into four types based on different matching conditions: (1) correct position but incorrect type (Type); (2) partially overlapping span with correct type (Span); (3) partially overlapping span with incorrect type (Type&Span); (4) completely mismatched span (Spurious).

Key Results

  • State-of-the-Art Performance: The unified framework outperformed mainstream BERT-based models (like W2NER and DiFiNet) and general-purpose LLMs (like GPT-4 and DeepSeek-R1) across all four benchmark datasets.
  • Superior Zero-Shot Transfer: On the unseen NCBI-Disease dataset, the model achieved a leading 69.15% F1 score, vastly outperforming GPT-4 (52.69%) and DeepSeek-R1 (63.01%), proving that multi-dataset joint training successfully unlocks cross-task adaptability.
Fig. 4. Zero-shot and fine-tuning performance of different LLMs.

Limitations and Future Work

Despite its success, the model still struggles with long-range dependencies and highly complex structural segments. For instance, it failed to extract long composite noun phrases like "PHA-activated peripheral mononuclear cells".

To overcome this, the authors plan to incorporate external medical knowledge graphs during the inference stage. Aligning LLM outputs with predefined clinical entities and relations should help the framework better navigate complex, multi-word biomedical descriptions.

Summary updated

BibTeX
@misc{lv2025unified,
  author = {Tengxiao Lv and Ling Luo and Juntao Li and Yanhua Wang and Yuchen Pan and Chao Liu and Yanan Wang and Yan Jiang and Huiyi Lv and Yuanyuan Sun and Jian Wang and Hongfei Lin},
  title = {{A Unified Biomedical Named Entity Recognition Framework with Large Language Models}},
  year = {2025},
  eprint = {2510.08902},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.08902},
}
Figure