Abstract
Interactive segmentation uses real-time user inputs, such as mouse clicks, to iteratively refine model predictions. Although not originally designed to address distribution shifts, this paradigm naturally lends itself to such challenges. In medical imaging, where distribution shifts are common, interactive methods can use user inputs to guide models towards improved predictions. Moreover, once a model is deployed, user corrections can be used to adapt the network parameters to the new data distribution, mitigating distribution shift. Based on these insights, we aim to develop a practical, effective method for improving the adaptive capabilities of interactive segmentation models to new data distributions in medical imaging. Firstly, we found that strengthening the model's responsiveness to clicks is important for the initial training process. Moreover, we show that by treating the post-interaction user-refined model output as pseudo-ground-truth, we can design a lean, practical online adaptation method that enables a model to learn effectively across sequential test images. The framework includes two components: (i) a Post-Interaction adaptation process, updating the model after the user has completed interactive refinement of an image, and (ii) a Mid-Interaction adaptation process, updating incrementally after each click. Both processes include a Click-Centered Gaussian loss that strengthens the model's reaction to clicks and enhances focus on user-guided, clinically relevant regions. Experiments on 5 fundus and 4 brain-MRI databases show that our approach consistently outperforms existing methods under diverse distribution shifts, including unseen imaging modalities and pathologies.
Introduction
Deep learning has significantly advanced medical image segmentation, yet these models frequently encounter performance degradation when deployed across different clinical environments—a phenomenon known as "distribution shift." Variations in scanner hardware, acquisition protocols, and patient demographics can render a model trained on one dataset ineffective on another.
While interactive segmentation allows clinicians to manually correct errors via prompts like mouse clicks, traditional models are "amnesiac": they do not retain knowledge from these interactions. Consequently, the model repeats the same errors on subsequent images from the same new distribution. This paper introduces OAIMS (Online Adaptation for Interactive Medical-image Segmentation), a framework designed to transform these corrective clicks into learning signals, allowing models to adapt to new data distributions in real-time.
The OAIMS Framework
The core innovation of OAIMS is the use of clinician-guided corrections as "pseudo-ground-truth" for on-the-fly model updates. The framework operates on two distinct timescales to maximize learning efficiency.
Mid-Interaction (MI) Adaptation
During the segmentation of a single image, the model performs incremental weight updates after each user click. To prevent the model from drastically altering correct regions while fixing errors, the MI process uses the previous iteration's prediction as a baseline. It employs a Click-Centered Gaussian (CCG) loss to focus the update on the immediate vicinity of the new click, ensuring the model's response is spatially relevant and stable.
Post-Interaction (PI) Adaptation
Once a clinician is satisfied with a segmentation mask, that final output serves as a high-quality pseudo-ground-truth. The model then undergoes a more comprehensive fine-tuning step before moving to the next image. This "long-term" memory update improves the model's baseline performance for future images within the same new distribution, reducing the number of clicks required over time.
Click-Centered Gaussian (CCG) Loss
A critical challenge in online adaptation is avoiding the reinforcement of model errors in uncorrected regions. The CCG loss addresses this by applying a Gaussian spatial penalty. This forces the network to prioritize learning from the pixels directly surrounding the user's click—the area where the human has explicitly provided ground-truth information—while ignoring potentially noisy predictions elsewhere.
Experimental Evaluation
The OAIMS framework was rigorously tested across two major medical imaging domains involving significant distribution shifts:
- Fundus Imaging: Models were trained on the REFUGE2 dataset and evaluated on four external databases (G1020, GS1-Drishti, GAMMA, and PAPILA).
- Brain MRI: Models were trained on BRATS2023 FLAIR sequences and tested across different modalities (T1, T1c, T2) and pathologies (Stroke, White Matter Hyperintensities, Traumatic Brain Injuries).
Key Results and Discussion
The experimental results demonstrate that OAIMS significantly outperforms static models and existing adaptation baselines.
As shown in the performance curves, the inclusion of the CCG loss consistently leads to higher Dice scores with fewer user interactions. For instance, in the extreme shift from BRATS FLAIR to BRATS T1, OAIMS achieved an 88.0% Dice score after 10 clicks, whereas a non-adaptive baseline reached only 62.5%. Furthermore, OAIMS reached an 80% Dice score in just 4.4 clicks on average, more than twice as fast as the state-of-the-art TSCA method.
Crucially, the system maintains real-time performance, with adaptation steps taking less than 0.1 seconds on a GPU. It also exhibits remarkable robustness; even when simulated user clicks were incorrect 40% of the time, the model still showed positive adaptation compared to the baseline.
Conclusion
OAIMS provides a practical and efficient solution for the distribution shift problem in medical imaging. By leveraging the natural workflow of interactive segmentation, the framework allows models to learn continuously from expert feedback without requiring large, manually labeled datasets for every new deployment site. Future work will explore extending this adaptive capability to other interaction types, such as scribbles and bounding boxes, and testing the framework with diverse neural architectures.
Summary updated