[论文解读] Bergeron: Combating Adversarial Attacks through a Conscience-Based Alignment Framework
Bergeron 提出了一种两级 LLM 框架,其中二级的“良心”模型会监控并纠正主 LLM 的不安全输入和输出,从而在无需微调的情况下显著提升对对抗性攻击的鲁棒性。该方法在多个模型(包括 GPT-3.5、Llama2-7B 和 Mistral-7B)上均降低了故障率,尤其在高风险提示(如 shell 模拟和列表生成)上表现突出。
Research into AI alignment has grown considerably since the recent introduction of increasingly capable Large Language Models (LLMs). Unfortunately, modern methods of alignment still fail to fully prevent harmful responses when models are deliberately attacked. Such vulnerabilities can lead to LLMs being manipulated into generating hazardous content: from instructions for creating dangerous materials to inciting violence or endorsing unethical behaviors. To help mitigate this issue, we introduce Bergeron: a framework designed to improve the robustness of LLMs against attacks without any additional parameter fine-tuning. Bergeron is organized into two tiers; with a secondary LLM acting as a guardian to the primary LLM. This framework better safeguards the primary model against incoming attacks while monitoring its output for any harmful content. Empirical analysis reviews that by using Bergeron to complement models with existing alignment training, we can significantly improve the robustness and safety of multiple, commonly used commercial and open-source LLMs. Specifically, we found that models integrated with Bergeron are, on average, nearly seven times more resistant to attacks compared to models without such support.
研究动机与目标
- 解决大型语言模型对对抗性提示持续存在的脆弱性,这些提示可绕过现有的对齐方法。
- 克服基于权重的对齐技术(如 RLHF)的局限性,后者成本高、不完整,且可能降低模型性能。
- 开发一种模块化、非侵入式的框架,增强对齐性,而无需重新训练主模型。
- 通过添加一个外部、透明的监督层,提升开源和黑箱 LLM 的安全性。
- 证明二级 LLM 可作为主模型输入和输出的实时、可解释的安全防护机制。
提出的方法
- 部署一个二级 LLM 作为“良心”,用于监控主 LLM 的输入提示和生成输出。
- 利用良心模型实时检测并纠正潜在有害内容,使用自然语言文本进行批判性分析。
- 实施两级防护:一级用于生成前的提示纠正,二级用于生成后的响应纠正。
- 使用 GPT-4 作为裁判模型,通过包含成功/失败示例的三样本提示评估响应的安全性。
- 将框架实现为包装器,确保对主模型原始行为的最小干扰。
- 采用可通过多次调用应用的迭代式纠正机制,尽管当前评估仅使用单次调用。
实验结果
研究问题
- RQ1二级 LLM 是否能在不微调的情况下,有效检测并纠正主 LLM 输入和输出中的不安全内容?
- RQ2Bergeron 框架在具有不同预对齐程度的模型(如 GPT-3.5 与 Mistral-7B)上的性能表现如何?
- RQ3模型规模和预对齐程度对基于良心的框架有效性有何影响?
- RQ4哪些对抗性提示技术最能绕过该框架,原因是什么?
- RQ5该框架在各类攻击类型(如 shell 模拟、列表生成和始终马基雅维利式提示)下与原始模型相比表现如何?
主要发现
- Bergeron 框架在所有评估模型中均降低了故障率,其中 GPT-3.5 的改进最为显著,所有攻击类型下的故障率均大幅下降。
- Llama2-7B 对列表生成攻击更为脆弱,而 GPT-3.5 更易受 shell 模拟提示影响,但 Bergeron 均有效缓解了这两种威胁。
- 尽管 Mistral-7B 经过极少的对齐微调,其故障率仍降低了 4% 至 11%,表明该框架在对齐程度较低的模型上也具有效果。
- 该框架在具有强预对齐的大规模、封闭源代码模型上表现最佳,表明基于权重的对齐与基于良心的对齐之间存在协同效应。
- 当 GPT-4 判定输出为不安全时,良心模型在 100% 的情况下成功识别并纠正了不安全内容,证明其检测准确率极高。
- 该框架在包括 Always Machiavellian、Shell Emulation 和 List Completion 在内的多种攻击类型中均保持高性能,表明其具备广泛的鲁棒性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。