A Modular Approach for Clinical SLMs Driven by Synthetic Data with Pre-Instruction Tuning, Model Merging, and Clinical-Tasks Alignment

Jean-Philippe Corbeil, Amin Dada, Jean-Michel Attendu, Asma Ben Abacha, Alessandro Sordoni, Lucas Caccia, François Beaulieu, Thomas Lin, Jens Kleesiek, Paul Vozila

Introduction

Clinical environments require high-performance AI that is both efficient and privacy-compliant. While Large Language Models (LLMs) like GPT-4 demonstrate vast medical knowledge, their deployment is often hindered by high latency, operational costs, and the "clinical data bottleneck"—the difficulty of accessing high-quality patient data due to privacy regulations. Small Language Models (SLMs) offer a promising alternative but typically struggle with complex medical reasoning and suffer from "catastrophic forgetting" when fine-tuned on specialized domains.

The MediPhi Framework

To address these challenges, researchers developed MediPhi, a 3.8B-parameter SLM suite based on Phi-3.5-mini. The core innovation is a modular training pipeline designed to inject specialized knowledge without compromising general reasoning capabilities.

Figure 1: Overview of the MediPhi training pipeline, including continual pre-training, knowledge acquisition, model merging, and clinical alignment.

The framework consists of three primary stages:

  1. Pre-Instruction Tuning (PIT): Unlike standard Domain Adaptation Pre-Training (DAPT) which uses raw text, PIT transforms medical documents into "instruction-like" formats (e.g., summaries, entity extraction) before training. This prepares the model to apply knowledge in a task-oriented manner.
  2. Domain-Specific Model Merging: Five specialized "expert" models were trained on distinct corpora (PubMed, Clinical notes, Guidelines, etc.). These experts were then merged back into the base model using Spherical Linear Interpolation (SLERP) and an evolutionary algorithm called BreadCrumbs. This process acts as a regularizer, preserving general instruction-following skills while integrating deep domain expertise.
  3. Clinical Alignment: The final model underwent Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO) using the newly created MediFlow dataset.

Data Strategy: MediFlow and CLUE+

A significant contribution of this work is the creation of MediFlow, a massive synthetic dataset comprising 2.5 million high-quality instructions across 14 medical NLP tasks. Generated via an agentic pipeline using GPT-4o, MediFlow serves as a high-quality proxy for sensitive clinical data.

Additionally, the researchers introduced CLUE+, an expanded version of the Clinical Language Understanding Evaluation benchmark. CLUE+ doubles the original benchmark's size by adding specialized tasks such as radiology report analysis, social determinants of health (SDoH) extraction, and medical error detection.

Key Results and Performance

MediPhi-Instruct demonstrates that specialized SLMs can rival or exceed much larger models. Notably, it outperformed GPT-4-0125 on ICD-10 medical coding tasks by 14%. The alignment process using MediFlow yielded an average performance increase of 18.9% across all evaluated benchmarks.

Figure 5: Accuracy comparison across various clinical tasks, showing the performance gains achieved through Pre-Instruction Tuning (PIT) and SLERP merging compared to base models and GPT-4 variants.

On the CLUE+ benchmark, MediPhi showed dramatic improvements over the base Phi-3.5 model, specifically a 64.3% relative gain in medical entity recognition and a 49.5% improvement in radiology report processing. These results highlight the efficacy of the PIT and merging strategies in enhancing domain-specific accuracy while maintaining efficiency.

Conclusion and Future Directions

MediPhi proves that a modular approach—combining synthetic data generation, instruction-aware pre-training, and model merging—can produce highly capable clinical SLMs. While the current iteration is limited to single-turn English interactions and may struggle with extremely high-complexity reasoning, it provides a scalable blueprint for deploying AI in healthcare. Future work will focus on multi-turn dialogue capabilities and expanding the framework to support multilingual clinical environments.

Summary updated

BibTeX
@inproceedings{corbeil2025modular,
  author = {Jean-Philippe Corbeil and Amin Dada and Jean-Michel Attendu and Asma Ben Abacha and Alessandro Sordoni and Lucas Caccia and François Beaulieu and Thomas Lin and Jens Kleesiek and Paul Vozila},
  title = {{A Modular Approach for Clinical SLMs Driven by Synthetic Data with Pre-Instruction Tuning, Model Merging, and Clinical-Tasks Alignment}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure