Reprogramming Distillation for Medical Foundation Models

Yuhang Zhou, Siyuan Du, Haolin Li, Jiangchao Yao, Ya Zhang, Yanfeng Wang

TL;DR

Reprogramming Distillation (RD) is a new framework designed to bridge the gap between massive medical foundation models (MFMs) and the lightweight models needed for real-world clinical deployment. By treating the foundation model as a "black box" and using a novel co-training approach with Centered Kernel Alignment (CKA), RD allows small student models to inherit the power of giant MFMs while overcoming inconsistencies in tasks and data modalities.

What Problem Does This Paper Address?

Medical Foundation Models (MFMs) are trained on vast datasets and possess incredible general-purpose capabilities. However, two major hurdles prevent them from being used in every hospital:

  1. Resource Constraints: MFMs are too large for the edge devices (like handheld ultrasound machines) often used in clinical settings.
  2. Task/Modality Gaps: An MFM might be pre-trained on general X-ray reconstruction, but a doctor needs it to diagnose a specific type of lung disease. Existing adaptation methods like Parameter-Efficient Fine-Tuning (PEFT) still require significant GPU memory for backpropagation, and standard Knowledge Distillation (KD) fails when the teacher (the MFM) and the student are looking at different types of data or tasks.

The authors aim to create a way to "distill" the MFM's wisdom into a tiny model without needing a supercomputer to do it.

Methods

The authors introduce Reprogramming Distillation (RD), which consists of three main components:

  • Black-box Reprogramming: Instead of fine-tuning the giant MFM, they treat it as a fixed "black box." They add a small, trainable reprogramming module (input transformation layers) and an output mapping layer (classifier). This "reprograms" the MFM’s feature space to be more relevant to the specific downstream medical task.
  • Co-training Mechanism: To ensure the student model actually learns from the MFM, the authors train both the student and the reprogramming module simultaneously. Crucially, they share a classifier between the two. This forces the student to learn decision boundaries that are aligned with the MFM’s high-level understanding.
  • Centered Kernel Alignment (CKA) Distillation: Training small models can be "noisy" and inconsistent. To stabilize the knowledge transfer, the authors use CKA loss. Unlike standard distillation that just looks at final outputs, CKA looks at the correlation and higher-order information in the features, making the transfer robust to different model architectures and initializations.

Datasets

The researchers validated RD across five diverse medical datasets covering various tasks and imaging modalities:

  • ISIC2018: Skin lesion (Melanoma) classification (RGB images).
  • COVID: COVID-19 diagnosis (CT scans).
  • BTC: Brain tumor classification (MRI).
  • BUSI: Breast cancer diagnosis (Ultrasound).
  • ChestXray: Lung disease diagnosis (X-Ray).

They tested these against three major MFMs: PMC-CLIP, RadDenseNet, and LVM-Med.

Key Insights and Ideas

  • MFMs as Fixed Assets: By keeping the MFM parameters frozen, RD avoids the massive GPU costs of backpropagation. This makes the method accessible to researchers without massive compute clusters.
  • Alignment is Everything: The "Aha!" moment here is that you can't just distill a general model into a specific one; you have to "reprogram" the teacher first so it speaks the same "language" (modality/task) as the student.
  • Superiority in Small Data: RD shows its strongest advantages in scenarios with very little data (like the BUSI ultrasound dataset). The "reprogrammed" knowledge acts as a powerful prior that prevents the small student model from overfitting.
  • End-to-End Efficiency: Unlike previous reprogramming methods that required a clunky multi-stage training process, RD’s co-training approach allows for a streamlined, end-to-end workflow.

Key Results

  • Performance: RD consistently outperformed state-of-the-art KD and PEFT methods. For example, on the BUSI dataset, RD achieved an accuracy of 85.71%, significantly higher than standard KD methods which hovered around 75-80%.
  • Efficiency: The student models (like ResNet18 or MobileNet) are orders of magnitude smaller than the MFMs. For instance, while the LVM-Med foundation model has 41M parameters and 65G FLOPs, a ShuffleNet student has only 0.6M parameters and 0.55G FLOPs, yet achieves comparable performance through RD.
  • Decision Boundaries: Qualitative analysis (visualized via decision boundaries) showed that RD produces models that "think" much more like a fully fine-tuned foundation model than other distillation techniques.

Limitations and Future Work

While the paper demonstrates strong results, a few areas remain for exploration:

  • Module Architecture: The reprogramming module currently uses standard residual blocks; the authors note that exploring more specialized architectures for different medical modalities could further boost performance.
  • Foundation Model Selection: The method relies on the existence of a high-quality MFM. If the MFM has zero exposure to a specific niche modality, reprogramming might have its limits.
  • Scaling to 3D: Most of the tests were on 2D slices or images; extending this framework to natively handle 3D medical volumes (like full MRI/CT stacks) is a logical next step.

Summary updated

BibTeX
@inproceedings{zhou2024reprogramming,
  author = {Yuhang Zhou and Siyuan Du and Haolin Li and Jiangchao Yao and Ya Zhang and Yanfeng Wang},
  title = {{Reprogramming Distillation for Medical Foundation Models}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2024},
  doi = {10.1007/978-3-031-72120-5\_50},
}

Loading related content...

Figure