Medical knowledge representation enhancement in large language models through clinical tokens optimization

Read full text
Authors: Qianqian Li, Jijun Tong, Shanna Liu, Chang Li, Jie Tang, Qingli Zhou
Cited by: 1
References: 19

Abstract

During the training of medical large language models (LLMs), conventional tokenizers frequently segment domain-specific medical terms into multiple subword tokens, resulting in suboptimal recognition and representation of specialized vocabulary. As a consequence, the model encounters difficulties in effectively acquiring medical domain knowledge during the fine-tuning process. To address this limitation, the present study introduces “clinical tokens”—medical subword units—by augmenting the vocabulary of the original LLaMA2 tokenizer. This adapted tokenizer retains medical terms as whole tokens wherever feasible, thereby enhancing tokenization accuracy and enabling the model to learn and interpret medical knowledge more effectively. For downstream task adaptation, this study employs the Byte Pair Encoding (BPE) algorithm to construct a domain-specific vocabulary and tokenization model, ensuring the inclusion of medical subword units (clinical tokens). We compare the tokenization performance of three variants: the original LLaMA2 tokenizer, the Chinese-LLaMA2 tokenizer (expanded with an extended Chinese vocabulary), and the clinical token-augmented tokenizer. This was followed by fine-tuning the large language models on curated medical datasets. The experimental results indicate that the enhanced tokenizer improves encoding and decoding efficiency, extends the model’s effective context window, and yields superior performance on downstream medical tasks.

Fields of Study & Subjects

Machine Learning in Healthcare Topic Modeling Artificial Intelligence in Healthcare and Education

Publication details

Journal / source
Scientific Reports
Publisher
Springer Science and Business Media LLC
Volume
16
Issue
1
Pages
6563–6563
Publication date
29 January 2026
Language
EN