[Paper Review] Visual Adversarial Examples Jailbreak Aligned Large Language Models
The paper shows that visual adversarial inputs can jailbreak alignment guardrails in vision-enabled LLMs, enabling harmful content generation beyond the targeted few-shot corpus, across multiple models and in black-box transfer settings.
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. Our findings also connect the long-studied adversarial vulnerabilities of neural networks to the nascent field of AI alignment. The presented attack suggests a fundamental adversarial challenge for AI alignment, especially in light of the emerging trend toward multimodality in frontier foundation models.
Motivation & Objective
- Highlight that visual inputs create expanded attack surfaces for vision-integrated LLMs.
- Demonstrate that a single visual adversarial example can universally jailbreak aligned VLMs.
- Show that jailbreaking transfers across multiple models and under black-box conditions.
- Connect adversarial vulnerabilities in neural networks with AI alignment challenges in multimodal models.
Proposed method
- Formulate adversarial input x_adv by minimizing the negative log-likelihood of a small few-shot harmful corpus Y conditioned on x_adv (Eqn 1).
- Optimize x_adv using end-to-end differentiable visual perturbations via PGD under constraints (epsilon) or unconstrained settings.
- Pair x_adv with a harmful instruction x_harm as joint input [x_adv, x_harm] to trigger jailbroken outputs.
- Compare visual attacks with a text-based attack that optimizes adversarial text tokens of matching length using discrete optimization (hotflip/Shin et al.).
- Evaluate attacks on vision-integrated Vicuna-based models (MiniGPT-4, InstructBLIP) and on LLaVA/LLaMA-2-Chat, including transferability analyses.
Experimental results
Research questions
- RQ1Do visual adversarial examples enable universal jailbreaking of alignment guardrails in vision-enabled LLMs?
- RQ2How do visual attacks compare to text-only adversarial attacks in effectiveness at jailbreak and toxicity induction?
- RQ3Are visual adversarial jailbreaks transferable across different VLMs (black-box setting)?
- RQ4What is the scope of harmful outputs induced by these visual adversarial examples beyond the few-shot corpus used for optimization?
Key findings
- A single visual adversarial example can substantially increase the likelihood that an aligned VLM outputs harmful content across multiple categories (Identity Attack, Disinformation, Violence/Crime, X-risk).
- Attacks with epsilon up to 64/255 and even unconstrained visuals achieve high jailbreak success across all four categories in human evaluation.
- Visual adversarial examples also raise toxicity metrics on RealToxicityPrompts, increasing the proportion of outputs with toxic attributes as measured by Perspective API and Detoxify.
- Compared to a text-only adversarial attack of equal token length, the visual attack generally yields stronger jailbreaking effects and tighter optimization loss reductions.
- The attack demonstrates black-box transferability among MiniGPT-4 (Vicuna), InstructBLIP (Vicuna), and LLaVA (LLaMA-2-Chat).
- DiffPure-based purification can mitigate some toxicity increases introduced by visual adversarial inputs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.