Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

Advertisement

Scientific Reports
  • View all journals
  • Search
  • My Account Login
  • Content Explore content
  • About the journal
  • Publish with us
  • Sign up for alerts
  • RSS feed
  1. nature
  2. scientific reports
  3. articles
  4. article
Dual-stage 3D medical image segmentation integrating learnable prompt generation and memory attention
Download PDF
Download PDF
  • Article
  • Open access
  • Published: 04 May 2026

Dual-stage 3D medical image segmentation integrating learnable prompt generation and memory attention

  • Fang Liu1,2,
  • Jiang Yang3,4,
  • YanDuo Zhang1,
  • Hui Xing3,4,
  • Junjie Yang1,
  • Tao Lu1,
  • Feng Wu3,4 &
  • …
  • Lei Deng3,4 

Scientific Reports , Article number:  (2026) Cite this article

  • 65 Accesses

  • Metrics details

We are providing an unedited version of this manuscript to give early access to its findings. Before final publication, the manuscript will undergo further editing. Please note there may be errors present which affect the content, and all legal disclaimers apply.

Subjects

  • Computational biology and bioinformatics
  • Mathematics and computing

Abstract

Although MedSAM2 achieves 3D medical image segmentation through a memory attention mechanism, its performance declines significantly when manually designed prompts are replaced by automatically generated ones—particularly in the context of rare cases or multi-object segmentation scenarios. Current automatic prompt generation methods often extract prompt cues directly from image features, which typically lack rich spatiotemporal context and semantic information, resulting in suboptimal performance. To overcome these limitations, we propose DSSAM2-LAPG, a dual-stage 3D medical image segmentation network that integrates a Learnable Automatic Prompt-space Generator (LAPG) with memory attention. The LAPG acts as a trainable mapper that transforms raw 3D image features into a semantically-rich and spatially-aligned prompt embedding space. In the preliminary stage, this mapper utilizes learnable object tokens (concept embeddings) to dynamically interact with image features, generating coarse but reliable spatial priors \(M_{\text {coarse}}\) and initial semantic prompts. In the refinement stage, a memory attention mechanism integrates these priors with historical context from a support memory to precisely delineate boundaries and ensure 3D consistency. This integrated approach specifically addresses the failure of existing methods in capturing 3D context, encoding rare-object semantics, and providing instance-aware guidance. Experimental results demonstrate that DSSAM2-LAPG achieves Dice score improvements of 7.2%, 6.0% and 4.1% on the private XYCH-cervical dataset, public dataset CCTH-Cervical and Multi-Organ BTCV datasets, respectively, compared to the strong baseline MedSAM2, and all without requiring any manual prompts. Our code is available https://github.com/liufangcoca-515/APG/tree/main.

Similar content being viewed by others

Embedded framework for clinical medical image segment anything in resource limited healthcare regions

Article Open access 24 September 2025

UNet with self-adaptive Mamba-like attention and causal-resonance learning for medical image segmentation

Article Open access 03 December 2025

A compact and interpretable multi-source framework for heterogeneous medical image classification

Article Open access 02 May 2026

Acknowledgements

This work was supported in part by the National Natural Science Foundation of China under Grants 82472634, 82505297; the Key Research and Development Program of Hubei Province (2023BCB128), the Key Research and Development Program of Hubei Province (2024BCB055), and in part supported by the Scientific Research Team Plan of Wuhan Technology and Business University.

Funding

YanDuo Zhang received funding from the National Natural Science Foundation of China under Grant ID 62072350; Hui Xing received funding from the National Natural Science Foundation of China under Grant ID 82472634; and the Key Research and Development Program of Hubei Province, Grant ID 2024BCB055.

Author information

Authors and Affiliations

  1. Hubei Key Laboratory of Intelligent Robot, Wuhan Institute of Technology, Wuhan, 430205, China

    Fang Liu, YanDuo Zhang, Junjie Yang & Tao Lu

  2. Wuhan Technology and Business University, Wuhan, 430065, China

    Fang Liu

  3. Institute of Gynecological and Obstetric Disease, Xiangyang Central Hospital, Affiliated Hospital of Hubei University of Arts and Science, Xiangyang, 441053, China

    Jiang Yang, Hui Xing, Feng Wu & Lei Deng

  4. Hubei Provincial Clinical Research Center for Cervical Lesions, Xiangyang, 441053, China

    Jiang Yang, Hui Xing, Feng Wu & Lei Deng

Authors
  1. Fang Liu
    View author publications

    Search author on:PubMed Google Scholar

  2. Jiang Yang
    View author publications

    Search author on:PubMed Google Scholar

  3. YanDuo Zhang
    View author publications

    Search author on:PubMed Google Scholar

  4. Hui Xing
    View author publications

    Search author on:PubMed Google Scholar

  5. Junjie Yang
    View author publications

    Search author on:PubMed Google Scholar

  6. Tao Lu
    View author publications

    Search author on:PubMed Google Scholar

  7. Feng Wu
    View author publications

    Search author on:PubMed Google Scholar

  8. Lei Deng
    View author publications

    Search author on:PubMed Google Scholar

Corresponding author

Correspondence to YanDuo Zhang.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Liu, F., Yang, J., Zhang, Y. et al. Dual-stage 3D medical image segmentation integrating learnable prompt generation and memory attention. Sci Rep (2026). https://doi.org/10.1038/s41598-026-51220-8

Download citation

  • Received: 27 November 2025

  • Accepted: 27 April 2026

  • Published: 04 May 2026

  • DOI: https://doi.org/10.1038/s41598-026-51220-8

Share this article

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Keywords

  • 3D medical images segmentation
  • Learnable prompt generation
  • MedSAM2
  • Prompt segmentation
  • Mask prediction
Download PDF

Advertisement

Explore content

  • Research articles
  • News & Comment
  • Collections
  • Subjects
  • Follow us on Facebook
  • Follow us on X
  • Sign up for alerts
  • RSS feed

About the journal

  • About Scientific Reports
  • Contact
  • Journal policies
  • Guide to referees
  • Calls for Papers
  • Editor's Choice
  • Journal highlights
  • Open Access Fees and Funding

Publish with us

  • For authors
  • Language editing services
  • Open access funding
  • Submit manuscript

Search

Advanced search

Quick links

  • Explore articles by subject
  • Find a job
  • Guide to authors
  • Editorial policies

Scientific Reports (Sci Rep)

ISSN 2045-2322 (online)

nature.com footer links

About Nature Portfolio

  • About us
  • Press releases
  • Press office
  • Contact us

Discover content

  • Journals A-Z
  • Articles by subject
  • protocols.io
  • Nature Index

Publishing policies

  • Nature portfolio policies
  • Open access

Author & Researcher services

  • Reprints & permissions
  • Research data
  • Language editing
  • Scientific editing
  • Nature Masterclasses
  • Research Solutions

Libraries & institutions

  • Librarian service & tools
  • Librarian portal
  • Open research
  • Recommend to library

Advertising & partnerships

  • Advertising
  • Partnerships & Services
  • Media kits
  • Branded content

Professional development

  • Nature Awards
  • Nature Careers
  • Nature Conferences

Regional websites

  • Nature Africa
  • Nature China
  • Nature India
  • Nature Japan
  • Nature Middle East
  • Privacy Policy
  • Use of cookies
  • Legal notice
  • Accessibility statement
  • Terms & Conditions
  • Your US state privacy rights
Springer Nature

© 2026 Springer Nature Limited

Nature Briefing AI and Robotics

Sign up for the Nature Briefing: AI and Robotics newsletter — what matters in AI and robotics research, free to your inbox weekly.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing: AI and Robotics