MergeSlide: Continual Model Merging and Task-to-Class Prompt-Aligned Inference for Lifelong Learning on Whole Slide Images
Preprint
Abstract
Lifelong learning on Whole Slide Images (WSIs) aims to train or fine-tune a unified model sequentially on cancer-related tasks, reducing the resources and effort required for data transfer and processing, especially given the gigabyte-scale size of WSIs. In this paper, we introduce MergeSlide, a simple yet effective framework that treats lifelong learning as a model merging problem by leveraging a vision-language pathology foundation model. When a new task arrives, it is: 1) defined with class-aware prompts, 2) fine-tuned for a few epochs using an MLP-free backbone, and 3) merged into a unified model using an orthogonal continual merging strategy that preserves performance and mitigates catastrophic forgetting. For inference under the class-incremental learning (CLASS-IL) setting, where task identity is unknown, we introduce Task-to-Class Prompt-aligned (TCP) inference. Specifically, TCP first identifies the most relevant task using task-level prompts and then applies the corresponding class-aware prompts to generate predictions. To evaluate MergeSlide, we conduct experiments on a stream of six TCGA datasets. The results show that MergeSlide outperforms both rehearsal-based continual learning and vision-language zero-shot baselines. Code and data are available at https://github.com/caodoanh2001/MergeSlide.Keywords
All Related Versions
This publication has 10 references indexed in Scilit:
- A multimodal whole-slide foundation model for pathologyNature Medicine, 2025
- Revisiting Flatness-Aware Optimization in Continual Learning With Orthogonal Gradient ProjectionIEEE Transactions on Pattern Analysis and Machine Intelligence, 2025
- A whole-slide foundation model for digital pathology from real-world dataNature, 2024
- A visual–language foundation model for pathology image analysis using medical TwitterNature Medicine, 2023
- Artificial intelligence-based model for lymph node metastases detection on whole slide images in bladder cancer: a retrospective, multicentre, diagnostic studyThe Lancet Oncology, 2023
- A Federated Learning System for Histopathology Image Analysis With an Orchestral Stain-Normalization GANIEEE Transactions on Medical Imaging, 2022
- Transformer-based unsupervised contrastive learning for histopathological image classificationMedical Image Analysis, 2022
- Robust whole slide image analysis for cervical cancer screening using deep learningNature Communications, 2021
- A continual learning survey: Defying forgetting in classification tasksIEEE Transactions on Pattern Analysis and Machine Intelligence, 2021
- Catastrophic Interference in Connectionist Networks: The Sequential Learning Problem1989