Localization then Neutralization: Gradient-guided Token Suppression against Visual Prompt Injection Attack

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Zhang, Dongpeng, Ma, Ke, Jiang, Yangbangyan, Pei, Gaozheng, Huang, Longtao, Xu, Qianqian, Huang, Qingming
Format: Preprint
Publié: 2026
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866914598021496832
author Zhang, Dongpeng
Ma, Ke
Jiang, Yangbangyan
Pei, Gaozheng
Huang, Longtao
Xu, Qianqian
Huang, Qingming
author_facet Zhang, Dongpeng
Ma, Ke
Jiang, Yangbangyan
Pei, Gaozheng
Huang, Longtao
Xu, Qianqian
Huang, Qingming
contents Adversarial images pose a severe security threat to multimodal large language models through prompt injection. Existing defenses largely lack a principled understanding of the underlying mechanisms and struggle to balance efficiency and defense utility. In this work, we show that successful adversarial attacks do not rely on the entire image uniformly but instead depend on a small subset of critical image tokens. Based on this insight, we propose Gradient Token Masking (GTM), which localizes these tokens via gradient analysis and neutralizes them through masking. We find that attribution based on the first generated token's output probability fails when attacks preserve the predicted token. To overcome this, GTM utilizes the Hidden-State Gradient Norm score for generation-influence attribution under adversarial inputs. We prove that its ranking is consistent with that of the full adversarial loss gradient, providing a theoretical guarantee for accurate localization. Our method requires only a single forward-backward pass to identify and zero out a small number of high-scoring tokens, effectively disrupting the adversarial attack path. Extensive experiments on prompt injection and multimodal jailbreak attacks demonstrate that our approach reduces attack success rates (ASR) to near zero while preserving model utility with negligible computational overhead.
format Preprint
id arxiv_https___arxiv_org_abs_2605_25194
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Localization then Neutralization: Gradient-guided Token Suppression against Visual Prompt Injection Attack
Zhang, Dongpeng
Ma, Ke
Jiang, Yangbangyan
Pei, Gaozheng
Huang, Longtao
Xu, Qianqian
Huang, Qingming
Machine Learning
Adversarial images pose a severe security threat to multimodal large language models through prompt injection. Existing defenses largely lack a principled understanding of the underlying mechanisms and struggle to balance efficiency and defense utility. In this work, we show that successful adversarial attacks do not rely on the entire image uniformly but instead depend on a small subset of critical image tokens. Based on this insight, we propose Gradient Token Masking (GTM), which localizes these tokens via gradient analysis and neutralizes them through masking. We find that attribution based on the first generated token's output probability fails when attacks preserve the predicted token. To overcome this, GTM utilizes the Hidden-State Gradient Norm score for generation-influence attribution under adversarial inputs. We prove that its ranking is consistent with that of the full adversarial loss gradient, providing a theoretical guarantee for accurate localization. Our method requires only a single forward-backward pass to identify and zero out a small number of high-scoring tokens, effectively disrupting the adversarial attack path. Extensive experiments on prompt injection and multimodal jailbreak attacks demonstrate that our approach reduces attack success rates (ASR) to near zero while preserving model utility with negligible computational overhead.
title Localization then Neutralization: Gradient-guided Token Suppression against Visual Prompt Injection Attack
topic Machine Learning
url https://arxiv.org/abs/2605.25194