[论文解读] A Comprehensive Study of Jailbreak Attack versus Defense for Large Language Models
本文系统评估了在 LLMs(Vicuna、LLaMA、GPT-3.5 Turbo)上九种越狱攻击技术和七种防御方法,结果显示基于模板的攻击在某些情况下常常优于白盒方法,而 Bergeron 是在测试中最有效的防御。
Large Language Models (LLMS) have increasingly become central to generating content with potential societal impacts. Notably, these models have demonstrated capabilities for generating content that could be deemed harmful. To mitigate these risks, researchers have adopted safety training techniques to align model outputs with societal values to curb the generation of malicious content. However, the phenomenon of "jailbreaking", where carefully crafted prompts elicit harmful responses from models, persists as a significant challenge. This research conducts a comprehensive analysis of existing studies on jailbreaking LLMs and their defense techniques. We meticulously investigate nine attack techniques and seven defense techniques applied across three distinct language models: Vicuna, LLama, and GPT-3.5 Turbo. We aim to evaluate the effectiveness of these attack and defense techniques. Our findings reveal that existing white-box attacks underperform compared to universal techniques and that including special tokens in the input significantly affects the likelihood of successful attacks. This research highlights the need to concentrate on the security facets of LLMs. Additionally, we contribute to the field by releasing our datasets and testing framework, aiming to foster further research into LLM security. We believe these contributions will facilitate the exploration of security measures within this domain.
研究动机与目标
- 评估多种越狱攻击技术在多种LLM上的有效性。
- 评估各种越狱防御策略对这些攻击的鲁棒性。
- 识别影响攻击成功的因素,包括模型类型与输入令牌。
提出的方法
- 从开放来源与库中选择九种攻击方法和七种防御的基线。
- 基准构建扩展到 60 条符合 OpenAI 指南的恶意查询。
- 使用基于 RoBERTa 的微调模型对恶意回应进行分类,并进行人工验证。
- 使用 Attack Success Rate (ASR) 和 Efficiency 对攻击进行评估,防御方面使用 DPR、BPR、GRQ。
- 在两张 GPU 上对三种模型(Vicuna、Llama-2、GPT-3.5 Turbo)进行两阶段评估。
- 包含基准平台和数据集在内的开源产物。

实验结果
研究问题
- RQ1RQ1:在不同未受保护的 LLM 上,越狱攻击技术有多有效?
- RQ2RQ2:针对不同 LLM 的越狱攻击,防御策略有多有效?
主要发现
- 基于模板的越狱方法非常有效,在某些模型中常常优于生成式方法。
- 如 GPTFuzz、Pair 和 TAP 等生成式攻击在基于生成的方法中表现最佳,而白盒方法相较于通用模板表现不佳。
- LLaMA 展现出比 Vicuna 更强的固有安全防御,使在白盒设置下更难越狱。
- 特殊令牌(例如某个 INST 标记)显著影响跨模板和模型的攻击成功率。
- Bergeron 成为所测试防御中最有效者,而大多数防御难以阻止恶意提示或过度限制良性提示。
- 需要标准化、可扩展的防御评估,以减少对良性提示的误分类并提高鲁棒性。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。