arXiv(opens in a new tab)cs.CLOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.02949

Enhancing Biomedical Named Entity Recognition via Multiple Programming Languages Instruction Tuning and Ensemble Method

Songtao Li, Yijia Zhang, Jianyuan Yuan, Shidi Zhang, Fengyu Zhang, Hongfei Lin

Songtao Li 1^{1}, Yijia Zhang 1^{1}, Jianyuan Yuan 2^{2}, Shidi Zhang 1^{1}, Fengyu Zhang 3^{3}, Hongfei Lin 4^{4}

1^{1}Dalian Maritime University

{devin_lee, zhangyijia, zhangshidi}@dlmu.edu.cn

2^{2}Beijing Institute of Technology

jianyuany@bit.edu.cn

3^{3}Northeastern University

fengyu.felix@gmail.com

4^{4}Dalian University of Technology

hflin@dlut.edu.cn

Abstract—Instruction tuning has become a common paradigm for applying large language models (LLMs) to biomedical named entity recognition (BioNER). However, existing instruction-tuning approaches still face two key challenges. First, conventional natural-language instructions typically serialize BioNER annotations as flat textual outputs, providing limited structural constraints for typed entity extraction. Second, high-quality biomedical annotations are limited, and learning from a single serialized output form may restrict structural diversity and reduce model robustness. Although external biomedical knowledge can be introduced to alleviate data scarcity, it often requires costly resource construction. To address these challenges, we propose MITE, a Multiple Programming Languages Instruction Tuning and Ensemble method for BioNER. MITE reformulates BioNER as a structure-to-structure generation task by representing both instructions and entity outputs in code-formatted representations. Specifically, each training instance is transformed into multiple programming-language formats, including Python, C++, and Java, while preserving the same underlying entity semantics. These language-specific representations provide structurally diverse supervision without requiring external biomedical knowledge or additional annotations. During inference, MITE aggregates predictions from different code formats through an entity-level voting strategy, reducing language-specific prediction variance and improving robustness. Experiments on six widely used BioNER datasets demonstrate that MITE consistently outperforms representative BERT-based and LLM-based baselines and exhibits strong cross-dataset generalization. Ablation and parameter analyses further verify the effectiveness and robustness of the proposed components.

Index Terms—biomedical named entity recognition, large language model, supervised fine-tuning, multiple programming languages

I. INTRODUCTION

Biomedical named entity recognition (BioNER) focuses on recognizing biomedical entities such as diseases, chemicals, genes, and proteins from unstructured biomedical text [1]. As a fundamental task in biomedical information extraction, BioNER provides structured entity-level knowledge that supports a wide range of downstream applications, including biomedical relation extraction [2] and biomedical question answering [3]. Therefore, reliable BioNER is a key foundation

Figure

(a) Performing BioNER with NL instructions

Figure

(b) Performing BioNER with code instructions

Fig. 1. Examples of performing structured BioNER task with NL and Code instructions. In contrast to prompting with NL instructions, we utilize structured Code instructions to mitigate the output discrepancy between the pretraining and inference stages.

for extracting, organizing, and exploiting biomedical knowledge from large-scale scientific literature and clinical text.

Recent advances in large language models (LLMs) have opened up new opportunities for BioNER by enabling models to follow task-specific instructions and generate flexible textual outputs. To adapt general-purpose LLMs to biomedical entity extraction, supervised fine-tuning (SFT) has been widely explored, where BioNER instances are converted into instruction-following formats and used to teach models how to extract entities from biomedical text [4], [5]. Under this paradigm, natural language instructions are commonly used to describe the extraction task, specify the target entity types, and guide the model to produce structured predictions. To further improve extraction performance, several recent studies incorporate external biomedical knowledge or domain-specific resources, allowing models to better capture specialized terminology and biomedical semantics [6], [7].

Despite notable progress in BioNER, existing studies still suffer from two main limitations. First, BioNER is inherently a span-type structure prediction task, requiring models to identify entity boundaries and assign semantic types under a predefined schema. However, current instruction-tuning methods usually formulate entity extraction as natural-language-to-text generation, where entity annotations are serialized into flat textual outputs. Such a formulation weakens the alignment between typed entity structures and the code-like structured patterns learned by LLMs during pretraining, limiting their ability to exploit explicit structural regularities for BioNER prediction, as illustrated in Fig. 1(a). Second, high-quality biomedical annotations are limited, and existing instruction-tuning methods usually learn BioNER from a single serialized output form. This restricts the structural diversity of training signals and may make models sensitive to specific output formats rather than robust entity semantics. Although external biomedical knowledge can be introduced to alleviate data scarcity, such resources are often costly to construct, limited in coverage, and difficult to maintain.

To address the aforementioned challenges, we propose MITE, a Multiple Programming Languages Instruction Tuning and Ensemble method for BioNER. MITE reformulates BioNER from natural-language-to-text generation into a structure-to-structure generation task, where both task instructions and entity outputs are represented in code-formatted structures. Entity mentions and their semantic types are expressed as explicit code-style objects, providing a constrained output representation that better aligns span-type BioNER prediction with the code-like structured patterns learned by LLMs during pretraining, as illustrated in Fig. 1(b). To further improve robustness, MITE transforms each BioNER instance into multiple programming-language representations, including Python, C++, and Java. These representations introduce structural diversity through different syntax forms, object construction patterns, and list operations, without requiring external biomedical knowledge or additional annotations. During inference, MITE aggregates predictions from different code formats through entity-level voting, reducing language-specific prediction variance and producing more stable BioNER outputs.

In summary, the contributions of this paper are as follows:

  • We reformulate BioNER as a structure-to-structure code generation task, which represents span-type entity predictions as explicit code-style objects and better aligns BioNER with the structured patterns learned by LLMs during pretraining.

• We transform original BioNER samples into multiple programming-language representations, constructing a structurally diverse training corpus without relying on external biomedical knowledge or additional annotations.

• We introduce a multi-language entity-level ensemble strategy that aggregates predictions from different code representations to improve the stability and reliability of BioNER outputs.

• Extensive experiments on six BioNER benchmarks demonstrate that MITE consistently outperforms representative baselines and exhibits strong cross-dataset generalization.

References (33)