Deep Reprogramming Distillation for Medical Foundation Models

Siyuan Du, Yuhang Zhou, Haolin Li, Jiangchao Yao, Haishuai Wang, Hui Lin, Ya Zhang, Yanfeng WangarXiv 2026

TL;DR

Adapting massive medical foundation models to lightweight clinical applications usually fails when the teacher and student models have different architectures or training strategies. This paper introduces Deep Reprogramming Distillation (DRD), a framework that bridges these structural and task gaps to distill large foundation models into highly efficient, deployment-ready student models. Across 18 medical datasets, DRD consistently outperforms existing fine-tuning and distillation methods while drastically slashing computational overhead.

What Problem Does This Paper Address?

Medical foundation models (like MedSAM or LVM-Med) show incredible versatility, but their massive size makes them impractical for real-world clinical deployment on resource-constrained hardware (e.g., local hospital workstations or mobile devices).

To make these models usable, researchers typically turn to Parameter-Efficient Fine-Tuning (PEFT) or Knowledge Distillation (KD). However, adapting medical foundation models introduces a triad of inconsistencies:

  1. Task/Domain Discrepancy: Foundation models are often pre-trained on broad, self-supervised proxy tasks, whereas downstream clinical tasks require highly specialized expertise (e.g., tumor diagnosis).
  2. Structural Discrepancy: The foundation model might be Vision Transformer (ViT)-based, while the lightweight target model is CNN-based (e.g., ResNet18 or MobileNet).
  3. Strategy Discrepancy: The teacher and student models use entirely different training objectives.

When architectures and strategies are heterogeneous, standard KD methods often suffer from "negative transfer"—actually degrading the student's performance instead of helping it.

Fig. 1: Real-world consideration for the adaptation of medical foundation models. It requires to overcome different inconsistency issues and enables low cost to deploy on resource-constrained devices. The resulting downstream models should well learn task-specific knowledge and build with a lightweight structure to allow for broader application in certain medical scenarios.

Methods

The authors propose Deep Reprogramming Distillation (DRD), a one-stage framework that keeps the foundation model frozen while dynamically reshaping its features to be "student-friendly."

The architecture consists of three core components:

  • Reprogramming Module: Lightweight, trainable three-layer convolutional projectors ($\phi_i$) map and resize the intermediate features of the frozen foundation model to match the spatial and channel dimensions of the student model.
  • Deep Co-training Reprogramming: Instead of a passive feature-matching loss, the reprogrammed teacher features are injected directly into the subsequent blocks of the student network to generate "hybrid logits." These hybrid logits are trained against the ground truth alongside the student's independent path, forcing the projectors to extract downstream-relevant knowledge.
  • Centered Kernel Alignment (CKA) Distillation: To combat training instability caused by random seeds and varying conditions, the authors implement a feature-level distillation loss based on CKA. This aligns the higher-order representations and correlations between the teacher and student features.
Fig. 2: The overall framework of Deep Reprogramming Distillation. During training, the foundation model is frozen. The deep reprogramming module reprograms the intermediate features of the foundation model through the student model branches, with downstream data supervising the co-training process. Additionally, the student model further benefits from CKA distillation for enhanced feature alignment and hybrid student logits distillation for effective logits-level knowledge transfer.

Datasets

The framework was comprehensively validated across 18 public medical image datasets spanning various modalities (MRI, CT, X-ray, Ultrasound, Fundus, Dermoscopy, and RGB) and tasks:

  • 2D/3D Classification: BUSI (breast cancer), ISIC2018 (melanoma), COVID, BTC (brain tumor), ChestXray, MMD, and LAC (lung tumor).
  • 2D/3D Segmentation: CoNIC, CDPRD, FIVES, USC, TN3K, Robo, CHAOS, MSD-Prostate, MSD-Pancreas, MSD-Spleen, and BTCV.

The foundation models used as teachers included PMC-CLIP, RadDenseNet, LVM-Med, Merlin, MedSAM, MSA, Swin-UMamba, and SAT.

Key Insights and Ideas

  • The Heterogeneity Penalty is Real: Traditional distillation methods assume the teacher and student share structural similarities. The authors show that directly applying standard KD across different model families (e.g., ViT to CNN) frequently results in worse performance than training the student from scratch.
  • Coarse Alignment Suffices: DRD does not require meticulous, layer-by-layer architectural matching. Dividing models into a few coarse, stage-level blocks allows the co-training mechanism to automatically learn an emergent semantic alignment during optimization.
  • Gradient Isolation for Efficiency: Because the foundation model's backbone is completely frozen and gradients do not backpropagate through it, DRD significantly lowers GPU memory requirements during training, making it accessible on consumer-grade hardware like an RTX 4090.

Key Results

  • Performance Boost: DRD consistently outperformed vanilla training, standard KD (e.g., Hint, OFA), and PEFT methods (e.g., LoRA, AdaptFormer) across all 18 tasks. For instance, on the challenging FIVES dataset, DRD improved a ShuffleNet student's performance by nearly 17 percentage points over the baseline.
  • Resource Efficiency: Compared to full fine-tuning of the foundation model, DRD reduced average per-iteration training time by 44.73% and slashed peak GPU memory usage by 60.42% (dropping from 11,065 MB to 4,379 MB).
  • Data Efficiency: DRD proved highly robust on small clinical datasets (like BUSI and COVID), showing less dependency on massive volumes of labeled downstream data than PEFT methods.
Comparison of DRD against various PEFT methods across classification tasks.

Limitations and Future Work

While the paper demonstrates excellent algorithmic performance and robust convergence stability, the authors note that the framework currently relies on manual, coarse stage decomposition of the networks. For future work, they plan to explore direct, in-hospital clinical applications of DRD using the latest state-of-the-art medical foundation models in real-world deployment pipelines.

Summary updated

BibTeX
@misc{du2026deep,
  author = {Siyuan Du and Yuhang Zhou and Haolin Li and Jiangchao Yao and Haishuai Wang and Hui Lin and Ya Zhang and Yanfeng Wang},
  title = {{Deep Reprogramming Distillation for Medical Foundation Models}},
  year = {2026},
  eprint = {2605.04447},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.04447},
}
Figure