Vulnerability code-bases often suffer from severe imbalance, limiting the effectiveness of Deep Learning-based vulnerability classifiers. Data Augmentation could help solve this by mitigating the scarcity of under-represented vulnerability types. In this context, we investigate LLM-based augmentation for vulnerable functions, comparing controlled generation of new vulnerable samples with semantics-preserving refactoring of existing ones. Using Qwen2.5-Coder to produce augmented data and CodeBERT as a classifier on the SVEN dataset, we find that our approaches are indeed effective in enriching vulnerable code-bases through a simple process and with reasonable quality, and that a hybrid strategy best boosts vulnerability classifiers' performance. Code repository is available here : https://github.com/DynaSoumhaneOuchebara/LLM-based-code-augmentation-Generate-or-Refactor-


翻译:漏洞代码库常面临严重的类别不平衡问题,这限制了基于深度学习的漏洞分类器的有效性。数据增强可通过缓解少数漏洞类型的样本稀缺性来帮助解决此问题。在此背景下,我们研究了基于大语言模型(LLM)的漏洞函数增强方法,对比了受控生成新漏洞样本与对现有样本进行语义保持重构两种策略。通过使用Qwen2.5-Coder生成增强数据,并以CodeBERT作为分类器在SVEN数据集上进行实验,我们发现所提方法能通过简洁流程并以合理质量有效丰富漏洞代码库,且混合增强策略最能提升漏洞分类器的性能。代码仓库地址:https://github.com/DynaSoumhaneOuchebara/LLM-based-code-augmentation-Generate-or-Refactor-

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
通过强化学习增强代码生成中的代码大语言模型:综述
专知会员服务
29+阅读 · 2025年1月1日
微软最新《检索增强生成(RAG)》综述
专知会员服务
56+阅读 · 2024年9月24日
基于 SonarQube 的增量代码扫描
DevOps时代
12+阅读 · 2019年7月18日
谷歌推出新型数据增强算法:AutoAugment
论智
20+阅读 · 2018年6月6日
放弃 RNN/LSTM 吧,因为真的不好用!望周知~
人工智能头条
19+阅读 · 2018年4月24日
在TensorFlow中对比两大生成模型:VAE与GAN
机器之心
12+阅读 · 2017年10月23日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
16+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
16+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员