Multi-Scale Global-Instance Prompt Tuning for Continual Test-time Adaptation in Medical Image Segmentation

Lingrui Li, Yanfeng Zhou, Nan Pu, Xin Chen, Zhun Zhong

Abstract

Distribution shift is a common challenge in medical images obtained from different clinical centers, significantly hindering the deployment of pre-trained semantic segmentation models in real-world applications across multiple domains. Continual Test-Time Adaptation (CTTA) has emerged as a promising approach to address cross-domain shifts during continually evolving target domains. Most existing CTTA methods rely on incrementally updating model parameters, which inevitably suffer from error accumulation and catastrophic forgetting, especially in long-term adaptation. Recent prompt-tuning-based works have shown potential to mitigate the two issues above by updating only visual prompts. While these approaches have demonstrated promising performance, several limitations remain: 1) lacking multi-scale prompt diversity, 2) inadequate incorporation of instance-specific knowledge, and 3) risk of privacy leakage. To overcome these limitations, we propose Multi-scale Global-Instance Prompt Tuning (MGIPT), to enhance scale diversity of prompts and capture both global- and instance-level knowledge for robust CTTA. Specifically, MGIPT consists of an Adaptive-scale Instance Prompt (AIP) and a Multi-scale Global-level Prompt (MGP). AIP dynamically learns lightweight and instance-specific prompts to mitigate error accumulation with adaptive optimal-scale selection mechanism. MGP captures domain-level knowledge across different scales to ensure robust adaptation with anti-forgetting capabilities. These complementary components are combined through a weighted ensemble approach, enabling effective dual-level adaptation that integrates both global and local information. Extensive experiments on medical image segmentation benchmarks demonstrate that our MGIPT outperforms state-of-the-art methods, achieving robust adaptation across continually changing target domains.

Introduction

Deploying medical image segmentation models across different clinical centers is often hampered by distribution shifts caused by variations in scanner hardware, imaging protocols, and patient demographics. Continual Test-Time Adaptation (CTTA) aims to mitigate these shifts by adapting models on-the-fly as new data streams in.

However, standard CTTA approaches that update model weights suffer from error accumulation—where the model learns from its own noisy predictions—and catastrophic forgetting of previous domains. Furthermore, recent prompt-tuning methods often rely on memory banks that store low-frequency image components. This presents a severe privacy risk, as original medical scans can be reconstructed from these stored frequencies using an inverse Fourier transform, potentially violating HIPAA compliance.

Overview of CTTA and comparison of tuning strategies. Panel (b) illustrates the privacy risks associated with memory-bank-based methods compared to the proposed MGIPT approach.

Methodology: Multi-Scale Global-Instance Prompt Tuning (MGIPT)

To address these limitations, we propose MGIPT, a framework that freezes the pre-trained model and adapts to new domains using two complementary visual prompts:

Adaptive-scale Instance Prompt (AIP)

Unlike fixed-size prompts, AIP learns a custom prompt for each specific image. It employs a progressive tuning strategy that iteratively expands the prompt region. An "Early Stop" mechanism halts expansion when the model's predictions on the original image and an augmented version align, ensuring the optimal scale is found for each patient-specific case without overfitting.

Multi-scale Global-level Prompt (MGP)

To capture broader domain-level shifts, MGP utilizes an ensemble of prompts at three different frequency scales. Crucially, MGIPT replaces privacy-leaking memory banks with a Teacher-Student Exponential Moving Average (EMA) update strategy. The student prompt learns from the current domain, while the teacher prompt slowly absorbs this knowledge to preserve long-term memory without storing raw patient data.

Detailed architecture of the MGIPT framework, showing the AIP and MGP update mechanisms and the final confidence-weighted inference ensemble.

Experimental Results

MGIPT was evaluated on Optic Disc/Optic Cup (OD/OC) and Polyp segmentation benchmarks, simulating sequential domain shifts across multiple clinical datasets.

  • Superior Accuracy: On the OD/OC task, MGIPT achieved an average Dice Similarity Coefficient (DSC) of 72.35%, outperforming the source-only baseline (65.86%) and the previous state-of-the-art prompt method, VPTTA (69.58%).
  • Long-Term Stability: In tests spanning three continuous rounds of adaptation, MGIPT maintained a 72.28% DSC, showing negligible degradation (0.07%). In contrast, weight-tuning methods like TENT saw performance drops exceeding 5%.
  • Robustness to Noisy Data: In polyp segmentation, where traditional CTTA often fails due to confident but incorrect background predictions, MGIPT achieved 80.64% DSC. By isolating model weights from toxic feedback loops, prompt tuning ensures more stable adaptation.

Conclusion

MGIPT offers a robust, privacy-preserving framework for CTTA in medical imaging. By combining instance-specific and domain-wide multi-scale prompts, it effectively mitigates error accumulation and catastrophic forgetting. While the iterative search for optimal instance prompts currently adds computational overhead during inference, future work will explore more efficient single-pass scale prediction to facilitate real-time clinical applications.

Summary updated

BibTeX
@misc{li2026multi,
  author = {Lingrui Li and Yanfeng Zhou and Nan Pu and Xin Chen and Zhun Zhong},
  title = {{Multi-Scale Global-Instance Prompt Tuning for Continual Test-time Adaptation in Medical Image Segmentation}},
  year = {2026},
  eprint = {2602.05937},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.05937},
}
Figure