Contrastive Graph Modeling for Cross-Domain Few-Shot Medical Image Segmentation
Yuntian Bo, Tao Zhou, Zechao Li, Haofeng Zhang, Ling Shao · 2025
Read Contrastive Graph Modeling for Cross-Domain Few-Shot Medical Image Segmentation by Yuntian Bo, Tao Zhou, Zechao Li, Haofeng Zhang, Ling Shao (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2512-21683.txt.
Introduction
Yuntian Bo, Tao Zhou, Zechao Li, Haofeng Zhang, and Ling Shao segment medical images in a hard setting: few labels, and a target domain different from the training one. Clinics need organ and lesion outlines, but annotations are scarce and scanners differ. Earlier methods improved transfer by filtering out domain-specific information, which hurt accuracy in the source domain.
Their framework, C-Graph, instead leans on a transferable prior: the structural consistency of medical images. Features become a graph, with pixels as nodes and semantic affinities as edges. A structural prior graph layer models dependencies among target-category nodes. A subgraph matching decoder uses relations among nodes to guide the predicted outline. A contrastive loss reduces node ambiguity and subgraph mismatch by making nodes more distinguishable in graph space. Across cross-domain benchmarks, C-Graph beat earlier approaches while keeping strong source-domain accuracy, a combination previous methods traded away.
Catalog record
| CREATOR | Yuntian Bo, Tao Zhou, Zechao Li, Haofeng Zhang, Ling Shao |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 66 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2512-21683
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Contrastive Graph Modeling for Cross-Domain Few-Shot Medical Image Segmentation Yuntian Bo, Tao Zhou, Zechao Li, Haofeng Zhang, Ling Shao Abstract Cross-domain few-shot medical image segmentation (CD-FSMIS) offers a promising and data-efficient solution for medical applications where annotations are severely scarce and multimodal analysis is required. However, existing methods typically filter out domain-specific information to improve generalization, which inadvertently limits cross-domain performance and degrades source-domain accuracy. To address this, we present Contrastive Graph Modeling (C-Graph), a framework that leverages the structural consistency of medical images as a reliable domain-transferable prior. We represent image features as graphs, with pixels as nodes and semantic affinities as edges. A Structural Prior Graph (SPG) layer is proposed to capture and transfer target-category node dependencies and enable global structure modeling through explicit node interactions. Building upon SPG layers, we introduce a Subgraph Matching Decoding (SMD) mechanism that exploits semantic relations among nodes to guide prediction. Furthermore, we design a Confusion-minimizing Node Contrast (CNC) loss to mitigate node ambiguity and subgraph heterogeneity by contrastively enhancing node discriminability in the graph space. Our method significantly outperforms prior CD-FSMIS approaches across multiple cross-domain benchmarks, achieving state-of-the-art performance while simultaneously preserving strong segmentation accuracy on the source domain. Our code is available at https://github.com/primebo1/C-Graph . \FAILED \FAILED I Introduction Medical image segmentation is fundamental for computer-assisted intervention [ 1 ] , yet current mainstream deep learning methods [ 2 , 3 ] still rely heavily on large-scale annotated data. Moreover, the resulting models are typically task-specific and fail to generalize to new concepts. In recent years, few-shot medical image segmentation (FSMIS) [ 4 , 5 ] has gained increasing attention due to its potential to reduce data reliance. By exploiting category-agnostic prior knowledge learned from base categories, FSMIS seeks to segment novel anatomical structures with only a few labeled examples. However, current FSMIS approaches naively assume a shared distribution between training and inference data, resulting in substantial performance degradation when deployed in unseen domains [ 6 ] . In contrast, clinical practice frequently involves multiple imaging techniques ( e.g. , CT, MRI) to capture comprehensive patient information, inherently introducing domain shifts that challenge model generalization. Fig. 1: (a) Our motivation. Despite significant appearance shifts, medical images exhibit high structural consistency across domains. (b) Previous methods naively focus on filtering out domain-specific information to improve generalization, while overlooking feature collapse, limiting cross-domain performance and severely degrading source-domain accuracy. (c) Our method models domain-consistent structure using graphs and employs contrastive learning to reduce node semantic confusion, achieving both superior in- and cross-domain performance. The discrepancies above have motivated the formulation of the cross-domain few-shot medical image segmentation (CD-FSMIS) task [ 7 , 6 ] , where model generalization extends beyond segmenting novel categories to handling unseen domains. Existing CD-FSMIS methods assume domain knowledge is decouplable, thus attempting to filter domain-relevant information for enhanced transferability. For instance, FAMNet [ 6 ] explicitly suppresses domain-specific frequency components to promote generalization. However, this simplistic information filtering inevitably compromises feature integrity, placing an inherent limit on achieving more precise cross-domain segmentation. Moreover, despite improved generalization, we observe a substantial degradation in the source domain, compared to conventional FSMIS methods. This highlights the need to identify more semantically consistent patterns to maximize cross-domain generalization while minimizing source domain performance degradation. In medical imaging, despite substantial variations across different imaging domains, we observe an inherent structural consistency attributed to anatomical properties and priors of biological tissues and organs. Here, structure is defined as: Definition 1 (structure). We define structure as the semantic relationships between spatial positions within the feature map, which reflect both categorical attributes and anatomical priors. As shown in Fig. 1 (a), organ morphology and spatial semantics, defined by the arrangement of pixels, are largely unaffected by modality-induced appearance shifts. This observation motivates us to model such domain-agnostic structure as robust and transferable priors for segmentation in novel target domains. In light of the foundations above, we are naturally motivated to model structure using graphs. Taking semantic similarity as the edge criterion, a medical image feature map can be transformed into a bottom-up graph: pixel-level features at each spatial position serve as nodes, nodes belonging to the same category form a subgraph, and subgraphs collectively constitute the full graph. However, this modeling approach faces two key challenges: 1) High node ambiguity. Semantic ambiguity is prevalent in medical images due to overlapping tissue, fuzzy boundaries, etc , leading to increased node classification uncertainty during graph optimization. 2) High subgraph heterogeneity . Variations in detail emphasis across imaging techniques may introduce considerable heterogeneity among nodes within the same subgraph, thereby reducing its semantic compactness. Together, these sources of semantic confusion degrade the reliability of the modeled graph. To tackle the aforementioned challenges, we present Contrastive Graph Modeling (C-Graph), a novel framework that reformulates CD-FSMIS as a graph learning problem. At its core, we introduce a simple yet effective Structural Prior Graph (SPG) layer, which serves as the primary building block of C-Graph. For novel category generalization, SPG layers leverage the support set to capture semantic dependencies among nodes of the target-class subgraph, forming class-level structural knowledge that is interactively transferred and emphasized in the query graph. For unseen domain generalization, SPG layers explicitly enable semantic interactions across spatial positions during training, progressively modeling global domain-agnostic structure. Moreover, the prevailing practice in (CD-) FSMIS, prototypical matching, treats pixel features as isolated entities, neglecting their interdependencies. To fully leverage the semantic dependencies among nodes modeled by the SPG layers, we propose a novel Subgraph Matching Decoding (SMD) mechanism that explicitly accounts for semantic connectivity among graph nodes during the decoding process, thereby enabling structurally coherent and context-aware segmentation. Finally, to address the highly confused nodes in graph modeling, we introduce a Confusion-minimizing Node Contrast (CNC) loss, which adaptively exploits semantic edge cues to enhance node discriminability within the graph space, and enforces structure-oriented learning to counteract domain shifts. Extensive experimental results demonstrate that our method consistently outperforms the previous state-of-the-art (SOTA) approach FAMNet [ 6 ] by large margins, achieving an average improvement of 3.51% across diverse cross-domain scenarios. Remarkably, it also maintains expert-level performance on the source domain, marking a notable breakthrough in the CD-FSMIS field. To summarize, we propose five key contributions: • We present Contrastive Graph Modeling (C-Graph), a novel framework that focuses on structural consistency in medical images to enhance generalization across domains. • We propose a Structural Prior Graph (SPG) Layer that simultaneously models structure and highlights target query nodes for improved generalization and matching. • We propose a Subgraph Matching Decoding (SMD) mechanism that departs from the prototypical paradigm to effectively leverage the structural patterns learned through the SPG layers for enhanced prediction. • We design a Confusion-minimizing Node Contrast (CNC) loss that reduces semantic confusion by contrastively guiding the model to learn structures regardless of appearance. • We validate the generalizability of C-Graph on four cross-domain medical datasets. Experimental results demonstrate the SOTA performance of the proposed method. Fig. 2: Overview of our proposed method. Here, \mathcal{G}^{i} denotes the output graph of the i -th SPG layer. II Related Works II-A Few-Shot Medical Image Segmentation The goal of FSMIS is to segment previously unseen categories during inference by providing the model with a