Treasure in Distribution: A Domain Randomization based Multi-Source Domain Generalization for 2D Medical Image Segmentation

Ziyang Chen, Yongsheng Pan, Yiwen Ye, Hengfei Cui, Yong XiaarXiv 2023

TL;DR

Treasure in Distribution (TriD) is a novel domain generalization framework that significantly improves the robustness of medical image segmentation models. By sampling feature statistics from a broad uniform distribution and mixing them channel-wise with original features, TriD creates a vast, diverse search space that prepares models for the unpredictable "domain shifts" common in real-world clinical data.

What Problem Does This Paper Address?

Deep learning models for medical imaging often suffer from a "performance cliff" when moved from the lab to the clinic. A model trained on MRI scans from Hospital A might fail miserably at Hospital B simply because Hospital B uses a different scanner brand or imaging protocol. This is known as domain shift.

Existing Domain Generalization (DG) methods try to fix this by "randomizing" the style of features during training. However, many current methods (like MixStyle) only interpolate between existing source domains. This creates a limited and scattered search space. If the unseen target domain falls outside this narrow range, the model still fails. The authors argue that there is "treasure" hidden in the wider distribution of possible feature styles that current methods ignore.

Methods

The authors propose TriD, a plug-and-play module for CNN architectures (like ResNet) consisting of two main components:

  1. Statistics Randomization (SR): Instead of just mixing statistics from known source images, SR samples augmented mean ($\mu$) and standard deviation ($\sigma$) values directly from a uniform distribution $U(0, 1)$. This forces the model to encounter a much wider and more even variety of feature styles—including "unreal" styles—which builds extreme robustness.
  2. Style Mixing (SM): To ensure the model doesn't lose track of the actual anatomy (the "content") while dealing with these wild styles, SM randomly mixes the augmented statistics with the original image statistics along the channel dimension. This provides a stable reference, helping the network explicitly learn domain-invariant representations.
Fig. 2. Overview of our TriD for feature perturbation.

Datasets

The researchers evaluated TriD on two challenging multi-source medical segmentation tasks:

  • Prostate Segmentation: 116 MRI cases collected from six different domains (different centers/scanners).
  • Optic Disc (OD) and Optic Cup (OC) Segmentation: A large-scale collection of fundus images from five different public datasets (1,102 training cases, 339 test cases).

Key Insights and Ideas

  • Uniformity is Key: As shown in Figure 1, traditional methods like MixStyle or DSU produce "clumpy" or limited augmented statistics. TriD’s uniform sampling covers the feature-style space much more thoroughly, ensuring the unseen target domain is "surrounded" by training examples.
  • The Power of "Unreal" Styles: Similar to how data augmentation uses unrealistic rotations or colors to improve robustness, TriD shows that exposing a network to "unreal" feature-space styles actually helps it generalize better to real-world unseen data.
  • Channel-wise vs. Batch-wise: Most previous methods perturb entire batches. TriD’s channel-wise mixing (SM) is more granular, allowing the model to see the "original" style and the "augmented" style simultaneously across different channels, which acts as a powerful regularizer.
Fig. 1. Visualization of the statistics (1st row: standard deviation, 2nd row: mean) computed from the features of the first residual block of ResNet-34 trained on prostate dataset, which has six different domains. We take five as source domains and the left one as unseen target domain and visualize the augmented statistics produced by MixStyle, EFDM, DSU and our SR using 2D t-SNE. (a) MixStyle: Using a linear combination of different statistics. (b) EFDM: Using exact histogram matching and the statistics-fusion operation of MixStyle. (c) DSU: Sampling from a normal distribution constructed based on the original statistics. (d) TriD (Ours): Sampling from a uniform distribution.

Key Results

TriD consistently outperformed state-of-the-art DG methods across both tasks:

  • OD/OC Segmentation: TriD achieved an average Dice Similarity Coefficient (DSC) of 87.62, surpassing other popular methods like MixStyle (85.64) and MaxStyle (86.64).
  • Prostate Segmentation: TriD reached an average DSC of 89.57, significantly higher than the "DeepAll" baseline (87.87) and other specialized DG techniques.
  • Ablation Studies: The authors proved that the combination of SR and SM is vital. Using SR alone provides a big boost, but adding the channel-wise mixing (SM) provides the final edge in performance.
Table 2. Performance (OD, OC) of Intra-Domain, DeepAll, our TriD and seven DG methods in joint segmentation of OD and OC. The best results except for the ones of Intra-Domain are highlighted with bold.

Limitations and Future Work

  • 2D Focus: The current study focuses on 2D segmentation. While many medical tasks are 2D or slice-based, extending this to native 3D convolutions is a logical next step.
  • Hyperparameter Sensitivity: While the authors used standard settings (like $\alpha=0.1$ for the Beta distribution), the optimal range for the uniform distribution sampling might vary for non-medical imaging tasks.
  • Inference: The TriD module is only used during training and is removed during inference. While this keeps the model fast, future work could explore if keeping a version of the module active could help with test-time adaptation.

Summary updated

BibTeX
@misc{chen2023treasure,
  author = {Ziyang Chen and Yongsheng Pan and Yiwen Ye and Hengfei Cui and Yong Xia},
  title = {{Treasure in Distribution: A Domain Randomization based Multi-Source Domain Generalization for 2D Medical Image Segmentation}},
  year = {2023},
  eprint = {2305.19949},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.19949},
}
Figure