Understanding and Mitigating Token-Pruning-Induced Vulnerabilities in VLMs

Shuailong Wang, Xinyu Lyu, Shengming Yuan, Jingkuan Song, Heng Tao Shen, Lianli GaoICML 2026

Executive Summary

While "token pruning" significantly accelerates Vision-Language Models (VLMs) by discarding redundant visual data, it inadvertently makes them highly susceptible to "jailbreak" attacks. This paper identifies the root cause of this vulnerability—a phenomenon termed Pruning-Induced Malicious Amplification—and introduces Safety-Aware Pruning (SAP). SAP is a plug-and-play defense mechanism that restores model safety by redistributing attention, all without sacrificing the speed gains achieved through pruning.

The Hidden Cost of Token Pruning

Vision-Language Models (VLMs) like LLaVA are powerful but computationally expensive. To accelerate inference, researchers frequently employ token pruning, a technique that identifies and removes "unimportant" visual tokens (such as background pixels) before they are processed by computationally heavy transformer layers.

However, this acceleration comes with a hidden cost: pruning makes models significantly more vulnerable to multimodal jailbreak attacks, where malicious instructions are concealed within images or text. Across most pruning strategies, the Attack Success Rate (ASR) spikes dramatically as the pruning ratio increases. The authors set out to investigate exactly why this degradation occurs and whether it is possible to achieve both efficiency and safety.

The Mechanism: Pruning-Induced Malicious Amplification

To diagnose the vulnerability, the authors uncovered an unrecognized mechanism at play. In a standard VLM, background tokens act as a "semantic buffer," naturally diluting the model's attention.

When pruning removes these seemingly "boring" tokens, the model's attention is forced to collapse entirely onto the remaining foreground tokens. If those retained tokens contain malicious content—such as a typographic jailbreak—their influence is inadvertently amplified. This concentrated attention allows the malicious anchors to hijack the model's response, bypassing its safety alignment.

The Solution: Safety-Aware Pruning (SAP)

To counteract this vulnerability, the researchers propose Safety-Aware Pruning (SAP), an inference-time mechanism designed to neutralize malicious amplification. Crucially, SAP is a "plug-and-play" solution: it requires no retraining and adds negligible latency. It operates in three distinct stages:

  1. Malicious Anchor Identification (MAI): The model utilizes a pre-computed "safety-aligned semantic vector" ($v_{safe}$) alongside current attention maps to pinpoint tokens that are both highly attended and semantically risky.
  2. Benign Token Restoration (BTR): SAP selectively recovers a small number of previously pruned background tokens to recreate the lost semantic buffer.
  3. Attention Reallocation (AR): The mechanism manually "dims" the attention weight on malicious anchors and redirects that attention mass to the newly restored benign tokens.

Experimental Setup

The researchers evaluated SAP across a comprehensive suite of benchmarks to ensure both safety and utility were preserved:

  • Safety Benchmarks: MM-SafetyBench, FigStep (typographic attacks), and JailBreakV-28K.
  • Utility Benchmarks: MMBench, MM-Vet, LLaVA-Bench, and ScienceQA (SQA) to verify standard task performance.
  • Models & Methods: Testing was primarily conducted on LLaVA-1.5-7B across eight different pruning paradigms, including Vision-centric, Text-guided, and Query-based approaches.

Key Findings and Results

  • Massive Safety Gains: SAP successfully mitigated pruning-induced vulnerabilities, reducing the Attack Success Rate (ASR) by up to 62% on certain pruning methods. For example, when extended to text, it reduced FasterVLM's ASR from 72.02% down to 10.32%.
  • Efficiency Maintained: SAP preserves the 75%+ pruning ratios necessary for fast inference. In head-to-head comparisons, SAP achieved comparable safety to external guardrails (like LLaVAGuard) but operated with 3x lower latency (57ms vs. 160ms).
  • Minimal Utility Trade-off: On the TRIM pruning method, SAP substantially improved safety while shifting utility scores by only a fraction of a percent (e.g., from 63.84% to 63.45%).
  • The "Safety Buffer" Hypothesis: The study proves that background tokens are not merely "noise." They serve a vital structural purpose in the attention mechanism by preventing the model from over-focusing on potentially harmful triggers.
  • Query-based Compression is an Exception: Unlike standard pruning that discards tokens, query-based methods (like LLaVA-Mini) fuse tokens into learnable queries. Interestingly, this approach improves safety under extreme compression because it naturally maintains a balanced attention distribution.
  • Safety Degrades Before Capacity: The authors demonstrated that safety degradation occurs long before the model loses its actual utility. This confirms that the vulnerability is a direct side effect of the pruning process itself, rather than a consequence of operating a "smaller" model.

Limitations and Future Directions

While SAP offers a robust defense, the authors note a few limitations:

  • White-Box Requirement: SAP currently requires access to the model's internal attention weights and hidden states. This makes it a "white-box" defense, which may be difficult to apply to closed-source API-based models (like GPT-4o) unless implemented directly by the provider.
  • Adaptive Attacks: Although SAP is difficult to bypass due to the combinatorial explosion of possible pruning configurations, a determined attacker aware of the SAP mechanism might eventually engineer new ways to circumvent it.
  • Extreme Pruning: At extreme pruning ratios (>95%), the Benign Token Restoration (BTR) assumption breaks down because there are not enough foreground tokens left to maintain task performance. However, such extreme ratios are rarely used in practice due to catastrophic utility collapse.

Summary updated

BibTeX
@inproceedings{wang2026understanding,
  author = {Shuailong Wang and Xinyu Lyu and Shengming Yuan and Jingkuan Song and Heng Tao Shen and Lianli Gao},
  title = {{Understanding and Mitigating Token-Pruning-Induced Vulnerabilities in VLMs}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=D3OHVbePvz},
}
Figure