Abstract
This paper focuses on jailbreaking attacks against multi-modal large language models (MLLMs), seeking to elicit MLLMs to generate objectionable responses to harmful user queries. A maximum likelihood-based algorithm is proposed to find an image Jailbreaking Prompt (imgJP), enabling jailbreaks against MLLMs across multiple unseen prompts and images (i.e., data-universal property). Our approach exhibits strong model-transferability, as the generated imgJP can be transferred to jailbreak various models, including MiniGPT-v2, LLaVA, InstructBLIP, and mPLUG-Owl2, in a black-box manner. Moreover, we reveal a connection between MLLM-jailbreaks and LLM-jailbreaks. As a result, we introduce a construction-based method to harness our approach for LLM-jailbreaks, demonstrating greater efficiency than current state-of-the-art methods.
Introduction
As Large Language Models (LLMs) like ChatGPT and Claude have become mainstream, so have "jailbreaking" attacks—cleverly engineered text prompts designed to trick the AI into ignoring its safety training. However, the new frontier is Multimodal Large Language Models (MLLMs), which process both text and images. While pure text jailbreaks are difficult to find due to the discrete nature of language, vision models are notoriously vulnerable to adversarial perturbations in continuous space. This research explores whether the visual input of an MLLM can be used as a "backdoor" to elicit harmful responses and whether this multimodal vulnerability can be exploited to attack pure text models more effectively.
Methodology: The Image Jailbreaking Prompt (imgJP)
The core of the proposed attack is the image Jailbreaking Prompt (imgJP). Instead of searching for a "magic" text string, the researchers treat jailbreaking as a continuous optimization problem in the image space. By optimizing pixels to maximize the probability that a model starts its response with a positive affirmation (e.g., "Sure, here is..."), they can bypass safety filters.
Key techniques include:
- imgJP-based Jailbreak: Optimizing a standalone image to trigger a jailbreak across diverse harmful text prompts (prompt-universal).
- deltaJP-based Jailbreak: Finding a tiny, nearly invisible perturbation (noise) that can be added to any image to turn it into a jailbreak trigger (image-universal).
- Ensemble Learning: Training the attack on an ensemble of surrogate models to enhance "black-box" transferability to unseen models.
Construction-based Attack (CA) for Text LLMs
Perhaps the most significant contribution is the Construction-based Attack (CA). The researchers "wrap" a pure text LLM (like LLaMA2) in a simple multimodal framework by adding a linear layer and a Vision Transformer (ViT). They find a successful visual jailbreak for this "constructed" MLLM and then map those visual features back into the text space via de-embedding and de-tokenization.
Datasets and Evaluation
The researchers introduced AdvBench-M, a benchmark built upon the text-only AdvBench (500 harmful behaviors). AdvBench-M adds 240 semantic-relevant images across 8 categories (e.g., "Bombs," "Drugs," "Cybersecurity") to test "image-universal" properties—determining if an attack remains effective regardless of the input image's content.
Key Results and Insights
- Efficiency Gains: The Construction-based Attack found successful text jailbreaks for LLaMA2 with a 93% success rate using only 20 candidate prompts, significantly outperforming the current state-of-the-art GCG (Greedy Coordinate Gradient) method.
- White-box and Black-box Success: On models like MiniGPT-4 and MiniGPT-v2, the attack achieved Attack Success Rates (ASR) between 77% and 92%. In black-box scenarios, the imgJP transferred successfully to models like mPLUG-Owl2 (59% ASR) and LLaVA (28% ASR).
- The Multimodal Backdoor: The study reveals that the visual features fed into an MLLM's internal LLM are the primary vulnerability. If the right mathematical representation (embedding) is found, the internal LLM can be tricked regardless of its safety training.
Conclusion and Future Work
Aligning MLLMs is significantly more challenging than aligning pure LLMs because the visual modality provides a high-dimensional, continuous attack surface. Current safety training, such as Reinforcement Learning from Human Feedback (RLHF), appears insufficient for multimodal inputs. Future research must focus on "multimodal alignment" to ensure safety guardrails are robust across all input types.
Warning: some content generated by language models may be offensive to some readers.
Summary updated