Tit-for-Tat: Safeguarding Large Vision-Language Models Against Jailbreak Attacks via Adversarial Defense
Shuyang Hao, Yiwei Wang, Bryan Hooi, Ming-Hsuan Yang, Jun Liu, Chengcheng Tang, Zi Huang, Yujun Cai
TL;DR
This work addresses the vulnerability of large vision-language models to jailbreaking attacks delivered through visual inputs by proposing ESIII, a two-stage defense that couples visual and textual safeguards. It first creates a universal defensive image $i^{*}_{def}$ via gradient-based optimization to embed security instructions, then synthesizes textual prompts $t_s$ to form a joint input $T$ with the enhanced image, yielding $y^{*} = \mathcal{M}([ W \cdot E(I), T ])$. Empirical results across MM-SafetyBench, VLGuard, and MM-Vet show ESIII significantly reduces jailbreak attack success while preserving performance on benign tasks and incurring negligible inference-time costs; it also demonstrates transferability across LVLMs and scenarios. Overall, ESIII leverages cross-modal defense signals to provide robust, efficient, and broadly applicable LVLM safety improvements suitable for practical deployment.
Abstract
Deploying large vision-language models (LVLMs) introduces a unique vulnerability: susceptibility to malicious attacks via visual inputs. However, existing defense methods suffer from two key limitations: (1) They solely focus on textual defenses, fail to directly address threats in the visual domain where attacks originate, and (2) the additional processing steps often incur significant computational overhead or compromise model performance on benign tasks. Building on these insights, we propose ESIII (Embedding Security Instructions Into Images), a novel methodology for transforming the visual space from a source of vulnerability into an active defense mechanism. Initially, we embed security instructions into defensive images through gradient-based optimization, obtaining security instructions in the visual dimension. Subsequently, we integrate security instructions from visual and textual dimensions with the input query. The collaboration between security instructions from different dimensions ensures comprehensive security protection. Extensive experiments demonstrate that our approach effectively fortifies the robustness of LVLMs against such attacks while preserving their performance on standard benign tasks and incurring an imperceptible increase in time costs.
