Abstract
Medical image segmentation often involves significant ambiguity, where multiple experts may disagree on precise boundaries due to unclear tissue margins or pathological variations. While the Segment Anything Model (SAM) has revolutionized computer vision with its zero-shot capabilities, its standard adaptation for medical imaging typically follows a deterministic "single-expert" paradigm. This paper introduces UA-SAM, a framework that enables SAM to represent inherent uncertainty by modeling the "collective intelligence" of multiple experts. By integrating a stochastic sampler into SAM’s adapters, UA-SAM generates a distribution of plausible segmentation masks. Our results across seven benchmarks demonstrate that UA-SAM not only improves segmentation accuracy but also effectively captures clinical disagreement, outperforming existing state-of-the-art models.
Introduction
The Segment Anything Model (SAM) has demonstrated remarkable "zero-shot" segmentation performance across diverse domains. However, in the high-stakes field of medical imaging, SAM faces a fundamental challenge: overconfidence in the face of ambiguity. Standard medical images often lack a single "ground truth"; instead, they represent a chorus of expert opinions. For instance, when multiple radiologists delineate a blurry lung nodule, their interpretations may vary slightly yet remain equally valid.
Most current methods for adapting SAM to the medical domain rely on a single-expert paradigm, training on a single consensus annotation to produce a deterministic mask. This approach systematically ignores the variability in expert interpretations, leading to models that cannot communicate uncertainty to clinicians. To address this, we propose UA-SAM, an adaptation framework that shifts from a single-expert mindset toward a "collective intelligence" approach.
Methodology
UA-SAM introduces an Uncertainty-aware Adapter designed to plug into SAM’s frozen backbone without requiring a full fine-tuning of the large model. The architecture is built on three primary innovations:
- Stochastic Sampling via CVAE: Instead of a fixed bottleneck, the adapters incorporate a Conditional Variational Autoencoder (CVAE). During training, the model learns a latent distribution of expert annotations. At inference, sampling from this distribution allows the generation of multiple, diverse, and plausible segmentation hypotheses.
- Position-conditioned Attention (Poscon-Att): Recognizing that different layers in the network capture features at varying levels of abstraction, this module aligns uncertainty samples with the specific hierarchical position of the adapter. This ensures that the injected "noise" is contextually appropriate for the layer's feature map.
- Prompt Channel Attention (Prompt-CAtt): To maintain SAM's interactive nature, this module ensures uncertainty features are sensitive to user prompts (points or boxes). As user guidance becomes more precise, the model’s predicted uncertainty naturally decreases.
Experimental Setup and Datasets
The model was evaluated on seven benchmarks across three major multi-annotated datasets:
- LIDC-IDRI: Lung nodule CT scans with annotations from four radiologists.
- REFUGE2-cup: Optic cup fundus images with annotations from seven radiologists.
- QUBIQ (Quantification of Uncertainties in Biomedical Imaging): A specialized benchmark covering brain growth, brain tumors, prostate, and kidney tasks with varying numbers of raters.
Results and Discussion
UA-SAM consistently outperformed both deterministic state-of-the-art (SOTA) models and existing uncertainty-aware architectures.
Performance Metrics
On the LIDC-IDRI dataset, UA-SAM achieved a Dice score of 0.889, surpassing the standard SAM-adapter (0.876). More importantly, the model achieved the lowest Generalized Energy Distance (GED)—0.209 for LIDC and 0.230 for REFUGE2. A lower GED indicates that the model's distribution of predicted masks closely aligns with the distribution of masks provided by human experts.
Key Insights
- The Consensus Plateau: Research indicated that training on a "majority vote" consensus becomes increasingly difficult as more experts are added, as the boundary complexity grows. UA-SAM avoids this by modeling the distribution of opinions directly.
- Controllable Uncertainty: The model demonstrates intuitive behavior where increasing the number of prompt points (e.g., from 1 to 3) significantly reduces the predicted uncertainty area, reflecting higher confidence with more human input.
- Efficiency: Despite its probabilistic capabilities, UA-SAM is parameter-efficient, updating only approximately 8M parameters compared to the 97M+ required by other medical SAM variants.
Conclusion and Future Work
UA-SAM represents a significant step toward making AI models more reliable in clinical settings by acknowledging and visualizing ambiguity. While the framework is efficient and accurate, future work will focus on reducing the slight computational overhead associated with multiple sampling and extending the framework to 3D volumetric data. Additionally, further integration of prompt awareness into the original SAM decoder could enhance the model's ability to resolve edge-case ambiguities.
Summary updated