arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2408.09093cs.CR
收藏

BaThe:通过将有害指令视为后门触发器来防御多模态大语言模型中的越狱攻击

BaThe: Defense against the Jailbreak Attack in Multimodal Large Language Models by Treating Harmful Instruction as Backdoor Trigger

Yulin Chen, Haoran Li, Yirui Zhang, Zihao Zheng, Yangqiu Song, Bryan Hooi

AI总结:

针对多模态大语言模型易受图像注入有害内容越狱攻击的问题,提出BaThe方法,将有害指令视为后门触发器并嵌入虚拟拒绝提示,实现有效防御且对模型性能影响小。

摘要:

多模态大语言模型(MLLMs)在各种多模态任务中展示了令人印象深刻的表现。另一方面,额外图像模态的集成可能允许恶意用户在图像中注入有害内容以进行越狱。与基于文本的LLMs不同,在基于文本的LLMs中,对手需要使用特定算法选择离散标记来隐藏其恶意意图,而图像信号的连续性质为对手直接注入有害意图提供了机会。在这项工作中,我们提出了BaThe(后门触发器防护盾),一种简单而有效的越狱防御机制。我们的工作受到最近关于生成语言模型中越狱后门攻击和虚拟提示后门攻击研究的启发。越狱后门攻击使用有害指令与手工制作的字符串组合作为触发器,使带有后门的模型生成被禁止的响应。我们假设有害指令可以作为触发器,如果我们反过来将拒绝响应设置为触发响应,那么带有后门的模型就可以防御越狱攻击。我们通过利用虚拟拒绝提示来实现这一点,类似于虚拟提示后门攻击。我们将虚拟拒绝提示嵌入到软文本嵌入中,我们称之为“楔子”。我们的全面实验表明,BaThe有效缓解了各种类型的越狱攻击,并能适应防御未见过的攻击,同时对MLLMs的性能影响最小。

英文摘要:

Multimodal Large Language Models (MLLMs) have showcased impressive performance in a variety of multimodal tasks. On the other hand, the integration of additional image modality may allow the malicious users to inject harmful content inside the images for jailbreaking. Unlike text-based LLMs, where adversaries need to select discrete tokens to conceal their malicious intent using specific algorithms, the continuous nature of image signals provides a direct opportunity for adversaries to inject harmful intentions. In this work, we propose $\textbf{BaThe}$ ($\textbf{Ba}$ckdoor $\textbf{T}$rigger S$\textbf{h}$i$\textbf{e}$ld), a simple yet effective jailbreak defense mechanism. Our work is motivated by recent research on jailbreak backdoor attack and virtual prompt backdoor attack in generative language models. Jailbreak backdoor attack uses harmful instructions combined with manually crafted strings as triggers to make the backdoored model generate prohibited responses. We assume that harmful instructions can function as triggers, and if we alternatively set rejection responses as the triggered response, the backdoored model then can defend against jailbreak attacks. We achieve this by utilizing virtual rejection prompt, similar to the virtual prompt backdoor attack. We embed the virtual rejection prompt into the soft text embeddings, which we call ``wedge''. Our comprehensive experiments demonstrate that BaThe effectively mitigates various types of jailbreak attacks and is adaptable to defend against unseen attacks, with minimal impact on MLLMs' performance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑