VEAttack: Downstream-agnostic Vision Encoder Attack against Large Vision Language Models

Hefei Mei, Zirui Wang, Shen You, Minjing Dong, Chang Xu

TL;DR

VEAttack is a highly efficient, "downstream-agnostic" adversarial attack that targets only the vision encoder of Large Vision-Language Models (LVLMs). By perturbing patch tokens instead of the class token and minimizing cosine similarity between features, it achieves massive performance drops (up to 94.5%) across diverse tasks like image captioning and VQA. Crucially, it does this without needing access to the language model or specific task labels.

What Problem Does This Paper Address?

Large Vision-Language Models (LVLMs)—such as LLaVA or OpenFlamingo—work by "plugging" a pre-trained vision encoder (often CLIP) into a Large Language Model (LLM). While powerful, they inherit the adversarial vulnerabilities of traditional computer vision models.

Existing attacks on these models usually fall into two camps:

  1. White-box attacks: These require full access to the model's gradients and specific task labels (e.g., the "correct" caption). This is computationally expensive, and the resulting adversarial images often fail to "transfer" well to other tasks.
  2. Black-box attacks: These use proxy models to guess vulnerabilities. They often require huge, visible amounts of "noise" (perturbations) to work and are generally less effective.
Qualitative comparison of VEAttack against other methods, demonstrating how it forces the model to generate a completely unrelated caption while remaining visually imperceptible.

The authors identify a "gray-box" middle ground: what if we only attack the vision encoder? Since the vision encoder acts as the "eyes" of the system and is reused across many different tasks, an attack here could be both highly efficient and universally disruptive.

Methods

The core of VEAttack is its "downstream-agnostic" nature. It does not care if the model is trying to answer a question or describe a scene; it simply aims to scramble the visual features before they ever reach the LLM.

Key technical innovations include:

  • Patch Token Targeting: Most traditional vision attacks target the "class" ([CLS]) token. However, LVLMs rely heavily on patch tokens (the grid of features representing different parts of the image) to generate text. The authors theoretically prove that perturbing patch tokens is significantly more effective for disrupting the aligned features that the LLM ultimately receives.
  • Cosine Similarity Loss: Instead of using standard $L_2$ (Euclidean) distance, VEAttack generates adversarial examples by minimizing the cosine similarity between clean and perturbed visual features. This holistically shifts the "semantic direction" of the features, making the attack more robust against the alignment layers that connect the vision and language components.
  • Gray-Box Setting: The attacker only needs the weights of the vision encoder. They do not need to run the massive LLM during the attack process, which drastically reduces the computational cost.

Datasets

The authors evaluated VEAttack across a wide range of standard benchmarks to prove its versatility:

  • Image Captioning: COCO and Flickr30k.
  • Visual Question Answering (VQA): VQAv2 and TextVQA.
  • Hallucination Benchmarking: POPE (used to see if the attack makes the model "see" objects that aren't there).
  • Image Classification: Evaluated on 12 datasets (including ImageNet, CIFAR-10/100, and Tiny-ImageNet).

Key Insights and Ideas

  • The $[CLS]$ vs. Patch Token Trade-off: The paper provides a mathematical proof showing that perturbations on the $[CLS]$ token have a diminished impact by the time they propagate through the model compared to direct patch token attacks.
  • The "Möbius Band" Effect: In a surprising twist, the authors found that making a vision encoder more "robust" (via adversarial training) actually makes it a better source for transfer attacks. Because a robust encoder filters out small "noise," an attacker is forced to find "universally destructive" semantic features to fool it. These high-level distortions then transfer incredibly well to other, non-robust models.
  • Attention Differentials: The researchers observed that different tasks rely on different tokens. Image captioning is highly sensitive to image token perturbations, whereas VQA is more influenced by the "instruction" tokens (the text of the question).
  • Efficiency: Because it bypasses the LLM entirely, VEAttack drastically reduces computational overhead.
Time consumption comparison showing VEAttack is significantly faster than APGD and FOA-Attack across multiple datasets.

Key Results

VEAttack demonstrated devastating effectiveness across multiple models (LLaVA, OpenFlamingo, MiniGPT-4, etc.):

  • Performance Degradation: It caused a 94.5% drop in CIDEr scores for image captioning on COCO and a 75.7% drop in accuracy for TextVQA.
  • Imperceptibility: Qualitatively, VEAttack produces much "cleaner" looking adversarial images than black-box methods, which often leave visible, semantic artifacts (like ghosting of other objects) in the sky or background.
  • Transferability: Adversarial images created for one vision encoder (like CLIP) successfully broke models using entirely different architectures (like BLIP-2 or MplugOwl).

Limitations and Future Work

While VEAttack is highly effective, the authors note a few areas for further exploration:

  • Defense Mechanisms: The paper focuses on the attack side; the authors have not yet proposed or tested specific architectural defenses to counter this patch-token-targeting strategy.
  • The Robustness Paradox: The "Möbius Band" finding—that robust encoders facilitate stronger transfer attacks—remains an unresolved challenge for the community. Building models that are robust locally without becoming a "weapon" that generates better attacks for other models is an open problem.
  • Mitigating Transfer: Future work is needed to find ways to "decouple" vision encoders so that a vulnerability in a shared component (like CLIP) doesn't compromise the entire ecosystem of LVLMs.

Summary updated

BibTeX
@inproceedings{mei2026veattack,
  author = {Hefei Mei and Zirui Wang and Shen You and Minjing Dong and Chang Xu},
  title = {{VEAttack: Downstream-agnostic Vision Encoder Attack against Large Vision Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=KboFptAM8S},
}
Figure