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

Contrastive Domain Disentanglement for Generalizable Medical Image Segmentation

Ran Gu, Jiangshan Lu, Jingyang Zhang, Wenhui Lei, Xiaofan Zhang, Guotai Wang, Shaoting ZhangarXiv 2022 · DOI

Introduction

Deep learning models for medical imaging frequently encounter the challenge of Domain Shift. A segmentation model trained on retinal scans from one hospital using a specific imaging device often fails when deployed at another site using different hardware. These discrepancies in lighting, contrast, and noise levels hinder the clinical utility of AI models. While Domain Adaptation techniques can bridge this gap, they typically require data from the target domain during training. In contrast, Domain Generalization (DG) aims to create models that perform accurately on completely "unseen" domains out of the box.

Existing disentanglement methods attempt to separate an image's content (anatomy) from its style (modality). However, these methods often struggle to properly constrain the style space, leading to "style leakage" where domain-specific noise contaminates the anatomical features.

The CDD Framework

The authors introduce the Contrastive Domain Disentanglement (CDD) network to address these limitations. The framework is designed to explicitly separate domain-invariant anatomical features from domain-specific modality styles.

Overview of the CDD framework showing the disentanglement process, style contrastive learning, and domain augmentation.

The CDD architecture consists of four primary components:

  1. Disentanglement Network: This includes an Anatomy Encoder ($E_{ana}$) that uses Gumbel-softmax activation to binarize features, effectively stripping away texture to retain only structural information. A Style Encoder ($E_{sty}$), built on a Variational Autoencoder (VAE) framework, captures modality-specific factors. A Decoder ($D_{rec}$) ensures lossless disentanglement by reconstructing the original image from these components.
  2. Style Contrastive Loss ($L_{sct}$): To ensure the style codes are discriminative, contrastive learning is applied. This forces style representations from the same domain to cluster together while pushing those from different domains apart, helping the anatomy encoder ignore site-specific variations.
  3. Domain Augmentation Strategy: The model simulates "unseen" domains by creating linear combinations of known modality styles. By enforcing anatomical consistency ($L_{dis}$) across these synthetic domains, the model becomes significantly more robust to novel imaging conditions.
  4. Segmentation Network: A standard U-Net backbone performs the final segmentation (e.g., identifying the optic cup and disc) using only the purified anatomical features.

Experimental Setup

The framework was evaluated on the task of Optic Cup (OC) and Optic Disc (OD) segmentation using four distinct retinal fundus image datasets: Drishti-GS (Domain 1), RIM-ONE (Domain 2), and two subsets of REFUGE (Domains 3 and 4). These datasets represent a significant challenge due to the variety of scanners and clinical protocols used. The researchers employed a "leave-one-domain-out" strategy to rigorously test generalization performance.

Results and Discussion

The CDD method demonstrated superior performance compared to existing state-of-the-art generalization techniques.

Qualitative comparison of segmentation results across four domains, showing CDD's robustness compared to other methods.

Quantitatively, CDD achieved an average Dice score of 89.35%, surpassing methods like DoFE (87.66%) and BigAug (86.87%). It also recorded the lowest Average Surface Distance (ASD), indicating highly accurate boundary predictions. Ablation studies confirmed that both the contrastive style loss ($L_{sct}$) and the domain augmentation strategy ($L_{dis}$) are essential for achieving these results.

Key insights from the study include:

  • Structured Style: Organizing the style space via contrastive loss is more effective than simple disentanglement.
  • Binarization: Using Gumbel-softmax prevents texture information from leaking into the anatomical representation.
  • Interpolated Generalization: Training on "interpolated" styles allows the model to better navigate the space between known clinical datasets.

Conclusion

The Contrastive Domain Disentanglement framework offers a robust solution for medical image segmentation across diverse clinical sites. By effectively isolating anatomical structures from modality-specific noise, CDD achieves state-of-the-art generalization. Future work will explore extending this 2D framework to 3D medical data, such as MRI and CT volumes, and investigating non-linear domain augmentation strategies.

Summary updated

BibTeX
@misc{gu2022contrastive,
  author = {Ran Gu and Jiangshan Lu and Jingyang Zhang and Wenhui Lei and Xiaofan Zhang and Guotai Wang and Shaoting Zhang},
  title = {{Contrastive Domain Disentanglement for Generalizable Medical Image Segmentation}},
  year = {2022},
  eprint = {2205.06551},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.06551},
}
Figure