AVERT: Outlier Erasure and Response Testing for Visual Prompt InjectionAVERT: Anomalous Value Erasure with Response Testing against Visual Prompt Injection
The authors propose AVERT, a defense against VLM visual prompt injection; on Qwen2-VL, the average ASR drops from 86.1% to 0.6%, with Ret. at 98.0%.
The attacker controls only the image and has white-box access (including parameters and gradients) to the undefended model, cannot modify the user question, system instructions, or model parameters, and aims to make the VLM output attacker-specified content. The defense reads and writes internal activations at inference time and does not know whether the image is attacked or what the attack target is.
- Visual prompt injection can force a VLM to output attacker-specified content by perturbing the image. The authors argue that existing defenses such as purification and token masking lose fine-grained visual utility on clean inputs, and that both blocking injection and preserving normal answering ability are needed.
- At inference time, AVERT estimates an anomalous value subspace from each input, then uses two tests—likelihood collapse of the answer and question independence—to decide whether to intervene; only for flagged answers does it remove that subspace and regenerate.
- The experiments cover four VLMs, four types of injection, and 13 utility benchmarks. In Table 1, AVERT's FDU is 98.0–99.1; under adaptive attack, Qwen2-VL's ASR is still 14.6%–25.8%, and Qwen3-VL-8B's average ASR on ImgHijack is 1.7%.
- The authors point out that AVERT requires access to model internals and per-model clean calibration data, that long answers are more easily mislabeled, and that it currently does not cover jailbreak. Adaptive attacks can let payloads survive repair; the answer recovery rate is 59.5%–70.4%, lower than DiffPure.
- Evaluated models
- Qwen2-VL-7BQwen2.5-VL-7BLLaVA-Llama-2-13BInternVL2.5-8BQwen3-VL-8B
- Benchmarks
- ImgHijackVision language model Manipulation Attack (VMA)self-interpreting imagestool-call injectionMM-VetMMBenchMMEDocVQAChartQATextVQAOCRBenchVisualWebBenchMathVistaMathVisionCountBenchMMStarCOCO
- Metrics
- ASRRet.FDURecoveryInference time
The researchers propose a visual prompt injection defense method, AVERT, which in white-box attacks against four vision-language models—Qwen2-VL, Qwen2.5-VL, LLaVA, and InternVL2.5—and four injection benchmarks reduces the average attack success rate from 86-90% to at most 0.6%, while retaining on average at least 96% of undefended utility across thirteen benchmarks. Visual prompt injection refers to using adversarially perturbed images to force the model to output attacker-specified content (such as malicious tool calls, links, or advertisements), sometimes unrelated to the user's question; existing defenses such as diffusion purification and image token masking noticeably sacrifice benign utility. AVERT compares attention head output statistics between the input and a clean image, extracts and projects out the direction with the largest deviation, and performs removal only for responses that depend on these directions, to avoid damaging benign visual information. The paper reports a defense-utility F score F_DU of 98.0-99.1, the highest among compared defenses on each model.
Related events and news
1 events · 0 news mentions
- This event's paper
AVERT防御视觉提示注入,白盒攻击成功率至多0.6%
Paper analysis
What problem does this paper attempt to solve?
The authors study how to block VLM visual prompt injection while preserving fine-grained visual utility on clean inputs.
Core question: Can intervention occur only when the answer actually depends on anomalous visual features, thereby simultaneously reducing the success rate of visual prompt injection and the utility loss on clean inputs?
- Application scenario: VLM agents process untrusted images from websites, documents, or messages. The authors state that perturbations can force the model to output advertisements, links, or tool calls, which filters that only inspect text struggle to detect.
- Shortcomings of existing methods: The authors argue that image purification may erase details, GTM's token masking may discard useful information, and harm gating such as ECSO misses advertisements or tool calls that are themselves harmless.
- Core observation: The authors report that injected content can be carried by an input-specific low-dimensional subspace in image-token attention values; the probability of the injected answer decreases after removing that subspace, or remains at probability under unrelated questions.
- Proposed method: AVERT separates "what to remove" from "when to remove": it estimates an Anomalous Value Subspace (AVS) per input, then uses an answer-level test gate to regenerate only flagged answers.
- Threat model:
- Attacker goal: Make the model output a target string, append a payload, leak context, or produce unrequested tool calls.
- Knowledge and capability: Controls only the image, and has white-box access to the undefended model, including parameters and gradients.
- Uncontrollable objects: Cannot modify the user question, system instructions, or model parameters; user requests and system instructions are trusted.
- Victim system and defense conditions: The victim system is a VLM that receives images and questions; the defense can read and write internal activations but does not know whether there is an attack or its target.
What related research exists?
Related work is divided into three categories: output-forcing visual injection, input and detection defenses, and activation intervention; this paper focuses on selective activation repair.
Visual prompt injection
- Bagdasaryan et al. (2023), Qi et al. (2024): The former mixes instructions into images and audio, while the latter uses a single adversarial image to jailbreak an aligned model; Carlini et al. (2023) and Zhao et al. (2023) discuss bounded perturbations and transfer to black box VLMs.
- ImgHijack, VMA, self-interpreting images, Fu et al. (2023): These respectively cover fixed strings and context leakage, five types of manipulation targets, appending spam or changing style, and generating tool calls within natural answers.
- Liu et al. (2024): Formalizes and benchmarks prompt injection in text LLM applications. The authors limit the scope of this paper to output-forcing injection, that is, the attacker fixes part of the answer, and the correct response is the true answer rather than a refusal.
Input transformation, prompting, and detection defenses
- Adversarial fine-tuning and input transformation: Mao et al. (2023) and Schlarmann et al. (2024) retrain the vision encoder; Guo et al. (2018) and DiffPure use input transformation or diffusion purification. The authors state that the former's protection applies only to the trained encoder.
- AdaShield, Feature Squeezing, JailGuard, PIP: These respectively use defensive prompts, reduced color depth, comparison before and after random mutation, and attention patterns on irrelevant probe questions for detection.
- GTM, ECSO: GTM uses gradients to locate and mask 5% image tokens; ECSO intervenes only when a harm check is triggered. The authors point out that most injected outputs are not harmful, so harm gating will miss detections.
Activation direction intervention
- Activation steering: Arditi et al. (2024), Lee et al. (2025), and Li et al. (2023) change model behavior by adding or removing activation directions.
- ASTRA, CARE, EigenShield: These respectively use directions obtained from adversarial images, generalized eigenvectors of malicious and benign covariances, and eigenvectors judged to be causal.
Baselines and positioning of this paper
- Baselines and benchmarks: The main table compares DiffPure, GTM, and ASTRA, and the appendix adds ECSO and CARE; the attack benchmarks are ImgHijack, VMA, self-interpreting images, and tool-call injection, and the utility evaluation includes 13 benchmarks.
- Authors' positioning: AVERT does not fit a unified attack direction offline, nor does it process every input; it estimates an anomalous subspace per input and uses an answer-dependence test to decide whether to repair.
How does the paper address this problem?
AVERT first answers normally, then estimates the AVS head by head, tests the gate with the two answers, and projects and repairs only the flagged answer.
AVERT (Anomalous Value Erasure with Response Testing) runs at inference time: it first obtains the original answer, then estimates each attention head's anomalous value subspace from the same forward pass, and finally uses answer-level evidence to decide whether to remove that subspace and regenerate.
Problem setting and anomalous directions
- Image influence path: In decoder-only VLMs, text tokens read the image through attention; the authors call the value change shared by every image token and propagatable to all text positions the common push.
- No clean original image needed: At test time there is no clean original of the attacked image, so the deviation is estimated using the mean and second-order statistics of unlabeled clean images rather than directly computing the attack perturbation.
- Whitened shift: wh=Bh−1(μh(x)−μ̄h), where Bh=C̄h+γ I; it represents the input mean shift whitened by clean statistics.
Anomalous Value Subspace
- Anomalous direction scoring: Anomalousness is measured by the ratio of the input's energy along a direction to the clean energy, taking the leading eigenvector of the corresponding generalized eigenvalue problem, without requiring attack samples.
- Subspace composition: Each head's AVS consists of the whitened shift orthogonalized against the k−1 leading generalized eigenvectors; each head's value dimension is 128.
- Repair method: Only during regeneration are the AVS projected out of each layer and head's image-token values; text-token values are unchanged.
Answer-Dependence Gate
- Likelihood collapse: Compare the token log-likelihoods of the original answer and the answer after removing the AVS, averaged over the three tokens with the largest drop, yielding sLC.
- Question independence: Replace the user question with J=3 fixed irrelevant questions, and average the log-likelihood change over the first n=4 tokens of the answer, yielding sQI.
- Trigger rule: sLC ≥ τLC or sQI ≥ τQI flags the answer; thresholds are fit only on clean answers, with the goal of flagging at most 5% of clean development-set answers.
- Development-set results: The authors report that the gate flags 99.5% of successful injections and 5.2% of clean answers; Figure 8 gives the development-set distributions and thresholds.
Algorithm and per-model parameters
- Inference procedure: Unflagged answers are returned as-is; only flagged answers are regenerated with AVS-removed activations, so the gate does not alter the answers of those that pass.
- Calibration data: Each model uses 273 calibration images to estimate clean statistics; γ is 10^-3 times the mean diagonal of the clean second-order statistics, and the generalized eigenvalue problem is solved in double precision.
- Repair size: For Qwen2-VL, Qwen2.5-VL, LLaVA, and InternVL2.5, k is 16, 32, 64, and 32 respectively; τLC is 3.59, 3.47, 1.25, and 2.93 respectively, and τQI is −1.98, −3.16, −1.32, and −1.65 respectively (Table 4).
- Development data isolation: The 1,941 clean entries are split into calibration 273, fit 1,086, and validation 582; development attacks use new base images, questions, and payloads, and duplicates and near-duplicates with test images are checked.
What experiments did the paper conduct?
The main experiments cover four VLMs, four injection types, and 13 utility benchmarks, and additionally test adaptive attacks, answer recovery, runtime, and new architectures.
Experimental setup
- Models evaluated: Qwen2-VL-7B, Qwen2.5-VL-7B, LLaVA-Llama-2-13B, InternVL2.5-8B; Qwen3-VL-8B is additionally tested in the appendix.
- Attack data: ImgHijack, VMA, self-interpreting images, tool-call injection; VMA includes five target categories: Manipulation, Privacy, Watermarking, Hijacking, and Denial-of-Service.
- Utility data: MM-Vet, MMBench, MME, plus DocVQA, ChartQA, TextVQA, OCRBench, VisualWebBench, MathVista, MathVision, CountBench, MMStar, and COCO, 13 in total.
- Baselines and metrics: DiffPure, GTM, ASTRA, with ECSO and CARE added in the appendix; ASR is attack success rate, Ret. is the mean ratio of defended to undefended scores across the 13 benchmarks, and FDU is the harmonic mean of 100−ASR and Ret.
- Success criteria: ImgHijack requires the answer to begin with the target string; VMA requires the word-level longest common subsequence to cover at least 80% of the target; self-interpreting requires the payload to appear in the answer to the attack image but not in the answer to the clean original image under the same defense; tool-call requires the attacker's parameters to match exactly.
- Judging and samples: The 218 open-ended questions in MM-Vet are scored by gpt-6-luna-2026-09-22; the other utility benchmarks use official rule-based scores. The main table does not report the number of repetitions.
Main results
According to Table 1; ASR Avg. is the mean of the averages over the four attacks, and Ret. and FDU are both reported as percentages.
Swipe horizontally to read the table
Model Method ASR Avg. (%) ↓ Ret. (%) ↑ FDU ↑ Qwen2-VL w/o defense 86.1 100.0 24.5 Qwen2-VL AVERT 0.6 98.0 98.7 Qwen2.5-VL w/o defense 88.1 100.0 21.3 Qwen2.5-VL AVERT 0.2 98.0 98.9 LLaVA w/o defense 90.1 100.0 18.1 LLaVA AVERT 0.1 96.2 98.0 InternVL2.5 w/o defense 87.8 100.0 21.7 InternVL2.5 AVERT 0.3 98.5 99.1 - Authors' interpretation: AVERT has the highest FDU on all four models; GTM's FDU is 89.0–97.6, DiffPure's is 80.6–94.3, and ASTRA's is 31.2–86.1.
- Baseline exceptions: DiffPure has ASR of 0.0% in all main-table settings, but Ret. of 67.5%–89.3%; ASTRA preserves utility on the two Qwen models but leaves average ASR of 81.4% and 81.6%, respectively.
- Per-attack results: AVERT does not reduce all to zero, e.g., on Qwen2-VL, VMA, SI, and Tool are 1.3%, 0.6%, and 0.4%, respectively, and on InternVL2.5, VMA is 1.1% (Table 1).
Adaptive attacks and parameter sensitivity
- Adaptive setup: The attacker fully knows AVERT and attacks Qwen2-VL with 16/255; question-agnostic creates 12 images, each using 40 surrogate questions and tested on 40 held-out questions, while question-specific creates one image for each of 48 questions.
- removal-aware: Under AVERT, ASR is 25.8% and 22.9% in the question-agnostic and question-specific settings, respectively, versus 84.4% and 75.0% without defense (Table 2).
- gate-aware: The corresponding ASR is 0.0% and 14.6%, versus 0.0% and 16.7% without defense; the authors argue that the signal measured by the hidden gate also weakens the injection.
- Sensitivity: On Qwen2-VL, VMA, k starting from 4 blocks 98.5–98.9% of attacks, but Ret. drops to 91.5% across the entire tested k range; with a gate budget of 0.25%, only 78.6% of attacks are blocked and FDU is 87.9, while with a budget of 30%, Ret. is 82.5% (Sec. 5.3, Figure 7).
Answer recovery, additional defenses, and new architectures
- Recovery-rate evaluation: GPT-5 mini sees only the question and one defended answer, not the image or the method; for ImgHijack, a reference answer from the undefended model on the clean image is also provided, and VMA is scored on whether the answer is on-topic and the attack is unsuccessful.
- Recovery results: AVERT's Recovery on the four models is 59.5%–70.4%, with a four-model mean of 64.1%; DiffPure's mean is 75.8% and GTM's mean is 63.2% (Table 13). The authors state that DiffPure's advantage mainly comes from recovering answers to “something is not present in the image.”
- Additional defenses: CARE has ASR of 0.0% in all settings, but Ret. of only 5.4%–55.6%; ECSO's four-attack average ASR is 72.6%–90.0%, and the authors state that its harm check retains most harmless payloads (Tables 7, 15).
- Qwen3-VL-8B: Under the twelve ImgHijack constraints, the average ASR of no defense, GTM, and AVERT is 95.2%, 10.8%, and 1.7%, respectively; AVERT is still 20.0% for specific string at ϵ=64 (Table 11).
Other ablations and analyses
- Single-direction removal: The common push eliminates 90% and 54% of VMA-style and ImgHijack-style attacks, respectively, the whitened shift eliminates 93% and 43%, and a random direction eliminates 8% and 2% in the corresponding figures (Figure 3).
- Direction-count comparison: The Figure 4 caption states that AVS's ASR is close to 0 at k=4, while random directions require k=32 to reach 36%; the development-set conditions are given in that figure.
- Inference time: On Qwen2-VL, a single RTX A5000, batch size 1, bf16, and 380 inputs, AVERT averages 4.25 seconds, 2.13× that of no defense; DiffPure is 6.84× (Table 12).
- Per-target exceptions: On Qwen2-VL, VMA Hijacking has ASR of 5.5% under AVERT, and on InternVL2.5, Hijacking and DoS are 1.8% and 3.6%, respectively (Table 9).
What are some points that can be further explored?
The authors list adaptive-attack robustness, false positives on clean answers, and expanding attack scope as future directions.
Limitations and future directions noted by the authors
- Internal access requirement: AVERT reads and modifies attention values, so it requires white-box access to model internals (Sec. 8 Limitations).
- Per-model calibration: Each model requires a set of clean images and questions for clean statistics and gating thresholds (Sec. 8).
- False positives and long answers: The threshold allows at most 5% of clean answers to be flagged and repaired; long answers are more likely to be flagged, and utility loss is concentrated in open-ended questions (Sec. 8).
- Adaptive attacks: An attacker who knows about AVERT can make the payload survive repair; the authors list improving the robustness of subspace estimation and gating against such attacks as a main future direction (Sec. 8).
- Attack type scope: Currently only perturbation-based injections are included, not jailbreaks; the authors propose extending to broader attack types in the future (Sec. 8).
- Residual utility loss: The Conclusion lists reducing false positives on clean answers as future work, calling it the main cause of residual utility loss.
Experimental coverage
- Model scope: The main tables cover four 7B–13B VLMs; the appendix reports ImgHijack only on Qwen3-VL-8B and compares with GTM (Table 11).
- Attack and defense scope: The attacks are four types of output-forcing injection; the main-table defenses are DiffPure, ASTRA, and GTM, with CARE and ECSO added in the appendix.
- Adaptive evaluation scope: Two strategies are evaluated only on Qwen2-VL at 16/255; question-agnostic uses 12 images and question-specific uses 48 questions (Sec. 5.4).
- Recovery rate and utility: Recovery uses GPT-5 mini single-answer scoring on successful attacks; utility includes 13 benchmarks, of which MM-Vet has 218 questions, and the paper does not report human agreement.
- Repetitions and overhead information: The main results do not report the number of repetitions or statistical significance tests; runtime is reported only on Qwen2-VL, a single RTX A5000, and 380 inputs (Table 12).
Summarize the main content of the paper
AVERT balances injection defense and utility through input-specific subspaces and answer gating, but adaptive attacks and answer recovery remain open problems.
AVERT is an inference-time defense against VLM visual prompt injection, with the goal of removing output-forcing injections while keeping clean-input answers as unchanged as possible, without knowing whether the image is attacked.
- Problem and approach: The attacker controls only the image and has white-box access to the undefended model. AVERT estimates an AVS from each input's image-token attention values, then uses likelihood collapse and question independence to judge whether the answer depends on anomalous directions or ignores the question.
- Selective repair: Answers that pass both tests are returned as-is; only flagged answers are regenerated after removing the AVS at every layer and head. Clean statistics and thresholds come from development data separate from the test data.
- Main results: In Table 1, the undefended average ASR across four VLMs is 86.1%–90.1%, and AVERT is 0.1%–0.6%; Ret. is 96.2%–98.5%, and FDU is 98.0–99.1.
- Robustness exceptions: On Qwen2-VL, removal-aware adaptive attacks achieve ASR of 25.8% and 22.9% under the two settings; on Qwen3-VL-8B, ImgHijack average ASR is 1.7%, with specific string, ϵ=64 at 20.0%.
- Utility and cost: AVERT's Recovery averages 64.1% across the four models, below DiffPure's 75.8%; on Qwen2-VL the average inference time is 2.13× that of no defense (Tables 12, 13).
- Authors' conclusion: The authors argue that answer-level tests can distinguish injections from genuine answers without knowing the payload content; future work needs to reduce false positives on clean answers, improve robustness to adaptive attacks, and extend to jailbreaks not currently covered.