MedSAM-Agent: Empowering Interactive Medical Image Segmentation with Multi-turn Agentic Reinforcement Learning
Shengyuan Liu, Liuxin Bao, Qi Yang, Wanting Geng, Boyun Zheng, Chenxin Li, Wenting Chen, Houwen Peng, Yixuan Yuan
TL;DR
This work tackles the generalization gap in medical image segmentation by introducing MedSAM-Agent, an autonomous multi-turn agent that learns to interact with segmentation tools through expert-curated trajectories. It combines a hybrid prompting strategy (Box-to-Point and Sequential-Click) with a two-stage training pipeline (SFT followed by RLVR) and a granular, clinically grounded reward design to optimize both accuracy and interaction efficiency. The approach demonstrates state-of-the-art performance across 6 modalities and 21 datasets, and exhibits zero-shot generalization to different segmentation backends, indicating robust, tool-agnostic strategic understanding. Overall, MedSAM-Agent offers a scalable path toward autonomous, efficient, and clinically faithful interactive segmentation capable of integrating into diverse clinical workflows.
Abstract
Medical image segmentation is evolving from task-specific models toward generalizable frameworks. Recent research leverages Multi-modal Large Language Models (MLLMs) as autonomous agents, employing reinforcement learning with verifiable reward (RLVR) to orchestrate specialized tools like the Segment Anything Model (SAM). However, these approaches often rely on single-turn, rigid interaction strategies and lack process-level supervision during training, which hinders their ability to fully exploit the dynamic potential of interactive tools and leads to redundant actions. To bridge this gap, we propose MedSAM-Agent, a framework that reformulates interactive segmentation as a multi-step autonomous decision-making process. First, we introduce a hybrid prompting strategy for expert-curated trajectory generation, enabling the model to internalize human-like decision heuristics and adaptive refinement strategies. Furthermore, we develop a two-stage training pipeline that integrates multi-turn, end-to-end outcome verification with a clinical-fidelity process reward design to promote interaction parsimony and decision efficiency. Extensive experiments across 6 medical modalities and 21 datasets demonstrate that MedSAM-Agent achieves state-of-the-art performance, effectively unifying autonomous medical reasoning with robust, iterative optimization. Code is available \href{https://github.com/CUHK-AIM-Group/MedSAM-Agent}{here}.
