SARNet: Rethinking Correspondence Granularity for Cross-Domain Few-Shot Segmentation

Chunlin Wen, Tao Zhang, Yu Zhang, Hongyuan Zhu, Siya Mi, Xiu-Shen Wei, Qingyong HuarXiv 2026 · DOI

TL;DR

When segmenting objects in a brand-new domain (like satellite or medical images) using only a few labeled examples, most models fail because they match features at the wrong scale: either too coarse (whole-image features) or too fine (tiny, over-segmented fragments). SARNet solves this "granularity dilemma" by grouping over-segmented regions into coherent semantic-level entities and refining them with global context, achieving state-of-the-art performance across four cross-domain benchmarks.

What Problem Does This Paper Address?

Imagine training a segmentation model on everyday photos (cars, dogs, chairs) and then asking it to segment skin lesions or satellite-view bodies of water using just one labeled example. This is Cross-Domain Few-Shot Segmentation (CD-FSS).

Most existing CD-FSS methods focus on adapting backbone features so they generalize better across domains. The authors point out that this misses a crucial factor: correspondence granularity—the scale at which you match the labeled "support" image to the unlabeled "query" image.

Figure 1: Comparison of correspondence modeling at dif- ferent granularities in CD-FSS. (a) Image-level Method: Pre- trained features cause severe domain bias, where non-target background regions are activated more intensely than the tar- get object itself (e.g., the bright top area in the correspondence map). (b) Fragment-level Method: Relying on over-segmented masks results in noisy and ambiguous local matching, ex- hibiting equally bright responses in both target and non- target areas. (c) Our Semantic-level Method: By aggregating and refining semantic knowledge, our method suppresses domain-specific noise, concentrating the highest affinity ex- clusively on the target object for accurate prediction.
  • Too coarse (Image-level): Matching directly on coarse, ImageNet-pretrained features introduces severe source-domain bias. Background textures often light up more strongly than the actual target object.
  • Too fine (Fragment-level): Recent methods use the Segment Anything Model (SAM) to get domain-agnostic object masks. However, SAM tends to over-segment—chopping a single object into many tiny pieces. Matching at this fragment level creates noisy, ambiguous correspondences. Furthermore, SAM's automatic mask generator leaves an average of 8.4% of pixels uncovered, and 32.7% of those missed pixels actually belong to the target object.

Methods

To hit the sweet spot between coarse and fine, the authors propose SARNet (Semantic-aware Aggregation and Refinement Network), built on a standard ResNet-50 backbone and a Self-Support Prototype (SSP) prediction head.

Figure 3: Overall architecture of our proposed SARNet. After extracting features 𝐹𝑜𝑟𝑖and constructing initial masks 𝑀𝑖𝑛𝑖, the Semantic-level Mask Aggregation Module (SMAM) (blue) first aggregates semantically consistent regions to form domain- general semantic-level masks 𝑀𝑠𝑒𝑚and semantic-level prototypes 𝑃𝑠𝑒𝑚. Then, semantic-level feature 𝐹𝑠𝑒𝑚and representative prototypes 𝑃𝑟𝑒𝑝are generated by refining 𝑃𝑠𝑒𝑚to enhance the domain robustness in the Semantic-level Feature Refinement Module (SFRM) (green). Finally, 𝐹𝑠𝑒𝑚and fused prototypes 𝑃𝑓are fed into SSP for the final query prediction 𝑀𝑝𝑟𝑒.
  1. Residual Mask: Before doing any matching, SARNet computes a "residual mask" covering all pixels missed by SAM, ensuring 100% image coverage.
  2. Semantic-level Mask Aggregation Module (SMAM): SMAM takes the initial SAM + residual masks and merges them into coherent semantic regions using two simple rules:
  3. Force-merge tiny fragments: Any mask covering less than 1% of the image ($\tau_r = 0.01$) is merged into its most similar semantic region.
  4. Group similar regions: Larger masks with high feature similarity ($\ge 0.95$ cosine similarity) are merged together; otherwise, they form a new semantic category.
  5. Semantic-level Feature Refinement Module (SFRM): Isolated regions still lack context. SFRM applies self-attention across the aggregated semantic prototypes to capture global context and inter-region relationships. It also extracts representative foreground/background prototypes from both the support and query images, fusing them to handle intra-class variations (e.g., two different-looking airplanes).

Datasets

  • Training (Source Domain): PASCAL VOC 2012 (with SBD augmentation), containing 20 common object categories.
  • Evaluation (Target Domains): Four diverse, unseen benchmarks:
  • FSS-1000: Tiny daily objects.
  • DeepGlobe: Satellite imagery.
  • ISIC: Dermoscopy images of skin lesions.
  • Chest X-ray: Medical lung X-ray screenings.

Key Insights and Ideas

  • Fewer, coherent masks beat many fragments: On DeepGlobe, fragment-level methods average 12.3 masks per category, whereas semantic-level aggregation reduces this to 2.6. Fewer, cleaner masks lead to consistently higher cross-domain similarity between support prototypes and query features.
Figure 2: Quantitative comparison of correspondence granu- larities across five datasets. (a) Cross-domain cosine similar- ity between support prototypes and query features. (b) Aver- age number of masks per semantic category. Fragment-level representations are over-segmented and domain-sensitive, whereas semantic-level aggregation reduces mask redun- dancy and yields higher cross-domain similarity.
  • Aggregation must precede refinement: In ablation studies, applying contextual refinement (SFRM) directly to unmerged fragment masks actually hurt performance (dropping mIoU from 68.1% to 67.8%) because it amplified noisy local cues. Combining SMAM + SFRM boosted performance to 71.5%.
  • Don't mix granularities: Trying to combine both fragment-level and semantic-level cues degraded performance (69.1% vs. 71.5%), confirming that mixing granularities reintroduces unstable local matches.

Key Results

Evaluated using mean Intersection over Union (mIoU) with a ResNet-50 backbone:

  • State-of-the-art accuracy: SARNet achieves 72.8% mIoU (1-shot) and 76.2% mIoU (5-shot) on average across the four target datasets, outperforming the previous best method (GPRN) by +1.1% and +0.9%, respectively.
  • Efficiency: Without test-time Adaptive Point Selection (APS), SARNet reaches 71.5% mIoU using 9.7M parameters and 56.2G FLOPs—nearly identical complexity to the prior method IFA (8.7M / 56.1G), but with a +3.7% mIoU* gain. With APS enabled, it matches GPRN's computational footprint (~100.2M params, 428.3G FLOPs) while delivering higher accuracy.

Limitations and Future Work

Like other SAM-based approaches, SARNet relies on pre-generated SAM masks, and enabling test-time APS refinement significantly increases computational cost (dropping speed from 27.6 FPS to 8.1 FPS). In future work, the authors plan to extend semantic-level correspondence modeling to other cross-domain few-shot tasks and explore granularity-adaptive correspondence learning.

Summary updated

BibTeX
@misc{wen2026sarnet,
  author = {Chunlin Wen and Tao Zhang and Yu Zhang and Hongyuan Zhu and Siya Mi and Xiu-Shen Wei and Qingyong Hu},
  title = {{SARNet: Rethinking Correspondence Granularity for Cross-Domain Few-Shot Segmentation}},
  year = {2026},
  eprint = {2612.03295},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2612.03295},
}
Figure