Cross-domain few-shot semantic segmentation (CD-FSS) has predominantly been formulated as learning domain-invariant representations or improving support-query correspondence. Nevertheless, large domain shifts still make prototype matching unreliable: inconsistent hierarchical responses corrupt the support representation, deterministic prototypes cannot express boundary and appearance ambiguity, and treating prototypes with different reliability equally during optimization weakens foreground-background separation. We therefore propose DAUPNet, a unified framework that reformulates cross-domain prototype matching as uncertainty-aware prototype discrimination. DAUPNet first harmonizes hierarchical support-query features to provide stable evidence, then represents foreground and background prototypes probabilistically, and finally uses their estimated uncertainty to regulate contrastive optimization. On four standard target domains, DAUPNet achieves 72.6% and 76.7% average mIoU in the 1-shot and 5-shot settings, respectively, including substantial gains on the two medical domains. These results demonstrate that modeling prototype uncertainty and incorporating it into optimization provides a robust and interpretable approach to CD-FSS under severe domain shift. The code is available at https://github.com/madness-Lei/DAUPNet
Figures & tables
Figure 1: Conceptual overview. (a) Deterministic foreground/background prototype matching. (b) HFH, PPR, and VACL improve prototype discrimination; VACL is used only during training.
Figure 2: Architecture of DAUPNet.
Figure 3: PPR fuses foreground/background means and variance-derived scores from the two deepest support levels. Matching uses only the means; VACL also uses the scores during training. Shallow levels show the feature hierarchy.
Figure 4: Variance-Aware Contrastive Learning (VACL) for reliability-guided prototype discrimination.
Method
Venue
Backbone
DeepGlobe
ISIC
Chest X-ray
FSS
Mean
1-shot
5-shot
1-shot
5-shot
1-shot
5-shot
1-shot
5-shot
1-shot
5-shot
SSP
ECCV-22
ResNet-50
40.0
48.7
35.5
45.9
74.4
74.3
78.9
80.6
57.2
62.4
PerSAM [ 21 ]
ICLR-24
ViT-base
36.1
40.7
23.3
25.3
30.0
30.1
60.9
66.5
37.6
40.6
PATNet
ECCV-22
ResNet-50
37.9
43.0
41.2
53.6
66.6
70.2
78.6
81.2
56.1
62.0
APM
NeurIPS-24
ResNet-50
40.9
44.9
41.7
51.2
78.3
82.8
79.3
81.8
60.0
65.2
ABCDFSS
CVPR-24
ResNet-50
42.6
49.0
45.7
53.3
79.8
81.4
74.6
76.2
60.7
65.0
Table 1: Comparison with state-of-the-art methods on four CD-FSS target domains under 1-shot / 5-shot mIoU (%). Compared methods use their respective adaptation strategies. The top three values in each column are bold and color-coded: 1st , 2nd , and 3rd .
Figure 5: (a) Qualitative comparison of support-guided prediction overlays and GT contours. (b) Foreground/background feature distributions without and with VACL.
Exp.
Setting
HFH
PPR
VACL
DeepGlobe
ISIC
Chest X-ray
FSS
Mean
Delta
1
Baseline
41.53
68.63
78.31
74.45
65.73
0.00
2
+HFH
✓
43.42
70.86
87.95
76.57
69.70
+3.97
3
+HFH+PPR
✓
✓
45.19
71.41
89.96
77.16
70.93
+5.20
4
+HFH+PPR+VACL
✓
✓
✓
46.74
74.41
91.50
80.89
73.39
+7.66
Table 2: Progressive ablation of DAUPNet modules under the 1-shot setting. Delta denotes the mean improvement over Exp. 1.
λvacl
DeepGlobe
ISIC
Chest X-ray
FSS
Mean
Δ Mean
0.000
45.19
71.41
89.96
77.16
70.93
0.00
0.005
45.74
72.41
89.89
78.73
71.69
+0.76
0.010
45.79
72.85
90.94
81.04
72.66
+1.73
0.020
46.74
74.41
91.50
80.89
73.39
+2.46
0.050
44.79
70.90
90.99
77.39
71.02
+0.09
Table 3: Sensitivity analysis of the VACL loss weight λvacl .
Figure 6: Prediction Responses under Different VACL Weight Coefficients
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Figure S1 : (a) Hierarchical response comparison before and after HFH; (b) Support-query hierarchical cross-similarity matrix before and after HFH.
Exp.
Prototype Source
Variance
mIoU
1
Single deterministic
77.30
2
Deepest-layer fg/bg
78.03
3
Deepest-layer fg/bg
✓
79.32
4
Multi-level fg/bg
78.18
5
Multi-level fg/bg
✓
80.89
Appendix
Table S1 : Ablation results of PPR prototype modeling strategies.
Figure S2 : Hierarchical foreground/background prototype response reorganization of PPR.
Exp.
Setting
Representation Path
VACL Input
Four-Domain Mean
1
Baseline
baseline feature
no VACL
65.73
2
Baseline + VACL
baseline feature
deterministic prototypes
66.67
3
HFH + VACL w/o PPR
HFH feature
HFH deterministic prototypes
70.21
4
HFH + PPR + VACL
HFH + PPR feature
PPR probabilistic prototypes and variances
73.39
Appendix
Table S2 : Diagnostic results on the dependency between PPR and VACL.
Exp.
Setting
Variance Weight
Rank Weight
FG-BG Separation
FG Attraction
BG Attraction
mIoU
1
w/o VACL
77.16
2
Standard contrastive
✓
✓
✓
78.42
3
Variance-aware contrastive
✓
✓
✓
✓
✓
80.89
4
Negative only
✓
✓
✓
78.72
5
Positive only
✓
✓
✓
✓
79.59
6
FG positive + negative
✓
✓
✓
✓
79.60
Appendix
Table S3 : Ablation results of VACL components and loss terms.
Table S4 : MMD distance from the source domain to target domains and 1-shot performance.
Method
Input Size
Params (M)
FLOPs (G)
FPS
Memory (MiB)
Baseline
416
28.100673
96.035
61.88
323.90
DAUPNet
416
28.439873
99.978
51.56
376.13
Baseline
400
28.100673
89.555
62.87
305.98
DAUPNet
400
28.439873
93.204
51.81
355.96
Appendix
Table S5 : Comparison of parameters, computation, and inference speed. Measurements use 1-shot, FP32, and GPU-resident inputs. FPS is computed from median latency; memory denotes peak allocated MiB. FLOPs count one fused multiply-add as two operations.
Exp.
PPR Configuration
DeepGlobe
ISIC
Chest X-ray
FSS-1000
Mean
1
Deepest + variance
45.78
72.84
89.97
79.32
71.98
2
Multi-level + variance
46.74
74.41
91.50
80.89
73.39
Appendix
Table S6 : Deepest-level versus multi-level PPR across four target domains under the 1-shot setting.
Cross-domain Few-shot Segmentation (CD-FSS) aims to transfer knowledge learned from source domain to distinct target domains, segmenting unseen target classes with only a few annotated samples. Although existing methods have made significant progress, they still rely on training or fine-tuning processes, which incur high computational costs and risk overfitting. We observe that when powerful and general-purpose vision foundation models are incorporated into these methods, their performance shows only marginal improvement or even degrades due to overfitting. To address this, we eliminate trainable parameters and propose a training-free framework to avoid both training overhead and overfitting. Built upon the self-supervised vision encoder DINOv3, our framework addresses cross-domain challenges through three core modules. First, the Semantic-aware Feature Re-fusion (SAFR) module identifies and re-fuses features that emphasize semantic patterns, generating representations with enhanced semantic discriminability. Additionally, the Adaptive Support Enhancement (ASE) module narrows semantic gaps between support and query through robust query information aggregation. Finally, the Hybrid Prototype Matching (HPM) module integrates matching results from diverse prototypes to adapt to varying semantic complexity across domains. Extensive experiments on four target domain datasets demonstrate that our method achieves state-of-the-art performance in CD-FSS without any training.
Sujun Sun, Mingwu Ren, Haofeng Zhang
School of Computer Science and Engineering, Nanjing University of Science and Technology, China · State Key Laboratory of Intelligent Manufacturing of Advanced Construction Machinery, China
Cross-domain Few-shot Segmentation (CD-FSS) aims to learn generalizable segmentation capability from abundant annotated samples in the source domain, enabling accurate segmentation of novel classes in the target domain with only a few annotated samples. Existing CD-FSS methods mainly focus on mitigating feature distribution shifts caused by style gaps while ignoring significant differences in class semantic granularity and discriminative attributes across domains, leading to two key degradations in support-query matching: semantic over-alignment and attribute over-alignment. To this end, we propose the Dual Hierarchical Aggregation Network (DHANet), which comprises three key modules. First, the Hierarchical Spatial Aggregation (HSA) module performs multi-scale region aggregation of pixel features along the spatial dimension, generating hierarchical semantic-enhanced features to alleviate semantic over-alignment. Additionally, the HCA module conducts multi-scale attribute aggregation along the channel dimension, generating hierarchical attribute-enhanced features to mitigate attribute over-alignment. Finally, we propose the Online Probabilistic Semantic Bank (OPSB), which progressively constructs and updates class probability distributions from query predictions during inference, and samples multiple pseudo-prototypes as additional support information to mitigate insufficient support. Extensive experiments on four target-domain datasets demonstrate that our method achieves state-of-the-art performance.
Sujun Sun, Mingwu Ren, Haofeng Zhang
School of Computer Science and Engineering, Nanjing University of Science and Technology, China · State Key Laboratory of Intelligent Manufacturing of Advanced Construction Machinery, China
Cross-domain few-shot medical image segmentation (CD-FSMIS) requires a model to generalise simultaneously to novel anatomical categories and unseen imaging domains from only a handful of annotated examples. Existing prototypical approaches inevitably entangle anatomical structure with domain-specific appearance variations, and thus lack a stable reference for reliable matching under domain shift. We observe that the geometric structure of human anatomy constitutes a reliable, domain-transferable prior that has been overlooked. Building on this insight, we propose GeoProto, a geometry-aware CD-FSMIS framework that enriches prototypical matching with explicit structural priors. The core component, Geometry-Aware Prototype Enrichment (GAPE), augments each local appearance prototype with a learned geometric offset encoding its ordinal position within the organ's interior topology. This offset is derived from an auxiliary Ordinal Shape Branch (OSB) trained under an ordinally consistent objective that enforces monotonic variation of geometric embeddings across interior strata, requiring no annotation beyond standard segmentation masks. Extensive experiments across seven datasets spanning three evaluation settings (cross-modality, cross-sequence, and cross-context) demonstrate that GeoProto achieves state-of-the-art performance.
Feifan Song, Yuntian Bo, Haofeng Zhang
School of Computer Science and Engineering, Nanjing University of Science and Technology