论文标题
用于软件漏洞检测的基于变压器的语言模型
Transformer-Based Language Models for Software Vulnerability Detection
论文作者
论文摘要
基于变压器的大型语言模型在自然语言处理中表现出色。通过考虑这些模型在一个域中获得的知识的可传递性,以及自然语言与高级编程语言(例如C/C ++)的亲密关系,例如C/C ++,此工作研究了如何利用(大型)基于变压器的语言模型在检测软件漏洞中以及这些模型对这些模型的好处。在这方面,首先提出了一个系统的(内聚)框架,详细介绍了源代码翻译,模型准备和推理。然后,使用具有多个漏洞的C/C ++源代码的软件漏洞数据集进行经验分析,该数据集具有与库功能调用,指针使用,数组使用情况和算术表达式相对应的多个漏洞。我们的经验结果证明了语言模型在脆弱性检测中的良好表现。此外,这些语言模型具有比当代模型更好的性能指标,例如F1得分,即双向长期记忆和双向封闭式复发单元。由于计算资源,平台,库和依赖项的要求,尝试语言模型总是具有挑战性的。因此,本文还分析了流行的平台,以有效地微调这些模型并在选择平台时提出建议。
The large transformer-based language models demonstrate excellent performance in natural language processing. By considering the transferability of the knowledge gained by these models in one domain to other related domains, and the closeness of natural languages to high-level programming languages, such as C/C++, this work studies how to leverage (large) transformer-based language models in detecting software vulnerabilities and how good are these models for vulnerability detection tasks. In this regard, firstly, a systematic (cohesive) framework that details source code translation, model preparation, and inference is presented. Then, an empirical analysis is performed with software vulnerability datasets with C/C++ source codes having multiple vulnerabilities corresponding to the library function call, pointer usage, array usage, and arithmetic expression. Our empirical results demonstrate the good performance of the language models in vulnerability detection. Moreover, these language models have better performance metrics, such as F1-score, than the contemporary models, namely bidirectional long short-term memory and bidirectional gated recurrent unit. Experimenting with the language models is always challenging due to the requirement of computing resources, platforms, libraries, and dependencies. Thus, this paper also analyses the popular platforms to efficiently fine-tune these models and present recommendations while choosing the platforms.