Learning-based automated vulnerability repair (AVR) techniques that utilize fine-tuned language models have shown promise in generating vulnerability patches. However, questions remain about their ability to repair unseen vulnerabilities. Our empirical study reveals that state-of-the-art models often overfit to the training set and are evaluated using training, validation, and test sets that are not mutually exclusive. Furthermore, relying on match-based metrics that compare generated patches to reference fixes at the token level has some limitations, failing to account for the possibility of various valid ways to patch the vulnerability. In this paper, we examine the capabilities of state-of-the-art fine-tuned AVR models and the adequacy of match-based evaluation metrics in three ways. First, we apply semantic-preserving transformations to test sets in order to determine whether models truly learn robust vulnerability-repair patterns or simply rely on spurious features. Second, we re-split the training, validation, and test sets to be mutually exclusive and evaluate the models on the revised test set to assess their generalization capabilities. Third, we introduce L-AVRBench, a test-based benchmark tailored for learning-based AVR, to overcome the limitations of match-based metrics and examine the AVR models' true repair capabilities.


翻译:基于学习的自动化漏洞修复技术利用微调语言模型在生成漏洞补丁方面展现出潜力。然而,这些模型修复未见漏洞的能力仍存疑问。我们的实证研究表明,最先进的模型往往对训练集过拟合,且其评估使用的训练集、验证集和测试集并非互斥。此外,依赖基于匹配的指标(在词元级别比较生成补丁与参考修复)存在一定局限性,未能考虑修复漏洞可能存在多种有效方式。本文通过三种方式考察最先进的微调自动化漏洞修复模型的能力以及基于匹配的评估指标的充分性。首先,我们对测试集应用语义保持变换,以确定模型是否真正学习到稳健的漏洞修复模式,还是仅仅依赖虚假特征。其次,我们重新划分训练集、验证集和测试集使其互斥,并在修订后的测试集上评估模型以检验其泛化能力。第三,我们提出L-AVRBench——一个专为基于学习的自动化漏洞修复定制的基于测试的基准,以克服基于匹配指标的局限性,并检验自动化漏洞修复模型的真实修复能力。

0
下载
关闭预览

相关内容

机器或装置在无人干预的情况下按规定的程序或指令自动进行操作或控制的过程, 是一门涉及学科较多、应用广泛的综合性科学技术。
Python图像处理,366页pdf,Image Operators Image Processing in Python
CosFace: Large Margin Cosine Loss for Deep Face Recognition论文笔记
统计学习与视觉计算组
44+阅读 · 2018年4月25日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2025年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员