Skip to content

A Context-Masking Backdoor Attack Against Large Vision-Language Models

Context-Shielded Backdoor Attack against Large Vision-Language Models

arXiv: Adversarial Attacks, Backdoors & Poisoning· arXiv:2611.01252· Zhifang Zhang, Qiang Huang, Chenpeng Wang, Weitong Chen, Olaf Maennel, Wei Emma Zhang, Lei Feng, Lei Zhang, Miao XuThe University of Queensland; Fudan University; YiXin-AILab; Adelaide University; Southeast UniversityIndexed by this site · 14 days ago· Originally publishedAttacks

Quick read

Attacks

Based on the paper PDF (AI-generated); refer to the original

The authors propose STRIPWAKE: an LVLM backdoor that fine-tunes only the projector, with 0.4% ASR under all tokens and 94.0%–99.7% across five compressors at k=64

Threat modelSupply-chain attacker: controls only the projector's training data and pipeline, knows nothing about downstream after release (compressor-agnostic), does not use any compressor in C during training, and does not know which compressor or budget k the deployer uses; the victim system is LLaVA-1.5-7B, and the deployer attaches the inference-time visual token compressor only after full-token auditing.

Questions
LVLM deployment commonly uses inference-time visual token compression, but existing LVLM backdoors trigger at nearly 100% under all-token inference and can be found by pre-deployment auditing; backdoors triggered by weight quantization/pruning do not cover the token compression aspect.
Methods
The authors report discovering the context stripping phenomenon: surrounding clean tokens suppress the trigger, and pruning strips away the context and activates it. STRIPWAKE fine-tunes only the projector, pairing a random-position tint trigger with full-token/lightly pruned dormant views and random proxy compressed views, plus benign teacher attention regularization.
Experiments and results
On LLaVA-1.5-7B, STRIPWAKE full-token ASR is 0.4%, 94.0%–99.7% on five main compressors at k=64, 79.8%–98.6% on another four compressors, and CIDEr is within 0.4 points of the clean model; vanilla backdoor is 99.2% at full token.
Limitations and future work
The authors state that future work will explore dynamic high-resolution tiling and video token compression. Experiments are conducted only on LLaVA-1.5-7B, the evaluation is the image captioning task, and defenses against this attack are not evaluated.
Experimental setupLLaVA-1.5-7B · COCO、COCO val2017 unseen slice et al. · ASR、CIDEr et al.
Evaluated models
LLaVA-1.5-7B
Benchmarks
COCOCOCO val2017 unseen sliceFlickr8kCC3M
Metrics
ASRCIDEr∆CIDEr
AI summaryThe researchers propose StripWake, a projector-only backdoor, which achieves an attack success rate of only 0.4% on LLaVA-1.5-7B with full-token inference, but 94.0%–99.7% on five major compressors. The authors call this phenomenon context stripping: the complete clean visual tokens suppress the embedded trigger, and the backdoor is activated only after inference-time visual token compression prunes away this context. Methodologically, StripWake trains by pairing a clean-supervised full-token view with a target-supervised randomly compressed view, and aligns the early visual attention of a frozen benign teacher model to preserve performance on the clean task. On nine unseen compressors, the backdoor remains dormant and causes no CIDEr loss.

The researchers propose StripWake, a projector-only backdoor, which achieves an attack success rate of only 0.4% on LLaVA-1.5-7B with full-token inference, but 94.0%–99.7% on five major compressors. The authors call this phenomenon context stripping: the complete clean visual tokens suppress the embedded trigger, and the backdoor is activated only after inference-time visual token compression prunes away this context. Methodologically, StripWake trains by pairing a clean-supervised full-token view with a target-supervised randomly compressed view, and aligns the early visual attention of a frozen benign teacher model to preserve performance on the clean task. On nine unseen compressors, the backdoor remains dormant and causes no CIDEr loss.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The authors say they discovered context stripping and propose STRIPWAKE, an LVLM backdoor that lies dormant on all tokens and activates under compression

    Core question: can an LVLM backdoor be built that stays dormant under pre-deployment full-token auditing, yet automatically activates once the deployer attaches an inference-time visual token compressor?

    • Scenario and motivation: LVLMs (such as LLaVA-1.5) encode an image into 576 visual tokens, and deployment commonly uses training-free compressors ([CLS] pruning, VisionZip, FastV, etc.) that drop 75%–90% of the tokens. The authors point out that auditing examines the full-token sequence, whereas deployment processes the compressed sequence, and the two are mismatched.
    • Shortcomings of existing methods: The authors state that existing LVLM backdoors have ASR near 100% under full-token inference, so pre-release behavior spot checks and output-perturbation detectors such as STRIP would directly expose them; whereas quantization/pruning-triggered deployment backdoors modify weights and cannot distinguish full-token inference from token-compressed deployment.
    • Core observation: The authors report discovering context stripping—surrounding clean visual tokens suppress the embedded trigger, the backdoor is suppressed at full token, and token pruning strips away this context and activates the backdoor (Figure 1).
    • Proposed in the paper: STRIPWAKE, a backdoor attack that fine-tunes only the two-layer projector: the full-token view is paired with clean supervision, the random proxy compressed view is paired with target-string supervision, and a frozen benign teacher is used to align early visual attention to preserve clean utility.
    • Threat model (Sec 3, supply-chain attacker):
      • Goal: high ASR under compressed deployment, ASR near 0 at full token, and clean CIDEr not dropping (Eq. 1).
      • Knowledge: compressor-agnostic—training uses no compressor in C and does not know which compressor or budget k the deployer chooses.
      • Capability: controls only the projector's training data and pipeline (6,000 COCO images, poisoning rate 5%); everything downstream after release is uncontrollable.
      • Victim system: LLaVA-1.5-7B; the auditor checks full-token inputs before attaching the compressor.
  2. What related research exists?

    Related work is divided into three groups: LVLM backdoors, deployment-triggered backdoors, and visual token compression; the authors state that this paper moves the activation condition from the input/weights to the token sequence

    LVLM backdoor attacks

    • BadCLIP [2], BadVLM [5], TrojVLM [16], Shadowcast [26], BadToken [28], etc.—implant triggers via visible patches, perturbations, style transformations, or multimodal token hooks, causing triggered inputs to produce attacker-chosen responses.
    • The authors point out that these backdoors are all trained for standard all-token inference and are immediately exposed under all-token evaluation; this paper belongs to the same attack category but moves the activation condition from the input to the token sequence.

    Deployment-triggered backdoors

    • Quantization-activated and pruning-activated backdoors [6, 18, 22]—jointly optimize the behavioral difference between full-precision weights and quantized/pruned weights, activating only after model compression.
    • The authors point out that these methods study weight-space editing, whereas the inference-time token compression in this paper does not change weights, and weight-triggered attacks cannot distinguish all-token inference from compressed deployment.

    LVLM visual token compression

    • pre-LLM compressors: [CLS]-attention pruning, VisionZip [27], DivPrune [1], PruMerge [21], VisPruner [29], FlowCut [23]—rank or merge tokens using visual encoder signals.
    • in-LLM compressors: FastV [4], SparseVLM [30], PyramidDrop [25]—prune inside the language model based on cross-modal attention; other work analyzes their positional recency bias [7]. The authors say these compressors are treated only as efficiency mechanisms, and their security implications have not been explored.

    Baselines and controls: vanilla backdoor (all-token view + DINO-salience trigger), two-view baseline (all-token dormant view paired with [CLS] pruning view, DINO trigger, no P and Lakd), clean model (same recipe without poisoning training). Evaluation uses COCO; generalization experiments use Flickr8k and CC3M.

    The authors position this paper as a new activation surface under the deployment-triggered paradigm: using clean patches in the all-token sequence as a shield, activating only when token pruning strips away the context.

  3. How does the paper address this problem?

    STRIPWAKE trains only the projector: random tint trigger + dormant/compressed dual views + random proxy compressor + benign teacher attention regularization

    Overall idea: rather than teaching the model to recognize the scoring rule of a specific compressor, train the projector so that the trigger activates in short token sequences and is suppressed in long clean context. The method is named STRIPWAKE and updates only the two-layer projector gϕ, with the vision encoder and language model frozen.

    Problem formulation

    • The victim model is LLaVA-1.5-7B (CLIP ViT-L/14, 336×336, N=576 patch tokens; Vicuna-7B). The compression operator Ck reduces 576 tokens to k (default k=64, removing 89%), and can be after the projector (d=0) or within early layers of the language model (d≥1).
    • The attacker optimizes the projector parameters ϕ to simultaneously satisfy three goals (Eq. 1): high probability of outputting the target string under compression (activation), approximately 0 at full token (dormancy), and CIDEr comparable to the clean model (utility).

    Context-shielded multi-view poisoning

    • Random token-multiplicative tint trigger: at the start of a training run, q=5% (29/576) patch positions are selected uniformly at random, and pixels are multiplied per channel by a fixed-sign tint (magnitude δ=96), i.e. x̃_u = \mathrm{clip}(x_u \odot (1 + \frac{\delta}{255}s), 0, 255); the random distribution ensures that both position-biased and content-biased compressors sample the trigger proportionally.
    • Paired views: each poisoned image yields four views per step—the full-token view and lightly pruned views (m∈{384,448,512}) supervised with the clean caption (Ldorm), and two random proxy compressed views (k∈{48,…,256}) supervised with the target string (Lact); clean images use the full-token view plus one compressed view supervised with the caption (Lclean).
    • Random proxy compressor P: five structural axes are randomized at each sampling—budget k, pruning depth d∈{0,…,4}, whether position IDs are kept or reordered, whether dropped tokens are merged, and the token selection rule (score-mixed and retention-controlled, half each); no real compressor is run during training.

    Benign-teacher attention regularization

    • The authors report that using only the three cross-entropy terms causes the poisoned projector to perturb early prompt-to-vision attention, dropping clean CIDEr by 4.9–6.2 points under FastV/SparseVLM.
    • Therefore, for clean compressed views, the attention of the last-prompt-token to retained visual tokens in layers 1–12 of the language model (head-averaged, normalized) is penalized with Jensen-Shannon divergence against the corresponding distribution of the frozen benign teacher projector, i.e. Lakd(ϕ) = 𝔼Dc 1/(|Λ|) ∑ℓ ∈ Λ JSD(α̃(ℓ)ϕ | α̃(ℓ)ϕ0), with weight λ=15.

    Training and success criteria

    • The total objective is a weighted sum of four terms (Eq. 2). AdamW, learning rate 2×10⁻⁴, batch 32, 2 epochs, 6,000 COCO images, poisoning rate ρ=5% (300 images).
    • Success criteria: full-token ASR near 0, high compressed ASR, and CIDEr comparable to the clean model; ASR is computed as whether the greedy-decoded output contains the exact target string.
  4. What experiments did the paper conduct?

    On LLaVA-1.5-7B, all-token ASR 0.4%, and at k=64, 94.0%–99.7% across five compressors, with causal intervention, ablation, and generalization experiments

    Experimental setup

    • Model under test: LLaVA-1.5-7B (CLIP ViT-L/14 + Vicuna-7B, training only the two-layer projector).
    • Compressors: nine published training-free compressors, all used only at test time—five in the main table ([CLS] pruning, VisionZip, DivPrune, FastV, SparseVLM), another four (PruMerge, PruMerge+, VisPruner, FlowCut), plus PyramidDrop (PDrop∗) and uniform Random pruning.
    • Baselines: clean model (same recipe without poisoning), vanilla backdoor (full-token view + DINO-salience trigger), two-view baseline (full-token dormant view + [CLS] pruning view, without P and Lakd).
    • Data and scale: 6,000 COCO training images, 300 poisoned; main evaluation uses 500 held-out COCO Karpathy test images, 3 independent training seeds (mean±std); appendix generalization experiments use 300 images per setting.
    • Metrics: ASR (proportion of greedy-decoded outputs containing the exact target string) and clean captioning CIDEr and ∆CIDEr relative to the clean model.
    • Default setting: k=64 (retaining 11% of tokens), trigger δ=96, q=5% (29 patches).

    Main results

    According to Table 3 (k=64, ASR %, ∆CIDEr relative to the clean model):

    Swipe horizontally to read the table

    MethodFull token(↓)[CLS]VisionZipDivPruneFastVSparseVLMPDrop∗Random∆CIDEr Full/[CLS]/FastV
    Clean model0.00.00.00.00.00.00.00.0132.3/118.1/109.0 (raw CIDEr)
    Vanilla backdoor99.297.095.699.699.499.699.494.0−3.3/−14.0/−11.3
    Two-view baseline0.295.895.297.212.614.05.247.0−4.6/−2.9/−3.7
    STRIPWAKE0.4±0.294.594.099.399.699.790.890.8−0.4/−0.4/+1.1
    w/o Lakd0.794.794.199.399.399.380.588.2−0.7/+0.3/−4.9
    • The authors state that STRIPWAKE is nearly silent at full token and consistently activates on the five unseen compressors; vanilla backdoor is 99.2% at full token and is exposed during auditing.
    • The two-view baseline transfers to pre-LLM compressors, but the authors point out that it fails on in-LLM attention compressors (FastV 12.6%, SparseVLM 14.0%), indicating that a single pruning heuristic is insufficient.
    • The authors state that STRIPWAKE's CIDEr differs from the clean model by −0.4 to +1.1 points, within the natural fluctuation of about 5 points across clean runs.

    Mechanism validation: context stripping (Sec 5.2)

    • Trigger survival intervention (Table 1, k=64): forcing retention of all 29 trigger tokens raises [CLS] and Random pruning ASR from 93.3% and 89.3% to 100.0%; forcing all to be dropped lowers them to 35.7% and 30.9%. The authors state that the residual activation comes from the vision encoder's 3×3 convolution spreading trigger features to neighboring clean patches.
    • Clean token restoration (Table 2): fixing the 29 trigger tokens and gradually restoring c clean tokens; ASR stays above 97.3% for c≤256, drops to 48.0%/49.0% at c=384, and drops to 1.2%/0.8% at c=512; the gap between same-image and unrelated-image sources does not exceed 1.7 percentage points. The authors state that suppression comes from the presence and number of clean tokens rather than scene semantics.
    • Budget sweep (Figure 3, Table 7): the authors state that [CLS]/VisionZip/DivPrune saturate at 256 tokens, FastV/SparseVLM saturate at 192, and PDrop∗ saturates at 64; the trigger proportion under attention-based compressors rises to 12%–30% as the budget decreases (Table 8), and remains 5% under Random pruning.

    Generalization experiments (Table 4, Table 6)

    • Another four unseen compressors (Table 4, same checkpoint without retraining): at k=64, PruMerge 98.6%, PruMerge+ 96.9%, VisPruner 96.3%, FlowCut 79.8%; at k=128, 97.7%–99.7%; under PruMerge/PruMerge+ native adaptive rules, 95.9%/97.5%.
    • Instructions, datasets, trigger strength (Table 6): under four user instructions, full-token ASR does not exceed 0.9%, [CLS]64 is 94.4%–94.6%, and FastV64 is 99.1%–100.0%; on unseen datasets (unseen COCO split, Flickr8k, CC3M), full token is 0.3%–1.9% and [CLS]64 is 82.3%–93.1%; at δ=64 or q=2.5%, [CLS]64/FastV64 are 84.6%/98.2% and 91.2%/98.3%; false triggers on clean images are at most 0.1%.

    Other ablations and analyses

    • Removing Lakd: dormancy and compressed activation are unchanged, FastV ∆CIDEr drops to −4.9 and SparseVLM to −6.2 (Table 5).
    • Replacing P with only the [CLS] view: FastV ASR 99.6%→91.6%, SparseVLM 99.7%→92.8% (Table 5).
    • Replacing the random trigger with the DINO-salience trigger (same two-view training): FastV 73.6%→12.6%, SparseVLM 74.0%→14.0% (Table 5).
    • Vertical-flip control (Appendix D): the Spearman correlation between FastV attention and token row index is +0.55 for the original image and +0.51 after flipping, while [CLS] attention is near 0; the authors state that this indicates FastV orders by position and [CLS] orders by content.
  5. What are some points that can be further explored?

    The authors propose only two future directions, dynamic high-resolution tiling and video token compression; experiments are limited to LLaVA-1.5-7B and the captioning task

    Limitations and future directions noted by the authors

    • The authors say future work will explore dynamic high-resolution tiling and video token compression (Sec 6 Conclusion).
    • The paper does not specifically discuss other limitations.

    Scope of experimental coverage

    • The only model tested is LLaVA-1.5-7B (CLIP ViT-L/14 + Vicuna-7B), and all results are on it (Sec 5.1).
    • The evaluation task is image captioning: training uses 6,000 COCO images, main evaluation uses 500 COCO Karpathy test images with 3 seeds; generalization experiments use 300 images per setting, including Flickr8k and CC3M (Sec 5.1, Appendix C).
    • Compressors cover nine published methods plus PDrop∗ and Random pruning, all used only at test time (Sec 5.1, Appendix B).
    • The attack fine-tunes only the two-layer projector, with the vision encoder and language model frozen; the threat model assumes the attacker does not know the deployer's compressor and budget (Sec 3).
    • The paper does not evaluate any defense or detection method against STRIPWAKE; the introduction mentions that output perturbation detectors such as STRIP can catch existing backdoors that trigger under all tokens, but does not report their effect on STRIPWAKE.
  6. Summarize the main content of the paper

    The authors say they discovered context stripping and propose STRIPWAKE: dormant on all tokens, activated across nine compressors, with CIDEr barely dropping

    An LVLM backdoor attack paper whose core is moving the backdoor's activation condition from the input or weights to inference-time token compression.

    • Problem: existing LVLM backdoors have ASR near 100% under all-token inference and are exposed by pre-deployment auditing; quantization/pruning-triggered deployment-type backdoors change weights and cannot cover the token compression deployment surface.
    • Finding: the authors say they discovered context stripping—surrounding clean visual tokens act like a shield to suppress the trigger, and the backdoor activates after token pruning strips away the context; causal intervention shows that trigger survival and context removal are two necessary conditions (Table 1, Table 2).
    • Method: STRIPWAKE fine-tunes only the two-layer projector: a randomly positioned multiplicative tint trigger (q=5%, δ=96), supervising clean captions on the all-token/lightly pruned view and the target string on a randomly proxied compressed view, plus a benign teacher attention regularizer (λ=15, JSD on layers 1–12) to preserve clean utility; no real compressor is run during training.
    • Results: on LLaVA-1.5-7B, all-token ASR 0.4%, 94.0%–99.7% across five major unseen compressors at k=64, and 79.8%–99.7% across another four compressors (Table 3, Table 4); ∆CIDEr ranges from −0.4 to +1.1 points; the vanilla backdoor is exposed at 99.2% under all tokens, and the two-view baseline reaches only 12.6%/14.0% on FastV/SparseVLM.
    • Generalization: under four unseen instructions, three unseen image datasets, and weaker triggers (δ=64 or q=2.5%), it still maintains all-token dormancy and compression activation, with at most 0.1% false triggering on clean images (Table 6).
    • Authors' conclusion: pre-deployment LVLM safety evaluation cannot audit only all-token behavior; it must audit the compressed deployment path; future work will explore dynamic high-resolution tiling and video token compression.

Related papers

Show 3 more papers
Read originalarxiv.org