Abstract
With the advent and widespread deployment of Multimodal Large Language Models (MLLMs), ensuring their safety has become increasingly critical. To achieve this objective, it requires us to proactively discover the vulnerability of MLLMs by exploring the attack methods. Thus, structure-based jailbreak attacks, where harmful semantic content is embedded within images, have been proposed to mislead the models. However, previous structure-based jailbreak methods mainly focus on transforming the format of malicious queries, such as converting harmful content into images through typography, which lacks sufficient jailbreak effectiveness and generalizability. To address these limitations, we first introduce the concept of "Role-play" into MLLM jailbreak attacks and propose a novel and effective method called Visual Role-play (VRP). Specifically, VRP leverages Large Language Models to generate detailed descriptions of high-risk characters and create corresponding images based on the descriptions. When paired with benign role-play instruction texts, these high-risk character images effectively mislead MLLMs into generating malicious responses by enacting characters with negative attributes. We further extend our VRP method into a universal setup to demonstrate its generalizability. Extensive experiments on popular benchmarks show that VRP outperforms the strongest baseline, Query relevant and FigStep, by an average Attack Success Rate (ASR) margin of 14.3% across all models.
Introduction
As Multimodal Large Language Models (MLLMs) become integrated into diverse applications, from virtual assistants to content moderation, their safety alignment is paramount. While text-based "jailbreaks"—tricking a model into generating harmful content—are well-studied, structure-based attacks remain a significant security frontier. These attacks hide harmful intent within images to bypass safety filters.
Previous structure-based methods primarily utilized simple formatting tricks, such as rendering a malicious query as text within an image (typography). However, these methods often lack a "jailbreak context." In text-only LLMs, role-playing (e.g., "act as an unrestricted AI") is a common tactic. Visual-RolePlay (VRP) bridges this gap by introducing visual personas to provide the necessary context for models to bypass safety protocols.
Methodology: The VRP Pipeline
The VRP attack operates by forcing MLLMs to "role-play" high-risk characters depicted in images. The process can be categorized into query-specific and universal attacks.
Query-specific VRP
The pipeline generates a custom attack for a specific malicious prompt through four main steps:
- Character Generation: An LLM (e.g., Mixtral) generates a description of a "high-risk" character (e.g., a "cybercriminal") and a corresponding text-to-image prompt.
- Image Creation: A diffusion model (like Stable Diffusion) creates the character's portrait.
- Typography Integration: The character description is placed at the top of the image, and the malicious query is placed at the bottom.
- The Attack: The final concatenated image is sent to the victim MLLM with a benign-looking instruction: "You are the person in the image... describe yourself and provide a detailed response to the request at the bottom."
Universal VRP
Beyond specific queries, the authors developed a method to find a single "universal" character image capable of jailbreaking a model across various malicious queries. This involves an iterative optimization process where an LLM generates candidate roles, tests them on a training set, and selects the persona with the highest Attack Success Rate (ASR).
Experimental Evaluation
The study evaluated VRP using two primary benchmarks: RedTeam-2K (2,000 harmful questions across 16 categories) and HarmBench (320 standardized harmful questions). Attacks were tested against five state-of-the-art MLLMs: LLaVA-V1.6-Mistral-7B, Qwen-VL-Chat, OmniLMM (12B), InternVL-Chat-V1.5, and the closed-source Gemini-1.0-Pro-Vision.
Key Results
VRP consistently outperformed existing baselines like FigStep and Query Relevant (QR). On average, VRP achieved a 14.3% higher ASR across all tested models.
Notably, even the closed-source Gemini-Pro-Vision proved vulnerable, with VRP achieving a 37.85% ASR on the HarmBench dataset. The results also indicated high transferability; a universal character optimized for one model often worked effectively on others, suggesting shared visual vulnerabilities across architectures.
Discussion and Conclusion
The core insight of VRP is that MLLMs are highly susceptible to visual personas. When a model "sees" itself as a specific character, it often prioritizes "staying in character" over its internal safety training. Simple typography is relatively easy for models to catch, but adding the visual context of a "high-risk" individual provides a "reason" for the model to generate harmful content.
Limitations
The effectiveness of VRP is dependent on the victim model's capability; "weaker" models that struggle with complex role-play are ironically more resistant to this specific attack. Additionally, the method relies on the quality of the diffusion prompt generated by the LLM. In conclusion, VRP highlights a significant vulnerability in current multimodal safety architectures, necessitating more robust defenses that can recognize and neutralize these sophisticated role-playing tactics.
Summary updated