用对抗学习自动优化点提示,提升SAM的分割鲁棒性
Attack for Defense: Adversarial Agents for Point Prompt Optimization Empowering Segment Anything Model
- 构建双空间图环境,用攻击-防御机制自动优化点提示
- 在多个数据集上使SAM分割准确率显著提升,最高增益达6.2%
- 无需重训练,可直接部署于各类提示任务,通用性强
点提示质量对分割任意模型(SAM)性能至关重要,但现有方法多依赖启发式或人工设计提示,限制了可扩展性和泛化能力。本文提出点提示防御者(Point Prompt Defender),一种基于攻击-防御范式的对抗强化学习框架,用于自动优化点提示。通过将图像块表示为双空间图中的节点,边编码物理与语义距离,构建任务无关的提示环境。攻击代理学习激活一组最大降低SAM分割性能的提示,而防御代理则学习抑制这些干扰提示并恢复精度。两者均使用深度Q网络训练,奖励信号基于分割质量变化。推理时仅部署防御代理,可对任意粗略提示集进行优化,从而在不重新训练的情况下提升SAM在多样化任务中的表现。大量实验表明,该方法有效增强了SAM的鲁棒性与泛化能力,建立了一个灵活、可解释且即插即用的提示优化框架。
原文摘要 · Abstract (English)
Prompt quality plays a critical role in the performance of the Segment Anything Model (SAM), yet existing approaches often rely on heuristic or manually crafted prompts, limiting scalability and generalization. In this paper, we propose Point Prompt Defender, an adversarial reinforcement learning framework that adopts an attack-for-defense paradigm to automatically optimize point prompts. We construct a task-agnostic point prompt environment by representing image patches as nodes in a dual-space graph, where edges encode both physical and semantic distances. Within this environment, an attacker agent learns to activate a subset of prompts that maximally degrade SAM's segmentation performance, while a defender agent learns to suppress these disruptive prompts and restore accuracy. Both agents are trained using Deep Q-Networks with a reward signal based on segmentation quality variation. During inference, only the defender is deployed to refine arbitrary coarse prompt sets, enabling enhanced SAM segmentation performance across diverse tasks without retraining. Extensive experiments show that Point Prompt Defender effectively improves SAM's robustness and generalization, establishing a flexible, interpretable, and plug-and-play framework for prompt-based segmentation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。