Abstract
Large Language Models (LLMs) demonstrate exceptional medical expertise but are often restricted in clinical environments due to privacy regulations like HIPAA. Conversely, Small Language Models (SLMs) can be deployed locally to ensure data privacy but typically lack the reasoning capabilities of larger models. This paper introduces a novel pipeline, Privacy-Preserving Contextual Prompting, which bridges this gap. By extracting de-identified medical keywords and using them to prompt an LLM for context, the system enhances SLM performance without exposing sensitive patient data. Our approach achieves up to a 22.57% accuracy improvement on medical benchmarks, establishing new state-of-the-art results for privacy-constrained medical tasks.
Introduction
The integration of AI in healthcare faces a critical tension between performance and privacy. While state-of-the-art LLMs like GPT-4 could revolutionize clinical decision support, their reliance on cloud-based processing makes them unsuitable for handling sensitive Protected Health Information (PHI). Local deployment of SLMs offers a solution for privacy but results in a significant performance drop due to limited model capacity.
This research addresses the "Goldilocks" problem: how to leverage the medical knowledge of an LLM to improve a private SLM without ever transmitting sensitive patient data to the LLM.
Methodology: Privacy-Preserving Contextual Prompting
The proposed framework consists of a three-stage pipeline designed to transfer knowledge from a "teacher" LLM to a "student" SLM while maintaining a strict privacy boundary.
1. Keyword Extraction
To prevent the leakage of PHI, the system first processes clinical notes through a local Named Entity Recognition (NER) model. This step extracts only relevant medical keywords (e.g., symptoms, diagnoses, medications) and discards identifiers such as names, dates, and locations.
2. Context Generation
The extracted keywords and candidate answers are sent to an LLM. Rather than asking for a direct answer, the LLM is prompted to generate a "medical knowledge-intensive context." This context simulates a clinician's reasoning process, explaining the underlying medical concepts and their relationships to the potential answers.
3. Context-Enhanced Training (FTC)
The generated context is concatenated with the original question and fed into the SLM (e.g., BioLinkBERT) during fine-tuning. This allows the SLM to learn from the rich medical background provided by the LLM, effectively "denoising" the input and focusing on relevant clinical logic.
Experimental Evaluation
The method was evaluated on several high-stakes medical benchmarks, including MedQA (USMLE), HEADQA (Spanish healthcare exams), and MedMCQA (Indian medical entrance exams). Out-of-domain (OOD) testing was conducted using the MMLU-professional medicine dataset.
Key Results
- Performance Boost: The Fine-Tuning with Context (FTC) method achieved an absolute accuracy increase of up to 22.57% over standard fine-tuning on MedQA and HEADQA.
- State-of-the-Art: The approach set new SOTA benchmarks for privacy-restricted medical tasks.
- Student Surpassing Teacher: In certain scenarios, the context-enhanced SLM outperformed the GPT-3.5 model used to generate its training context.
- Robustness: The framework also showed significant gains (11.67%) on general domain tasks like OpenbookQA, demonstrating its broad applicability.
Discussion and Insights
A primary finding of this work is that LLMs do not require full clinical narratives to provide useful reasoning; a sparse set of medical keywords is sufficient to activate their internal medical knowledge base. Furthermore, the SLM demonstrated an ability to extract useful information from the LLM's explanations even when the LLM's final "preliminary decision" was incorrect.
The method is particularly effective in data-scarce environments. In few-shot experiments with only 100 training examples, the context-enhanced SLM significantly outperformed baselines, making it a promising tool for specialized medical domains or rare diseases.
Limitations
Despite its success, the pipeline has limitations. The reliance on LLM-generated context introduces risks of hallucinations or outdated medical information. Additionally, the context generation step adds computational overhead during the data preparation phase, although the final SLM remains efficient for local inference.
Conclusion
Privacy-Preserving Contextual Prompting offers a viable path for deploying high-performance AI in clinical settings. By decoupling medical reasoning from sensitive data, this framework allows healthcare providers to benefit from the vast knowledge of LLMs while adhering to the strictest privacy standards.
Summary updated