Small or Large? Zero-Shot or Finetuned? Guiding Language Model Choice for Specialized Applications in Healthcare
Open Access
- 17 October 2025
- journal article
- research article
- Published by MDPI AG in Machine Learning and Knowledge Extraction
- Vol. 7 (4) , 121
Abstract
Objectives: To guide language model (LM) selection by comparing finetuning vs. zero-shot use, generic pretraining vs. domain-adjacent vs. further domain-specific pretraining, and bidirectional language models (BiLMs) such as BERT vs. unidirectional LMs (LLMs) for clinical classification. Materials and Methods: We evaluated BiLMs (RoBERTa, PathologyBERT, Gatortron) and LLM (Mistral nemo instruct 12B) on three British Columbia Cancer Registry (BCCR) pathology classification tasks varying in difficulty/data size. We assessed zero-shot vs. finetuned BiLMs, zero-shot LLM, and further BCCR-specific pretraining using macro-average F1 scores. Results: Finetuned BiLMs outperformed zero-shot BiLMs and zero-shot LLM. The zero-shot LLM outperformed zero-shot BiLMs but was consistently outperformed by finetuned BiLMs. Domain-adjacent BiLMs generally outperformed generic BiLMs after finetuning. Further domain-specific pretraining boosted complex/low-data task performance, with otherwise modest gains. Conclusions: For specialized classification, finetuning BiLMs is crucial, often surpassing zero-shot LLMs. Domain-adjacent pretrained models are recommended. Further domain-specific pretraining provides significant performance boosts, especially for complex/low-data scenarios. BiLMs remain relevant, offering strong performance/resource balance for targeted clinical tasks.Keywords
All Related Versions
This publication has 13 references indexed in Scilit:
- Fine-tuning language model embeddings to reveal domain knowledge: An explainable artificial intelligence perspective on medical decision makingEngineering Applications of Artificial Intelligence, 2024
- Classifying Tumor Reportability Status From Unstructured Electronic Pathology Reports Using Language Models in a Population-Based Cancer Registry SettingJCO Clinical Cancer Informatics, 2024
- Large language models in medical and healthcare fields: applications, advances, and challengesArtificial Intelligence Review, 2024
- A Systematic Review of Testing and Evaluation of Healthcare Applications of Large Language Models (LLMs)medRxiv, 2024
- Mistral 7BarXiv, 2023
- GatorTron: A Large Clinical Language Model to Unlock Patient Information from Unstructured Electronic Health RecordsarXiv, 2022
- Don't Stop Pretraining: Adapt Language Models to Domains and TasksarXiv, 2020
- RoBERTa: A Robustly Optimized BERT Pretraining Approach2019
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding2019
- Universal Language Model Fine-tuning for Text ClassificationarXiv, 2018