VANER: Leveraging Large Language Model for Versatile and Adaptive Biomedical Named Entity Recognition

Junyi Biana, Weiqi Zhai, Xiaodi Huang, Jiaxuan Zheng, Shanfeng ZhuarXiv 2024

TL;DR

VANER bridges the gap between Large Language Models (LLMs) and specialized biomedical entity recognition. By combining instruction tuning with a novel knowledge-injection method called Dense Bioentities Recognition (DBR), it outperforms previous LLM approaches and rivals traditional state-of-the-art (SOTA) systems across multiple benchmarks.

What Problem Does This Paper Address?

Biomedical Named Entity Recognition (BioNER)—identifying genes, diseases, and chemicals in text—is notoriously difficult. Traditional solutions rely on task-specific models (like BioBERT) that struggle to generalize across different datasets.

While Large Language Models (LLMs) like LLaMA2 are versatile, they face three major hurdles in BioNER:

  1. Lack of Domain Knowledge: General LLMs aren't deeply familiar with specialized medical terminology.
  2. The Causal Mask Problem: Standard LLMs use "causal masking," meaning a token can only "see" tokens to its left. For entity recognition, knowing what comes after a word is just as important as what comes before it.
  3. Generative vs. Discriminative: Asking an LLM to "list entities" (generative) often yields lower precision than "labeling tokens" (discriminative).

Methods

The authors introduce VANER, which uses LLaMA2 as a high-performance feature extractor rather than a text generator.

Key innovations include:

  • Sequence Labeling over Generation: Instead of generating text, VANER projects LLM hidden states into IOB (Inside, Outside, Beginning) tags.
  • Bidirectional Attention: They remove the causal mask during training and inference, allowing the model to utilize full bidirectional context—essentially turning a decoder-only LLM into a powerful encoder.
  • Instruction Tuning: The model receives instructions specifying the dataset name and the target entity type. This allows a single model to handle multiple datasets even when their annotation standards conflict.
  • Dense Bioentities Recognition (DBR): To inject medical knowledge, the authors retrieve relevant entities from external knowledge bases (like UMLS) using SapBERT. They then "cram" these entities into synthetic training sentences to force the model to memorize domain-specific entities directly.
The VANER training framework combines instruction tuning with sequence labeling and bidirectional attention.

Datasets

The authors trained and evaluated VANER on 8 major BioNER datasets covering four categories:

  • Chemicals: BC4CHEMD, BC5CDR-chem
  • Species: s800, Linnaeus
  • Genes: JNLPBA, BC2GM
  • Diseases: NCBI, BC5CDR-disease

To test generalizability, they also evaluated the model on the CRAFT dataset, which was not seen during training.

Key Insights and Ideas

  • Causal masks are for generation, not extraction. The paper reinforces that for NLU (Natural Language Understanding) tasks, the unidirectional nature of standard LLMs is a handicap. Removing the mask significantly boosts performance.
  • Instruction tuning acts as a "style" switch. Because different BioNER datasets have different rules (e.g., does "breast cancer" include the word "cancer"?), providing the dataset name in the prompt helps the model reconcile these discrepancies.
  • Synthetic "Dense" data is an efficient teacher. Rather than pre-training on billions of medical abstracts, DBR uses a targeted retrieval process to create high-density training samples. This accelerates convergence and improves the model's "memory" of rare entities.
The DBR process retrieves relevant positive and negative entities from a knowledge base to create dense training samples.

Key Results

VANER achieved impressive results, marking a milestone for LLM-based BioNER:

  • New SOTA: It achieved the highest F1 scores on three datasets: BC4CHEMD (93.18), BC5CDR-chem (94.34), and Linnaeus (94.06).
  • Outperforming LLMs: It significantly outperformed other LLM-based methods like GPT-3.5 and UniversalNER.
  • Efficiency: Despite its power, the model was trained using 4-bit LoRA on a single consumer-grade GTX-4090 GPU, making it accessible for researchers without massive compute clusters.
  • Faster Convergence: As shown in Figure 5, models using DBR (the blue lines) reached higher F1 scores much faster than those without it.
F1 score progression during training shows that DBR (blue) leads to faster and better convergence compared to training without it (green).

Limitations and Future Work

While VANER is a leap forward, it still falls short of specialized tools like HunFlair on gene recognition. The authors attribute this to the fact that HunFlair is trained on a much larger collection of gene-specific datasets (13-14 vs. VANER's 2).

Future work may involve:

  • Scaling up the number of training datasets to improve gene and disease recognition.
  • Applying the VANER architecture to other information extraction tasks, such as relation extraction.
  • Experimenting with even larger backbone models beyond LLaMA2-7B.

Summary updated

BibTeX
@misc{biana2024vaner,
  author = {Junyi Biana and Weiqi Zhai and Xiaodi Huang and Jiaxuan Zheng and Shanfeng Zhu},
  title = {{VANER: Leveraging Large Language Model for Versatile and Adaptive Biomedical Named Entity Recognition}},
  year = {2024},
  eprint = {2404.17835},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.17835},
}
Figure