Skip to main content
QUICK REVIEW

[论文解读] GPT-4 Is Too Smart To Be Safe: Stealthy Chat with LLMs via Cipher

Youliang Yuan, Wenxiang Jiao|arXiv (Cornell University)|Aug 12, 2023
Topic ModelingComputer Science被引用 14
一句话总结

本文提出了 CipherChat,这是一个通过以密文对话来测试大语言模型安全对齐的框架,揭示了基于密文的提示可以绕过安全措施,其中 SelfCipher 的规避效果尤为强劲。

ABSTRACT

Safety lies at the core of the development of Large Language Models (LLMs). There is ample work on aligning LLMs with human ethics and preferences, including data filtering in pretraining, supervised fine-tuning, reinforcement learning from human feedback, and red teaming, etc. In this study, we discover that chat in cipher can bypass the safety alignment techniques of LLMs, which are mainly conducted in natural languages. We propose a novel framework CipherChat to systematically examine the generalizability of safety alignment to non-natural languages -- ciphers. CipherChat enables humans to chat with LLMs through cipher prompts topped with system role descriptions and few-shot enciphered demonstrations. We use CipherChat to assess state-of-the-art LLMs, including ChatGPT and GPT-4 for different representative human ciphers across 11 safety domains in both English and Chinese. Experimental results show that certain ciphers succeed almost 100% of the time to bypass the safety alignment of GPT-4 in several safety domains, demonstrating the necessity of developing safety alignment for non-natural languages. Notably, we identify that LLMs seem to have a ''secret cipher'', and propose a novel SelfCipher that uses only role play and several demonstrations in natural language to evoke this capability. SelfCipher surprisingly outperforms existing human ciphers in almost all cases. Our code and data will be released at https://github.com/RobustNLP/CipherChat.

研究动机与目标

  • 评估针对自然语言学习到的安全对齐是否能够推广到非自然语言(密文)。
  • 开发一个框架(CipherChat),用于在密文输入输出提示下评估 LLM 的安全性。
  • 识别哪些密文类型和提示结构最能引发前沿 LLM 的不安全回应。
  • 探究 LLMs 是否具备潜在的“秘密密文”,以及如何唤起它以绕过安全。
  • 提供提升安全对齐以覆盖非自然语言的建议。

提出的方法

  • 构建一个三部分的系统提示(行为分配、密文教学、密文不安全演示),以训练 LLM 在密文模式下工作。
  • 使用多种密码(GBK、ASCII、UTF、Unicode、Morse、Atbash、Caesar、SelfCipher)对输入指令进行密文编码并提供给 LLM。
  • 使用基于规则的方法和基于 GPT-4 的解密器将密文输出翻译回自然语言以进行评估。
  • 通过 CipherChat 设置对 GPT-3.5-Turbo 和 GPT-4 进行提示,在英语和中文的 11 个安全领域中评估安全性。
  • 手动和自动筛选并分类不安全输出,并在不同密文和语言之间进行比较。
  • 分析系统提示、不安全演示及演示对安全规避的影响。

实验结果

研究问题

  • RQ1CipherChat 是否能够通过跨语言的密文提示实现与 LLM 的对话?
  • RQ2CipherChat 是否能够利用不同密文绕过 LLMs 的安全对齐,尤其是 GPT-4?
  • RQ3哪些因素(系统提示、不安全演示、密文类型)会影响 CipherChat 的规避效果?
  • RQ4是否存在 LLM 内潜在的“秘密密文”的证据,SelfCipher 是否能更有效地利用它?
  • RQ5安全对齐应如何扩展以覆盖非自然语言像密文这样的?

主要发现

  • CipherChat 使 Turbo 和 GPT-4 能以所选密文在中文和英文中对话。
  • 某些人类密文(中文的 Unicode、英文的 ASCII)在相当程度上可以绕过 GPT-4 的安全对齐,取得显著成效。
  • SelfCipher 使用自然语言角色扮演和演示,达到较高的规避率,且常常优于传统密文。
  • GPT-4 通常比 Turbo 给出更高的不安全率,尤其在英语中。
  • SelfCipher 在 Crimes 领域的英语不安全率为 70.9%,表现最佳。
  • 在 11 个领域中,不安全回应在高容量模型中更频繁,在英语中也比中文多,Insult、Unfairness 和 Mental Health 领域尤为突出。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。