SAIF: A Stability-Aware Inference Framework for Medical Image Segmentation with Segment Anything Model
Organizations: Xi’an Jiaotong-Liverpool University, Suzhou, China · University College London, London, United Kingdom · Anhui Jianzhu University, Hefei, China
Abstract
Segment Anything Model (SAM) enable scalable medical image segmentation but suffer from inference-time instability when deployed as a frozen backbone. In practice, bounding-box prompts often contain localization errors, and fixed threshold binarization introduces additional decision uncertainty. These factors jointly cause high prediction variance, especially near object boundaries, degrading reliability. We propose the Stability-Aware Inference Framework (SAIF), a training-free and plug-and-play inference framework that improves robustness by explicitly modeling prompt and threshold uncertainty. SAIF constructs a joint uncertainty space via structured box perturbations and threshold variations, evaluates each hypothesis using decision stability and boundary consistency, and introduces a stability-consistency score to filter unstable candidates and perform stability-weighted fusion in probability space. Experiments on Synapse, CVC-ClinicDB, Kvasir-SEG, and CVC-300 demonstrate that SAIF consistently improves segmentation accuracy and robustness, achieving state-of-the-art performance without retraining or architectural modification. Our anonymous code is released at https://anonymous.4open.science/r/SAIF.
Figures & tables
| Category | Methods | CVC-ClinicDB | Kvasir-SEG | CVC-300 | |||
|---|---|---|---|---|---|---|---|
| mDice | mIoU | mDice | mIoU | mDice | mIoU | ||
| Train based | U-Net [ 15 ] | 82.31 | 75.56 | 81.84 | 74.63 | 71.07 | 62.76 |
| U-Net++ [ 16 ] | 79.45 | 72.92 | 82.19 | 74.35 | 70.72 | 62.46 | |
| TransUNet [ 17 ] | 89.46 | 85.02 | 86.91 | 80.58 | - | - | |
| EU-Net [ 18 ] | 90.24 | 84.67 | 90.81 | 85.42 | 83.76 | 76.55 | |
| PraNet [ 19 ] | 90.20 | 85.82 | 90.15 | 84.83 | 87.32 | 80.48 | |
| Group | Method | Spleen | Kidney (R) | Kidney (L) | Gallbladder | Liver | Stomach | Aorta | Pancreas | mDice[%] | HD95[mm] |
| Non SAM | TransUNet [ 17 ] | 85.08 | 77.02 | 81.87 | 63.16 | 94.08 | 75.62 | 87.23 | 55.86 | 77.48 | 31.69 |
| SwinUNet [ 20 ] | 90.66 | 79.61 | 83.28 | 66.53 | 94.29 | 76.60 | 85.47 | 56.58 | 79.13 | 21.55 | |
| UNETR [ 23 ] | 87.81 | 84.80 | 85.66 | 60.56 | 94.46 | 73.99 | 89.99 | 59.25 | 79.56 | 18.59 | |
| nnU-Net [ 24 ] | 90.31 | 91.46 | 86.07 | 71.71 | 95.84 | 79.01 | 92.39 | 82.92 | 86.21 | 10.63 | |
| nnFormer [ 25 ] | 90.51 | 86.25 | 86.57 | 70.17 | 96.84 | 86.83 | 92.40 | 83.35 | 86.57 | 10.78 | |
| SAM based | SAM3D [ 26 ] | 84.29 | 85.64 | 86.31 | 49.81 | 95.42 | 76.11 | 89.57 | 69.32 | 79.56 | 23.10 |
Medical Image Segmentation
Medical image segmentation delineates organs, lesions, and other structures in scans to support measurement, diagnosis, treatment planning, and research.
See all 788 papers