[Paper Review] Black-box Targeted Adversarial Attack on Segment Anything (SAM)
This paper proposes a black-box targeted adversarial attack (PATA++) on the Segment Anything Model (SAM) by attacking only the image encoder, bypassing prompt dependency. It introduces a novel regularization loss to enhance feature dominance, significantly improving cross-model transferability and achieving state-of-the-art performance in targeted mask generation under black-box settings.
Deep recognition models are widely vulnerable to adversarial examples, which change the model output by adding quasi-imperceptible perturbation to the image input. Recently, Segment Anything Model (SAM) has emerged to become a popular foundation model in computer vision due to its impressive generalization to unseen data and tasks. Realizing flexible attacks on SAM is beneficial for understanding the robustness of SAM in the adversarial context. To this end, this work aims to achieve a targeted adversarial attack (TAA) on SAM. Specifically, under a certain prompt, the goal is to make the predicted mask of an adversarial example resemble that of a given target image. The task of TAA on SAM has been realized in a recent arXiv work in the white-box setup by assuming access to prompt and model, which is thus less practical. To address the issue of prompt dependence, we propose a simple yet effective approach by only attacking the image encoder. Moreover, we propose a novel regularization loss to enhance the cross-model transferability by increasing the feature dominance of adversarial images over random natural images. Extensive experiments verify the effectiveness of our proposed simple techniques to conduct a successful black-box TAA on SAM.
Motivation & Objective
- To investigate the adversarial robustness of the Segment Anything Model (SAM) in a practical black-box setting with no access to prompts or model weights.
- To overcome the challenge of cross-prompt transferability in end-to-end attacks by eliminating dependency on specific prompt types.
- To improve cross-model transferability of adversarial examples by enhancing the relative feature strength of adversarial images over natural images.
- To develop a prompt-agnostic, effective, and transferable targeted attack method that maintains high mask similarity to target images.
Proposed method
- Propose a prompt-agnostic targeted attack (PATA) that attacks only the image encoder, avoiding reliance on prompt-specific optimization.
- Introduce a novel regularization loss to increase the feature dominance of adversarial images over random natural images, improving transferability.
- Replace reference natural images with random patches cropped from the original clean image to avoid dependency on external data.
- Use iterative FGSM-based optimization (e.g., TI-FGSM) combined with the regularization loss to generate adversarial perturbations.
- Apply the attack in a black-box setup using ViT-B as a surrogate model to generate adversarial examples for ViT-L and ViT-H variants.
- Optimize for high Intersection over Union (IoU) between predicted and target masks under both point and box prompts.
Experimental results
Research questions
- RQ1Can a targeted adversarial attack be successfully performed on SAM in a black-box setting without access to the model or prompt?
- RQ2Does attacking only the image encoder improve cross-prompt and cross-model transferability compared to end-to-end attacks?
- RQ3How does relative feature strength influence the transferability of adversarial examples across different SAM variants?
- RQ4Can a regularization loss that enhances feature dominance significantly improve the performance of black-box targeted attacks on SAM?
Key findings
- PATA++ achieves a mean IoU of 30.92% on ViT-L and 26.58% on ViT-H under black-box cross-model attacks, outperforming baseline PATA.
- The proposed regularization loss increases transferability by a non-trivial margin, with IoU rising from 26.36%/22.78% (PATA) to 30.92%/26.58% (PATA++).
- Combining PATA++ with TI-FGSM further improves performance, achieving 33.53% and 30.16% IoU on ViT-L and ViT-H, respectively.
- The regularization loss is more effective than MI-FGSM, which surprisingly reduces transferability, possibly due to lower feature dominance.
- Perturbation budget has a strong positive correlation with performance, with IoU increasing from 22.03%/20.07% at ε=4/255 to 41.73%/35.17% at ε=16/255.
- Qualitative results show that PATA++ successfully generates adversarial masks that closely resemble target masks under both point and box prompts.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.