Abstract
Foundation models in medical imaging offer powerful general-purpose representations, but adapting them to new clinical tasks sequentially often leads to catastrophic forgetting. We present MedSeqFT, a novel sequential fine-tuning framework that enables 3D medical imaging models to learn new segmentation tasks incrementally. By employing a Maximum Data Similarity (MDS) buffering strategy and LoRA-based knowledge distillation, MedSeqFT preserves foundational knowledge while effectively specializing on new data. Our evaluations across 12 datasets demonstrate superior performance over standard fine-tuning and multi-task learning, with significant gains in transferability to unseen tasks.
Introduction
In the clinical domain, medical imaging datasets typically arrive sequentially rather than all at once. Standard adaptation strategies for foundation models struggle with this reality. Parallel Fine-Tuning creates isolated models for each task, preventing cross-task knowledge sharing. Multi-Task Fine-Tuning requires simultaneous access to all datasets, which is often impossible due to privacy regulations and logistical constraints.
The ideal approach is sequential fine-tuning, where a model learns tasks one after another. However, this typically results in catastrophic forgetting, where the model's weights are overwritten, destroying its ability to perform previous tasks or maintain general anatomical understanding. MedSeqFT addresses these challenges by anchoring the model to its foundational knowledge during the incremental learning process.
Methodology
MedSeqFT introduces two primary components to mitigate forgetting and enhance learning:
1. Maximum Data Similarity (MDS) Selection
To maintain the model's foundational grounding, we implement a label-free memory buffer. For each new task, data samples are passed through the original foundation model to calculate the self-supervised learning (SSL) loss. Samples with the lowest loss—indicating high structural similarity to the original pre-training data—are selected for the MDS buffer. This buffer serves as a representative "anchor" for the model's generalist capabilities in subsequent training steps.
2. Knowledge and Generalization Retention Fine-Tuning (K&G RFT)
The fine-tuning process for a new task involves a two-stage distillation:
- KD-based Full Fine-Tuning: The model is trained on the new task while using the MDS buffer to ensure internal representations remain consistent with the previous model state.
- LoRA-based KD & Reparameterization: Lightweight Low-Rank Adaptation (LoRA) layers are injected into a frozen backbone. New task knowledge is distilled into these layers, which are then mathematically merged back into the main weights. This "reparameterization" allows the model to absorb new information without architectural expansion or significant weight shifts that cause forgetting.
Experimental Setup
We evaluated MedSeqFT on 12 diverse 3D medical imaging datasets categorized into:
- CT Multi-task Set: Including LiTS (Liver), and MSD datasets for HepaV, Pancreas, Colon, and Lung.
- MRI Multi-task Set: Including PanSegData, ISLES 2022, HNTSMRG 2024, ISPY1, and WMH.
- Transferability Set: Two unseen CT datasets (COVID-19-20 and KiTS) to test zero-shot or few-shot generalization after sequential training.
Results and Discussion
MedSeqFT consistently outperformed baseline methods across all benchmarks. On the CT multi-task benchmark, it achieved a 3.0% improvement in Dice score over standard Full Fine-Tuning (FFT) and reduced the Hausdorff Distance (HD95) by 10 mm.
Notably, MedSeqFT surpassed dedicated multi-task models like UniSeg, demonstrating that sequential learning can be more effective than simultaneous training when managed correctly. In transferability tests, the MedSeqFT-refined model showed a 3.5% Dice improvement on unseen tasks compared to the base pre-trained model, confirming that the framework successfully preserves and even enhances generalizable features. Visualization of the loss landscapes revealed that MedSeqFT produces smoother optimization surfaces, contributing to its stability and better starting points for future tasks.
Conclusion
MedSeqFT provides a robust framework for the lifelong adaptation of medical foundation models. By combining intelligent data buffering with constrained weight updates via LoRA distillation, it overcomes the hurdle of catastrophic forgetting in sequential clinical workflows. While the multi-stage distillation adds a modest overhead to training time (approx. 6 hours), the gains in performance and practical flexibility are substantial. Future work will focus on multi-modal sequential learning and selective component refinement.
Summary updated