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 BV]
卷期号:212: 112031-112031 被引量:55
标识
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
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
刚刚
wwwwwwww发布了新的文献求助10
刚刚
开心的母鸡完成签到,获得积分10
刚刚
CodeCraft的应助被wangjiaooooo采纳,获得10
1秒前
shiny完成签到,获得积分10
1秒前
EthanChan完成签到,获得积分10
1秒前
doou完成签到,获得积分10
1秒前
1秒前
arniu2008发布了新的文献求助10
1秒前
王洵完成签到,获得积分10
1秒前
1秒前
慕青的应助被M二十四采纳,获得10
1秒前
绝爱薄饼完成签到,获得积分10
2秒前
lanhl发布了新的文献求助10
2秒前
2秒前
福星发布了新的文献求助10
3秒前
kano完成签到,获得积分10
3秒前
十一发布了新的文献求助10
3秒前
3秒前
开朗谷兰完成签到,获得积分10
4秒前
ASCK完成签到,获得积分0
4秒前
wangyumumu的应助被读书崽采纳,获得10
4秒前
李爱国的应助被041采纳,获得10
4秒前
趙途嘵生完成签到,获得积分10
5秒前
[刘小婷]完成签到,获得积分10
5秒前
柿柿如意完成签到,获得积分10
5秒前
暴富发布了新的文献求助10
5秒前
feifanyang完成签到,获得积分20
6秒前
Liyongxing完成签到,获得积分10
6秒前
此时此刻完成签到 ,获得积分10
6秒前
善良的碧灵完成签到,获得积分10
7秒前
LunarLight完成签到 ,获得积分10
7秒前
molihuakai的应助被zz采纳,获得10
7秒前
冷静完成签到,获得积分10
7秒前
吴宣京完成签到,获得积分10
8秒前
8秒前
尘默寡焱完成签到,获得积分10
8秒前
无花果的应助被田勇采纳,获得10
8秒前
章鱼小丸子完成签到,获得积分10
8秒前
开心的铅笔完成签到 ,获得积分10
8秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Aspects of Post-SPE Phonology 2000
CODESSA 2000
Performance standards for antimicrobial disk and dilution susceptibility tests for bacteria isolated from animals 888
Rosenblum, Global Change Biology 800
Holistic Discourse Analysis, Second Edition by Robert E. Longacre (2012-09-10) 666
Berberine regulates the TLR4 signaling pathway to suppress hypoxia-induced proliferation and migration of pulmonary arterial smooth muscle cells 530
热门求助领域 (近24小时)
化学 材料科学 医学 生物 计算机科学 工程类 纳米技术 物理 有机化学 化学工程 内科学 生物化学 复合材料 催化作用 心理学 细胞生物学 无机化学 电极 光电子学 人工智能
热门帖子
关注 科研通微信公众号,转发送积分 7858675
求助须知:如何正确求助?哪些是违规求助? 9376824
关于积分的说明 20706935
捐赠科研通 7457494
什么是DOI,文献DOI怎么找? 3346552
关于科研通互助平台的介绍 2488813
邀请新用户注册赠送积分活动 2370965