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

HCDG: A Hierarchical Consistency Framework for Domain Generalization on Medical Image Segmentation

Yijun Yang, Shujun Wang, Pheng-Ann Heng, Lequan Yu

Medical imaging AI faces a significant "last mile" problem: models trained at one institution often fail when deployed at another due to variations in scanners, protocols, and patient populations. This phenomenon, known as domain shift, hinders the clinical adoption of deep learning models. To address this, researchers have developed HCDG, a Hierarchical Consistency framework designed to learn universal, "hospital-agnostic" representations for medical image segmentation.

Abstract

Domain Generalization (DG) is essential for the reliable deployment of medical image segmentation models across diverse clinical environments. This paper presents HCDG, a novel framework that enforces consistency across two hierarchical levels: data-level (extrinsic) and task-level (intrinsic). By combining a Fourier-based augmentation strategy (DomainUp) with dual-task learning (segmentation and boundary regression), HCDG achieves state-of-the-art performance on unseen clinical domains without requiring target-domain data during training.

The Challenge of Domain Generalization

Standard deep learning assumes that training and testing data share the same distribution. In clinical practice, domain shift is inevitable. While previous DG methods focused on learning domain-invariant features through data-level perturbations, they often neglected task-level consistency—the logical relationship between related tasks, such as organ segmentation and boundary detection. HCDG bridges this gap by integrating both extrinsic and intrinsic consistency.

Methodology: Hierarchical Consistency

The HCDG framework operates through two primary mechanisms to ensure robustness against domain shift.

Overview of the proposed HCDG framework, integrating Extrinsic and Intrinsic Consistency modules.

1. Extrinsic Consistency (EC)

Extrinsic consistency focuses on data-level robustness. The framework introduces DomainUp, a Fourier-based data augmentation strategy. DomainUp decomposes images into "amplitude" (representing style/appearance) and "phase" (representing structure). By mixing amplitudes from different source domains, the model synthesizes diverse training environments. A key refinement is Amplitude Gaussian-mixing (AG), which uses a Gaussian mask to concentrate style-mixing on core semantic regions, ensuring the synthesized images remain anatomically realistic.

2. Intrinsic Consistency (IC)

Intrinsic consistency targets task-level robustness. The model is trained on a dual-task objective: image segmentation and boundary regression. A "Classmate" module, consisting of additional decoders, ensures that the predicted segmentation mask and the predicted boundary are spatially and logically consistent. This dual-task approach acts as a powerful regularizer, guiding the model toward anatomically plausible results even when faced with unfamiliar image styles.

The entire system utilizes a Teacher-Student architecture. A "teacher" model (an exponential moving average of the student) provides stable targets, guiding the student's learning across the synthesized and original domains.

Experimental Results

The authors evaluated HCDG on two challenging multi-site tasks using a "leave-one-domain-out" strategy:

  • Optic Cup/Disc (OC/OD) Segmentation: Evaluated on fundus images from four sources (Drishti-GS, RIM-ONE-r3, and REFUGE).
  • Prostate MRI Segmentation: Evaluated on T2-weighted MRI data from six different institutions.

Performance Comparison

HCDG consistently outperformed state-of-the-art DG methods, including JiGen, DoFE, and FACT.

  • Fundus Images: Achieved an overall Dice coefficient of 89.64%, compared to the 86.38% baseline.
  • Prostate MRI: Reached 88.89% Dice, a significant improvement over the 83.79% baseline.
Qualitative comparison of HCDG against other DG methods in fundus and prostate MRI segmentation.

Qualitative analysis reveals that HCDG produces smoother and more anatomically accurate contours on unseen data. While other methods often generate fragmented or jagged masks under domain shift, HCDG maintains structural integrity through its hierarchical consistency constraints.

Conclusion and Future Directions

HCDG demonstrates that hierarchical consistency is a powerful tool for bridging the domain gap in medical imaging. By synergetically combining data-level augmentation with task-level logical constraints, the framework achieves superior generalization. Future research directions include incorporating more advanced backbones like nnU-Net and adapting the consistency framework for semi-supervised scenarios with limited labeled data.

Summary updated

BibTeX
@misc{yang2021hcdg,
  author = {Yijun Yang and Shujun Wang and Pheng-Ann Heng and Lequan Yu},
  title = {{HCDG: A Hierarchical Consistency Framework for Domain Generalization on Medical Image Segmentation}},
  year = {2021},
  eprint = {2109.05742},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.05742},
}
Figure