TL;DR
3DSAM-adapter is a parameter-efficient framework that transforms the 2D Segment Anything Model (SAM) into a 3D powerhouse for medical imaging. By introducing lightweight spatial adapters and a novel visual prompt sampler, the model achieves state-of-the-art tumor segmentation on volumetric CT data using only a single point prompt.
What Problem Does This Paper Address?
The Segment Anything Model (SAM) revolutionized 2D image segmentation, but it hits a wall in the medical domain. Medical data, like CT and MRI scans, is inherently volumetric (3D). When applied to these tasks, the original SAM typically processes data slice-by-slice, completely ignoring the crucial spatial context between slices.
Furthermore, tumors are notoriously difficult to segment: they are often small, have irregular shapes, and exhibit low contrast against surrounding tissues. Existing attempts to adapt SAM to 3D often treat the third dimension as a "time" axis (like video) or use heavy fusion modules that discard the rich pre-trained knowledge of the original transformer. The authors sought a way to holistically adapt SAM to 3D while keeping the majority of its powerful pre-trained weights frozen.
Methods
The authors propose a "holistic adaptation" involving three main components:
- 3D Image Encoder: The original Vision Transformer (ViT) is modified to handle 3D patches. Instead of a massive 3D convolution, they use a combination of $1 \times 14 \times 14$ and $14 \times 1 \times 1$ convolutions to approximate a $14^3$ kernel efficiently. They also introduce a tunable lookup table for depth-wise positional encoding.
- Spatial Adapters: To help the frozen 2D transformer learn 3D patterns, they insert lightweight "Spatial Adapters" into each block. These consist of a down-projection, a depth-wise 3D convolution, and an up-projection. Spatial adapter structure
- Visual Sampler Prompting: Standard positional encoding for prompts can lead to "over-smoothing" in 3D token spaces. Instead, the authors propose a Visual Sampler. This module interpolates features directly from the image embedding at the prompt's coordinates, ensuring the prompt shares the same semantic space as the image. Global queries are then used to filter out noise from inaccurate prompts. Visual sampler and prompt encoder
- Lightweight Mask Decoder: The decoder is upgraded to 3D and uses multi-layer aggregation (similar to skip connections in a U-Net) to recover fine-grained texture details lost during downsampling. Mask decoder with multi-layer aggregation
Datasets
The model was evaluated on four challenging open-source abdominal CT tumor segmentation datasets:
- KiTS21: Kidney Tumor Segmentation.
- MSD-Pancreas: Pancreas Tumor Segmentation (Medical Segmentation Decathlon).
- LiTS17: Liver Tumor Segmentation.
- MSD-Colon: Colon Cancer Primaries Segmentation.
Key Insights and Ideas
- Isotropy Matters: Unlike video, where the temporal dimension is distinct, 3D medical volumes are often isotropic. The authors found that treating all three spatial dimensions equally within the transformer blocks is more effective than specialized "temporal" fusion.
- Parameter Efficiency: By freezing the backbone and only tuning the adapters and normalization layers, they achieved superior results with only 16.96% tunable parameters.
- Visual Sampling > Positional Encoding: Fetching actual image features at the prompt location makes the model significantly more robust to "noisy" or slightly misplaced clicks compared to the original SAM's coordinate-based encoding.
- Robustness to Prompt Location: Ablation studies showed the model performs consistently whether the user clicks the center, the margin, or the surrounding area of a tumor.
Key Results
The 3DSAM-adapter significantly outperformed the domain standard, nnU-Net, and other transformer-based models (like Swin-UNETR) on 3 out of 4 tasks using just a single click prompt:
- Kidney Tumor: +8.25% Dice score improvement.
- Pancreas Tumor: +29.87% Dice score improvement.
- Colon Cancer: +10.11% Dice score improvement.
Qualitatively, the model demonstrates a much better ability to distinguish ambiguous tumor boundaries where the original SAM and other baselines often fail. Qualitative comparison of segmentation results
Limitations and Future Work
- Liver Tumor Performance: The model was comparable but slightly behind nnU-Net on liver tumors. The authors attribute this to the liver tumor dataset containing multiple small, scattered tumors; a single click can only identify one, leading to false negatives for the others.
- Texture Loss: Because SAM's ViT backbone uses heavy initial downsampling, some fine-grained texture information is lost. Future work will focus on adapting the architecture to better recover these details for even higher precision.
- Multi-labeling: The current study focused purely on tumor segmentation rather than joint organ-tumor segmentation, which might provide additional anatomical context.
Summary updated