OptimCLM: Optimizing clinical language models for predicting patient outcomes via knowledge distillation, pruning and quantization
- PMID: 39708669
- DOI: 10.1016/j.ijmedinf.2024.105764
OptimCLM: Optimizing clinical language models for predicting patient outcomes via knowledge distillation, pruning and quantization
Abstract
Background: Clinical Language Models (CLMs) possess the potential to reform traditional healthcare systems by aiding in clinical decision making and optimal resource utilization. They can enhance patient outcomes and help healthcare management through predictive clinical tasks. However, their real-world deployment is limited due to high computational cost at inference, in terms of both time and space complexity.
Objective: This study aims to develop and optimize an efficient framework that compresses CLMs without significant performance loss, reducing inference time and disk-space, and enabling real-world clinical applications.
Methods: We introduce OptimCLM, a framework for optimizing CLMs with ensemble learning, knowledge distillation (KD), pruning and quantization. Based on domain-knowledge and performance, we select and combine domain-adaptive CLMs DischargeBERT and COReBERT as the teacher ensemble model. We transfer the teacher's knowledge to two smaller generalist models, BERT-PKD and TinyBERT, and apply black-box KD, post-training unstructured pruning and post-training 8-bit model quantization to them. In an admission-to-discharge setting, we evaluate the framework on four clinical outcome prediction tasks (length of stay prediction, mortality prediction, diagnosis prediction and procedure prediction) using admission notes from the MIMIC-III clinical database.
Results: The OptimCLM framework achieved up to 22.88× compression ratio and 28.7× inference speedup, with less than 5% and 2% loss in macro-averaged AUROC for TinyBERT and BERT-PKD, respectively. The teacher model outperformed five state-of-the-art models on all tasks. The optimized BERT-PKD model also outperformed them in most tasks.
Conclusion: Our findings suggest that domain-specific fine-tuning with ensemble learning and KD is more effective than domain-specific pre-training for domain-knowledge transfer and text classification tasks. Thus, this work demonstrates the feasibility and potential of deploying optimized CLMs in healthcare settings and developing them with less computational resources.
Keywords: Black-box distillation; Clinical outcome prediction; Ensemble learning; Model compression; Post-training quantization; Unstructured pruning.
Copyright © 2024 Elsevier B.V. All rights reserved.
Conflict of interest statement
Declaration of Competing Interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Similar articles
-
Distilling the knowledge from large-language model for health event prediction.Sci Rep. 2024 Dec 28;14(1):30675. doi: 10.1038/s41598-024-75331-2. Sci Rep. 2024. PMID: 39730390 Free PMC article.
-
SensiMix: Sensitivity-Aware 8-bit index & 1-bit value mixed precision quantization for BERT compression.PLoS One. 2022 Apr 18;17(4):e0265621. doi: 10.1371/journal.pone.0265621. eCollection 2022. PLoS One. 2022. PMID: 35436295 Free PMC article.
-
DDK: Dynamic structure pruning based on differentiable search and recursive knowledge distillation for BERT.Neural Netw. 2024 May;173:106164. doi: 10.1016/j.neunet.2024.106164. Epub 2024 Feb 9. Neural Netw. 2024. PMID: 38367353
-
Classifying social determinants of health from unstructured electronic health records using deep learning-based natural language processing.J Biomed Inform. 2022 Mar;127:103984. doi: 10.1016/j.jbi.2021.103984. Epub 2022 Jan 7. J Biomed Inform. 2022. PMID: 35007754
-
A survey of model compression techniques: past, present, and future.Front Robot AI. 2025 Mar 20;12:1518965. doi: 10.3389/frobt.2025.1518965. eCollection 2025. Front Robot AI. 2025. PMID: 40182395 Free PMC article. Review.
Cited by
-
Early detection of occupational stress: Enhancing workplace safety with machine learning and large language models.PLoS One. 2025 Jun 2;20(6):e0323265. doi: 10.1371/journal.pone.0323265. eCollection 2025. PLoS One. 2025. PMID: 40455805 Free PMC article.
MeSH terms
LinkOut - more resources
Full Text Sources