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

CodeChameleon:用于越狱大语言模型的个性化加密框架

CodeChameleon: Personalized Encryption Framework for Jailbreaking Large Language Models

School of Computer Science, Fudan University(复旦大学计算机科学学院);Institute of Modern Languages and Linguistics, Fudan University(复旦大学现代语言与语言学研究所)

Huijie Lv, Xiao Wang, Yuansen Zhang, Caishuang Huang, Shihan Dou, Junjie Ye, Tao Gui, Qi Zhang, Xuanjing Huang

AI总结:

本文提出CodeChameleon框架,通过个性化加密将越狱任务伪装成代码补全以绕过LLM意图安全识别,并在指令中嵌入解密函数保证执行,在7个LLM上取得领先攻击成功率。

摘要:

对抗性滥用,尤其是通过“越狱”绕过模型安全与伦理协议的行为,对大语言模型(LLMs)构成了重大挑战。本文深入探讨了此类成功攻击背后的机制,并针对对齐后大语言模型的安全机制提出了一个假设:意图安全识别之后再进行响应生成。基于这一假设,我们提出了CodeChameleon,一个基于个性化加密策略的新型越狱框架。为了规避意图安全识别阶段,我们将任务重新表述为代码补全格式,使用户能够利用个性化加密函数对查询进行加密。为了保证响应生成功能,我们在指令中嵌入了一个解密函数,使LLM能够成功解密并执行加密查询。我们在7个LLM上进行了广泛实验,取得了最先进水平的平均攻击成功率(ASR)。值得注意的是,我们的方法在GPT-4-1106上实现了86.6%的ASR。

英文摘要:

Adversarial misuse, particularly through `jailbreaking' that circumvents a model's safety and ethical protocols, poses a significant challenge for Large Language Models (LLMs). This paper delves into the mechanisms behind such successful attacks, introducing a hypothesis for the safety mechanism of aligned LLMs: intent security recognition followed by response generation. Grounded in this hypothesis, we propose CodeChameleon, a novel jailbreak framework based on personalized encryption tactics. To elude the intent security recognition phase, we reformulate tasks into a code completion format, enabling users to encrypt queries using personalized encryption functions. To guarantee response generation functionality, we embed a decryption function within the instructions, which allows the LLM to decrypt and execute the encrypted queries successfully. We conduct extensive experiments on 7 LLMs, achieving state-of-the-art average Attack Success Rate (ASR). Remarkably, our method achieves an 86.6\% ASR on GPT-4-1106.

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

↑