GRACE: Empowering LLM-based software vulnerability detection with graph structure and in-context learning

计算机科学 图形 脆弱性(计算) 软件 背景(考古学) 软件工程 工程类 计算机安全 理论计算机科学 程序设计语言 地理 考古
作者
Guilong Lu,Xiaolin Ju,Xiang Chen,Wenlong Pei,Zhilong Cai
出处
期刊:Journal of Systems and Software [Elsevier]
卷期号:212: 112031-112031 被引量:8
标识
DOI:10.1016/j.jss.2024.112031
摘要

Software vulnerabilities inflict considerable economic and societal harm. Therefore, timely and accurate detection of these flaws has become vital. Large language models (LLMs) have emerged as a promising tool for vulnerability detection in recent studies. However, their effectiveness suffers when limited to plain text source code, which may ignore the syntactic and semantic information of the code. To address this limitation, we propose a novel vulnerability detection approach GRACE that empowers LLM-based software vulnerability detection by incorporating graph structural information in the code and in-context learning. We also design an effective demonstration retrieval approach that identifies highly relevant code examples by considering semantic, lexical, and syntactic similarities for the target code to provide better demonstrations for in-context learning. To evaluate the effectiveness of GRACE, we conducted an empirical study on three vulnerability detection datasets (i.e., Devign, Reveal, and Big-Vul). The results demonstrate that GRACE outperforms six state-of-the-art vulnerability detection baselines by at least 28.65% in terms of the F1 score across these three datasets. Therefore, our study highlights the effectiveness of integrating graph structural information and in-context learning in LLMs for vulnerability detection. These findings motivate further investigation into tailoring such approaches for specific vulnerability types or adapting them to other security tasks.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
大幅提高文件上传限制,最高150M (2024-4-1)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
无私的凝安完成签到,获得积分10
1秒前
orixero应助独特大米采纳,获得10
1秒前
XhuaQye完成签到,获得积分20
1秒前
1秒前
宁静致远发布了新的文献求助10
2秒前
大地发布了新的文献求助10
2秒前
2秒前
科研叶发布了新的文献求助10
3秒前
筱筱完成签到 ,获得积分10
3秒前
英姑应助Cynthia采纳,获得10
4秒前
老白完成签到,获得积分10
4秒前
谨慎达发布了新的文献求助10
5秒前
暮冬十三完成签到,获得积分10
5秒前
美丽萝莉完成签到,获得积分10
5秒前
Dr.Dream完成签到,获得积分10
6秒前
完美世界应助qy97采纳,获得10
6秒前
7秒前
hanhanynl发布了新的文献求助10
7秒前
缘木思林发布了新的文献求助10
7秒前
8秒前
所所应助xun采纳,获得10
9秒前
wxyinhefeng完成签到 ,获得积分10
9秒前
鱿鱼炒黄瓜完成签到,获得积分10
9秒前
pppsci完成签到,获得积分10
10秒前
10秒前
10秒前
11秒前
ST发布了新的文献求助20
11秒前
李健的小迷弟应助xiaozhao采纳,获得10
12秒前
12秒前
勤恳的小松鼠完成签到,获得积分10
13秒前
DAKE发布了新的文献求助10
14秒前
凳子琪发布了新的文献求助10
15秒前
15秒前
16秒前
徐徐徐徐徐徐完成签到,获得积分10
16秒前
njh完成签到 ,获得积分10
17秒前
17秒前
深情安青应助太渊采纳,获得10
18秒前
18秒前
高分求助中
The Young builders of New china : the visit of the delegation of the WFDY to the Chinese People's Republic 1000
юрские динозавры восточного забайкалья 800
English Wealden Fossils 700
Chen Hansheng: China’s Last Romantic Revolutionary 500
COSMETIC DERMATOLOGY & SKINCARE PRACTICE 388
Case Research: The Case Writing Process 300
Global Geological Record of Lake Basins 300
热门求助领域 (近24小时)
化学 医学 生物 材料科学 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 基因 遗传学 催化作用 物理化学 免疫学 量子力学 细胞生物学
热门帖子
关注 科研通微信公众号,转发送积分 3141967
求助须知:如何正确求助?哪些是违规求助? 2792954
关于积分的说明 7804609
捐赠科研通 2449278
什么是DOI,文献DOI怎么找? 1303129
科研通“疑难数据库(出版商)”最低求助积分说明 626796
版权声明 601291