arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.04724cs.CRcs.LG
收藏

Purple Llama CyberSecEval:面向语言模型的安全编码基准

Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Models

Meta
Manish Bhatt, Sahana Chennabasappa, Cyrus Nikolaidis, Shengye Wan, Ivan Evtimov, Dominik Gabi, Daniel Song, Faizan Ahmad, Cornelius Aschermann, Lorenzo Fontana,… 展开作者

Manish Bhatt, Sahana Chennabasappa, Cyrus Nikolaidis, Shengye Wan, Ivan Evtimov, Dominik Gabi, Daniel Song, Faizan Ahmad, Cornelius Aschermann, Lorenzo Fontana, Sasha Frolov, Ravi Prakash Giri, Dhaval Kapil, Yiannis Kozyrakis, David LeBlanc, James Milazzo, Aleksandar Straumann, Gabriel Synnaeve, Varun Vontimitta, Spencer Whitman, Joshua Saxe

AI总结:

本文提出 CyberSecEval 统一网络安全基准,从生成不安全代码和协助网络攻击两方面评估七款编码 LLM,发现先进模型仍存在安全风险,并提供自动化评测与改进工具。

摘要:

本文介绍了 CyberSecEval,这是一个综合性基准,旨在帮助增强用作编码助手的大型语言模型(LLM)的网络安全。我们相信 CyberSecEval 是迄今为止最广泛的统一网络安全安全基准,它在两个关键安全领域对 LLM 进行全面评估:它们生成不安全代码的倾向,以及在被要求协助网络攻击时的遵从程度。通过一项涉及 Llama 2、Code Llama 和 OpenAI GPT 大型语言模型系列中七个模型的案例研究,CyberSecEval 有效识别了关键网络安全风险。更重要的是,它为改进这些模型提供了实用见解。研究中的一个重要观察结果是,更先进的模型倾向于建议不安全代码,这凸显了在复杂 LLM 的开发中整合安全考量的迫切需要。CyberSecEval 凭借其自动化测试用例生成和评估流程,覆盖范围广泛,并为 LLM 设计者和研究人员提供了一种工具,以广泛衡量和增强 LLM 的网络安全安全属性,从而助力开发更安全的 AI 系统。

英文摘要:

This paper presents CyberSecEval, a comprehensive benchmark developed to help bolster the cybersecurity of Large Language Models (LLMs) employed as coding assistants. As what we believe to be the most extensive unified cybersecurity safety benchmark to date, CyberSecEval provides a thorough evaluation of LLMs in two crucial security domains: their propensity to generate insecure code and their level of compliance when asked to assist in cyberattacks. Through a case study involving seven models from the Llama 2, Code Llama, and OpenAI GPT large language model families, CyberSecEval effectively pinpointed key cybersecurity risks. More importantly, it offered practical insights for refining these models. A significant observation from the study was the tendency of more advanced models to suggest insecure code, highlighting the critical need for integrating security considerations in the development of sophisticated LLMs. CyberSecEval, with its automated test case generation and evaluation pipeline covers a broad scope and equips LLM designers and researchers with a tool to broadly measure and enhance the cybersecurity safety properties of LLMs, contributing to the development of more secure AI systems.

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

↑