Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

AdaShield: Safeguarding Multimodal Large Language Models from Structure-based Attack via Adaptive Shield Prompting

About

With the advent and widespread deployment of Multimodal Large Language Models (MLLMs), the imperative to ensure their safety has become increasingly pronounced. However, with the integration of additional modalities, MLLMs are exposed to new vulnerabilities, rendering them prone to structured-based jailbreak attacks, where semantic content (e.g., "harmful text") has been injected into the images to mislead MLLMs. In this work, we aim to defend against such threats. Specifically, we propose \textbf{Ada}ptive \textbf{Shield} Prompting (\textbf{AdaShield}), which prepends inputs with defense prompts to defend MLLMs against structure-based jailbreak attacks without fine-tuning MLLMs or training additional modules (e.g., post-stage content detector). Initially, we present a manually designed static defense prompt, which thoroughly examines the image and instruction content step by step and specifies response methods to malicious queries. Furthermore, we introduce an adaptive auto-refinement framework, consisting of a target MLLM and a LLM-based defense prompt generator (Defender). These components collaboratively and iteratively communicate to generate a defense prompt. Extensive experiments on the popular structure-based jailbreak attacks and benign datasets show that our methods can consistently improve MLLMs' robustness against structure-based jailbreak attacks without compromising the model's general capabilities evaluated on standard benign tasks. Our code is available at https://github.com/rain305f/AdaShield.

Yu Wang, Xiaogeng Liu, Yu Li, Muhao Chen, Chaowei Xiao• 2024

Related benchmarks

TaskDatasetResultRank
Jailbreak AttackHADES
Attack Success Rate26.5
59
Jailbreak Attack DefenseMM-SafetyBench
Attack Success Rate (ASR)8.57
56
Jailbreak Safety EvaluationMM-Safety Bench (test)
Average ASR4.81
56
Jailbreak AttackRedTeam 2K
ASR24.7
52
Vision-Language UnderstandingMM-Vet--
43
Safety EvaluationMM-SafetyBench
Average ASR0.12
42
Jailbreak AttackFigStep
Attack Success Rate (ASR)12.4
26
Visual Jailbreak DefenseVisual Adversarial Attacks epsilon = 16/255
Attack Success Rate17.32
25
Visual Jailbreak DefenseVisual Adversarial Attacks epsilon = 32/255
ASR18.2
25
Text-Based Jailbreak AttackJailbreakV-28K (test)
ASR (None-Template)63.22
25
Showing 10 of 34 rows

Other info

Follow for update