CyberMetric: A Benchmark Dataset based on Retrieval-Augmented Generation for Evaluating LLMs in Cybersecurity Knowledge
作者: Norbert Tihanyi, Mohamed Amine Ferrag, Ridhi Jain, Tamas Bisztray, Merouane Debbah
分类: cs.AI, cs.CR
发布日期: 2024-02-12 (更新: 2024-06-03)
💡 一句话要点
提出CyberMetric基准数据集以评估LLMs在网络安全知识中的表现
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 网络安全 大型语言模型 基准数据集 检索增强生成 多项选择问答 模型评估 专家验证
📋 核心要点
- 现有方法在网络安全知识评估中缺乏多样化和准确性,难以全面测试LLMs的能力。
- 本文提出了CyberMetric数据集,通过多项选择题的形式,系统性地评估LLMs在网络安全领域的知识。
- 实验结果表明,顶尖LLMs在CyberMetric-80上的表现优于人类专家,显示出其在特定领域的优势。
📝 摘要(中文)
大型语言模型(LLMs)在软件开发和网络威胁情报等多个领域的应用日益广泛。然而,网络安全领域的知识复杂多样,包括密码学、逆向工程和风险评估等,给人类专家带来了挑战。为准确测试LLMs在网络安全领域的综合知识,研究社区亟需一个多样化、准确且最新的数据集。为此,本文提出了CyberMetric-80、CyberMetric-500、CyberMetric-2000和CyberMetric-10000四个多项选择问答基准数据集,分别包含80、500、2000和10000个问题。通过利用GPT-3.5和检索增强生成(RAG)技术,收集了包括NIST标准、研究论文和公开书籍等文献,生成了每个问题的四个可能答案。经过多轮错误检查和人类专家的验证,确保了问题的准确性和相关性。我们对25个最先进的LLM模型进行了评估和比较,结果显示,GPT-4o等模型的表现优于人类专家。
🔬 方法详解
问题定义:本文旨在解决现有LLMs在网络安全知识评估中的不足,尤其是缺乏一个全面且准确的数据集来测试其能力。
核心思路:通过构建多个基准数据集(CyberMetric-80等),利用检索增强生成技术,系统性地生成多项选择题,以评估LLMs在网络安全领域的知识。
技术框架:整体架构包括数据收集、问题生成、答案验证和模型评估四个主要阶段。首先收集相关文献,然后生成问题,最后通过专家验证确保问题的准确性。
关键创新:最重要的创新在于结合了检索增强生成技术与专家验证,确保了数据集的高质量和相关性,这在现有方法中较为少见。
关键设计:在数据集构建过程中,设置了严格的验证流程,确保每个问题都经过200小时的专家审查,过滤掉与网络安全无关的问题。
🖼️ 关键图片
📊 实验亮点
实验结果显示,GPT-4o、GPT-4-turbo等模型在CyberMetric-80数据集上表现优异,准确率超过人类专家,尤其是在小型模型(如Llama-3-8B)面前,展现出显著的性能优势。这一发现为LLMs在网络安全领域的应用提供了重要参考。
🎯 应用场景
该研究的潜在应用领域包括网络安全教育、LLMs的能力评估以及安全工具的开发。通过提供一个标准化的数据集,研究人员和开发者可以更有效地比较和提升LLMs在网络安全领域的表现,推动相关技术的发展与应用。
📄 摘要(原文)
Large Language Models (LLMs) are increasingly used across various domains, from software development to cyber threat intelligence. Understanding all the different fields of cybersecurity, which includes topics such as cryptography, reverse engineering, and risk assessment, poses a challenge even for human experts. To accurately test the general knowledge of LLMs in cybersecurity, the research community needs a diverse, accurate, and up-to-date dataset. To address this gap, we present CyberMetric-80, CyberMetric-500, CyberMetric-2000, and CyberMetric-10000, which are multiple-choice Q&A benchmark datasets comprising 80, 500, 2000, and 10,000 questions respectively. By utilizing GPT-3.5 and Retrieval-Augmented Generation (RAG), we collected documents, including NIST standards, research papers, publicly accessible books, RFCs, and other publications in the cybersecurity domain, to generate questions, each with four possible answers. The results underwent several rounds of error checking and refinement. Human experts invested over 200 hours validating the questions and solutions to ensure their accuracy and relevance, and to filter out any questions unrelated to cybersecurity. We have evaluated and compared 25 state-of-the-art LLM models on the CyberMetric datasets. In addition to our primary goal of evaluating LLMs, we involved 30 human participants to solve CyberMetric-80 in a closed-book scenario. The results can serve as a reference for comparing the general cybersecurity knowledge of humans and LLMs. The findings revealed that GPT-4o, GPT-4-turbo, Mixtral-8x7B-Instruct, Falcon-180B-Chat, and GEMINI-pro 1.0 were the best-performing LLMs. Additionally, the top LLMs were more accurate than humans on CyberMetric-80, although highly experienced human experts still outperformed small models such as Llama-3-8B, Phi-2 or Gemma-7b.