Introduction
Medical image segmentation is a cornerstone of computer-aided diagnosis, yet its clinical utility is often hampered by the "domain gap." Models trained on data from one institution frequently underperform when deployed at another due to variations in scanner hardware, imaging protocols, and patient demographics. This challenge, known as Single Domain Generalization (SDG), requires models to learn features that remain invariant across diverse, unseen environments.
While pixel intensities and textures vary significantly between domains, the underlying anatomical shape of organs remains relatively constant. This paper introduces Mixture-of-Shape-Experts (MoSE), a framework that leverages this consistency. By combining the efficiency of Mixture-of-Experts (MoE) with the representational power of dictionary learning, MoSE generates robust shape priors that serve as effective prompts for the Segment Anything Model (SAM), bridging the gap between foundation models and domain-specific medical tasks.
The MoSE Framework
The core innovation of MoSE lies in its reimagining of dictionary learning through the lens of MoE. Traditional dictionary learning represents complex shapes as combinations of basic "atoms." However, these methods often struggle with a trade-off: small dictionaries lack representational diversity, while large ones risk overfitting to the source domain.
MoSE addresses this by implementing three integrated components:
1. Shape Experts
Instead of static atoms, MoSE utilizes a set of learnable parameters—up to 1024 "shape experts"—that encode distinct semantic shape information. This large pool allows the model to capture a wide variety of anatomical variations without the typical performance degradation associated with large, dense dictionaries.
2. Sparse Gating Network
To manage the large expert pool, a lightweight CNN gating network processes the image embedding from SAM. It employs a Top-K selection strategy, activating only the most relevant experts for any given pixel. This sparsity is crucial; it prevents the model from memorizing specific training samples, thereby enhancing its ability to generalize to new datasets.
3. Bidirectional SAM Integration
MoSE establishes a symbiotic relationship with the Segment Anything Model (SAM):
- Forward Path: SAM’s image encoder provides high-level features to the gating network, assisting in the selection of the most appropriate shape experts.
- Backward Path: The selected experts are combined into a "shape map," which is then fed into SAM’s prompt encoder. This guides the final mask decoder to produce precise, anatomically plausible segmentations.
To ensure stability and efficiency, the authors employ Coefficient of Variation (CV) regularization to balance expert utilization and an $\ell_1$ warm-up strategy during the early stages of training.
Experimental Evaluation
The framework was evaluated on the task of liver segmentation using CT scans across five public datasets. To test Single Domain Generalization, the model was trained exclusively on the BTCV dataset (30 cases) and evaluated on four unseen target domains: LiTS (131 cases), CHAOS (20 cases), AMOS (100 cases), and WORD (20 cases).
Performance Metrics
MoSE demonstrated superior performance across all target domains compared to existing SOTA SDG methods and standard SAM adaptations:
- Accuracy: The model achieved an average Dice Coefficient of 91.4% across all unseen domains, outperforming the baseline (87.3%) and the previous best method, CCSDG (88.4%).
- Robustness: On the AMOS dataset, MoSE reduced the Hausdorff Distance (HD) to 9.7mm, a significant improvement over the baseline's 15.4mm. This indicates that MoSE produces masks with much higher anatomical fidelity and fewer boundary errors.
Key Insights
- Scalability: Unlike traditional dictionary learning, where performance often plateaus, MoSE benefits from scaling. Performance continued to improve as the number of experts increased from 256 to 1024, thanks to the sparse MoE architecture.
- Shape as a Universal Prompt: By translating abstract dictionary atoms into visual shape maps, MoSE provides a mechanism to inject domain-specific medical knowledge into general-purpose foundation models like SAM.
- Dynamic Assembly: The gating network allows the model to dynamically "assemble" a shape prior for each input, providing the flexibility needed to handle the variability of unseen clinical data.
Conclusion and Future Directions
MoSE represents a significant step forward in making medical segmentation models more generalizable. By focusing on shape—a domain-invariant feature—and utilizing a sparse expert architecture, the framework achieves high accuracy and robustness on unseen data.
Future work may involve extending the framework to 3D volumes to capture more comprehensive spatial priors and exploring its application to more complex, irregular structures such as tumors or multi-organ segmentation tasks.
Summary updated