NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Bridging Granularity Gaps: Hierarchical Semantic Learning for Cross-domain Few-shot Segmentation

Sujun Sun, Haowen Gu, Cheng Xie, Yanxu Ren, Mingwu Ren, Haofeng ZhangarXiv 2025 · DOI

Abstract

Cross-domain Few-shot Segmentation (CD-FSS) faces significant challenges due to the "granularity gap" between source and target domains—where natural images often feature coarse object-background distinctions while medical or satellite imagery requires fine-grained discrimination. This paper introduces the Hierarchical Semantic Learning (HSL) framework to address this discrepancy. HSL incorporates Dual Style Randomization (DSR) to simulate diverse contrast levels and Hierarchical Semantic Mining (HSM) to extract multi-scale region prototypes. Additionally, a Prototype Confidence-modulated Thresholding (PCMT) module improves inference in low-contrast scenarios. Experimental results demonstrate that HSL achieves state-of-the-art performance across diverse target domains with superior computational efficiency.

Introduction

Few-shot segmentation (FSS) aims to segment novel classes using minimal annotated examples. However, standard FSS models struggle with domain shifts. Cross-domain FSS (CD-FSS) addresses this by training on a source domain (e.g., natural images) and testing on radically different target domains (e.g., medical scans). While previous work focused on the "style gap" (color/texture), this paper identifies the "segmentation granularity gap" as a primary hurdle. In natural images, a bird is a coarse foreground object. In medical imaging, a lesion might require fine-grained distinction from surrounding tissue, similar to distinguishing specific feather patterns. Models trained only on coarse data fail to capture these nuances.

Methodology

The Hierarchical Semantic Learning (HSL) framework introduces three core components to bridge the granularity gap:

  1. Dual Style Randomization (DSR): Beyond global style perturbation, DSR applies foreground style randomization. By swapping the amplitude spectrum of foreground objects with local region styles using Fast Fourier Transforms (FFT), the model learns to handle varying foreground-background contrasts.
  2. Hierarchical Semantic Mining (HSM): HSM uses multi-scale superpixel masks to extract "region prototypes" at different feature levels. This guides the network to learn semantic consistency across a hierarchy of granularities, from large object parts to fine textures.
  3. Prototype Confidence-modulated Thresholding (PCMT): To handle low-contrast target domains where standard similarity metrics are ambiguous, PCMT employs an adaptive threshold (via OTSU) weighted by the model's prototype confidence.
Overview of the HSL framework, including DSR, HSM, and PCMT modules.

Experiments and Results

The model was trained on PASCAL VOC 2012 and evaluated on four diverse target domains: Deepglobe (satellite), ISIC (skin lesions), Chest X-ray (lungs), and FSS-1000 (diverse natural images).

HSL achieves state-of-the-art (SOTA) results across all benchmarks. Using a ResNet-50 backbone, HSL outperforms the previous best method (DRA) by over 3.3% in mean-IoU for both 1-shot and 5-shot settings. With a ViT-base backbone, it surpasses LoEC by 3.23% (1-shot). Notably, HSL is highly efficient, requiring 70% fewer parameters and achieving higher frame rates (43.29 FPS) than DRA.

Quantitative comparison of HSL against SOTA few-shot and cross-domain few-shot segmentation methods.

Conclusion

The HSL framework demonstrates that addressing granularity gaps is as vital as bridging style gaps in CD-FSS. By leveraging hierarchical semantic mining and adaptive thresholding, HSL provides a robust and efficient solution for generalizing to highly diverse domains. Future work may involve integrating hierarchical mask generation directly into the training process to remove dependencies on external superpixel models.

Summary updated

BibTeX
@misc{sun2025bridging,
  author = {Sujun Sun and Haowen Gu and Cheng Xie and Yanxu Ren and Mingwu Ren and Haofeng Zhang},
  title = {{Bridging Granularity Gaps: Hierarchical Semantic Learning for Cross-domain Few-shot Segmentation}},
  year = {2025},
  eprint = {2511.12200},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.12200},
}
Figure