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

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

arXiv:2403.09513 · 2026-07-27 공개 · arXiv · PDF

multimodal-llms robustness-evaluation prompt-refinement jailbreak-defense llm-based-generator defender-framework benign-datasets shield-prompting

Abstract

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.

한국어 요약

한 줄 요약

AdaShield는 구조 기반 탈옥 공격에 대응하는 적응형 쉴드 프롬프팅 방식으로, MLLM의 안전성을 유지하면서 훈련 없이도 방어 성능을 향상시킨다.

핵심 기여도

핵심 아이디어

구조 기반 탈옥 공격은 해로운 텍스트를 이미지에 숨겨 MLLM의 안전 메커니즘을 우회하는 방식이다. 기존 방어법은 훈련이나 후처리 모듈이 필요하지만, 이는 계산 비용이 높고 MLMaaS 환경에서는 적용이 어려웠다.
AdaShield는 입력에 **방어 프롬프트**를 자동으로 추가하는 방식으로, 훈련 없이도 MLLM의 입력을 분석하고 해로운 쿼리를 차단한다.
**AdaShield-S**는 수작업된 $ P_s $를 사용해 이미지와 텍스트를 단계적으로 검증하도록 유도하며, **Chain-of-Thought (CoT)** 프롬프팅을 통해 성능을 향상시킨다.
**AdaShield-A**는 **Defender LLM**과 **타겟 MLLM**이 대화를 통해 방어 프롬프트를 반복적으로 최적화하는 **자동 정제 프레임워크**를 도입, 다양한 공격 시나리오에 대응하는 다수의 방어 프롬프트를 생성한다.

기술적 접근법

주요 결과

의의 및 한계

실용적 활용