arXiv:2611.01252cs.CVOct 2026

Manuscript Offprint

arXiv:2611.01252

Context-Shielded Backdoor Attack against Large Vision-Language Models

Zhifang Zhang, Qiang Huang, Chenpeng Wang, Weitong Chen, Olaf Maennel, Wei Emma Zhang, Lei Feng, Lei Zhang, Miao Xu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large vision-language models (LVLMs) routinely use inference-time visual-token compression to prune hundreds of patch tokens down to a compact budget. Existing LVLM backdoors fire whenever a triggered image appears, whereas prior deployment-triggered attacks activate only when model weights are quantized or pruned. However, conventional LVLM backdoors exhibit nearly 100% attack success rate (ASR) under full-token inference, immediately exposing compromised checkpoints during pre-deployment auditing. We reveal context stripping: surrounding clean visual tokens suppress an embedded trigger at full length, whereas token pruning strips this context away and activates the backdoor. Motivated by this finding, we propose STRIPWAKE, a projector-only backdoor that remains dormant under full-token auditing yet activates across unseen compressors. Specifically, STRIPWAKE pairs clean-supervised full-token views with target-supervised randomized compressed views, and aligns early visual attention with a frozen benign teacher to preserve clean utility. On LLaVA-1.5-7B across nine unseen compressors, STRIPWAKE stays dormant at 0.4% full-token ASR yet achieves 94.0%–99.7% compressed ASR across five primary compressors without CIDEr loss.

1. Introduction

Large vision-language models (LVLMs) such as LLaVA-1.5 [13] encode a single image into hundreds of visual patch tokens (N=576N=576 for CLIP ViT-L/14 at 336×336336\times336 resolution), making visual tokens the primary memory and latency bottleneck during autoregressive decoding. Consequently, a model checkpoint that is released, benchmarked, and safety-audited with all 576 visual tokens is routinely deployed in production behind an inference-time visual-token compressor—such as [CLS] -attention pruning, VisionZip [27], DivPrune [1], FastV [4], SparseVLM [30], PruMerge [21], VisPruner [29], or FlowCut [23]—that drops 75%–90% of the visual to-

kens before or inside the language model without retraining. This standard division between full-token auditing and compressed deployment creates a fundamental mismatch: the token sequence inspected by an auditor before release is not the token sequence processed by the language model in deployment.

Existing backdoor attacks on LVLMs [5, 16, 17, 19, 26, 28] inject patch, stealth, or multimodal triggers that train the victim model to emit a target response whenever the trigger is present. However, because these conventional backdoors fire at nearly 100% attack success rate (ASR) under standard full-token inference, they are directly exposed to pre-deployment behavioral spot-checks and output-perturbation detectors such as STRIP [9] before any token compressor is attached. Meanwhile, prior deployment-activated backdoors in vision and language models [6, 18, 22] remain dormant in the full-precision model and activate only when the model weights themselves are quantized or pruned. Unlike weight compression, inference-time visual-token compression leaves the deployed model weights bit-for-bit identical to the audited checkpoint and modifies only the length and composition of the visual token sequence at test time, a threat surface that existing weight-triggered attacks cannot exploit.

In this paper, we investigate how inference-time token pruning alters backdoor activation in LVLMs and reveal that a visual trigger can be suppressed by its surrounding clean patches at full token length yet activated when pruning removes those patches—a phenomenon we term context stripping (Fig. 1). Through two controlled causal interventions on LLaVA-1.5-7B (Sec. 5.2), we establish that activation is governed by two coupled conditions: trigger survival and context removal. First, intervening on the compressor's kept set at budget k=64k=64 (Table 1) shows that forcing all 29 trigger tokens into the kept set raises ASR from 93.3% to 100.0% under [CLS] pruning and from 89.3% to 100.0% under random pruning, whereas forcing all trigger tokens out cuts ASR to 35.7% and 30.9%, respectively. Second, holding all 29 trigger tokens fixed and progressively adding cc clean tokens back into the sequence (Table 2) keeps ASR above 97.3% up to c=256c=256 added tokens before collapsing

†^{\dagger}Equal contribution.

Figure

(a) ASR under pruning

Figure

(b) What compression keeps

Figure 1. Inference-time visual-token compression strips surrounding clean context and activates STRIPWAKE. We evaluate LLaVA-1.5-7B on 300 triggered images across pruning ratios η=1−k/N\eta = 1 - k/N of the N=576N=576 visual tokens. (a) Attack success rate (ASR, %) as a function of η\eta: STRIPWAKE stays dormant with all tokens (η=0\eta=0, 0.4% ASR) and activates sharply as η\eta increases under [CLS] pruning, FastV, and uniform Random pruning. (b) Qualitative progression on a representative triggered image under [CLS] pruning: the top row visualizes the surviving patch tokens (trigger patches outlined), the middle row shows the last-prompt-token visual attention in layers 16–31, and the bottom annotations report the model output and dataset-wide ASR. As η\eta grows, surrounding clean tokens are stripped away while a subset of trigger tokens survives, switching the output from a normal caption to the target string.

to ≤1.2%\leq 1.2\% at c=512c=512 tokens, with at most 1.7 percentage points of difference between clean tokens taken from the same image versus an unrelated image. Overall, surrounding clean visual tokens act as a content-independent context shield that suppresses the backdoor during full-token auditing, whereas inference-time token pruning activates the backdoor by stripping this shield away while retaining a subset of trigger tokens.

Motivated by this finding, we propose STRIPWAKE, a context-shielded backdoor attack against LVLMs that fine-tunes only the two-layer vision-to-language projector while keeping both the vision encoder and the language model frozen (Fig. 2). Specifically, STRIPWAKE comprises two synergistic components: (i) context-shielded multi-view poisoning (Sec. 4.1), which stamps a multiplicative tint trigger onto q=5%q=5\% (29 of 576) randomly sampled patch tokens and pairs full-token and lightly pruned views supervised with clean captions against compressed views drawn from randomized surrogate compressors P\mathcal{P} supervised with the target string; and (ii) benign-teacher attention regularization (Sec. 4.2), which minimizes the Jensen-Shannon divergence between the early language-model visual attention of the poisoned model and that of a frozen benign teacher on clean compressed views. Because random trigger placement guarantees that both visual-salience compressors (such as [CLS] pruning and VisionZip) and position-biased language-model compressors (such as FastV and SparseVLM) retain a sufficient fraction of trigger tokens without running any inference-time compressor during training, the multi-view objective generalizes across heterogeneous pruning rules, while the benign-teacher attention regularizer prevents the 4.9–6.2-

point CIDEr drop otherwise caused by attention-driven pruning.

Extensive experiments on LLaVA-1.5-7B across nine published inference-time compressors validate the effectiveness of STRIPWAKE. With all 576 tokens, STRIPWAKE remains dormant at 0.4% ASR and matches the clean captioning CIDEr of a benignly fine-tuned projector within 0.4 points (Table 3); at k=64k=64 tokens, it activates at 94.0%–99.7% across the five primary unseen compressors ([CLS], VisionZip, DivPrune, FastV, and SparseVLM) and up to 97.7%–99.7% across PruMerge, PruMerge+, VisPruner, and FlowCut (Table 4). These results further show that STRIPWAKE generalizes across unseen user instructions, image datasets, and trigger strengths (Sec. 5.5), indicating that pre-deployment LVLM safety evaluations must audit compressed deployment paths rather than full-token behavior alone.

References (29)