Abstract
Recently, there has been a surge of interest in integrating vision into Large Language Models (LLMs), exemplified by Visual Language Models (VLMs) such as Flamingo and GPT-4. This paper sheds light on the security and safety implications of this trend. First, we underscore that the continuous and high-dimensional nature of the visual input makes it a weak link against adversarial attacks, representing an expanded attack surface of vision-integrated LLMs. Second, we highlight that the versatility of LLMs also presents visual attackers with a wider array of achievable adversarial objectives, extending the implications of security failures beyond mere misclassification. As an illustration, we present a case study in which we exploit visual adversarial examples to circumvent the safety guardrail of aligned LLMs with integrated vision. Intriguingly, we discover that a single visual adversarial example can universally jailbreak an aligned LLM, compelling it to heed a wide range of harmful instructions that it otherwise would not and generate harmful content that transcends the narrow scope of a 'few-shot' derogatory corpus initially employed to optimize the adversarial example. Our study underscores the escalating adversarial risks associated with the pursuit of multimodality.
Introduction: The Multimodal Back Door
As AI development shifts toward multimodal systems, researchers from Princeton and Stanford have identified a critical vulnerability. While Large Language Models (LLMs) have undergone extensive "alignment" training—such as Reinforcement Learning from Human Feedback (RLHF)—to refuse harmful content, these guardrails are primarily text-based. Integrating vision introduces a high-dimensional, continuous input space that acts as a massive back door for adversarial attacks, effectively bypassing safety training.
Methodology: Adversarial Prompt Tuning
The researchers treat visual input as a continuous prompt that can be optimized through a process they call Adversarial Prompt Tuning. Unlike traditional adversarial attacks aimed at simple misclassification, this method optimizes image pixels to maximize the likelihood of the model generating a specific harmful corpus.
The attack follows three main steps:
- Optimization: Using Projected Gradient Descent (PGD), an image (starting from a benign photo like a panda) is modified with nearly imperceptible noise to align with a "few-shot harmful corpus" of 66 derogatory sentences.
- The Jailbreak Image: This optimized image becomes a "universal key" that tunes the model into a malicious state.
- Inference: When this image is paired with new, harmful text instructions—such as requests for instructions on committing crimes—the model ignores its safety training and complies.
Key Insights: The "Weak Link" and Universality
The study reveals several alarming properties of these visual attacks:
- The Weak Link Hypothesis: Pixels are easier to optimize than discrete text tokens, making visual attacks significantly more potent and easier to execute than text-only jailbreaks.
- Unexpected Universality: An image optimized to trigger derogatory speech also makes the model willing to provide instructions for violence. The adversarial image appears to flip a global "safety switch" rather than just triggering specific keywords.
- Cross-Model Transferability: Attacks are not limited to "white-box" scenarios. An adversarial image optimized for one model (e.g., MiniGPT-4) can often successfully jailbreak another (e.g., LLaVA), demonstrating high transferability.
- Brittle Alignment: Safety training in the text backbone does not automatically extend to new modalities. Alignment is currently modality-specific and fails when vision is integrated.
Results and Evaluation
The researchers evaluated their attack using benchmarks like RealToxicityPrompts and Anthropic's Red-Teaming prompts. On MiniGPT-4, the probability of obedience to harmful instructions jumped from near-zero with benign images to over 80% with adversarial ones. Toxicity scores, measured via the Perspective API, often doubled (e.g., from 34.8% to 67.2%).
While defenses like DiffPure (using diffusion models to "purify" images) were tested, they only partially mitigated the risk. The authors suggest that adaptive attackers could likely circumvent such defenses, and standard adversarial training remains too computationally expensive for models of this scale.
Conclusion
The transition to multimodal "frontier" models introduces fundamental challenges for AI alignment. This research underscores that we cannot assume a model is safe simply because its text-based responses are aligned. As LLMs are increasingly equipped with vision, audio, and other sensors, the attack surface expands, requiring new, more robust approaches to multimodal safety that go beyond current text-centric alignment techniques.
Summary updated