2025-02-03 · 专家 · 机器学习 · 计算机视觉 · 自然语言处理

Constitutional Classifiers: Defending against Universal Jailbreaks across Thousands of Hours of Red Teaming

本文提出了一种名为“宪法分类器”的框架,通过使用自然语言规则定义允许和限制的内容类别,来训练分类器以防御大型语言模型(LLM)遭受通用越狱攻击的风险。

更新于 2025-02-03。作者:Mrinank Sharma、Meg Tong、Jesse Mu、Jerry Wei、Jorrit Kruthoff、Scott Goodfriend、Euan Ong、Alwin Peng、Raj Agarwal、Cem Anil、Amanda Askell、Nathan Bailey、Joe Benton、Emma Bluemke、Samuel R. Bowman、Eric Christiansen、Hoagy Cunningham、Andy Dau、Anjali Gopal、Rob Gilson、Logan Graham、Logan Howard、Nimit Kalra、Taesung Lee、Kevin Lin、Peter Lofgren、Francesco Mosconi、Clare O'Hara、Catherine Olsson、Linda Petrini、Samir Rajani、Nikhil Saxena、Alex Silverstein、Tanya Singh、Theodore Sumers、Leonard Tang、Kevin K. Troy、Constantin Weisser、Ruiqi Zhong、Giulio Zhou、Jan Leike、Jared Kaplan、Ethan Perez。

中文摘要

大型语言模型(LLMs)容易受到通用越狱攻击——这些攻击策略系统地绕过模型的安全措施,使用户能够执行需要许多模型交互的有害过程,例如大规模制造非法物质。为了防御这些攻击,我们引入了宪法分类器:在由LLMs根据自然语言规则(即宪法)生成的合成数据上训练的安全保障,这些规则指定了允许和限制的内容。在超过3,000小时的预估红队测试中,没有发现任何红队能够找到能够从早期分类器保护的LLM中提取信息的通用越狱,其详细程度与未受保护的模型在大多数目标查询中的水平相似。在自动评估中,增强分类器展示了针对保留域特定越狱的强大防御能力。这些分类器也保持了部署的可行性,生产流量拒绝率绝对增加了0.38%,推理开销降低了23.7%。我们的工作表明,在保持实际部署可行性的同时防御通用越狱是可行的。

英文摘要

Large language models (LLMs) are vulnerable to universal jailbreaks-prompting strategies that systematically bypass model safeguards and enable users to carry out harmful processes that require many model interactions, like manufacturing illegal substances at scale. To defend against these attacks, we introduce Constitutional Classifiers: safeguards trained on synthetic data, generated by prompting LLMs with natural language rules (i.e., a constitution) specifying permitted and restricted content. In over 3,000 estimated hours of red teaming, no red teamer found a universal jailbreak that could extract information from an early classifier-guarded LLM at a similar level of detail to an unguarded model across most target queries. On automated evaluations, enhanced classifiers demonstrated robust defense against held-out domain-specific jailbreaks. These classifiers also maintain deployment viability, with an absolute 0.38% increase in production-traffic refusals and a 23.7% inference overhead. Our work demonstrates that defending against universal jailbreaks while maintaining practical deployment viability is tractable.

解读

一句话总结

本文提出了一种名为“宪法分类器”的框架,通过使用自然语言规则定义允许和限制的内容类别,来训练分类器以防御大型语言模型(LLM)遭受通用越狱攻击的风险。

问题1:这篇论文想要解决什么具体问题?

• 问题背景:大型语言模型(LLM)容易受到通用越狱攻击,这些攻击可以绕过模型的安全机制,并允许用户执行需要大量模型交互的有害过程。 • 现有方案不足:目前的安全机制,如越狱防御,可能不足以有效防御针对广泛查询的通用越狱攻击。 • 研究目标:开发一种能够防御通用越狱攻击,同时保持实际部署可行性的方法。

问题2:论文的核心创新点是什么?

• 技术创新:引入了“宪法分类器”,它使用自然语言规则定义允许和限制的内容类别,并使用这些规则生成合成数据来训练分类器。 • 方法改进:采用双分类器防御系统,包括输入分类器和输出分类器,以提供多层保护。 • 优势:通过在超过3000小时的红色团队测试中未发现成功的通用越狱攻击,证明了方法的鲁棒性。

问题3:实验结果如何验证了方法的有效性?

• 关键实验:进行了超过3000小时的红色团队测试,以及自动化评估,以验证分类器的鲁棒性。 • 性能提升:在自动化评估中,增强了的分类器对保留域特定越狱攻击表现出鲁棒的防御。 • 对比结果:与未使用分类器的系统相比,分类器保护的系统拒绝了超过95%的越狱尝试。

问题4:这个研究的实际应用价值是什么?

• 应用场景:该研究可以应用于需要高级科学能力的LLM,以减少CBRN相关滥用风险。 • 实施建议:建议在LLM系统中实施宪法分类器,以提供额外的安全层。 • 局限与展望:虽然该方法在防御通用越狱攻击方面表现出色,但需要进一步研究以解决潜在的局限性,并随着威胁模型的演变而改进。

来源

机器可读索引:llms.txt