Abstract
Deep learning models for medical image segmentation often suffer from significant performance degradation when deployed on data from different clinical centers or scanners—a phenomenon known as domain shift. Test-Time Adaptation (TTA) offers a solution by allowing models to adapt to unlabeled target data during inference. However, the lack of a standardized evaluation framework has hindered progress. This paper introduces MedSeg-TTA, the first large-scale, multi-modal benchmark for TTA in medical image segmentation. We evaluate 20 representative algorithms across seven imaging modalities, establishing a unified protocol to identify the strengths and weaknesses of current adaptation strategies.
Introduction
The clinical utility of medical AI is often limited by its inability to generalize across diverse environments. A model trained on high-quality MRI scans from one institution may fail when applied to scans from another due to variations in hardware, acquisition protocols, and patient demographics. While retraining models for every new domain is impractical due to data privacy and labeling costs, Test-Time Adaptation (TTA) provides a mechanism for on-the-fly adjustment using only the unlabeled target images encountered during deployment.
Despite its potential, the TTA landscape remains fragmented. Existing studies often focus on single modalities or use inconsistent evaluation metrics, making comparative analysis difficult. MedSeg-TTA addresses this by providing an "apples-to-apples" comparison of 20 TTA methods across a wide range of medical imaging tasks.
The MedSeg-TTA Framework
We categorize TTA methods into four primary paradigms based on their adaptation mechanism:
- Input-level Transformation: These methods modify the appearance of target images (e.g., via style transfer or frequency alignment) to match the source domain's distribution.
- Feature-level Alignment: These strategies adjust the model's internal representations to ensure consistency between source and target features.
- Output-level Regularization: This approach uses self-supervised objectives, such as entropy minimization or consistency loss, to refine the model's final predictions.
- Prior Estimation: These methods leverage domain-specific knowledge, such as anatomical shape priors, to constrain and guide the adaptation process.
To ensure a rigorous evaluation, we implemented a Unified Protocol. All methods utilize a standard UNet backbone and follow a strict "no-leakage" policy, meaning they have no access to the original source training data or target labels during the adaptation phase.
Experimental Setup and Datasets
The benchmark spans seven distinct imaging modalities, each presenting unique challenges:
- MRI: Brain tumor segmentation (BraTS-GLI to BraTS-SSA).
- CT: Liver segmentation (LiTS to 3D-IRCADB).
- OCT: Fundus segmentation (MESSIDOR to RIGA+).
- Ultrasound (US): Thyroid nodule segmentation (TN3K to DDTI).
- Pathology (PATH): Colorectal gland segmentation (CRAG to GlaS).
- Dermoscopy (DER): Melanoma segmentation (ISIC to PH2).
- Chest X-ray (CXR): Lung segmentation (SZ-CXR to Montgomery).
Key Findings
Our comprehensive evaluation reveals several critical insights into the behavior of TTA methods in medical contexts:
- No "Silver Bullet": Performance varies significantly across modalities. A method that performs well on 2D X-rays may not translate effectively to 3D CT volumes. The optimal paradigm depends on whether the domain shift is primarily stylistic (intensity-based) or structural (anatomical).
- Robustness of Input-level Methods: Algorithms like SFDA-FSM, which align frequency-domain statistics, demonstrated remarkable stability. In Ultrasound tasks, SFDA-FSM improved the Dice score from 0.4811 to 0.8333, showcasing its potential for clinical deployment.
- The Risk of Anatomical Priors: While prior-based methods can be powerful, they are sensitive to the accuracy of the prior. If a shape template does not account for pathological variations in the target patient, adaptation can lead to "negative transfer," where performance drops below the baseline.
- Metric Discrepancies: Improvements in overlap metrics (Dice score) do not always correlate with improvements in boundary accuracy (HD95). This underscores the necessity of multi-metric evaluation for safety-critical medical applications.
Conclusion and Future Directions
MedSeg-TTA provides a foundational roadmap for the development of more reliable medical AI. Our results highlight the need for "self-adaptive" hyperparameter tuning, as TTA methods are currently sensitive to settings that cannot be easily optimized without labels in the field. Furthermore, the integration of Medical Vision-Language Models (VLMs) as semantic anchors represents a promising frontier for providing more robust, context-aware priors for adaptation.
The complete benchmark, including code and a public leaderboard, is available at https://github.com/wenjing-gg/MedSeg-TTA.
Summary updated