Unleashing the Potential of SAM for Medical Adaptation via Hierarchical Decoding
Zhiheng Cheng, Qingyue Wei, Hongru Zhu, Yan Wang, Liangqiong Qu, Wei Shao, Yuyin Zhou
Abstract
The Segment Anything Model (SAM) has garnered significant attention for its versatile segmentation abilities and intuitive prompt-based interface. However, its application in medical imaging presents challenges, requiring either substantial training costs and extensive medical datasets for full model fine-tuning or high-quality prompts for optimal performance. This paper introduces H-SAM: a prompt-free adaptation of SAM tailored for efficient fine-tuning of medical images via a two-stage hierarchical decoding procedure. In the initial stage, H-SAM employs SAM's original decoder to generate a prior probabilistic mask, guiding a more intricate decoding process in the second stage. Specifically, we propose two key designs: 1) A class-balanced, mask-guided self-attention mechanism addressing the unbalanced label distribution, enhancing image embedding; 2) A learnable mask cross-attention mechanism spatially modulating the interplay among different image regions based on the prior mask. Moreover, the inclusion of a hierarchical pixel decoder in H-SAM enhances its proficiency in capturing fine-grained and localized details. This approach enables SAM to effectively integrate learned medical priors, facilitating enhanced adaptation for medical image segmentation with limited samples. Our H-SAM demonstrates a 4.78% improvement in average Dice compared to existing prompt-free SAM variants for multi-organ segmentation using only 10% of 2D slices. Notably, without using any unlabeled data, H-SAM even outperforms state-of-the-art semisupervised models relying on extensive unlabeled training data across various medical datasets. Our code is available at https://github.com/Cccccczh404/H-SAM .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2fdcf2b5-325d-4255-8e25-8f61aa5e95eeCited by top-tier papers16
- Enhancing Low-Rank Adaptation with Recoverability-Based Reinforcement Pruning for Object CountingHaojie Guo, Junyu Gao, Yuan YuanAAAI 2025 · 4 citations
- Deep Instruction Tuning for Segment Anything ModelXiaorui Huang, Gen Luo, Chaoyang Zhu, Bo Tong et al.ACM MM 2024 · 3 citations
- Segment Anything Model Meets Semi-supervised Medical Image Segmentation: A Novel PerspectiveHaifeng Zhao, Haiyang Li, Lei-Lei Ma, Dengdi SunNeurIPS 2025 · 1 citation
- SAMora: Enhancing SAM through Hierarchical Self-Supervised Pre-Training for Medical ImagesShuhang Chen, Hangjie Yuan, Pengwei Liu, Hanxue Gu et al.ICCV 2025 · 1 citation
- RS2-SAM2: Customized SAM2 for Referring Remote Sensing Image SegmentationFu Rong, Meng Lan, Qian Zhang, Lefei ZhangAAAI 2026 · 1 citation
Builds on13
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- Segment AnythingAlexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao et al.ICCV 2023 · 13,211 citations
- Semi-supervised Medical Image Segmentation through Dual-task ConsistencyXiangde Luo, Jieneng Chen, Tao Song, Guotai WangAAAI 2021 · 754 citations
Related papers
- MaskSAM: Auto-Prompt SAM with Mask Classification for Volumetric Medical Image SegmentationBin Xie, Hao Tang, Bin Duan, Dawen Cai et al.ICCV 2025 · 7 citations
- OFL-SAM2: Prompt SAM2 with Online Few-shot Learner for Efficient Medical Image SegmentationMeng Lan, Lefei Zhang, Xiaomeng LiAAAI 2026
- Towards a Comprehensive, Efficient and Promptable Anatomic Structure Segmentation Model Using 3D Whole-Body CT ScansHeng Guo, Jianfeng Zhang, Jiaxing Huang, Tony C. W. Mok et al.AAAI 2025 · 12 citations
- SegMoTE: Token-Level Mixture of Experts for Medical Image SegmentationYujie Lu, Jingwen Li, Sibo Ju, Yanzhou Su et al.CVPR 2026 · 2 citations
- BLO-SAM: Bi-level Optimization Based Finetuning of the Segment Anything Model for Overfitting-Preventing Semantic SegmentationLi Zhang, Youwei Liang, Ruiyi Zhang, Amirhosein Javadi et al.ICML 2024 · 14 citations
