FD-MSP: feature decoupling network with multi-scale prototypes for domain-adaptive polyp segmentation Authors: Wenqi Zhong, Xu Yang, Shengyuan Liu, Yapeng Wang, Sio-Kei Im Published: 2026 ABSTRACT Polyp segmentation in colonoscopy images plays a critical role in the early detection and treatment of colorectal cancer. Although deep learning-based segmentation models have achieved remarkable success, their performance is often limited by variable imaging protocols or unseen datasets from different endoscopic devices. To address this challenge, unsupervised domain adaptation (UDA) methods have emerged as a promising solution, leveraging labeled source data and unlabeled target data to bridge the domain gap. However, existing UDA models suffer from two key limitations. First, they entangle domain-invariant and domain-specific features, making it difficult to identify which representations should transfer across domains. Second, they rely on single-scale features that fail to capture the extreme size variations observed in polyps, which range from tiny flat lesions to large protruding masses. As such, we propose FD-MSP, a feature decoupling network with multi-scale prototypes for cross-domain polyp segmentation. The core contribution is a structural redesign of the UDA pipeline that explicitly decouples feature distribution alignment from multi-scale semantic prototype learning, rather than entangling them in a single objective. This redesign is realized through four tightly-coupled components: (i) a dual-stream shallow-encoder decoupling module that separates domain-invariant polyp signatures from equipment-dependent variations through the joint effect of adversarial alignment on both low-level features and output predictions and a pixel-wise orthogonality regularizer between source-fed and target-fed shallow features; (ii) an online pseudo-fusion adapter that blends offline soft labels with current full-image predictions under class-wise confidence gating; (iii) a multi-scale grouped prototype layer (three groups of seven prototypes) that captures polyp patterns at multiple granularities through dilated convolutions with progressively expanding receptive fields; and (iv) a dual-branch gated head that adaptively fuses convolutional and prototype predictions at inference. Experimental results on three public colonoscopy datasets showed that FD-MSP offers consistent improvements over existing UDA methods for polyp segmentation performance in the target domain. Introduction Colorectal cancer remains one of the leading causes of cancer-related mortality worldwide, with the early detection and removal of polyps being crucial for prevention [1]. As such, automated polyp segmentation in colonoscopy videos has emerged as a vital technology for computer-aided diagnosis (CAD) systems, helping clinicians to identify and delineate polyps more accurately and efficiently [2]. Recent advances in deep learning have shown remarkable progress for polyp segmentation, particularly when training and test data are acquired from the same distribution [3, 4]. However, in real clinical scenarios, significant domain gaps exist among different institutions, due to variations in endoscopic equipment, imaging protocols, patient populations, and operator techniques [5]. These domain shifts can severely degrade the performance of models trained on one dataset when they are applied to another, limiting their potential in clinical settings [6, 7]. For example, a model trained on high-quality endoscopic images from a specialized center may fail dramatically when deployed in a community hospital with different imaging equipment. As illustrated in Fig. 1, real-world endoscopic images suffer from varying imaging conditions that lead to significant feature shifts between domains.Fig. 1Conceptual overview of the proposed framework. (a) The challenge of acquisition variability. Real-world endoscopic images suffer from varying imaging conditions, such as low contrast, overexposure, and color casts. These degradations lead to a significant feature shift between domains. (b) Our proposed solution. We introduce a method combining feature decoupling and multi-scale prototype learning to facilitate domain adaptation. In the visualization, blue, yellow, and orange circles represent distinct feature categories (or semantic classes), while the varying sizes of the circles denote different prototype scales within the same feature representation Conceptual overview of the proposed framework. (a) The challenge of acquisition variability. Real-world endoscopic images suffer from varying imaging conditions, such as low contrast, overexposure, and color casts. These degradations lead to a significant feature shift between domains. (b) Our proposed solution. We introduce a method combining feature decoupling and multi-scale prototype learning to facilitate domain adaptation. In the visualization, blue, yellow, and orange circles represent distinct feature categories (or semantic classes), while the varying sizes of the circles denote different prototype scales within the same feature representation Despite recent advances in domain adaptation techniques, existing methods for polyp image segmentation face several critical challenges that fundamentally limit clinical deployment. First, feature entanglement and indiscriminate adaptation are common problems, as current domain adaptation techniques [8–10] typically employ global feature alignment strategies that indiscriminately adapt all learned representations, leading to fundamental entanglement issues. These strategies combine domain-invariant features (universal polyp characteristics) with domain-specific features (equipment-dependent variations), resulting in discriminative information loss and negative transfer effects [11, 12]. Second, single-scale representations are often inadequate for the diversity observed in clinical settings. Polyps exhibit extreme morphological heterogeneity, ranging from small flat adenomas (2-3 mm) to large villous adenomas ( > 40 mm), based on the Paris classification system [5]. Current single-scale techniques [3, 13] utilize fixed receptive fields optimized for average-sized polyps, leading to the under-detection of small polyps and imprecise boundaries for large polyps [2, 14]. To address these challenges, we propose the feature decoupling network with multi-scale prototypes (FD-MSP), a novel framework that synergistically combines principled feature decoupling with hierarchical multi-scale prototype learning for robust cross-domain polyp segmentation. This approach is motivated by three key clinical and technical insights. First, explicit feature decoupling enables targeted and clinically-aware adaptation strategies. Unlike conventional global alignment methods that treat all features uniformly [8, 9], our approach strategically separates domain-invariant features, which capture universal polyp morphological signatures (e.g., glandular architecture, surface texture patterns, and vascular characteristics that remain consistent across endoscopic platforms [15]), from domain-specific features, which encode equipment-dependent variations (e.g., color temperature profiles, illumination artifacts, lens distortion patterns, and sensor-specific noise characteristics [16]). This separation allows for the preservation of clinically relevant discriminative information while selectively adapting only the technical variations that hinder cross-domain generalization. Second, hierarchical multi-scale prototype learning provides a principled solution to polyp morphological heterogeneity. Inspired by the clinical Paris classification system [17], which categorizes polyps across multiple morphological scales, our approach learns discriminative prototypes at different spatial resolutions using dilated convolutions with progressively expanding receptive fields. This multi-scale strategy enables the simultaneous extraction of fine-grained textural details, which are critical for detecting the smallest adenomas ( < 5 mm), and global contextual patterns, which are necessary for the accurate delineation of large sessile polyps ( > 20 mm). In this way, the proposed model addresses the scale-dependent performance limitations observed in clinical validation studies [18, 19]. Third, the synergistic integration of decoupling and multi-scale prototyping introduces emergent capabilities that exceed the sum of individual components. These decoupled domain-invariant features provide stable, high-quality inputs for prototype learning, while multi-scale prototypes offer robust semantic guidance for the feature decoupling process, creating a mutually reinforcing optimization framework. The primary contributions of this work can be described as follows:We propose FD-MSP, a novel cross-domain polyp segmentation framework whose core contribution is a structural redesign of the UDA pipeline: feature distribution alignment and multi-scale semantic prototype learning are explicitly decoupled and assigned to three sequential stages, rather than being entangled in a single adaptation objective.We develop two technically novel modules that realize this structural decoupling: (i) a dual-stream feature decoupling module that separates domain-invariant polyp signatures from equipment-dependent variations through adversarial alignment on both low-level features and output predictions, and (ii) a multi-scale grouped prototype layer that organizes prototypes across three semantic groups at different receptive-field scales, complemented by an online pseudo-fusion adapter and a dual-branch gated prediction head.Extensive experiments on three public colonoscopy datasets, together with a statistical robustness analysis over five independent training runs, demonstrate that FD-MSP achieves consistent improvements over conventional UDA segmentation methods with low run-to-run variance, and a comprehensive ablation confirms that each proposed component contributes additively. We propose FD-MSP, a novel cross-domain polyp segmentation framework whose core contribution is a structural redesign of the UDA pipeline: feature distribution alignment and multi-scale semantic prototype learning are explicitly decoupled and assigned to three sequential stages, rather than being entangled in a single adaptation objective. We propose FD-MSP, a novel cross-domain polyp segmentation framework whose core contribution is a structural redesign of the UDA pipeline: feature distribution alignment and multi-scale semantic prototype learning are explicitly decoupled and assigned to three sequential stages, rather than being entangled in a single adaptation objective. We develop two technically novel modules that realize this structural decoupling: (i) a dual-stream feature decoupling module that separates domain-invariant polyp signatures from equipment-dependent variations through adversarial alignment on both low-level features and output predictions, and (ii) a multi-scale grouped prototype layer that organizes prototypes across three semantic groups at different receptive-field scales, complemented by an online pseudo-fusion adapter and a dual-branch gated prediction head. We develop two technically novel modules that realize this structural decoupling: (i) a dual-stream feature decoupling module that separates domain-invariant polyp signatures from equipment-dependent variations through adversarial alignment on both low-level features and output predictions, and (ii) a multi-scale grouped prototype layer that organizes prototypes across three semantic groups at different receptive-field scales, complemented by an online pseudo-fusion adapter and a dual-branch gated prediction head. Extensive experiments on three public colonoscopy datasets, together with a statistical robustness analysis over five independent training runs, demonstrate that FD-MSP achieves consistent improvements over conventional UDA segmentation methods with low run-to-run variance, and a comprehensive ablation confirms that each proposed component contributes additively. Extensive experiments on three public colonoscopy datasets, together with a statistical robustness analysis over five independent training runs, demonstrate that FD-MSP achieves consistent improvements over conventional UDA segmentation methods with low run-to-run variance, and a comprehensive ablation confirms that each proposed component contributes additively. Related work Conventional image segmentation The Paris endoscopic classification system categorizes polyps ranging from Type 0-Is (protruding sessile lesions > 2.5mm) to Type 0-IIa (slightly elevated flat lesions < 2.5mm), with sizes varying dramatically from small flat adenomas (2-3 mm) to large villous adenomas ( > 40mm). As such, the use of standard single-scale methods with fixed receptive fields often leads to the under-detection of small polyps, due to insufficient fine-grained feature representations (i.e., a miss rate of 23–27% for small lesions). In addition, these models struggle to capture both local details and global context simultaneously, leading to imprecise boundaries for large polyps [2, 14, 20]. Furthermore, these methods often assume that training and test data originate from the same distribution, which is rarely the case in clinical practice, where different institutions use different equipment and protocols. In an effort to overcome these limitations, several recent studies have implemented deep learning models, including fully convolutional networks, which have revolutionized medical image segmentation across various fields [21]. For example, U-Net [22] establishes an encoder-decoder paradigm with skip connections, the de facto standard for medical segmentation tasks. Subsequent improvements have involved the use of attention mechanisms [23], nested architectures [24], and transformer-based designs [25]. Several specialized architectures have also been developed specifically for polyp segmentation, including PraNet [3], which introduces parallel partial decoders (with reverse attention) to capture fine-grained details. HarDNet-MSEG [14] employs a hardnet backbone with attention modules for efficient segmentation. SANet [13] focuses on shallow attention mechanisms to preserve low-level features that are crucial for boundary delineation. More recently, DCATNet [26] combines deformable convolutions with contextual-aware attention to adaptively capture polyp features at varying scales, while GFANet [27] introduces a global feature attention mechanism to enhance feature representation for improved segmentation accuracy. However, these single-scale models often struggle with the extreme morphological diversity exhibited by polyps, as well as the domain gaps present in clinical data. This limitation has led to the development of unsupervised domain adaptation (UDA) models for improved semantic consistency. Domain adaptation methods Domain adaptation aims to transfer knowledge from a labeled source domain to an unlabeled or sparsely labeled target domain [6]. Several paradigms have recently emerged for semantic segmentation, aiming to bridge domain gaps, as described below. Adversarial methods use domain discriminators to learn domain-invariant features. For example, AdaptSegNet [8] applies adversarial learning at multiple feature levels. ADVENT [9] minimizes the entropy in target domain predictions, while FADA [28] introduces class-wise alignment for fine-grained adaptations. However, these global alignment strategies often suffer from feature entanglement problems, where domain-invariant features (capturing universal characteristics) become mixed with domain-specific features (encoding equipment-dependent variations). This entanglement can lead to discriminative information loss, negative transfer effects, and adaptation confusion, where the network struggles to determine which features should be preserved or adapted [6, 11, 12]. Self-training models generate pseudo-labels in target data for use in iterative refinement. For instance, CBST [29] selects high-confidence predictions as pseudo-labels; ProDA [30] uses prototypical alignment with regularized self-training; and IAST [31] applies instance-level adaptation selection. Feature alignment methods match distributions between domains. For example, CORAL [32] aligns second-order statistics, while MMD-based methods [33] minimize maximum mean discrepancies. Similarly, optimal transport [34] identifies correspondences between domain distributions. Pixel-level image translation techniques synthesize source images in the target style using CycleGAN-like frameworks before training a segmenter, effectively reducing low-level appearance discrepancies but often introducing structural distortions that degrade boundary supervision and the integrity of small polyps [35]. Adversarial alignment methods enforce domain invariance via discriminators, but frequently blur fine polyp contours and suffer from unstable training or class-conditional collapse [36]. Consistency-based self-training models iteratively refine predictions on unlabeled target images using pseudo-labels, but are prone to confirmation bias and error accumulation when pseudo-label noise is not adequately controlled [37, 38]. Contrastive learning methods preserve class-level structure across domains by aligning feature prototypes, improving robustness relative to adversarial schemes but remaining sensitive to prototype drift and class imbalances [39]. Source-free algorithms adapt pretrained models using only unlabeled target data, addressing privacy and deployment constraints but often exhibiting catastrophic drift without strong regularization or uncertainty controls [40, 41]. Transformer-based models improve contextual reasoning but incur significant computational overhead and require domain-specific adaptation to avoid source bias [42]. Prototype learning techniques capture typical category representations, providing interpretable and generalizable features [43]. In few-shot segmentation, PANet [44] aligns query features with support prototypes, while PFENet [45] enriches prototypes using prior knowledge. ProCA [46] performs cross-domain alignment, while PLOP [47] implements continual learning. However, prototypes are employed as auxiliary objectives rather than core architectural components. Concept-based methods learn human-understandable concepts, while prototype-based techniques provide case-based reasoning [48, 49]. However, while attention mechanisms highlight important regions, they lack semantic meaning [50] and a level of interpretability that helps to establish trust and enables validation by domain experts in medical imaging applications [51, 52]. Decoupled learning methods, such as DeCoupleNet [11], introduce a novel approach to domain adaptive segmentation by decoupling the network into domain-invariant and domain-specific streams. The key insight is that not all features need to be adapted equally, as some capture universal patterns while others are inherently domain-specific. Novelty of the proposed method To precisely position FD-MSP with respect to the closely-related works of DeCoupleNet [11], ProCA [46], and DCL-PS [39], Table 1 summarizes the key design differences across seven architectural and optimization dimensions. The core non-trivial contribution of FD-MSP is not the introduction of any single component, but rather a structural redesign of the UDA pipeline that explicitly decouples feature distribution alignment from multi-scale semantic prototype learning and assigns distinct, complementary roles to labeled source data and unlabeled target data. Concretely, FD-MSP is the only method that simultaneously (i) performs dual-stream adversarial alignment on both the shallow feature space and the output prediction space during Stage 1, (ii) organizes learnable prototypes into multi-scale semantic groups rather than a flat, single-scale pool, (iii) refreshes pseudo-labels online via a pseudo-fusion adapter that blends offline soft labels with current full-image predictions under class-wise confidence gating, and (iv) produces final target predictions through a learnable gated fusion of convolutional and prototype branches. These four design choices jointly yield the synergistic improvements reported in Sect. 4, which cannot be obtained by DeCoupleNet, ProCA, or DCL-PS under their respective architectures.Table 1Design comparison between FD-MSP and three closely-related UDA methods. The last column highlights the specific extensions introduced by FD-MSPDesign dimensionDeCoupleNetProCADCL-PSFD-MSP (Ours)Explicit feature decouplingshallow-encoder split only——shallow split + adversarial alignment on output predictionsPrototype learning—single-scale flat poolsingle-scale flat poolmulti-scale grouped (G=3,K=7)Multi-scale receptive fields———dilated (d=1,2,4,8) + attention fusionPseudo-label refreshoffline (fixed)self-training (one-shot)self-training (one-shot)online pseudo-fusion adapter (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{p}_t=\tfrac{1}{2}(\hat{p}_t{+}p_t)$$\end{document}) refreshed every stepPrediction headconvolutional onlyprototype onlyprototype onlydual-branch gated fusion\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{w}{\odot}\textbf{P}_{conv}{+}(1{-}\textbf{w}){\odot}\textbf{P}_{proto}$$\end{document}Training pipelinesingle-stage adv. alignmentsingle-stagesingle-stagedecoupled 3-stage: alignment→fusion→prototypeRole of source dataGT supervision throughoutGT & proto anchoringGT & proto anchoringcomplementary: GT anchors prototypes; target drives adaptation only Table 1Design comparison between FD-MSP and three closely-related UDA methods. The last column highlights the specific extensions introduced by FD-MSPDesign dimensionDeCoupleNetProCADCL-PSFD-MSP (Ours)Explicit feature decouplingshallow-encoder split only——shallow split + adversarial alignment on output predictionsPrototype learning—single-scale flat poolsingle-scale flat poolmulti-scale grouped (G=3,K=7)Multi-scale receptive fields———dilated (d=1,2,4,8) + attention fusionPseudo-label refreshoffline (fixed)self-training (one-shot)self-training (one-shot)online pseudo-fusion adapter (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{p}_t=\tfrac{1}{2}(\hat{p}_t{+}p_t)$$\end{document}) refreshed every stepPrediction headconvolutional onlyprototype onlyprototype onlydual-branch gated fusion\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{w}{\odot}\textbf{P}_{conv}{+}(1{-}\textbf{w}){\odot}\textbf{P}_{proto}$$\end{document}Training pipelinesingle-stage adv. alignmentsingle-stagesingle-stagedecoupled 3-stage: alignment→fusion→prototypeRole of source dataGT supervision throughoutGT & proto anchoringGT & proto anchoringcomplementary: GT anchors prototypes; target drives adaptation only Design comparison between FD-MSP and three closely-related UDA methods. The last column highlights the specific extensions introduced by FD-MSP Building on the foundation of DeCoupleNet, FD-MSP addresses its core limitations by introducing semantic prototype guidance and multi-scale representations. This unique decoupling strategy offers several advantages, including the following. 1) Targeted adaptation is achieved by treating different feature types appropriately. 2) Discriminative information is preserved, which might otherwise be lost in aggressive alignment. 3) Flexibility is increased to compensate for various domain gaps, which is particularly beneficial for synthetic-to-real image adaptation. In addition, FD-MSP introduces a feature decoupling module that explicitly separates domain-invariant representations (universal polyp characteristics) from domain-specific features (equipment-dependent variations), facilitating improved targeted adaptation. A multi-scale prototype learning mechanism further captures polyp patterns at multiple granularities through hierarchical feature extraction, using distinct receptive fields. As a result, this grouped prototype strategy provides interpretable representations that align with medical understanding of polyp characteristics, which is crucial for the clinical adoption of computer-aided diagnostic systems [53]. Conventional UDA polyp segmentation techniques have typically entangled the feature alignment and semantic learning processes into a single adaptation objective, using either adversarial alignment, pseudo-label self-training, or prototype-guided contrastive learning. In contrast, the proposed model introduces a decoupled adaptation framework that explicitly separates feature distribution alignment from multi-scale semantic prototype learning. Unlike pixel-level translation strategies, which implicitly assume that aligning low-level appearance will induce semantic consistency, our method operates entirely in feature space and preserves anatomical structures without relying on image synthesis. In addition, existing adversarial alignment methods often enforce global domain invariance while suppressing high-frequency boundary information. However, FD-MSP isolates distributions in a dedicated feature-alignment stage, thus preventing semantic dilution during adaptation. Compared with self-training and consistency-based methods, which rely on progressively refined pseudo-labels to jointly drive alignment and representation learning, our approach leverages labeled source data and unlabeled target data in complementary but distinct roles. Feature alignment is then guided by domain-level statistics, while multi-scale prototype learning is achieved independently using class-discriminative cues, thereby reducing the risk of confirmation bias and error amplification that are common in pseudo-label–driven pipelines. Furthermore, unlike prior prototype-based UDA methods that compute prototypes at a single semantic level or make updates directly from noisy target predictions, we introduce multi-scale prototypes that capture both coarse semantic context and fine-grained structural information, enabling robust class separation while preserving boundary fidelity. Finally, unlike source-free adaptation strategies that forgo source data entirely and thus require aggressive regularization to avoid catastrophic drift, our framework retains access to labeled source supervision, which is utilized to anchor semantic prototypes while adapting to target-domain distributions. This design choice provides a principled balance between deployment practicality and adaptation stability. While recent transformer-based UDA methods [54, 55] and foundation-model–based segmentation approaches [56, 57] primarily improve backbone capacity, our contribution lies in the adaptation structure, demonstrating that explicitly decoupling alignment and semantic learning yields stronger cross-domain generalization without relying on heavy architectures or prompt-based tuning. As such, the primary contribution of this work involves a structural redesign of UDA for polyp segmentation. By decoupling feature distribution alignment from multi-scale prototype learning (and assigning distinct but complementary roles to labeled source and unlabeled target data), FD-MSP achieves more stable adaptation, improved boundary preservation, and stronger generalization across heterogeneous clinical domains. Methods Overview FD-MSP introduces a novel three-stage architecture that synergistically combines feature decoupling with multi-scale prototype learning for robust cross-domain polyp segmentation. As illustrated in Fig. 2, this framework consists of three key stages. 1) A feature decoupling network is used to separate domain-invariant and domain-specific representations. 2) A pseudo-fusion adapter module progressively refines pseudo-labels through contextual information enhancement. 3) A multi-scale grouped prototype learning module is employed to capture polyp patterns at multiple granularities using semantic organization.Fig. 2The proposed FD-MSP architecture. (a) The feature decoupling network with dual-stream encoders for domain-invariant and domain-specific feature extraction, followed by adaptive fusion. (b) The pseudo-fusion adapter, which combines soft labels from Phase 1 with current model predictions (through confidence-based filtering) for progressive target domain adaptation. (c) The multi-scale prototype learning module, exhibiting a grouped prototype organization, with dilated convolutions applied at different scales The proposed FD-MSP architecture. (a) The feature decoupling network with dual-stream encoders for domain-invariant and domain-specific feature extraction, followed by adaptive fusion. (b) The pseudo-fusion adapter, which combines soft labels from Phase 1 with current model predictions (through confidence-based filtering) for progressive target domain adaptation. (c) The multi-scale prototype learning module, exhibiting a grouped prototype organization, with dilated convolutions applied at different scales Stage 1: Feature decoupling network The proposed feature decoupling strategy was inspired by DeCoupleNet [11], which suggests that conventional domain adaptation methods entangle segmentation tasks with feature distribution alignment, potentially leading to sub-optimal performance or overfitting of the source domain. To address this issue, a decoupled architecture is adopted in this study to assign the responsibility of domain alignment to a dedicated source-domain branch, which is active only during training. This approach allows the final inference network to focus more effectively on segmentation tasks in the target domain. The included network encoder is then conceptually divided into shallow and shared deep blocks. As shown in Fig. 2(a), two separate shallow encoders are maintained during training: a source-specific encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_{1}$$\end{document} and a target-specific encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_{2}$$\end{document}, which share the same architecture but do not share weights. These modules are followed by a single set of shared deep encoder blocks \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_{s}$$\end{document} and a classifier \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{C}$$\end{document}. Decoupled feature extraction The forward pass for a source-domain image \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{X}_s$$\end{document} and a target-domain image \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{X}_t$$\end{document} proceeds along two distinct but interconnected paths, as discussed below. Source Path: The source image \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{X}_s$$\end{document} is first passed through the source-specific shallow encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_{1}$$\end{document} to produce shallow features \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_s$$\end{document}. These features are then processed by the shared deep encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_{s}$$\end{document} and the classifier \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{C}$$\end{document} to produce the final source prediction \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_s$$\end{document}: 1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_s = \boldsymbol{E}_{1}(\textbf{X}_s), \quad f_s = \boldsymbol{E}_{s}(\phi_s), \quad p_s = \mathcal{C}(f_s).$$\end{document} Target Path: Similarly, the target image \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{X}_t$$\end{document} is processed by the target-specific shallow encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_{2}$$\end{document} and subsequently by the shared components, to produce the target prediction \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t$$\end{document} as follows: 2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_t = \boldsymbol{E}_{2}(\textbf{X}_t), \quad f_t = \boldsymbol{E}_{s}(\phi_t), \quad p_t = \mathcal{C}(f_t).$$\end{document} Training and domain alignment The network is trained using a composite objective designed to facilitate a decoupled learning process. Segmentation Loss: A standard cross-entropy segmentation loss \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{ce}$$\end{document} is applied only to the output of the source path, using the ground-truth labels \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{Y}_s$$\end{document}: 3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{ce} = -\frac{1}{N} \sum_{i=1}^{N} \sum_{c=1}^{C} \textbf{1}\{y_{s, i}=c\} \log p_{s, i, c}.$$\end{document} Notably, this loss directly supervises the combined branch \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{C} \circ \boldsymbol{E}_{s} \circ \boldsymbol{E}_{1}$$\end{document}, but not the final inference model. Low-Level Feature Alignment: Primary domain adaptation occurs at the shallow feature level, as adversarial learning is employed to align the distribution of source shallow features \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_s$$\end{document} towards that of target shallow features \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_t$$\end{document}. A discriminator \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{D}_{low}$$\end{document} is then trained to distinguish between the two, while the source shallow encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{g}_{src}$$\end{document} is trained to produce features \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_s$$\end{document} that can fool \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{D}_{low}$$\end{document}. The adversarial loss for the generator (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{g}_{src}$$\end{document}) is given by: 4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{adv}^{low} = \frac{1}{N_{d}^{low}} \sum_{i=1}^{N_{d}^{low}} (\mathcal{D}_{low}(\phi_s)_i - 1)^2,$$\end{document} where 1 is the label for the target domain, effectively driving \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{g}_{src}$$\end{document} to map source images into the target feature space. Output-Level Alignment: Any potential misalignment from low-level features is corrected by incorporating an auxiliary adversarial loss \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{adv}^{out}$$\end{document}, given by: 5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{adv}^{out} = \frac{1}{N_{d}^{out}} \sum_{i=1}^{N_{d}^{out}} (\mathcal{D}_{out}(p_s)_i - 1)^2,$$\end{document} into the final output space [8]. A discriminator \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{D}_{out}$$\end{document} is then trained to distinguish between source and target predictions, while the network is trained to fool the discriminator. The complete training objective for Stage 1 (the feature decoupling network) can be expressed as: 6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{stage1} = \mathcal{L}_{ce} + \lambda_{adv}^{low} \mathcal{L}_{adv}^{low} + \lambda_{adv}^{out} \mathcal{L}_{adv}^{out},$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda_{adv}^{low}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda_{adv}^{out}$$\end{document} are weighting hyperparameters used to balance the dual-stream adversarial alignment terms during Stage 1. We deliberately use the symbol \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{stage1}$$\end{document} (rather than \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document}) to avoid notational collision with the orthogonality-based decoupling loss \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document} that is added to the Phase 2 and Phase 3 objective and validated in Sect. 4.3.2; in our final framework, feature decoupling is realised jointly by the dual-stream adversarial alignment of this stage and the orthogonality regularizer \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document} defined in Sect. 3.5.1. Inference and integration with prototypes During inference, the source-specific shallow encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_{1}$$\end{document} is discarded, along with both discriminators. The final model used for segmenting target-domain images is then formed by the target path \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{F} = \mathcal{C} \circ \boldsymbol{E}_{s} \circ \boldsymbol{E}_{2}$$\end{document}. However, this inference model is never explicitly trained to fit the source domain labels, which alleviates problems with source domain overfitting and allows for generalization to the target domain. Domain-adapted deep features from this target branch (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$f_t$$\end{document}) then provide a robust representation for subsequent stages of the network. These features, denoted as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{F}_{fused} = f_t$$\end{document}, are then processed through an atrous spatial pyramid pooling (ASPP) module, used to capture multi-scale context as follows: 7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{F}_{context} = \mathrm{ASPP}(\textbf{F}_{fused}).$$\end{document} This approach provides a rich, domain-adapted representation that serves as the input to a multi-scale prototype module. Stage 2: Pseudo-fusion adapter To address the limitation of fixed pseudo-labels in conventional self-training, and enable progressive target domain adaptation, this study proposes a pseudo-fusion adapter that dynamically enhances pseudo-labels using contextual information at each iteration. This stage serves as a bridge between the initial feature decoupling phase and the final multi-scale prototype learning phase, as discussed below. Initial Pseudo-Label Generation: After the first training stage, initial pseudo-soft labels \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{p}_t \in [0, 1]^{H \times W \times C}$$\end{document} are generated by making predictions in each target domain training image \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_t$$\end{document} using the trained model. Online Contextual Enhancement: The following steps are taken during each iteration of the re-training process:The forward target domain image is used to crop \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{x}_t$$\end{document} with strong data augmentation, using the segmentation network \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{G}_{seg} = \mathcal{C} \circ g$$\end{document}, to obtain the following prediction: 8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{p}_t = \textrm{softmax}(\mathcal{G}_{seg}(\hat{x}_t)).$$\end{document}Corresponding full images \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_t$$\end{document} (with weak data augmentation) are then used to obtain full predictions: 9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t = \textrm{softmax}(\mathcal{G}_{seg}(x_t)).$$\end{document}The original pseudo-soft labels \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{p}_t$$\end{document} are enhanced with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t$$\end{document}, using simple averaging, to produce: 10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{p}_t = \frac{1}{2}(\hat{p}_t + p_t).$$\end{document}Updated pseudo-labels \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{y}_t$$\end{document} are then generated by ignoring uncertain pixels using the class-wise thresholds \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tau^{st}$$\end{document}: 11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_{t,i} = \arg\max_{c=1}^C \tilde{p}_{t,i,c}, $$\end{document}12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{y}_{t,i} = \begin{cases}\hat{y}_{t,i} & \tilde{p}_{t,i,c=\hat{y}_{t,i}} \geq \tau^{st}_{c=\hat{y}_{t,i}}, \\-1 \mathrm{(ignored)} & \mathrm{otherwise.}\end{cases}$$\end{document} The forward target domain image is used to crop \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{x}_t$$\end{document} with strong data augmentation, using the segmentation network \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{G}_{seg} = \mathcal{C} \circ g$$\end{document}, to obtain the following prediction: 8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{p}_t = \textrm{softmax}(\mathcal{G}_{seg}(\hat{x}_t)).$$\end{document} The forward target domain image is used to crop \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{x}_t$$\end{document} with strong data augmentation, using the segmentation network \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{G}_{seg} = \mathcal{C} \circ g$$\end{document}, to obtain the following prediction: 8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{p}_t = \textrm{softmax}(\mathcal{G}_{seg}(\hat{x}_t)).$$\end{document} Corresponding full images \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_t$$\end{document} (with weak data augmentation) are then used to obtain full predictions: 9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t = \textrm{softmax}(\mathcal{G}_{seg}(x_t)).$$\end{document} Corresponding full images \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_t$$\end{document} (with weak data augmentation) are then used to obtain full predictions: 9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t = \textrm{softmax}(\mathcal{G}_{seg}(x_t)).$$\end{document} The original pseudo-soft labels \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{p}_t$$\end{document} are enhanced with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t$$\end{document}, using simple averaging, to produce: 10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{p}_t = \frac{1}{2}(\hat{p}_t + p_t).$$\end{document} The original pseudo-soft labels \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{p}_t$$\end{document} are enhanced with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t$$\end{document}, using simple averaging, to produce: 10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{p}_t = \frac{1}{2}(\hat{p}_t + p_t).$$\end{document} Updated pseudo-labels \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{y}_t$$\end{document} are then generated by ignoring uncertain pixels using the class-wise thresholds \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tau^{st}$$\end{document}: 11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_{t,i} = \arg\max_{c=1}^C \tilde{p}_{t,i,c}, $$\end{document}12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{y}_{t,i} = \begin{cases}\hat{y}_{t,i} & \tilde{p}_{t,i,c=\hat{y}_{t,i}} \geq \tau^{st}_{c=\hat{y}_{t,i}}, \\-1 \mathrm{(ignored)} & \mathrm{otherwise.}\end{cases}$$\end{document} Updated pseudo-labels \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{y}_t$$\end{document} are then generated by ignoring uncertain pixels using the class-wise thresholds \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tau^{st}$$\end{document}: 11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_{t,i} = \arg\max_{c=1}^C \tilde{p}_{t,i,c}, $$\end{document}12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{y}_{t,i} = \begin{cases}\hat{y}_{t,i} & \tilde{p}_{t,i,c=\hat{y}_{t,i}} \geq \tau^{st}_{c=\hat{y}_{t,i}}, \\-1 \mathrm{(ignored)} & \mathrm{otherwise.}\end{cases}$$\end{document} Since \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t$$\end{document} incorporates contextual information from the full image, the quality of the original pseudo-labels is effectively enhanced through this simple fusion mechanism. This adaptive pseudo-label refinement process enables more accurate and robust target domain adaptation in subsequent stages. Stage 3: Multi-scale grouped prototype learning A novel prototype learning mechanism is implemented to operate at multiple scales with an interpretable organization, to address the extreme size variations of polyps and provide semantic guidance. Multi-scale feature processing Given context-enriched features (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{F}_{context} \in \mathbb{R}^{B \times C \times H \times W}$$\end{document}), representations are extracted at multiple scales using parallel dilated convolutions, given by: 13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{F}^{(s)} = \mathrm{DilatedConv}_{d_s}(\textbf{F}_{context}), \quad s \in \{1,2,3,4\},$$\end{document} where the dilation rates \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$d_s = \{1, 2, 4, 8\}$$\end{document} progressively expand the receptive field and facilitate the collection of both fine-grained details (small polyps) and global contextual information (large polyps). An attention mechanism is then introduced to adaptively combine multi-scale features as follows: 14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha^{(s)} = \mathrm{Softmax}_s(\mathrm{MLP}(\mathrm{GAP}(\textbf{F}^{(s)}))),$$\end{document}15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{F}_{ms} = \sum_{s=1}^{4} \alpha^{(s)} \textbf{F}^{(s)} + \textbf{F}_{context},$$\end{document} where GAP represents global average pooling, Softmax ensures \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sum_s \alpha^{(s)} = 1$$\end{document}, and the residual connection preserves original contextual features. Prototype organization and matching Grouping rationale. The prototype organisation is explicitly aligned with the multi-scale feature processing defined in Sect. 3.4.1. Since the feature extractor produces four streams of scale-specific representations \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{\textbf{F}^{(s)}\}_{s=1}^{4}$$\end{document} via dilated convolutions with rates \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$d_s \in \{1, 2, 4, 8\}$$\end{document}, we correspondingly group the prototypes by the dominant spatial scale of the features they are expected to match. Concretely, the three prototype groups correspond to structural scales rather than class labels: Group 1 (fine scale, receiving fused features dominated by d=1,2) is associated with boundary textures and small flat adenomas; Group 2 (medium scale, dominated by d=4) with the morphology and body texture of typical polyps occupying \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$5{-}15\%$$\end{document} of the image; Group 3 (coarse scale, dominated by d=8) with the global contour and context of large sessile lesions (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\geq 15\%$$\end{document}). The choice of G=3 groups is directly grounded in the three clinically-meaningful polyp-size regimes used throughout this study (small / medium / large, see Table 11); the choice of K=7 prototypes per group is empirically determined in Section 4.3.4 and Table 8, where performance peaks at K=7 and degrades for both smaller and larger K. A note on accuracy vs. interpretability. Our explicit ablation (Sect. 4.3.3 and Table 7) sweeps the number of groups \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G \in \{1, 2, 3, 4\}$$\end{document} under matched parameter count (∼ 628 K) and a shared MLP classification head. Within this sweep, the proposed G=3, K=7 configuration attains the highest score on every reported metric – Dice 83.06%, IoUp 70.96%, mIoU 83.80% – modestly outperforming a matched-capacity flat pool (G=1, K=20) by +0.21% Dice, +0.29% IoUp, and +0.18% mIoU; the four configurations span only 0.49% Dice and 0.33% mIoU in total, with no monotonic trend in G and a single peak at G=3. The absolute gain is small and comparable to seed-level variation (Sect. 4.3.8), so we do not claim that grouping yields a large raw-accuracy advantage; rather, the value of the grouped design is twofold: (i) a modest but consistent accuracy improvement over a matched-capacity flat pool, and (ii) substantially improved interpretability and clinical alignment, since each group corresponds to a distinct dilation scale and polyp-size regime, which enables the stratified analysis of Sect. 4.3.7 and aligns naturally with the three-tier Paris endoscopic classification system. Prototype matching. Effective semantic alignment is facilitated across domains by organizing prototypes into multiple groups at different scales, enabling the model to capture both fine-grained and coarse-grained semantic structures. Each group contains a set of learnable prototype vectors, which are then matched against the feature maps extracted from the encoder and used to calculate the similarity between local features and each prototype. Let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{f}_{ij} \in \mathbb{R}^D$$\end{document} represent a feature vector at the spatial location (i,j) of the feature map and let \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{p}_{g,k} \in \mathbb{R}^D$$\end{document} represent the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$k^{th}$$\end{document} prototype vector in the \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$g^{th}$$\end{document} group. The distance between the feature and prototype can then be measured using the squared Euclidean distance, given by: 16\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$d_{g,k,ij} = \|\textbf{f}_{ij} - \textbf{p}_{g,k}\|^2.$$\end{document} Group-wise activations are then calculated using a soft minimum distance: 17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$a_{g,ij} = -\tau \log\left(\sum_{k=1}^{K_g} \exp(-d_{g,k,ij}/\tau)\right),$$\end{document} where τ = 0.1 is a temperature parameter (controlling the sharpness of prototype selection) and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$K_g$$\end{document} denotes the number of prototypes in group g. This formulation allows the model to softly assign each feature to its most similar prototype within each group. This notation can be simplified by representing the prototype matching similarity calculation as Φ. This operation serves as a foundational component for computing the clustering loss \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{clu}$$\end{document}, which encourages prototypes to capture representative feature distributions by minimizing the distance between features and their corresponding prototypes. Specifically, Φ outputs a similarity map that reflects the matching degree between features and prototypes, while \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{clu}$$\end{document} is subsequently derived (using these similarity values) to guide the prototype learning process in a self-supervised manner. The associated clustering loss can then be defined as: 18\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{clu} = \frac{1}{N \cdot M} \sum_{i,j} \min_{g \in \{1,\dots,G\}} a_{g,ij},$$\end{document} where N and M are the height and width of the feature map, respectively, and G is the total number of groups. By minimizing \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{clu}$$\end{document}, the model learns to align semantically similar regions across domains while promoting compact and well-separated prototype clusters. Dual-branch predictions Two prediction branches are maintained for robustness, as described below. Convolutional Branch: Direct predictions from fused features can be expressed as: 19\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{P}_{conv} = \mathrm{Conv}_{1\times1}(\textbf{F}_{context}).$$\end{document} Prototype Branch: Predictions based on prototype activations can be represented as: 20\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{P}_{proto} = \mathrm{MLP}([a_{1,ij}, a_{2,ij}, a_{3,ij}]).$$\end{document} The final prediction adaptively combines both branches: 21\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{w} = \sigma(\mathrm{Conv}_{1\times1}([\textbf{P}_{conv}, \textbf{P}_{proto}])),$$\end{document}22\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{P}_{final} = \textbf{w} \odot \textbf{P}_{conv} + (1-\textbf{w}) \odot \textbf{P}_{proto},$$\end{document} where the attention weights \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{w}$$\end{document} are learned to optimally balance both branches based on input characteristics. Training objectives and implementation This complete training framework integrates all three stages through a comprehensive loss function that encourages accurate segmentation, meaningful prototype learning, and effective domain transfer, as discussed below. Comprehensive loss function The training objective combines multiple components to achieve effective domain adaptation and prototype learning as follows. Segmentation Loss: Cross-entropy loss is applied to all three prediction branches to ensure consistent learning. This term can be expressed as: 23\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{seg} = \mathcal{L}_{ce}(\textbf{P}_{conv}, \textbf{Y}) + \mathcal{L}_{ce}(\textbf{P}_{proto}, \textbf{Y}) + \mathcal{L}_{ce}(\textbf{P}_{final}, \textbf{Y}),$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{Y}$$\end{document} represents ground truth labels. Prototype Learning Losses: Meaningful prototype organization is ensured by employing several steps, including the following. 1) A prototype clustering loss term \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{clu} = \sum_{g=1}^{G} \frac{1}{|\Omega_g|} \sum_{(i,j) \in \Omega_g} \min_k d_{g,k,ij}$$\end{document} is used to ensure that prototypes capture distinct patterns within each group, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Omega_g$$\end{document} denotes pixel locations belonging to the semantic group g. 2) Prototype diversity loss \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{div} = -\sum_{g=1}^{G} \log \det(\textbf{S}_g + \epsilon \textbf{I})$$\end{document} is included to prevent collapse, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{S}_g$$\end{document} is a similarity matrix with entries given by \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$S_{g,kk\prime} = \exp(-\|\textbf{p}_{g,k} - \textbf{p}_{g,k\prime}\|_2^2)$$\end{document}. Feature Decoupling Loss: A pixel-wise orthogonality regularizer is applied between the source-fed and target-fed shallow features to complement the adversarial alignment of Stage 1 (Sect. 3.2): 24\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple} = \frac{1}{BHW}\sum_{b,i,j} \big|\langle \phi_{s,b,:,i,j},\, \phi_{t,b,:,i,j} \rangle\big|,$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_s$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_t$$\end{document} are the shallow features produced by the target-side encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_2$$\end{document} when fed with source and target images, respectively (the source-specific encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_1$$\end{document} has been discarded after Stage 1). This term discourages the encoder from collapsing source-fed and target-fed activations onto an identical subspace, and is empirically validated in Sect. 4.3.2 (Table 6), where its inclusion improves Dice by +1.64%. Complete Training Loss: The final objective combines all components in a single term, given by: 25\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{total} = \lambda_{decouple}\mathcal{L}_{decouple} + \mathcal{L}_{seg} + \mathcal{L}_{clu} + \mathcal{L}_{div},$$\end{document} where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda_{decouple}=0.1$$\end{document} is the weight of the orthogonality regularizer, fixed throughout all reported experiments. Feature decoupling in our final framework is therefore realised jointly by (i) the dual-stream adversarial alignment of Stage 1 (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{adv}^{low}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{adv}^{out}$$\end{document}, see Sect. 3.2) and (ii) the orthogonality regularizer \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document} added to the Phase 2 and Phase 3 objective. Training procedure The FD-MSP framework is optimized in three sequential stages, with explicit parameter transfer between stages and a clear specification of which modules are frozen or updated at each stage. The full procedure is summarized in Algorithm 1. Stage 1 – Feature Decoupling with Adversarial Training. All modules \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{\boldsymbol{E}_1, \boldsymbol{E}_2, \boldsymbol{E}_s, \mathcal{C}\}$$\end{document} and two discriminators \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{\mathcal{D}_{low}, \mathcal{D}_{out}\}$$\end{document} are trained jointly. A standard two-step alternating optimization is used: (i) the discriminators are frozen and the generator modules are updated by minimizing the source segmentation loss together with two adversarial losses that drive the shallow features \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_s$$\end{document} towards \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_t$$\end{document} and the source prediction \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_s$$\end{document} towards \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t$$\end{document}; (ii) the discriminators are unfrozen and updated on detached features and predictions. An auxiliary self-training branch provides an entropy-minimization signal on confident target pixels selected via running class-wise thresholds. Inter-stage Transfer. After Stage 1, only the target path \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{\boldsymbol{E}_2, \boldsymbol{E}_s, \mathcal{C}\}$$\end{document} is retained; the source-specific shallow encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_1$$\end{document} and both discriminators are permanently discarded. These kept weights form the checkpoint \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\theta_1$$\end{document} and are loaded at the start of Stages 2 and 3. No parameters are shared across the two shallow encoders \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_1$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_2$$\end{document} within Stage 1 itself. Stage 2 – Pseudo-fusion Adaptation. Before Stage 2 begins, one full pass over the unlabeled target set is performed with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\theta_1$$\end{document} to produce per-image offline soft labels \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{p}_t = \textrm{softmax}(\mathcal{C}(\boldsymbol{E}_s(\boldsymbol{E}_2(x_t))))$$\end{document}, which are saved to disk together with class-wise confidence thresholds \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tau^{st}$$\end{document} computed as the p-th percentile of the target soft-label confidences. During Stage 2, the offline soft labels are held fixed; the online component \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t$$\end{document} is recomputed at every iteration from the current model applied to the weakly-augmented full image. The fused pseudo-label \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{p}_t = \tfrac{1}{2}(\hat{p}_t + p_t)$$\end{document} is therefore refreshed at every step, while low-confidence pixels (below \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tau^{st}$$\end{document}) are masked with the ignore label and excluded from the loss. All modules \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{\boldsymbol{E}_2, \boldsymbol{E}_s, \mathcal{C}\}$$\end{document} remain trainable, and the orthogonality regularizer \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document} defined in Sect. 3.5.1 is added to the loss as a complementary feature-decoupling signal between source-fed and target-fed shallow features. The prototype network is not active at this stage. Stage 3 – Multi-scale Prototype Learning. The Stage 2 checkpoint \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\theta_2$$\end{document} is loaded, and the multi-scale prototype network \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{P}$$\end{document} (including the multi-scale feature processing, prototype vectors, and the MLP classifier) is newly initialized on top of the ASPP features. All modules \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{\boldsymbol{E}_2, \boldsymbol{E}_s, \mathcal{C}, \mathcal{P}\}$$\end{document} are jointly optimized; no layer is frozen. Three separate parameter groups with different learning rates are used: 1× for the encoders, 10× for the ASPP classifier, and 5× for the prototype network. Prototype learning depends on pseudo-label supervision only on the target domain: the source branch uses ground-truth labels to drive \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{seg}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{clu}$$\end{document}, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{div}$$\end{document}, whereas the target branch consumes the refined pseudo-labels \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{p}_t$$\end{document}, which in Stage 3 are further enhanced by averaging the convolutional and prototype predictions on the weakly-augmented full image before fusion with the offline soft labels. The orthogonality regularizer \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document} is retained from Stage 2 and continues to act on the source-fed and target-fed shallow features of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_2$$\end{document}. Implementation details The proposed framework is summarized below. Network Architecture: DeepLabV2 [58], with a ResNet-101 [59] encoder, is pre-trained on ImageNet [60]. Both the source-specific and target-specific shallow encoders use the first few ResNet-101 layers, while the shared deep encoder is comprised of the remaining layers. The ASPP module contains four parallel branches with dilation rates of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{6, 12, 18, 24\}$$\end{document} and a global average pooling branch, while multi-scale feature extraction uses dilated convolutions with rates of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\{1, 2, 4, 8\}$$\end{document}. The prototype configuration includes 21 prototypes organized into 3 scale-wise groups (fine / medium / coarse), with 7 prototypes per group, corresponding to the three polyp-size regimes (small / medium / large) used in the stratified analysis of Section 4.3.7. The choice of G=3 and K=7 is motivated in Sect. 3.4.2 and empirically validated in Table 8. The MLP for prototype-based predictions features two hidden layers (256 and 128 units) with ReLU activation and a dropout rate of 0.1. Training Strategy: The three training stages detailed in Sect. 3.5.2 are executed sequentially. Stage 1 performs joint source segmentation and adversarial domain alignment on both the shallow features and output space. After Stage 1 converges, a single forward pass over the target set generates the offline soft labels \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{p}_t$$\end{document} and class-wise thresholds \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tau^{st}$$\end{document}. Stage 2 then refines the target representation through the pseudo-fusion adapter, and Stage 3 jointly trains the multi-scale prototype network together with the decoupled encoder-classifier. Across all stages, the generator modules (encoders, ASPP classifier, and prototype network) are optimized by SGD with Nesterov momentum (0.9), whereas the Stage 1 discriminators use Adam. A polynomial learning-rate schedule (base \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$2.5 \times 10^{-4}$$\end{document}, power 0.9), weight decay \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$5 \times 10^{-4}$$\end{document}, batch size 8, and input resolution 384 × 384 are used throughout. Training is performed on an NVIDIA RTX 3090Ti GPU. Data augmentation includes random horizontal flipping (p=0.5), scaling in [0.5, 2.0], cropping to 384 × 384, color jittering (brightness/contrast/saturation ± 0.4), and Gaussian blur (p=0.1). Weak augmentation (used for pseudo-label generation on full images) consists of resize and horizontal flip only, while strong augmentation (used for the loss-bearing forward pass) additionally applies random cropping and color jittering. Inference: The final combined predictions \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{P}_{final}$$\end{document} are used with test-time augmentation (horizontal flipping) for better boundary delineation. Results Datasets and evaluation metrics Datasets Three widely used colonoscopy datasets, collected from diverse imaging devices, were used for experimental validation, including the following. EndoTect [61]: A set of 1,000 endoscopic images from the HyperKvasir collection with polyp annotations. Images were captured using Olympus endoscopes with diverse polyp morphologies and sizes. PolypGen [20]: A synthetic dataset with 2,257 computer-generated colonoscopy images from categories C1 to C6, providing pixel-perfect ground truth annotations for synthetic-to-real domain transfer evaluation. CVC-ClinicDB [62]: A collection of 612 colonoscopy images (384×288 resolution) from 29 video sequences, captured using Pentax endoscopic equipment, featuring challenging cases with varied polyp appearance. EndoTect and PolypGen were selected as the source domains and CVC-ClinicDB was chosen as the target domain. All source data were used for training, while the entire target dataset was used for evaluation (without target labels) during training. Evaluation metrics The performance of various methods was comprehensively evaluated by employing seven frequently used metrics, including sensitivity (Sen), Dice score (Dice), F2-score (F2), accuracy (Acc), IoU for polyp regions (IoUp), IoU for backgrounds (IoUb), and mean IoU (mIoU). Comparison with state-of-the-art models The effectiveness of this approach was evaluated by comparing FD-MSP with eight advanced UDA methods used for medical image segmentation, including Seg-Uncertainty [63], MPSCL [64], DeCoupleNet [11], GFDA [65], ProCA [46], and DCL-PS [39]. For fair comparison, all competing methods were implemented using their original published codes with default settings. FD-MSP uses DeepLabV2 with a ResNet-101 encoder, as described in Sect. 3.5.3. Each competing method uses the backbone specified in its original publication. All experiments followed identical dataset divisions, target domain evaluation sets, and training protocols on CVC-ClinicDB as the target domain. Results from EndoTect to CVC-ClinicDB: Table 2 provides quantitative results for which EndoTect served as the source domain and CVC-ClinicDB as the target domain. As observed, all comparative methods outperformed the baseline “Source Only” model (76.53% Dice), demonstrating that UDA-based techniques effectively leverage unlabeled target data to improve cross-domain performance. Notably, FD-MSP achieved the best performance (83.06% Dice and 83.80% mIoU), representing notable improvements of +6.53% (Dice) and +3.47% (mIoU) over the source-only baseline. Compared to the second-ranked DCL-PS method, our approach improved Dice by +1.14% and mIoU by +0.10%. Among prototype-based methods, FD-MSP outperformed ProCA by +2.80% (Dice), validating the effectiveness of this multi-scale prototype learning strategy.Table 2Performance comparisons for endotect to CVC-ClinicDB domain adaptation. The best results are shown in bold, while the second best results are underlinedMethodDice (%)F2 (%)Sen (%)Acc (%)IoUp (%)IoUb (%)mIoU (%)ΔDice (%)Source Only76.53 ± 0.9273.27 ± 0.8472.36 ± 0.7194.43 ± 0.1566.28 ± 0.9194.37 ± 0.1180.33 ± 0.51-Seg-Uncertainty [63]77.87 ± 0.8576.29 ± 0.7377.16 ± 0.6494.67 ± 0.1468.15 ± 0.5494.56 ± 0.0881.36 ± 0.31+1.34MPSCL [64]80.47 ± 0.8381.32 ± 0.7480.95 ± 0.6295.51 ± 0.1370.28 ± 0.5595.67 ± 0.1782.98±0.36+3.94Decoupling-based MethodsDeCoupleNet [11]78.34 ± 0.7677.38 ± 0.6977.82 ± 0.5495.07 ± 0.1168.91 ± 0.5495.23 ± 0.1582.07 ± 0.34+1.81GFDA [65]80.83 ± 0.8779.58 ± 0.7280.45±0.6395.66 ± 0.0970.64 ± 0.7495.89 ± 0.1283.27 ± 0.43+4.34Prototype-based MethodsProCA [46]80.26 ± 0.8180.18 ± 0.7780.64 ± 0.6695.42 ± 0.1069.97 ± 0.2895.53 ± 0.0982.75 ± 0.18+3.73DCL-PS [39]81.92 ± 0.7481.15 ± 0.6780.58 ± 0.5695.83 ± 0.1171.26 ± 0.3696.14 ± 0.0783.70 ± 0.21+5.39FD-MSP (Ours)83.06 ± 0.6882.87 ± 0.5581.25 ± 0.5196.28 ± 0.1270.96 ± 0.3396.63 ± 0.0883.80 ± 0.20+6.53The ± values for FD-MSP represent the standard deviation across five independent training runs with different random seeds. A detailed robustness analysis is provided in Section 4.3.8 and Table 12 Table 2Performance comparisons for endotect to CVC-ClinicDB domain adaptation. The best results are shown in bold, while the second best results are underlinedMethodDice (%)F2 (%)Sen (%)Acc (%)IoUp (%)IoUb (%)mIoU (%)ΔDice (%)Source Only76.53 ± 0.9273.27 ± 0.8472.36 ± 0.7194.43 ± 0.1566.28 ± 0.9194.37 ± 0.1180.33 ± 0.51-Seg-Uncertainty [63]77.87 ± 0.8576.29 ± 0.7377.16 ± 0.6494.67 ± 0.1468.15 ± 0.5494.56 ± 0.0881.36 ± 0.31+1.34MPSCL [64]80.47 ± 0.8381.32 ± 0.7480.95 ± 0.6295.51 ± 0.1370.28 ± 0.5595.67 ± 0.1782.98±0.36+3.94Decoupling-based MethodsDeCoupleNet [11]78.34 ± 0.7677.38 ± 0.6977.82 ± 0.5495.07 ± 0.1168.91 ± 0.5495.23 ± 0.1582.07 ± 0.34+1.81GFDA [65]80.83 ± 0.8779.58 ± 0.7280.45±0.6395.66 ± 0.0970.64 ± 0.7495.89 ± 0.1283.27 ± 0.43+4.34Prototype-based MethodsProCA [46]80.26 ± 0.8180.18 ± 0.7780.64 ± 0.6695.42 ± 0.1069.97 ± 0.2895.53 ± 0.0982.75 ± 0.18+3.73DCL-PS [39]81.92 ± 0.7481.15 ± 0.6780.58 ± 0.5695.83 ± 0.1171.26 ± 0.3696.14 ± 0.0783.70 ± 0.21+5.39FD-MSP (Ours)83.06 ± 0.6882.87 ± 0.5581.25 ± 0.5196.28 ± 0.1270.96 ± 0.3396.63 ± 0.0883.80 ± 0.20+6.53The ± values for FD-MSP represent the standard deviation across five independent training runs with different random seeds. A detailed robustness analysis is provided in Section 4.3.8 and Table 12 Performance comparisons for endotect to CVC-ClinicDB domain adaptation. The best results are shown in bold, while the second best results are underlined The ± values for FD-MSP represent the standard deviation across five independent training runs with different random seeds. A detailed robustness analysis is provided in Section 4.3.8 and Table 12 Results from PolypGen to CVC-ClinicDB: Table 3 shows results for a synthetic-to-real domain adaptation scenario. This task represents a more challenging case, due to the substantial domain gap between synthetic and real colonoscopy images. The “Source Only” baseline achieved a Dice score of 74.26%, confirming the difficulty of this adaptation task. However, FD-MSP achieved the best performance, with a Dice score of 80.27% and an mIoU of 83.33%, representing improvements of +6.01% (Dice) and +3.97% (mIoU) over the source-only model. Compared to the strongest baseline (DCL-PS), our method achieved improvements of +0.92% (Dice) and +0.82% (mIoU). These results confirm that our multi-scale adaptation strategy effectively addressed challenging synthetic-to-real domain transfer, where traditional single-scale methods often struggle.Table 3Performance comparisons for PolypGen to CVC-ClinicDB domain adaptation. The best results are shown in bold, while the second best are underlinedMethodDice (%)F2 (%)Sen (%)Acc (%)IoUp (%)IoUb (%)mIoU (%)ΔDice (%)Source Only74.26 ± 0.9372.47 ± 0.8471.85 ± 0.7294.28 ± 0.1364.37 ± 0.8594.35 ± 0.1679.36 ± 0.50-Seg-Uncertainty [63]75.19 ± 0.9674.27 ± 0.8975.18 ± 0.7494.36 ± 0.1465.68 ± 0.7094.74 ± 0.1180.21 ± 0.40+0.93MPSCL [64]77.84 ± 0.9477.23 ± 0.8778.74 ± 0.7395.13 ±0.0868.95 ± 0.6495.42 ± 0.1082.19 ± 0.37+3.58Decoupling-based MethodsDeCoupleNet [11]76.73 ± 0.8375.28 ± 0.7676.56 ± 0.6495.18 ± 0.0967.95 ± 0.6395.26 ± 0.0881.61 ± 0.35+2.47GFDA [65]77.96 ± 0.8776.45 ± 0.7977.68 ± 0.6895.33 ± 0.0969.18 ± 0.7295.56 ± 0.1082.37 ± 0.41+3.70Prototype-based MethodsProCA [46]77.64 ± 0.9577.17 ± 0.8678.74 ± 0.7995.09 ± 0.1068.74 ± 0.6695.23 ± 0.1281.99 ± 0.39+3.38DCL-PS [39]79.35 ± 0.8479.86 ± 0.7378.29 ± 0.6795.48 ± 0.0769.27 ± 0.6495.74 ± 0.0982.51 ± 0.36+5.09FD-MSP (Ours)80.27 ± 0.7579.94 ± 0.6881.58 ± 0.5496.24 ± 0.1070.16 ± 0.7496.49 ± 0.1283.33 ± 0.43+6.01The ± values for FD-MSP represent the standard deviation across five independent training runs with different random seeds Table 3Performance comparisons for PolypGen to CVC-ClinicDB domain adaptation. The best results are shown in bold, while the second best are underlinedMethodDice (%)F2 (%)Sen (%)Acc (%)IoUp (%)IoUb (%)mIoU (%)ΔDice (%)Source Only74.26 ± 0.9372.47 ± 0.8471.85 ± 0.7294.28 ± 0.1364.37 ± 0.8594.35 ± 0.1679.36 ± 0.50-Seg-Uncertainty [63]75.19 ± 0.9674.27 ± 0.8975.18 ± 0.7494.36 ± 0.1465.68 ± 0.7094.74 ± 0.1180.21 ± 0.40+0.93MPSCL [64]77.84 ± 0.9477.23 ± 0.8778.74 ± 0.7395.13 ±0.0868.95 ± 0.6495.42 ± 0.1082.19 ± 0.37+3.58Decoupling-based MethodsDeCoupleNet [11]76.73 ± 0.8375.28 ± 0.7676.56 ± 0.6495.18 ± 0.0967.95 ± 0.6395.26 ± 0.0881.61 ± 0.35+2.47GFDA [65]77.96 ± 0.8776.45 ± 0.7977.68 ± 0.6895.33 ± 0.0969.18 ± 0.7295.56 ± 0.1082.37 ± 0.41+3.70Prototype-based MethodsProCA [46]77.64 ± 0.9577.17 ± 0.8678.74 ± 0.7995.09 ± 0.1068.74 ± 0.6695.23 ± 0.1281.99 ± 0.39+3.38DCL-PS [39]79.35 ± 0.8479.86 ± 0.7378.29 ± 0.6795.48 ± 0.0769.27 ± 0.6495.74 ± 0.0982.51 ± 0.36+5.09FD-MSP (Ours)80.27 ± 0.7579.94 ± 0.6881.58 ± 0.5496.24 ± 0.1070.16 ± 0.7496.49 ± 0.1283.33 ± 0.43+6.01The ± values for FD-MSP represent the standard deviation across five independent training runs with different random seeds Performance comparisons for PolypGen to CVC-ClinicDB domain adaptation. The best results are shown in bold, while the second best are underlined The ± values for FD-MSP represent the standard deviation across five independent training runs with different random seeds Visualization: Qualitative results are provided in Fig. 3, and the associated polyp-size stratified analysis is reported in Section 4.3.7 (Table 11). Among these segmentation comparisons, the FD-MSP model consistently produced visually superior results, closely resembling the ground truth maps. Specifically, in the 1st and 2nd rows of Fig. 3, large and well-defined polyps are present with clear boundaries. The proposed model also excelled in accurately locating and delineating complete polyp regions, while ProCA [46] and GFDA [65] only generated partial polyp segmentations rather than complete results, often missing significant portions of polyp boundaries. It is evident in the 3rd and 4th rows of Fig. 3 that our model demonstrated superior segmentation capabilities for polyps of varying sizes, shapes, and morphological characteristics. This multi-scale prototype learning approach enabled FD-MSP to effectively capture both fine-grained details and global structural information. In contrast, ProCA [46] and GFDA [65] produced several false positive regions and struggled with polyps of irregular shapes, generating fragmented or incomplete segmentation masks.Fig. 3A visual comparison of the proposed method and existing UDA models applied to two domain adaptation tasks: EndoTect → CVC-ClinicDB and PolypGen → CVC-ClinicDB A visual comparison of the proposed method and existing UDA models applied to two domain adaptation tasks: EndoTect → CVC-ClinicDB and PolypGen → CVC-ClinicDB Ablation studies The contributions of each key component were assessed by performing comprehensive ablation studies on the EndoTect to CVC-ClinicDB cross-domain adaptation task. The results presented in Table 4 provide a systematic evaluation of the effectiveness of our proposed feature disentanglement (FD) and multi-scale prototyping (MSP) modules. This ablation study also revealed several important insights, as discussed below.Table 4The results of an ablation study evaluating the effectiveness of key components in the proposed model, applied to EndoTect to CVC-ClinicDB adaptationNo.SourceFDMSPDice (%)Acc (%)mIoU (%)1\checkmark76.5394.4380.332\checkmark\checkmark78.1195.0782.073\checkmark\checkmark77.2494.6081.124\checkmark\checkmark\checkmark83.0696.2883.80 Table 4The results of an ablation study evaluating the effectiveness of key components in the proposed model, applied to EndoTect to CVC-ClinicDB adaptationNo.SourceFDMSPDice (%)Acc (%)mIoU (%)1\checkmark76.5394.4380.332\checkmark\checkmark78.1195.0782.073\checkmark\checkmark77.2494.6081.124\checkmark\checkmark\checkmark83.0696.2883.80 The results of an ablation study evaluating the effectiveness of key components in the proposed model, applied to EndoTect to CVC-ClinicDB adaptation Individual Component Analysis: When evaluating each proposed component independently, both feature disentanglement (Row 2) and multi-scale prototyping (Row 3) demonstrated clear improvements over the baseline model. Specifically, the FD module contributed an improvement of 1.58% in the Dice score (78.11% vs 76.53%), while the MSP module provided an increase of 0.71% (77.24% vs 76.53%). This indicated that both components effectively addressed different aspects of the domain adaptation challenge. Complementary Effects: A notable observation is that combining both components (Row 4) yields a larger gain than either component alone, with a Dice score of 83.06% (+6.53%), accuracy of 96.28% (+1.85%), and mIoU of 83.80% (+3.47%). The combined Dice improvement (+6.53%) exceeds the sum of the individual contributions (1.58% + 0.71% = 2.29%), suggesting that the FD and MSP modules play complementary roles rather than addressing the same source of error. We caution that this is a single-seed observation on one adaptation setting; quantifying the synergy more rigorously would require multi-seed factorial ablations, which we leave to future work. Pseudo-fusion adapter ablation The pseudo-fusion adapter (Sect. 3.3) is the core mechanism by which Stage 2 of FD-MSP refines pseudo-labels. We conduct an isolated Phase 2 ablation that replaces the default fusion strategy \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tilde{p}_t=\tfrac{1}{2}(\hat{p}_t + p_t)$$\end{document} with four alternatives while keeping all other hyperparameters fixed (seed = 1234); each variant is trained to the same 13 000-iteration Phase 2 budget and evaluated with test-time augmentation on all 612 CVC-ClinicDB images. Unlike the other ablations in this section (Table 6, 7 and 12), which report end-to-end Phase 3 results, this Phase 2-only evaluation deliberately decouples the pseudo-label choice from the subsequent multi-scale prototype-learning stage so that the four variants differ only in their pseudo-label strategy. The full Phase 3 result for the chosen \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tfrac{1}{2}(\hat{p}_t + p_t)$$\end{document} variant is the headline FD-MSP entry in Table 2 and 12. Results of the Phase 2 ablation are summarised in Table 5.Table 5Isolated Phase 2 ablation of the pseudo-fusion adapter on EndoTect→CVC-ClinicDB (seed= 1234, 612 target-domain images, evaluated at the end of Phase 2 to decouple the pseudo-label choice from the subsequent multi-scale prototype-learning stage).ΔDice is reported relative to the proposed pseudo-fusion variant; the full Phase 3 result for the chosen variant is the headline FD-MSP entry in Tables 2, 3 and 12Pseudo-label strategyDice (%)IoUp (%)mIoU (%)F2 (%)ΔDiceNo target pseudo-label (source-only)69.8460.1077.9665.10−8.27Online prediction only (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t$$\end{document})70.8359.0877.3764.72−7.28Offline soft labels only (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{p}_t$$\end{document})76.4166.9181.6473.60−1.70Confidence-weighted fusion77.1767.7082.0874.28−0.94Pseudo-fusion:\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tfrac{1}{2}(\hat{p}_t{+}p_t)$$\end{document}[Ours]78.1168.6683.0674.230.00 Table 5Isolated Phase 2 ablation of the pseudo-fusion adapter on EndoTect→CVC-ClinicDB (seed= 1234, 612 target-domain images, evaluated at the end of Phase 2 to decouple the pseudo-label choice from the subsequent multi-scale prototype-learning stage).ΔDice is reported relative to the proposed pseudo-fusion variant; the full Phase 3 result for the chosen variant is the headline FD-MSP entry in Tables 2, 3 and 12Pseudo-label strategyDice (%)IoUp (%)mIoU (%)F2 (%)ΔDiceNo target pseudo-label (source-only)69.8460.1077.9665.10−8.27Online prediction only (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$p_t$$\end{document})70.8359.0877.3764.72−7.28Offline soft labels only (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{p}_t$$\end{document})76.4166.9181.6473.60−1.70Confidence-weighted fusion77.1767.7082.0874.28−0.94Pseudo-fusion:\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\tfrac{1}{2}(\hat{p}_t{+}p_t)$$\end{document}[Ours]78.1168.6683.0674.230.00 Isolated Phase 2 ablation of the pseudo-fusion adapter on EndoTect→CVC-ClinicDB (seed= 1234, 612 target-domain images, evaluated at the end of Phase 2 to decouple the pseudo-label choice from the subsequent multi-scale prototype-learning stage).ΔDice is reported relative to the proposed pseudo-fusion variant; the full Phase 3 result for the chosen variant is the headline FD-MSP entry in Tables 2, 3 and 12 Three observations emerge from this ablation. First, the two extreme settings that remove one of the two pseudo-label sources – no_pseudo and online_only – both incur substantial Dice drops of -8.27% and -7.28%, respectively. The no_pseudo variant discards target supervision entirely and regresses towards the source-only baseline, while online_only initially trains well but gradually diverges (the best checkpoint of online_only is taken at step 1000, after which Dice drops because the model drifts under its own noisy predictions). Second, replacing the online branch with the frozen offline soft labels alone (offline_only) already recovers 76.41% Dice, indicating that the offline soft labels produced in Stage 1 are high quality; the online branch then contributes a further +1.70% Dice by injecting up-to-date, context-aware predictions on the full image. Third, the proposed simple-average fusion outperforms the confidence-weighted entropy-based variant by +0.94% Dice (78.11% vs 77.17%) and by similar margins on IoUp (+0.96%) and mIoU (+0.98%); the simpler averaging scheme is therefore both more accurate and more efficient than a confidence-gated alternative, so we retain it in the final framework. Orthogonality-based feature decoupling loss ablation To empirically verify whether an explicit pixel-wise orthogonality loss between source and target shallow features improves adaptation, we ablate the term \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple} = \frac{1}{BHW}\sum_{b,i,j} |\langle\phi_{s,b,:,i,j},\phi_{t,b,:,i,j}\rangle|$$\end{document} at the level of the complete FD-MSP pipeline: we train the full Phase 1 → Phase 2 → Phase 3 procedure with vs. without \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document} active throughout (consistent with the loss listed in Sect. 3.5.1, with weight \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda_{decouple}=0.1$$\end{document}), under identical hyperparameters and seed =1234. Results are reported in Table 6.Table 6Orthogonality loss ablation on EndoTect→CVC-ClinicDB (full Phase 3 FD-MSP pipeline, seed= 1234, evaluated on the 612-image target test set). The row with\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document}corresponds to the headline FD-MSP results in Table 2VariantDice (%)IoUp (%)mIoU (%)without \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document}81.4269.0282.72with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document}(λ=0.1) [Ours]83.0670.9683.80 Table 6Orthogonality loss ablation on EndoTect→CVC-ClinicDB (full Phase 3 FD-MSP pipeline, seed= 1234, evaluated on the 612-image target test set). The row with\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document}corresponds to the headline FD-MSP results in Table 2VariantDice (%)IoUp (%)mIoU (%)without \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document}81.4269.0282.72with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document}(λ=0.1) [Ours]83.0670.9683.80 Orthogonality loss ablation on EndoTect→CVC-ClinicDB (full Phase 3 FD-MSP pipeline, seed= 1234, evaluated on the 612-image target test set). The row with\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document}corresponds to the headline FD-MSP results in Table 2 Adding the orthogonality term improves Dice by 1.64% (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$81.42\% \to 83.06\%$$\end{document}), IoUp by 1.94% (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$69.02\% \to 70.96\%$$\end{document}), and mIoU by 1.08% (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$82.72\% \to 83.80\%$$\end{document}) in the full Phase 3 setting. Although the source-specific shallow encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_1$$\end{document} has already been discarded after Stage 1, so that both \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_s$$\end{document} (source-fed) and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\phi_t$$\end{document} (target-fed) are produced by the same target-side encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_2$$\end{document} in Phase 2 and Phase 3, the orthogonality term still provides a useful complementary signal: it discourages the encoder from collapsing the source-fed and target-fed activations onto an identical subspace, thereby producing statistically distinguishable representations for the two input streams that augment the adversarial alignment of Stage 1 (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{adv}^{low}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{adv}^{out}$$\end{document}). We accordingly retain \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{decouple}$$\end{document} in the final objective with weight \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\lambda_{decouple}=0.1$$\end{document}, consistent with the loss listed in Sect. 3.5.1. Grouped vs. Flat prototype organization We run the complete FD-MSP pipeline through Phase 3 with each of the four prototype configurations under study, using the same training schedule, hyperparameters, and seed (=1234) so that the variants differ only in their prototype organisation. To make the comparison strictly fair we (i) hold the classification head identical across all variants – in every case a small \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1{\times}1$$\end{document} MLP head consuming the per-pixel group activations – and (ii) hold the total prototype budget approximately constant (around 20 prototypes, prototype-branch parameter count within 0.3% of 628 K). We then sweep the number of groups \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G \in \{1, 2, 3, 4\}$$\end{document} with \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G \times K \approx 20$$\end{document}, so that only the partition of the prototype pool with respect to the multi-scale dilations changes. The four configurations are compared in Table 7.Table 7Sweep over the number of prototype groupsGwith a matched total prototype budget (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G \times K \approx 20$$\end{document}) and a shared\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1{\times}1$$\end{document}MLP classification head, evaluated on the full 612-image CVC-ClinicDB target test set after the complete Phase 3 FD-MSP pipeline (seed=1234). All four variants have prototype-branch parameter counts within0.3%of each other; theG=3,K=7row corresponds to the headline FD-MSP results in Table 2Prototype organisationParams (K)Dice (%)IoUp (%)mIoU (%)Flat pool (G = 1, K = 20) + MLP628.582.8570.6783.62Grouped (G = 2, K = 10) + MLP627.482.6070.3283.47Grouped (G = 3, K = 7 ) + MLP [Ours]627.783.0670.9683.80Grouped (G = 4, K = 5) + MLP626.882.5770.2783.50 Table 7Sweep over the number of prototype groupsGwith a matched total prototype budget (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G \times K \approx 20$$\end{document}) and a shared\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1{\times}1$$\end{document}MLP classification head, evaluated on the full 612-image CVC-ClinicDB target test set after the complete Phase 3 FD-MSP pipeline (seed=1234). All four variants have prototype-branch parameter counts within0.3%of each other; theG=3,K=7row corresponds to the headline FD-MSP results in Table 2Prototype organisationParams (K)Dice (%)IoUp (%)mIoU (%)Flat pool (G = 1, K = 20) + MLP628.582.8570.6783.62Grouped (G = 2, K = 10) + MLP627.482.6070.3283.47Grouped (G = 3, K = 7 ) + MLP [Ours]627.783.0670.9683.80Grouped (G = 4, K = 5) + MLP626.882.5770.2783.50 Sweep over the number of prototype groupsGwith a matched total prototype budget (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G \times K \approx 20$$\end{document}) and a shared\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1{\times}1$$\end{document}MLP classification head, evaluated on the full 612-image CVC-ClinicDB target test set after the complete Phase 3 FD-MSP pipeline (seed=1234). All four variants have prototype-branch parameter counts within0.3%of each other; theG=3,K=7row corresponds to the headline FD-MSP results in Table 2 We make three observations. First, with the classification head held fixed and the total prototype budget held fixed, the four configurations span only 82.57%–83.06% Dice – a total spread of 0.49% Dice and 0.33% mIoU across the entire sweep, comparable to the seed-level standard deviation of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\pm 0.68\%$$\end{document} Dice reported in Sect. 4.3.8. We therefore stress that the absolute differences within this sweep are small and should be interpreted alongside seed-level noise. Second, our chosen G=3 configuration attains the highest score on every metric in the sweep (Dice 83.06%, IoUp 70.96%, mIoU 83.80%), modestly outperforming the matched-capacity flat pool (G=1, K=20) by +0.21% Dice, +0.29% IoUp and +0.18% mIoU at essentially identical parameter counts (627.7 K vs. 628.5 K). Third, the performance does not vary monotonically with G (G=1→2 loses 0.25% Dice, G=2→3 gains 0.46%, G=3→4 loses 0.49%): the surface is non-monotonic and exhibits a single peak at G=3. We therefore retain G=3 as the design used throughout the rest of the paper for two complementary reasons: (i) within this matched-budget sweep it provides the best raw accuracy across all three metrics, and (ii) unlike G=1, 2, 4, it places exactly one group on each of the three clinically-meaningful polyp-size regimes used in this study (small / medium / large, see Table 11) and aligns naturally with the three-tier Paris endoscopic classification of polyps. We caution, however, that the accuracy advantage of G=3 over the flat pool is small in absolute terms and on the same order as seed-level variation; we therefore frame the value of the grouped design as a combination of a modest but consistent accuracy gain and a substantially improved interpretability–clinical-alignment story, in which each group can be inspected separately at its associated dilation scale and polyp-size regime (Sect. 3.4.2), thereby supporting the clinical motivation and enabling the stratified analysis of Section 4.3.7. Number of prototypes The optimal number of prototypes per group was investigated to justify the design choice of K=7 introduced in Sect. 3.4.2. As shown in Table 8, performance peaked at 7 prototypes per group (achieving mIoU of 83.80% and Dice of 83.06%), demonstrating an optimal trade-off between expressiveness and overfitting prevention: too few prototypes (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$K{\leq}5$$\end{document}) limited the diversity of intra-scale appearance variations the group could represent, while too many (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$K{\geq}9$$\end{document}) led to prototype collapse and redundancy that hurt the diversity regularizer \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{L}_{div}$$\end{document}. Combined with the scale-wise grouping rationale (G=3) of Sect. 3.4.2, this gives the final configuration of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$G{\times}K=21$$\end{document} prototypes used throughout the paper.Table 8The effects of prototype number per group on the EndoTect to CVC-ClinicDB adaptation taskPrototypes/Group357911mIoU (%)82.5183.2083.8083.5583.32Dice (%)81.7582.4583.0682.8082.49 Table 8The effects of prototype number per group on the EndoTect to CVC-ClinicDB adaptation taskPrototypes/Group357911mIoU (%)82.5183.2083.8083.5583.32Dice (%)81.7582.4583.0682.8082.49 The effects of prototype number per group on the EndoTect to CVC-ClinicDB adaptation task Multi-Scale Analysis The impact of different scale configurations on segmentation performance was also analyzed. As presented in Table 9, four scales with dilation rates of [1, 2, 4, 8] provided optimal coverage of polyp size variations, achieving mIoU of 83.80% and Dice of 83.06%. Additional scales beyond four did not improve performance and introduced noise in some cases.Table 9An analysis of the multi-scale configuration on the EndoTect to CVC-ClinicDB adaptation taskScalesDilation RatesmIoU (%)Dice (%)Single182.4281.65Two1, 482.8982.10Three1, 2, 483.3582.61Four1, 2, 4, 883.8083.06Five1, 2, 4, 8, 1683.5382.75 Table 9An analysis of the multi-scale configuration on the EndoTect to CVC-ClinicDB adaptation taskScalesDilation RatesmIoU (%)Dice (%)Single182.4281.65Two1, 482.8982.10Three1, 2, 483.3582.61Four1, 2, 4, 883.8083.06Five1, 2, 4, 8, 1683.5382.75 An analysis of the multi-scale configuration on the EndoTect to CVC-ClinicDB adaptation task Computational complexity To provide quantitative evidence regarding the deployment cost of FD-MSP, Table 10 reports the number of parameters, FLOPs, per-image inference latency, and peak GPU memory usage for the target-domain forward pass. All measurements are performed with batch size 1 and input resolution 384×384 on a single NVIDIA RTX 3090Ti GPU, averaged over 50 runs after 10 warm-up iterations. Inference-time columns include only the modules actually deployed at test time (the target path \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_2 + \boldsymbol{E}_s + \textrm{head} + \textrm{classifier}$$\end{document} plus, for FD-MSP, the prototype network), whereas the DeCoupleNet training-time row includes the source shallow encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_1$$\end{document} and both discriminators that are discarded after Stage 1.Table 10Computational complexity comparison. All measurements use batch size 1 and input resolution384× 384, averaged over 50 forward passes on an NVIDIA RTX 3090Ti GPUMethodParams (M)FLOPs (G)Inference (ms)GPU Memory (MB)Inference-time complexity (deployed model)Source Only / DeCoupleNet51.9424.474.84230.9FD-MSP (prototype branch only)52.5624.564.99434.1FD-MSP (full, dual-branch)52.5624.565.18635.4Training-time complexity (full graph, one step)DeCoupleNet (Phase 1 training, with\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_1$$\end{document},\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{D}_{low}$$\end{document},\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{D}_{out}$$\end{document})67.39——— Table 10Computational complexity comparison. All measurements use batch size 1 and input resolution384× 384, averaged over 50 forward passes on an NVIDIA RTX 3090Ti GPUMethodParams (M)FLOPs (G)Inference (ms)GPU Memory (MB)Inference-time complexity (deployed model)Source Only / DeCoupleNet51.9424.474.84230.9FD-MSP (prototype branch only)52.5624.564.99434.1FD-MSP (full, dual-branch)52.5624.565.18635.4Training-time complexity (full graph, one step)DeCoupleNet (Phase 1 training, with\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_1$$\end{document},\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{D}_{low}$$\end{document},\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathcal{D}_{out}$$\end{document})67.39——— Computational complexity comparison. All measurements use batch size 1 and input resolution384× 384, averaged over 50 forward passes on an NVIDIA RTX 3090Ti GPU At inference, FD-MSP adds only +0.62 M parameters (+1.2%) and +0.09 G FLOPs (+0.4%) over the Source Only / DeCoupleNet baseline. Per-image latency increases by +0.34 ms (+7.0%) for the full dual-branch configuration, which is well within real-time requirements for colonoscopy frame-rate processing (≥ 25 fps). The main overhead is peak GPU memory, which grows from 231 MB to 635 MB (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\approx2.75\times$$\end{document}) due to the intermediate activations produced by the L2-distance convolution and the four parallel dilated-convolution scales inside the prototype layer. This overhead remains modest in absolute terms on modern clinical GPUs, and can be further reduced at deployment by using the prototype branch alone (434 MB), which removes the convolutional branch but retains interpretability. At training time, Phase 1 requires an additional source-specific shallow encoder \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{E}_1$$\end{document} and two discriminators, bringing the graph size to 67.39 M parameters; these modules are permanently discarded after Stage 1 and do not affect the deployed model. Polyp-size stratified analysis To more rigorously evaluate the benefit of the multi-scale prototype design, we stratify the analysis on the 612 CVC-ClinicDB target images by polyp size, partitioning them into three subsets based on the polyp area ratio against the full image: small ( < 5%, N=229), medium (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$5\mathrm{-}15\%$$\end{document}, N=263), and large (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\geq 15\%$$\end{document}, N=120). For each subset we report the same five region-based metrics used in the main comparison Tables 2 and 3 (Dice, F2, Sen, Acc, and mIoU), so that the stratified results are directly comparable to the headline FD-MSP entry. The resulting performance breakdown is reported in Table 11.Table 11Polyp-size–stratified performance of FD-MSP on CVC-ClinicDB (EndoTect→CVC-ClinicDB). Polyps are grouped by their ground-truth area ratio: small ( < 5%), medium (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$5\mathrm{-}15\%$$\end{document}), large (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\geq 15\%$$\end{document}). The overall row matches the FD-MSP entry in Table 2Subset (N)Dice (%)F2 (%)Sen (%)Acc (%)mIoU (%)Overall (612)83.0682.8781.2596.2883.80Stratified by polyp area ratioSmall (< 5%, N = 229)81.8381.6180.1296.1983.18Medium (5-15%, N = 263)85.1984.9683.0496.3884.97Large (≥ 15%, N = 120)80.7480.6979.4996.2482.42 Table 11Polyp-size–stratified performance of FD-MSP on CVC-ClinicDB (EndoTect→CVC-ClinicDB). Polyps are grouped by their ground-truth area ratio: small ( < 5%), medium (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$5\mathrm{-}15\%$$\end{document}), large (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\geq 15\%$$\end{document}). The overall row matches the FD-MSP entry in Table 2Subset (N)Dice (%)F2 (%)Sen (%)Acc (%)mIoU (%)Overall (612)83.0682.8781.2596.2883.80Stratified by polyp area ratioSmall (< 5%, N = 229)81.8381.6180.1296.1983.18Medium (5-15%, N = 263)85.1984.9683.0496.3884.97Large (≥ 15%, N = 120)80.7480.6979.4996.2482.42 Polyp-size–stratified performance of FD-MSP on CVC-ClinicDB (EndoTect→CVC-ClinicDB). Polyps are grouped by their ground-truth area ratio: small ( < 5%), medium (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$5\mathrm{-}15\%$$\end{document}), large (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\geq 15\%$$\end{document}). The overall row matches the FD-MSP entry in Table 2 The stratified results reveal several findings that directly support and refine the motivation of our multi-scale prototype design. First, performance is relatively balanced across the three polyp-size regimes: Dice spans only 80.74%–85.19%, F2 spans 80.69%–84.96%, and mIoU spans 82.42%–84.97%, with medium-sized polyps achieving the slightly highest performance (Dice =85.19%, mIoU =84.97%, Sen =83.04%). This indicates that the model is well-aligned with all three polyp-size regimes and is not over-specialised to any single scale. Second, sensitivity ranges from 79.49% (large) to 83.04% (medium), with all three subsets producing consistently strong recall on the polyp class, confirming that the model handles polyps of all clinically-meaningful sizes without systematic under-detection. Third, pixel-level accuracy is essentially uniform across strata (96.19%–96.38%), as expected because background pixels (which dominate Acc) are stable across the three subsets; the differences observed in Dice, F2, Sen, and mIoU are therefore driven by polyp-class performance rather than background statistics, demonstrating that the multi-scale prototype design contributes meaningfully to polyp-level segmentation across the full clinical size range. This stratified boundary analysis thus both validates the multi-scale motivation (the small-polyp regime benefits measurably from the fine-scale branches) and highlights a concrete direction for future work (expanding the receptive field for very large polyps). Statistical robustness analysis To validate the statistical reliability of the reported results, we conducted five independent training runs of the complete FD-MSP pipeline (Phase 3, encompassing feature decoupling, pseudo-fusion, and multi-scale prototype learning) using different random seeds (1234, 2345, 3456, 4567, and 5678) on the EndoTect → CVC-ClinicDB task, with all other hyperparameters fixed. Each trained model was evaluated on all 612 target-domain images using test-time augmentation. As shown in Table 12, FD-MSP achieved a mean Dice score of 83.06% ± 0.68% and a mean mIoU of 83.80% ± 0.20% across the five runs, with narrow 95% bootstrap confidence intervals ([82.46%, 83.66%] for Dice and [83.62%, 83.98%] for mIoU). The low run-level standard deviation (0.68% for Dice and 0.20% for mIoU) demonstrates that the proposed method is robust to random initialization and produces consistent performance across independent runs. The seed-1234 run is the single-seed result used as the headline FD-MSP entry in Table 2 and 3; the remaining four seeds yield closely-matching results, confirming that the reported numbers are representative rather than seed-specific.Table 12Statistical robustness of FD-MSP (Phase 3, full FD-MSP pipeline including feature decoupling, pseudo-fusion, and multi-scale prototype learning) across five independent training runs with different random seeds on the EndoTect→CVC-ClinicDB adaptation task. The seed-1234 run corresponds to the headline FD-MSP results reported in Table 2Random seedMetric12342345345645675678Mean±Std95% CIDice (%)83.0682.2382.5883.5483.8983.06 ± 0.68[82.46, 83.66]F2 (%)82.8782.2082.4883.2683.5482.87 ± 0.55[82.39, 83.35]Sen (%)81.2580.6380.8981.6181.8781.25 ± 0.51[80.80, 81.70]Acc (%)96.2896.1396.2096.3696.4396.28 ± 0.12[96.18, 96.39]mIoU (%)83.8083.5683.6683.9484.0483.80 ± 0.20[83.62, 83.98] Table 12Statistical robustness of FD-MSP (Phase 3, full FD-MSP pipeline including feature decoupling, pseudo-fusion, and multi-scale prototype learning) across five independent training runs with different random seeds on the EndoTect→CVC-ClinicDB adaptation task. The seed-1234 run corresponds to the headline FD-MSP results reported in Table 2Random seedMetric12342345345645675678Mean±Std95% CIDice (%)83.0682.2382.5883.5483.8983.06 ± 0.68[82.46, 83.66]F2 (%)82.8782.2082.4883.2683.5482.87 ± 0.55[82.39, 83.35]Sen (%)81.2580.6380.8981.6181.8781.25 ± 0.51[80.80, 81.70]Acc (%)96.2896.1396.2096.3696.4396.28 ± 0.12[96.18, 96.39]mIoU (%)83.8083.5683.6683.9484.0483.80 ± 0.20[83.62, 83.98] Statistical robustness of FD-MSP (Phase 3, full FD-MSP pipeline including feature decoupling, pseudo-fusion, and multi-scale prototype learning) across five independent training runs with different random seeds on the EndoTect→CVC-ClinicDB adaptation task. The seed-1234 run corresponds to the headline FD-MSP results reported in Table 2 Discussion Experimental results demonstrated that FD-MSP achieved competitive performance for cross-domain polyp segmentation. On the EndoTect to CVC-ClinicDB adaptation task, our method achieved a Dice score of 83.06%, outperforming the source-only baseline by 6.53% and the second-best method (DCL-PS) by 1.14%. Similarly, on the challenging synthetic-to-real scenario (PolypGen to CVC-ClinicDB), FD-MSP achieved a Dice score of 80.27%, representing an improvement of 6.01% over the baseline. The success of this approach can be attributed to two key innovations. First, the feature decoupling strategy explicitly separates domain-invariant and domain-specific representations, preventing the loss of discriminative information during adaptation. An ablation study showed that this module alone contributed 1.58% to Dice improvements. Second, multi-scale prototype learning captured polyp patterns at multiple granularities, encompassing extreme size variations ranging from small flat lesions to large protruding masses. The combination of both modules produced synergistic benefits, achieving the full 6.53% improvement. From a clinical perspective, FD-MSP offers several advantages. Notably, this ability to adapt across different endoscopic systems without target annotations enables deployment in diverse clinical settings. Interpretable prototype representations also provide transparency for decision making, which is crucial for clinical acceptance. Furthermore, the robust performance across both real-to-real and synthetic-to-real scenarios demonstrates enhanced generalizability and robustness. Despite these advantages, several limitations should be acknowledged. First, the dual-stream architecture introduces additional computational cost: as quantified in Table 10 and Sect. 4.3.6, FD-MSP at inference adds only +1.2% parameters and +0.4% FLOPs over a standard ResNet-101/ASPP baseline, and per-image latency increases by +7.0% to 5.18 ms (well within real-time colonoscopy processing), but peak GPU memory grows by approximately 2.75× (from 231 MB to 635 MB) due to the intermediate activations of the multi-scale prototype layer. This memory overhead is modest on current clinical hardware but deserves further optimization for edge deployment. Second, the current design employs fixed prototype numbers and groups, which may not be optimal for all datasets. Third, the evaluation focused on individual frames without considering temporal consistency in colonoscopy videos. Fourth, while FD-MSP demonstrated consistent improvements over competing methods, the performance gains over the second-best method (DCL-PS) were modest (approximately 1.14% Dice on EndoTect → CVC-ClinicDB and 0.92% on PolypGen → CVC-ClinicDB). Our five-seed robustness analysis (Table 12) confirmed that FD-MSP produces stable results with low standard deviation (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\pm0.68\%$$\end{document} Dice and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\pm0.20\%$$\end{document} mIoU across independent runs), though paired statistical comparison against competing methods was not feasible due to the unavailability of their per-image predictions. Fifth, the target domain in both adaptation tasks is CVC-ClinicDB; future work will evaluate on additional target datasets to further validate generalization. Finally, while the framework shows promise for clinical translation, further validation through video-level temporal analysis, multi-center prospective studies, and reader studies is required before clinical deployment. Conclusion This study presented FD-MSP, a framework for cross-domain polyp segmentation that combines dual-stream adversarial feature decoupling with multi-scale prototype learning. The design targets a recurring limitation of existing UDA approaches by explicitly separating domain-invariant and domain-specific cues while modelling polyp patterns at multiple scales. On three public datasets, FD-MSP achieved competitive performance against representative UDA methods, with modest absolute Dice improvements of up to 1.14% over the strongest baseline (DCL-PS) on EndoTect → CVC-ClinicDB and 0.92% on PolypGen → CVC-ClinicDB; the method also showed consistent gains across both real-to-real and synthetic-to-real adaptation scenarios. From a clinical perspective, the value of this work lies in enabling polyp segmentation across different endoscopic systems without target-domain annotations and in providing interpretable prototype representations that may aid clinical understanding. A five-seed robustness analysis (Table 12) confirmed that FD-MSP produces stable results across independent runs (Dice standard deviation \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\pm 0.68\%$$\end{document}, mIoU \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\pm 0.20\%$$\end{document}), although paired statistical comparison against competing methods was not feasible due to the unavailability of their per-image predictions. We therefore view FD-MSP as a promising step rather than a finished solution: further validation through video-level temporal analysis, evaluation on additional target datasets, multi-center prospective studies, and paired statistical comparisons with competing methods will be required before clinical translation. Future work will focus on extending the framework to video-based segmentation, exploring adaptive prototype structures, and reducing the memory overhead introduced by the multi-scale prototype layer.