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

VulBERTa:用于漏洞检测的简化源代码预训练

VulBERTa: Simplified Source Code Pre-Training for Vulnerability Detection

Imperial College London(帝国理工学院);University of Malaya(马来亚大学)

Hazim Hanif, Sergio Maffeis

AI总结:

VulBERTa通过自定义分词预训练RoBERTa模型于C/C++代码,学习深层表示,在多个漏洞检测数据集和基准上达到最先进性能,且训练数据和参数成本低。

摘要:

本文提出了VulBERTa,一种利用深度学习检测源代码中安全漏洞的方法。我们的方法使用自定义分词流程,在来自开源C/C++项目的真实代码上预训练一个RoBERTa模型。该模型学习代码语法和语义的深层知识表示,我们利用这些表示来训练漏洞检测分类器。我们在多个数据集(Vuldeepecker、Draper、REVEAL和muVuldeepecker)和基准(CodeXGLUE和D2A)上,对二分类和多分类漏洞检测任务评估了我们的方法。评估结果表明,尽管VulBERTa概念上简单,且在训练数据规模和模型参数数量方面成本有限,但它在不同数据集上均取得了最先进的性能,并优于现有方法。

英文摘要:

This paper presents VulBERTa, a deep learning approach to detect security vulnerabilities in source code. Our approach pre-trains a RoBERTa model with a custom tokenisation pipeline on real-world code from open-source C/C++ projects. The model learns a deep knowledge representation of the code syntax and semantics, which we leverage to train vulnerability detection classifiers. We evaluate our approach on binary and multi-class vulnerability detection tasks across several datasets (Vuldeepecker, Draper, REVEAL and muVuldeepecker) and benchmarks (CodeXGLUE and D2A). The evaluation results show that VulBERTa achieves state-of-the-art performance and outperforms existing approaches across different datasets, despite its conceptual simplicity, and limited cost in terms of size of training data and number of model parameters.

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

↑