Improving Adversarial Robustness in Vision-Language Models with Architecture and Prompt Design

Rishika Bhagwatkar, Shravan Nayak, Pouya Bashivan, Irina Rish

Introduction

Vision-Language Models (VLMs), such as LLaVA, integrate vision encoders with Large Language Models (LLMs) to perform complex multimodal tasks. However, these models inherit the adversarial vulnerabilities of their constituent parts. Maliciously crafted, imperceptible noise can lead to hallucinations or toxic outputs. Traditional defenses like adversarial training are computationally prohibitive for large-scale foundation models. This study explores alternative, low-cost pathways to robustness through architectural selection and prompt engineering.

Methodology

The researchers conducted a comprehensive "stress test" using white-box gradient-based attacks: FGSM (one-step), PGD (iterative), and Auto-PGD (strongest). The investigation focused on two dimensions:

  1. Architecture: Evaluating various vision encoders (CLIP, SigLIP, DINOv2), input resolutions, and LLM backbones (Vicuna, Llama-2, Mistral) of different sizes.
  2. Prompt Design: Testing "Adversarial Prompts" that instruct the model to consider the possibility of image perturbations.

The study reveals that architectural choices significantly impact a VLM's inherent security.

Comparison of APGD accuracy across different architectural components, highlighting the impact of encoder choice and LLM backbone.

Key findings include:

  • Ensemble Vulnerability: Using multiple vision encoders does not necessarily improve security. An attacker only needs to compromise the weakest encoder in the ensemble to break the entire system.
  • LLM Scaling: Increasing LLM parameters (e.g., from 7B to 13B) yields negligible gains in adversarial robustness. The security bottleneck resides primarily in the vision encoder's representation.
  • Model Backbone: Mistral 7B demonstrated superior natural robustness compared to Vicuna or Llama-2.
  • Encoder Pre-training: Encoders trained on massive web-scale data (CLIP, SigLIP) are more robust than those trained on ImageNet or via self-supervision (DINOv2).

The Power of Suggestion: Robustness via Prompting

Perhaps the most significant discovery is that simple prompt engineering can act as a powerful defense. By merely suggesting that an image might be perturbed, the model's ability to ignore adversarial noise improves dramatically.

Impact of different adversarial prompts on LLaVA-7B accuracy under APGD attack. The "Adversarial Possibility" (AP) prompt shows a massive gain in robustness.

On the COCO dataset, LLaVA-7B's accuracy under a strong APGD attack rose from 12.54% with a standard prompt to 91.46% when using the Adversarial Possibility (AP) prompt ("Given image could be adversarially perturbed"). This suggests that VLMs possess a latent internal capacity for robustness that can be activated through instruction.

Conclusion and Future Directions

While prompt engineering offers a nearly "free" defense, it is not infallible. Knowledgeable attackers could potentially incorporate the robust prompt into their attack optimization. Future research should address multimodal attacks targeting both text and images and explore the development of automated adversarial detectors to trigger these defensive prompts dynamically.

Summary updated

BibTeX
@inproceedings{bhagwatkar2024improving,
  author = {Rishika Bhagwatkar and Shravan Nayak and Pouya Bashivan and Irina Rish},
  title = {{Improving Adversarial Robustness in Vision-Language Models with Architecture and Prompt Design}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.990},
}
Figure