arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2401.03741cs.SEcs.CL
收藏

使用大型语言模型增强自动化代码漏洞修复

Enhanced Automated Code Vulnerability Repair using Large Language Models

Universidad de Alcalá(阿尔卡拉大学)

David de-Fitero-Dominguez, Eva Garcia-Lopez, Antonio Garcia-Cabot, Jose-Javier Martinez-Herraiz

AI总结:

本文提出利用 Code Llama 和 Mistral 等大型语言模型及新的代码修改表示格式来增强 C 代码漏洞自动修复,实验表明其准确性优于 VulRepair,并强调了评估指标与数据集完整性的重要性。

摘要:

本研究针对代码漏洞自动化修复这一复杂挑战展开,该挑战对于在日益由技术驱动的世界中增强数字安全至关重要。研究引入了一种新颖且高效的代码修改表示格式,使用了先进的大型语言模型(LLMs),如 Code Llama 和 Mistral。这些模型在包含 C 代码漏洞的数据集上进行了微调,显著提高了自动化代码修复技术的准确性和适应性。一项关键发现是,与 VulRepair 等先前方法相比,这些模型的修复准确性有所提升,这凸显了它们的实用价值和效率。研究还对当前评估指标(如完美预测)及其在反映自动化修复模型在真实场景中真实能力方面的局限性进行了批判性评估。随后,研究强调了使用不含训练样本的测试数据集的重要性,指出需要保证数据集完整性,以提高 LLMs 在代码修复任务中的有效性。本工作的意义在于其对数字安全的贡献,为自动化代码漏洞修复设定了新标准,并为网络安全和人工智能领域的未来发展铺平了道路。该研究不仅突显了 LLMs 在增强代码安全方面的潜力,还促进了在这些关键领域的进一步探索和研究。

英文摘要:

This research addresses the complex challenge of automated repair of code vulnerabilities, vital for enhancing digital security in an increasingly technology-driven world. The study introduces a novel and efficient format for the representation of code modification, using advanced Large Language Models (LLMs) such as Code Llama and Mistral. These models, fine-tuned on datasets featuring C code vulnerabilities, significantly improve the accuracy and adaptability of automated code repair techniques. A key finding is the enhanced repair accuracy of these models when compared to previous methods such as VulRepair, which underscores their practical utility and efficiency. The research also offers a critical assessment of current evaluation metrics, such as perfect predictions, and their limitations in reflecting the true capabilities of automated repair models in real-world scenarios. Following this, it underscores the importance of using test datasets devoid of train samples, emphasizing the need for dataset integrity to enhance the effectiveness of LLMs in code repair tasks. The significance of this work is its contribution to digital security, setting new standards for automated code vulnerability repair and paving the way for future advancements in the fields of cybersecurity and artificial intelligence. The study does not only highlight the potential of LLMs in enhancing code security but also fosters further exploration and research in these crucial areas.

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

↑