arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.13968cs.CLcs.AIcs.CR
收藏

用信息瓶颈保护你的LLM

Protecting Your LLMs with Information Bottleneck

Nanjing University(南京大学);Microsoft Research Asia(微软亚洲研究院);Tsinghua University(清华大学);Queen Mary University of London(伦敦玛丽女王大学);Pennsylvania State University(宾夕法尼亚州立大学);NEC Laboratories America(美国 NEC 实验室)

Zichuan Liu, Zefan Wang, Linjie Xu, Jinyu Wang, Lei Song, Tianchun Wang, Chunlin Chen, Wei Cheng, Jiang Bian

AI总结:

本文提出基于信息瓶颈原理的防御机制IBProtector,通过轻量级提取器选择性压缩和扰动提示词以保留关键信息,在不修改底层模型的情况下有效抵御越狱攻击并保持响应质量。

摘要:

大型语言模型(LLMs)的出现彻底改变了自然语言处理领域,但它们可能会被攻击以产生有害内容。尽管在LLMs的伦理对齐方面做出了努力,但这些对齐往往很脆弱,可以通过优化或人工设计的对抗性提示词进行的越狱攻击来绕过。为了解决这个问题,我们引入了信息瓶颈保护器(IBProtector),这是一种基于信息瓶颈原理的防御机制,并且我们修改了目标函数以避免平凡解。IBProtector在一个轻量级且可训练的提取器的辅助下,选择性地压缩和扰动提示词,仅保留目标LLMs生成预期回答所需的关键信息。此外,我们进一步考虑了梯度不可见的情况,以兼容任何LLM。我们的实证评估表明,IBProtector在缓解越狱尝试方面优于当前的防御方法,同时不会过度影响响应质量或推理速度。其在各种攻击方法和目标LLMs上的有效性和适应性,凸显了IBProtector作为一种新颖、可迁移的防御机制的潜力,它能在无需修改底层模型的情况下增强LLMs的安全性。

英文摘要:

The advent of large language models (LLMs) has revolutionized the field of natural language processing, yet they might be attacked to produce harmful content. Despite efforts to ethically align LLMs, these are often fragile and can be circumvented by jailbreaking attacks through optimized or manual adversarial prompts. To address this, we introduce the Information Bottleneck Protector (IBProtector), a defense mechanism grounded in the information bottleneck principle, and we modify the objective to avoid trivial solutions. The IBProtector selectively compresses and perturbs prompts, facilitated by a lightweight and trainable extractor, preserving only essential information for the target LLMs to respond with the expected answer. Moreover, we further consider a situation where the gradient is not visible to be compatible with any LLM. Our empirical evaluations show that IBProtector outperforms current defense methods in mitigating jailbreak attempts, without overly affecting response quality or inference speed. Its effectiveness and adaptability across various attack methods and target LLMs underscore the potential of IBProtector as a novel, transferable defense that bolsters the security of LLMs without requiring modifications to the underlying models.

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

↑