Unsupervised Domain Adaptation through Shape Modeling for Medical Image Segmentation

Yuan Yao, Fengze Liu, Zongwei Zhou, Yan Wang, Wei Shen, Alan L. Yuille, Yongyi Lu

Abstract

Shape information is a strong and valuable prior in segmenting organs in medical images. However, most current deep learning based segmentation algorithms have not taken shape information into consideration, which can lead to bias towards texture. We aim at modeling shape explicitly and using it to help medical image segmentation. Previous methods proposed Variational Autoencoder (VAE) based models to learn the distribution of shape for a particular organ and used it to automatically evaluate the quality of a segmentation prediction by fitting it into the learned shape distribution. Based on which we aim at incorporating VAE into current segmentation pipelines. Specifically, we propose a new unsupervised domain adaptation pipeline based on a pseudo loss and a VAE reconstruction loss under a teacher-student learning paradigm. Both losses are optimized simultaneously and, in return, boost the segmentation task performance. Extensive experiments on three public Pancreas segmentation datasets as well as two in-house Pancreas segmentation datasets show consistent improvements with at least 2.8 points gain in the Dice score, demonstrating the effectiveness of our method in challenging unsupervised domain adaptation scenarios for medical image segmentation. We hope this work will advance shape analysis and geometric learning in medical imaging.

Introduction

Deep learning models for medical imaging often exhibit "brittleness" when deployed across different clinical environments. A segmentation model trained on CT scans from one hospital frequently underperforms at another due to domain shift. Variations in scanners, slice thicknesses, and contrast protocols alter the image "texture" and intensity distributions.

While fine-tuning models for every new site is ideal, medical data annotation is prohibitively expensive and requires expert radiologists. This research addresses the challenge of adapting models to new, unlabeled datasets by focusing on anatomical invariants. While textures vary, the underlying anatomical shape of an organ (e.g., the pancreas) remains a stable "anchor." The authors propose modeling shape explicitly using Variational Autoencoders (VAEs) to guide unsupervised domain adaptation (UDA).

Methods: The Teacher-Student Shape Prior Pipeline

The proposed framework utilizes a Teacher-Student learning paradigm that incorporates an explicit shape prior. The process consists of two primary stages:

1. Source Training

On a labeled source dataset (e.g., NIH Pancreas CT), two networks are trained:

  • Segmentation Network ($S^s$): A standard 3D U-Net for organ segmentation.
  • VAE Network ($E, D$): Trained specifically to reconstruct ground-truth organ masks. This VAE learns the latent distribution of anatomically valid shapes.

2. Target Adaptation

When transitioning to an unlabeled target domain, the source network acts as a "Teacher." A "Student" network ($S^t$) is then fine-tuned using a dual-loss approach:

  • Pseudo-label Loss ($\mathcal{L}_{pseudo}$): The Student attempts to match the pixel-wise predictions generated by the Teacher.
  • VAE Reconstruction Loss ($\mathcal{L}_{recon}$): The Student’s prediction is passed through the pre-trained, fixed VAE. If the VAE can reconstruct the shape accurately, the prediction is considered anatomically plausible. High reconstruction error penalizes the Student for producing "non-organ-like" shapes.
Overview of the proposed UDA framework featuring the Teacher-Student paradigm and VAE shape modeling.

The framework is further enhanced by Dynamic Hyperparameters to balance these losses and Test-time Training, allowing for per-image refinement during inference.

Experimental Results

The study evaluated the VAE-based pipeline across five distinct pancreas segmentation datasets: the NIH Pancreas CT (source), and four target domains including MSD, Synapse, and two in-house datasets (IV and oral contrast).

The VAE-based pipeline consistently outperformed baseline "Direct Test" methods and other state-of-the-art UDA techniques such as SIFA and Discriminator-based alignment.

Quantitative comparison of the VAE pipeline against other UDA methods across multiple datasets.

Key findings include:

  • Significant Performance Gains: On the MSD dataset, the method improved the Dice score from a baseline of 0.6777 to 0.7574.
  • Closing the Domain Gap: In the Synapse dataset, the method achieved a Dice score of 0.7869, nearly reaching the supervised "Upper Bound" of 0.7961.
  • Robustness to Contrast Variations: The method showed strong performance even when adapting between datasets with different contrast agents (IV vs. oral), which typically cause severe intensity shifts.

Discussion and Conclusion

By treating shape as an anatomical invariant, this work effectively counteracts the "texture bias" inherent in deep networks. The VAE serves as a critic, ensuring that segmentation outputs remain within the bounds of anatomical plausibility.

While currently focused on single-organ (pancreas) segmentation, future work could extend this to multi-organ contexts. Additionally, incorporating surrounding anatomical context could further strengthen the shape prior. Overall, this approach demonstrates that geometric learning is a powerful tool for making medical AI more robust and generalizable across diverse clinical settings.

Summary updated

BibTeX
@inproceedings{yao2022unsupervised,
  author = {Yuan Yao and Fengze Liu and Zongwei Zhou and Yan Wang and Wei Shen and Alan L. Yuille and Yongyi Lu},
  title = {{Unsupervised Domain Adaptation through Shape Modeling for Medical Image Segmentation}},
  booktitle = {MIDL},
  year = {2022},
  url = {https://openreview.net/forum?id=o4P0U8sl4H},
}
Figure