Break the Visual Perception: Adversarial Attacks Targeting Encoded Visual Tokens of Large Vision-Language Models

Yubo Wang, Chaohu Liu, Yanqiu Qu, Haoyu Cao, Deqiang Jiang, Linli Xu

TL;DR

Researchers have developed VT-Attack, a multi-pronged adversarial method that disrupts the visual tokens produced by image encoders in Large Vision-Language Models (LVLMs). By targeting the features, relationships, and global semantics of these tokens, the attack effectively "blinds" models like LLaVA and MiniGPT-4, causing them to generate irrelevant or nonsensical responses regardless of the text prompt.

What Problem Does This Paper Address?

Large Vision-Language Models (LVLMs) are the current frontier of AI, combining the reasoning of LLMs with the "eyes" of vision encoders (like CLIP). However, this integration introduces a massive security surface. Most existing adversarial attacks on these models are either "targeted" (trying to force a specific wrong answer) or "end-to-end" (requiring access to the entire model).

The authors identify a critical gap: we don't fully understand how stable the "visual feature space" is. LVLMs rely on an encoder to turn an image into a sequence of visual tokens—mathematical representations that the language model can "read." If an attacker can subtly corrupt these tokens at the source (the encoder), they can potentially break the model's perception entirely, making it generate errors across any task or prompt.

Methods

The authors propose VT-Attack (Visual Tokens Attack), a "gray-box" approach that only requires access to the image encoder, not the full LVLM. It employs three distinct sub-methods to comprehensively corrupt the visual information:

  1. Visual Feature Representation Attack: This is the baseline approach. It uses optimization (PGD) to maximize the distance between the feature vectors of the clean image and the adversarial image.
  2. Visual Token Relation Attack (The Novel Core): The authors observed that visual tokens aren't independent; tokens representing the same object tend to cluster together. VT-Attack uses K-Means clustering to identify these inherent relationships in the clean image and then forces the adversarial tokens to deviate from their original cluster centers. This destroys the "context" the model uses to understand object boundaries and relationships.
  3. Global Semantics Attack: This targets the [CLS] token (the token representing the "summary" of the image). It maximizes the discrepancy between the image's visual features and its original text description.

By combining these three, the attack produces a "visually clean" image that, when processed, yields a chaotic mess of tokens that the language model cannot interpret.

Datasets

The study utilized 1000 images randomly sampled from the ILSVRC 2012 (ImageNet) validation set.

The researchers evaluated the attack against a wide array of victim models, categorized by their image encoders:

  • OpenAI CLIP ViT-based: LLaVA, Otter, LLaMA-Adapter-v2, OpenFlamingo.
  • EVA CLIP ViT-based: BLIP-2, MiniGPT-4, InstructBLIP.
  • Custom Trained ViT: mPLUG-Owl-2.

Key Insights and Ideas

  • The Power of Relationships: The "Relation Attack" proved more effective than simply shifting feature vectors. By disrupting how tokens relate to one another, the attack prevents the model from "connecting the dots" to see a coherent object.
  • Prompt-Agnostic Chaos: Unlike many attacks that are tuned to a specific question (e.g., "What color is the car?"), VT-Attack is prompt-agnostic. Once the visual tokens are corrupted, the model fails whether you ask it to describe the scene, count objects, or answer a complex VQA question.
  • Semantic Robustness vs. Complexity: Interestingly, the "Semantics Attack" (targeting the summary token) was less sensitive to image complexity. While feature attacks struggle with very "busy" images, the semantic attack remains consistently effective because a simple description can often capture the essence of even a complex scene.
  • Total System Breakdown: In some cases, corrupting visual tokens caused LLaVA to fail even on non-visual prompts (like "What is artificial intelligence?"), suggesting that corrupted visual inputs can "pollute" the entire hidden state of the language model.

Key Results

  • Superior Performance: VT-Attack consistently outperformed baseline methods (like E2E and CLIP-based attacks) across all tested models.
  • CLIP Score Drop: On the image captioning task, VT-Attack reduced the CLIP score (a measure of how well the text matches the image) significantly. For LLaVA, the score dropped from a clean 31.94 to 20.33.
  • High Success Rate: The Attack Success Rate (ASR) reached as high as 91.4% for image captioning on the Otter model, compared to just 81.2% for standard E2E attacks.
  • Transferability: Because the attack targets the encoder, an adversarial image generated for one model (e.g., LLaVA) was highly effective against other models using the same encoder (e.g., OpenFlamingo), demonstrating a "global" vulnerability in shared pre-trained components.

Limitations and Future Work

  • Gray-Box Assumption: The attack assumes the adversary has access to the specific image encoder used by the target LVLM. While many models use public encoders like CLIP, a custom-trained, private encoder would be harder to attack this way.
  • Defense Gap: The paper focuses primarily on the attack side to demonstrate vulnerability. The authors note that providing guidance for defending the visual feature space is a crucial next step.
  • Stealthiness vs. Power: While the perturbations are constrained to be small ($\epsilon = 8/255$), the paper does not extensively explore the trade-off between the "visual obviousness" of the noise and the total collapse of the model's reasoning.

Summary updated

BibTeX
@inproceedings{wang2024break,
  author = {Yubo Wang and Chaohu Liu and Yanqiu Qu and Haoyu Cao and Deqiang Jiang and Linli Xu},
  title = {{Break the Visual Perception: Adversarial Attacks Targeting Encoded Visual Tokens of Large Vision-Language Models}},
  booktitle = {ACM Multimedia},
  year = {2024},
  doi = {10.1145/3664647.3680779},
}

Loading related content...

Figure