CKD-EHR:Clinical Knowledge Distillation for Electronic Health Records

Junke Wang, Hongshun Ling, Li Zhang, Longqian Zhang, Fang Wang, Yuan Gao, Zhi LiarXiv 2025 · DOI

Abstract

Electronic Health Records (EHRs) offer significant potential for precision medicine, yet the deployment of Large Language Models (LLMs) for clinical tasks is hindered by high computational costs and domain-specific knowledge gaps. We present CKD-EHR, a framework that distills the medical reasoning capabilities of a 7-billion parameter LLM (Qwen 2.5) into a lightweight BERT model. By leveraging clinical data augmentation and a novel "soft label" projection mechanism, CKD-EHR achieves state-of-the-art diagnostic accuracy while being 22 times faster and 35 times more memory-efficient than the teacher LLM.

Introduction

Mining Electronic Health Records (EHRs) effectively is a cornerstone of modern precision medicine. While Large Language Models (LLMs) like Qwen or GPT-4 exhibit impressive reasoning, their application in clinical settings faces two primary challenges: the domain gap between general-purpose training and nuanced medical data, and the prohibitive deployment costs associated with running massive models in real-time hospital environments.

Existing approaches, such as Retrieval-Augmented Generation (RAG), often introduce noise from external web sources. CKD-EHR addresses these issues by capturing LLM-level intelligence within a compact model capable of running on standard hardware, specifically targeting the structured yet complex nature of patient records.

Methodology

The CKD-EHR framework consists of three integrated components designed to bridge the gap between LLM reasoning and efficient clinical deployment.

The CKD-EHR framework overview, illustrating LoRA fine-tuning, efficacy-aware data fusion, and the knowledge distillation process from Qwen 2.5 to BERT.

Efficacy-Aware Data Fusion (EADF)

Rather than relying on external knowledge bases, EADF analyzes real-world patient trajectories from the MIMIC-III database. It identifies "symptom-treatment-outcome" chains—causal sequences where specific interventions led to particular disease progressions—and converts them into natural language descriptions. This ensures the model learns from high-quality, clinically relevant associations.

Low-Rank Clinical Knowledge Distillation (LoRCKD)

The framework utilizes a teacher-student paradigm. A Qwen2.5-7B model is first fine-tuned using Low-Rank Adaptation (LoRA) to specialize in clinical tasks efficiently. This fine-tuned teacher then guides the training of a much smaller student model, BERT, through knowledge distillation.

Multi-Label Adaptive Projection Head (MLAPH)

A critical innovation in CKD-EHR is the MLAPH. Instead of distilling noisy final token outputs, MLAPH projects the LLM’s internal hidden states into a dedicated space for 25 target diseases. This generates "soft labels"—probabilistic representations of the teacher's certainty. These labels provide a richer training signal than binary "hard labels," allowing the student to learn complex inter-dependencies between different medical conditions.

Experimental Setup

The framework was evaluated using the MIMIC-III (Medical Information Mart for Intensive Care III) dataset, which contains de-identified data from over 40,000 critical care patients. The primary task was phenotyping: predicting the onset of 25 specific diseases (e.g., acute renal failure, chronic hypertension) for a patient's subsequent visit based on their current clinical history.

Results and Key Insights

CKD-EHR demonstrated significant improvements over traditional EHR models and specialized clinical models like BioBERT.

  • Diagnostic Performance: The framework achieved a 9% increase in accuracy and a 27% improvement in F1-score compared to baseline models.
  • Operational Efficiency: The distilled BERT model achieved a 22.2x inference speedup over the Qwen2.5-7B teacher.
  • Resource Optimization: GPU memory requirements were reduced from 14.3GB to just 418.8MB, a 35-fold reduction that enables deployment on edge devices or mobile platforms within clinical settings.

The success of CKD-EHR highlights that structured clinical data itself serves as superior "knowledge" compared to general medical texts. Furthermore, training the student model to mimic the teacher's uncertainty (via soft labels) allows a small model to act as a highly effective specialist.

Conclusion and Future Work

CKD-EHR proves that LLM-level reasoning can be distilled into lightweight models for practical clinical use. While currently validated on the MIMIC-III dataset for 25 diseases, future work will focus on generalizing the framework across diverse hospital systems and expanding its scope to thousands of diagnoses. Additionally, the researchers plan to explore multimodal distillation, incorporating medical imaging data with textual EHR records to further enhance diagnostic capabilities.

Summary updated

BibTeX
@misc{wang2025ckd,
  author = {Junke Wang and Hongshun Ling and Li Zhang and Longqian Zhang and Fang Wang and Yuan Gao and Zhi Li},
  title = {{CKD-EHR:Clinical Knowledge Distillation for Electronic Health Records}},
  year = {2025},
  eprint = {2506.15118},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.15118},
}
Figure