Article(id=1327018411470729284, tenantId=1146029695717560320, journalId=1324759914146529478, issueId=1327018256403117010, articleNumber=null, orderNo=null, doi=10.7544/issn1000-1239.202440171, pmid=null, cstr=null, oa=null, hot=null, price=null, onlineType=0, articleFormat=0, articleType=null, articleTypeStr=research-article, receivedDate=1710172800000, receivedDateStr=2024-03-12, revisedDate=1747756800000, revisedDateStr=2025-05-21, acceptedDate=1749571200000, acceptedDateStr=2025-06-11, onlineDate=1794315444103, onlineDateStr=2026-11-10, pubDate=1756656000000, pubDateStr=2025-09-01, doiRegisterDate=null, doiRegisterDateStr=null, onlineIssueDate=1794315444103, onlineIssueDateStr=2026-11-10, onlineJustAcceptDate=null, onlineJustAcceptDateStr=null, onlineFirstDate=null, onlineFirstDateStr=null, sourceXml=null, magXml=null, createTime=1794315444103, creator=13701087609, updateTime=1794315444103, updator=13701087609, issue=Issue{id=1327018256403117010, tenantId=1146029695717560320, journalId=1324759914146529478, year='2025', volume='62', issue='9', pageStart='2125', pageEnd='2395', issueExtLink='null', onlineDate='null', pubDate='1756656000000', pubDateStr='2025-09-01', beforeIssueId=null, nextIssueId=null, price=null, status=1, issueComplete=1, articleOrder=1, issueType=-1, specialIssue=null, createTime=1794315407133, creator='13701087609', updateTime=1794376916348, updator='13701087609', preIssue=null, nextIssue=null, articleTotal=null, ext={EN=IssueExt(id=1327276245596876892, tenantId=1146029695717560320, journalId=1324759914146529478, issueId=1327018256403117010, language=EN, specialIssueTitle=, coverIllustrator=null, specialIssueEditor=, specialIssueAbout=), CN=IssueExt(id=1327276245596876893, tenantId=1146029695717560320, journalId=1324759914146529478, issueId=1327018256403117010, language=CN, specialIssueTitle=, coverIllustrator=null, specialIssueEditor=, specialIssueAbout=)}, issueFiles=null, downloadFileDto=null}, startPage=2348, endPage=2361, ext={EN=ArticleExt(id=1327018412775157829, articleId=1327018411470729284, tenantId=1146029695717560320, journalId=1324759914146529478, language=EN, title=LHG-VD: A Learnable Hierarchical Graph Representation Vulnerability Detection Method, columnId=1325493671541474142, journalTitle=Journal of Computer Research and Development, columnName=Network and Information Security, runingTitle=null, highlight=null, articleAbstract=

Software vulnerabilities pose a serious threat to the safe and stable operation of computer systems and software, so the research related to their automatic detection has been receiving extensive attention. Unlike traditional static vulnerability detection tools that use predefined rules provided by human experts to analyze the code, graph neural network (GNN)-based vulnerability detection methods have surpassed the traditional methods in some datasets by automatically learning the vulnerable code patterns. However, in the current GNN-based vulnerability detection methods, the design of GNN model is not combined with the characteristics of the code itself, which leads to poor detection effect on the real vulnerability code dataset. In this paper, we propose a learnable hierarchical graph representation vulnerability detection method LHG-VD, which is characterized by proposing a learnable readout function for the limitation of the traditional readout function, and designing a cross-granularity loss function based on the idea of comparative learning for the problem of maintaining the local structural information of the code in the process of graph pooling. Experimental results on real vulnerability datasets show that the F1 value of LHG-VD is 71.5%, which is improved by 4.9% compared with DeepWukong, a slice-level detection method, and 8.9% compared with AMPLE, a function-level detection method.

, authors=Song Hu1, Jiachi Luo2, Wenkai Wan2, Yang Yan1, Fan Guo2, *, Yanwen Qu2, authorsList=Song Hu, Jiachi Luo, Wenkai Wan, Yang Yan, Fan Guo, Yanwen Qu, authorCompany=null, correspAuthors=Fan Guo, authorNote=

born in 1999. Master. His main research interests include vulnerability detection and graph deep learning

born in 2002. Bachelor. His main research interest includes machine learning

born in 2001. Master. His main research interests include vulnerability detection and graph deep learning

born in 1999. Master. His main research interests include vulnerability detection and machine learning

born in 1977. PhD, associate professor, His main research interests include network security, program analysis, and vulnerability mining

born in 1983. PhD, lecturer. His main research interests include graph deep learning and vulnerability detection

, correspAuthorsNote=null, copyrightStatement=Copyright © 2025 Journal of Computer Research and Development. All rights reserved., copyrightOwner=null, extLink=null, articleAbsUrl=null, sourceXml=null, magXml=null, pdfUrl=null, pdf=null, pdfFileSize=null, pdfExtLink=null, richHtmlUrl=null, mobilePdfUrl=null, reviewReport=null, pdfFirstPage=null, abstractGraph=null, abstractGraphContent=null, abstractVideo=null, citation=null, cebUrl=null, magXmlContent=null, mapNumber=null, fund=null), CN=ArticleExt(id=1327018415132356704, articleId=1327018411470729284, tenantId=1146029695717560320, journalId=1324759914146529478, language=CN, title=LHG-VD: 一种可学习的层次化图表示漏洞检测方法, columnId=1325493672690713440, journalTitle=计算机研究与发展, columnName=网络与信息安全, runingTitle=null, highlight=null, articleAbstract=

软件漏洞严重威胁了计算机系统和软件的安全稳定运行,因此针对其自动检测的相关研究一直受到广泛关注. 与传统静态漏洞检测工具采用人类专家提供的预定义规则进行代码分析不同,基于图神经网络(GNN)的漏洞检测方法通过自动学习易受攻击的代码模式,在一些数据集上的检测效果已经超越传统方法. 然而,目前基于GNN 的漏洞检测方法中,由于未结合代码自身特点对GNN 模型进行设计,导致在真实漏洞代码数据集上检测效果较差. 提出一种可学习的层次化图表示的漏洞检测方法LHG-VD,其特点是针对传统读出函数的局限提出一种可学习的读出函数,针对图池化过程中的代码局部结构信息保持问题设计了一种基于对比学习思想的跨粒度损失函数. 在真实漏洞数据集的实验结果表明,LHG-VD 的F1值为71.5%,与切片级检测方法DeepWukong 相比提升4.9个百分点,与函数级检测方法AMPLE 相比提升8.9个百分点.

, authors=胡菘1, 罗嘉驰2, 万文凯2, 闫阳1, 郭帆2, *, 曲彦文2, authorsList=胡菘, 罗嘉驰, 万文凯, 闫阳, 郭帆, 曲彦文, authorCompany=null, correspAuthors=郭帆, authorNote=

1999年生. 硕士. 主要研究方向为漏洞检测、图深度学习

2002年生. 学士. 主要研究方向为机器学习

2001年生. 硕士. 主要研究方向为漏洞检测、图深度学习

1999年生. 硕士. 主要研究方向为漏洞检测、机器学习

1977年生. 博士,副教授. 主要研究方向为网络安全、程序分析、漏洞挖掘

1983年生. 博士,讲师. 主要研究方向为图深度学习、漏洞检测

, correspAuthorsNote=
郭帆()
, copyrightStatement=版权所有 © 2025 计算机研究与发展编辑部, copyrightOwner=null, extLink=null, articleAbsUrl=null, sourceXml=S62vFtzUHamtnyGm88UH9g==, magXml=AbIUj8WgZD3b9loiHHWokA==, pdfUrl=null, pdf=rQkVyTPW/wKCBc9XCngiAg==, pdfFileSize=1180439, pdfExtLink=null, richHtmlUrl=null, mobilePdfUrl=null, reviewReport=null, pdfFirstPage=null, abstractGraph=x2/xg/qYmMKcaTdhHUIKkQ==, abstractGraphContent=null, abstractVideo=null, citation=null, cebUrl=null, magXmlContent=ZqMlk+NeiqKxyrEG2rF5Cg==, mapNumber=null, fund=null)}, authors=[Author(id=1327018415564370024, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=0, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=songhu@jxnu.edu.cn, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1327018415631478890, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415564370024, language=EN, stringName=Song Hu, firstName=Song, middleName=null, lastName=Hu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1School of Digital Industry, Jiangxi Normal University, Shangrao, Jiangxi 334006, bio={"content":"

born in 1999. Master. His main research interests include vulnerability detection and graph deep learning

"}, bioImg=null, bioContent=

born in 1999. Master. His main research interests include vulnerability detection and graph deep learning

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018415706976363, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415564370024, language=CN, stringName=胡菘, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1江西师范大学数字产业学院 江西上饶 334006, bio={"img":"Cb6Va5d3lu+52yu+HZAhnQ==","content":"

1999年生. 硕士. 主要研究方向为漏洞检测、图深度学习

"}, bioImg=Cb6Va5d3lu+52yu+HZAhnQ==, bioContent=

1999年生. 硕士. 主要研究方向为漏洞检测、图深度学习

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415342071905, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=1, ext=[AuthorCompanyExt(id=1327018415350460514, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415342071905, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1School of Digital Industry, Jiangxi Normal University, Shangrao, Jiangxi 334006), AuthorCompanyExt(id=1327018415363043427, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415342071905, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1江西师范大学数字产业学院 江西上饶 334006)])]), Author(id=1327018415765696621, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=1, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1327018415841194095, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415765696621, language=EN, stringName=Jiachi Luo, firstName=Jiachi, middleName=null, lastName=Luo, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022, bio={"content":"

born in 2002. Bachelor. His main research interest includes machine learning

"}, bioImg=null, bioContent=

born in 2002. Bachelor. His main research interest includes machine learning

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018415916691568, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415765696621, language=CN, stringName=罗嘉驰, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2江西师范大学计算机信息工程学院 南昌 330022, bio={"img":"3nFN0rg46EyBVy7H0JjLzg==","content":"

2002年生. 学士. 主要研究方向为机器学习

"}, bioImg=3nFN0rg46EyBVy7H0JjLzg==, bioContent=

2002年生. 学士. 主要研究方向为机器学习

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415451123812, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=2, ext=[AuthorCompanyExt(id=1327018415463706725, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022), AuthorCompanyExt(id=1327018415476289638, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2江西师范大学计算机信息工程学院 南昌 330022)])]), Author(id=1327018415992189042, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=2, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1327018416076075124, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415992189042, language=EN, stringName=Wenkai Wan, firstName=Wenkai, middleName=null, lastName=Wan, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022, bio={"content":"

born in 2001. Master. His main research interests include vulnerability detection and graph deep learning

"}, bioImg=null, bioContent=

born in 2001. Master. His main research interests include vulnerability detection and graph deep learning

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018416164155509, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415992189042, language=CN, stringName=万文凯, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2江西师范大学计算机信息工程学院 南昌 330022, bio={"img":"F2XUYpKlPthcVLLbOOdq1g==","content":"

2001年生. 硕士. 主要研究方向为漏洞检测、图深度学习

"}, bioImg=F2XUYpKlPthcVLLbOOdq1g==, bioContent=

2001年生. 硕士. 主要研究方向为漏洞检测、图深度学习

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415451123812, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=2, ext=[AuthorCompanyExt(id=1327018415463706725, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022), AuthorCompanyExt(id=1327018415476289638, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2江西师范大学计算机信息工程学院 南昌 330022)])]), Author(id=1327018416243847287, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=3, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1327018416310956153, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416243847287, language=EN, stringName=Yang Yan, firstName=Yang, middleName=null, lastName=Yan, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1School of Digital Industry, Jiangxi Normal University, Shangrao, Jiangxi 334006, bio={"content":"

born in 1999. Master. His main research interests include vulnerability detection and machine learning

"}, bioImg=null, bioContent=

born in 1999. Master. His main research interests include vulnerability detection and machine learning

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018416382259322, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416243847287, language=CN, stringName=闫阳, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1江西师范大学数字产业学院 江西上饶 334006, bio={"img":"aA3ZPh1/6hww6oD3iccIjA==","content":"

1999年生. 硕士. 主要研究方向为漏洞检测、机器学习

"}, bioImg=aA3ZPh1/6hww6oD3iccIjA==, bioContent=

1999年生. 硕士. 主要研究方向为漏洞检测、机器学习

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415342071905, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=1, ext=[AuthorCompanyExt(id=1327018415350460514, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415342071905, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1School of Digital Industry, Jiangxi Normal University, Shangrao, Jiangxi 334006), AuthorCompanyExt(id=1327018415363043427, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415342071905, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1江西师范大学数字产业学院 江西上饶 334006)])]), Author(id=1327018416453562492, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=4, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=fguo@jxnu.edu.cn, emailSecond=null, emailThird=null, correspondingAuthor=1, authorType=1, ext={EN=AuthorExt(id=1327018416550031486, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416453562492, language=EN, stringName=Fan Guo, firstName=Fan, middleName=null, lastName=Guo, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, *, address=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022, bio={"content":"

born in 1977. PhD, associate professor, His main research interests include network security, program analysis, and vulnerability mining

"}, bioImg=null, bioContent=

born in 1977. PhD, associate professor, His main research interests include network security, program analysis, and vulnerability mining

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018416625528959, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416453562492, language=CN, stringName=郭帆, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, *, address=2江西师范大学计算机信息工程学院 南昌 330022, bio={"img":"zIA9J/gjCgmJDubsYioiGw==","content":"

1977年生. 博士,副教授. 主要研究方向为网络安全、程序分析、漏洞挖掘

"}, bioImg=zIA9J/gjCgmJDubsYioiGw==, bioContent=

1977年生. 博士,副教授. 主要研究方向为网络安全、程序分析、漏洞挖掘

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415451123812, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=2, ext=[AuthorCompanyExt(id=1327018415463706725, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022), AuthorCompanyExt(id=1327018415476289638, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2江西师范大学计算机信息工程学院 南昌 330022)])]), Author(id=1327018416688443521, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=5, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1327018416768135299, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416688443521, language=EN, stringName=Yanwen Qu, firstName=Yanwen, middleName=null, lastName=Qu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022, bio={"content":"

born in 1983. PhD, lecturer. His main research interests include graph deep learning and vulnerability detection

"}, bioImg=null, bioContent=

born in 1983. PhD, lecturer. His main research interests include graph deep learning and vulnerability detection

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018416856215684, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416688443521, language=CN, stringName=曲彦文, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2江西师范大学计算机信息工程学院 南昌 330022, bio={"img":"KPk6K9X+g7Zubd9ErEWBUg==","content":"

1983年生. 博士,讲师. 主要研究方向为图深度学习、漏洞检测

"}, bioImg=KPk6K9X+g7Zubd9ErEWBUg==, bioContent=

1983年生. 博士,讲师. 主要研究方向为图深度学习、漏洞检测

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415451123812, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=2, ext=[AuthorCompanyExt(id=1327018415463706725, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022), AuthorCompanyExt(id=1327018415476289638, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2江西师范大学计算机信息工程学院 南昌 330022)])])], keywords=[Keyword(id=1327018416965267589, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, orderNo=1, keyword=vulnerability detection), Keyword(id=1327018417086902406, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, orderNo=2, keyword=deep learning), Keyword(id=1327018417166594183, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, orderNo=3, keyword=graph neural network), Keyword(id=1327018417229508744, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, orderNo=4, keyword=comparative learning), Keyword(id=1327018417338560649, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, orderNo=5, keyword=graph pooling), Keyword(id=1327018417447612554, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, orderNo=1, keyword=漏洞检测), Keyword(id=1327018417497944203, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, orderNo=2, keyword=深度学习), Keyword(id=1327018417586024588, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, orderNo=3, keyword=图神经网络), Keyword(id=1327018417686687885, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, orderNo=4, keyword=对比学习), Keyword(id=1327018417804128398, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, orderNo=5, keyword=图池化)], refs=[Reference(id=1327018419884503203, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=1, rfOrder=0, authorNames=null, journalName=null, refType=null, unstructuredReference=Cherem S, Princehouse L, Rugina R. Practical memory leak detection using guarded value-flow analysis[C]//Proc of the 28th ACM SIGPLAN Conf on Programming Language Design and Implementation. New York: ACM, 2007: 480−491, articleTitle=null, refAbstract=null), Reference(id=1327018419947417764, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=2, rfOrder=1, authorNames=null, journalName=null, refType=null, unstructuredReference=Ji Xiujuan, Yang Jufeng, Xu Jing, et al. Interprocedural path-sensitive resource leaks detection for C programs[C]//Proc of the 4th Asia-Pacific Symp on Internetware. New York: ACM, 2012: 1−9, articleTitle=null, refAbstract=null), Reference(id=1327018420014526629, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=3, rfOrder=2, authorNames=null, journalName=null, refType=null, unstructuredReference=Kroening D, Tautschnig M. CBMC–C bounded model checker[C]//Proc of the 20th Int Conf on Tools and Algorithms for the Construction and Analysis of Systems. Berlin: Springer, 2014: 389−391, articleTitle=null, refAbstract=null), Reference(id=1327018420077441190, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=4, rfOrder=3, authorNames=null, journalName=null, refType=null, unstructuredReference=Fan Gang, Wu Rongxin, Shi Qingkai, et al. Smoke: Scalable path-sensitive memory leak detection for millions of lines of code[C]//Proc of the 41st IEEE/ACM Int Conf on Software Engineering (ICSE). Piscataway, NJ: IEEE, 2019: 72−82, articleTitle=null, refAbstract=null), Reference(id=1327018420152938663, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=5, rfOrder=4, authorNames=null, journalName=null, refType=null, unstructuredReference=Chernis B, Verma R. Machine learning methods for software vulnerability detection[C]//Proc of the 4th ACM Int Workshop on Security and Privacy Analytics. New York: ACM, 2018: 31−39, articleTitle=null, refAbstract=null), Reference(id=1327018420232630440, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=6, rfOrder=5, authorNames=null, journalName=null, refType=null, unstructuredReference=Russell R, Kim L, Hamilton L, et al. Automated vulnerability detection in source code using deep representation learning[C]//Proc of the 17th IEEE Int Conf on Machine Learning and Applications (ICMLA 2018). Piscataway, NJ: IEEE, 2018: 757−762, articleTitle=null, refAbstract=null), Reference(id=1327018420392013993, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=7, rfOrder=6, authorNames=null, journalName=null, refType=null, unstructuredReference=Li Zhen, Zou Deqing, Xu Shouhuai, et al. VulDeePecker: A deep learning-based system for vulnerability detection[C]//Proc of the 25th Network and Distributed System Security Symp (NDSS 2018). Piscataway, NJ: IEEE, 2018: 1−15, articleTitle=null, refAbstract=null), Reference(id=1327018420517843114, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=8, rfOrder=7, authorNames=null, journalName=null, refType=null, unstructuredReference=Aumpansub A, Huang Zhen. Detecting software vulnerabilities using neural networks[C]//Proc of the 13th Int Conf on Machine Learning and Computing. New York: ACM, 2021: 166−171, articleTitle=null, refAbstract=null), Reference(id=1327018420622700715, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=9, rfOrder=8, authorNames=null, journalName=null, refType=null, unstructuredReference=Fu M, Tantithamthavorn C. LineVul: A transformer-based line-level vulnerability prediction[C]//Proc of the 19th Int Conf on Mining Software Repositories. New York: ACM, 2022: 608−620, articleTitle=null, refAbstract=null), Reference(id=1327018420727558316, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=10, rfOrder=9, authorNames=null, journalName=null, refType=null, unstructuredReference=Feng Hantao, Fu Xiaotong, Sun Hongyu, et al. Efficient vulnerability detection based on abstract syntax tree and deep learning[C]//Proc of the IEEE Conf on Computer Communications Workshops (INFOCOM WKSHPS). Piscataway, NJ: IEEE, 2020: 722−727, articleTitle=null, refAbstract=null), Reference(id=1327018420811444397, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=11, rfOrder=10, authorNames=null, journalName=null, refType=null, unstructuredReference=Li Zhen, Zou Deqing, Xu Shouhuai, et al. SySeVR: A framework for using deep learning to detect software vulnerabilities[J]. IEEE Transactions on Dependable and Secure Computing, 2022, 19(4): 2244−2258, articleTitle=null, refAbstract=null), Reference(id=1327018420874358958, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=12, rfOrder=11, authorNames=null, journalName=null, refType=null, unstructuredReference=Zhou Yaqin, Liu Shangqing, Siow Jingkai, et al. Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks[C]//Proc of the 33rd Int Conf on Neural Information Processing Systems. Cambridge, MA: MIT, 2019: 10197−10207, articleTitle=null, refAbstract=null), Reference(id=1327018420941467823, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=13, rfOrder=12, authorNames=null, journalName=null, refType=null, unstructuredReference=Cheng Xiao, Wang Haoyu, Hua Jiayi, et al. DeepWukong: Statically detecting software vulnerabilities using deep graph neural network[J]. ACM Transactions on Software Engineering and Methodology, 2021, 30(3): 1−33, articleTitle=null, refAbstract=null), Reference(id=1327018421016965296, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=14, rfOrder=13, authorNames=null, journalName=null, refType=null, unstructuredReference=Chakraborty S, Krishna R, Ding Yangruibo, et al. Deep learning based vulnerability detection: Are we there yet[J]. IEEE Transactions on Software Engineering, 2021, 48(9): 3280−3296, articleTitle=null, refAbstract=null), Reference(id=1327018421100851377, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=15, rfOrder=14, authorNames=null, journalName=null, refType=null, unstructuredReference=胡雨涛, 王溯远, 吴月明, 等. 基于图神经网络的切片级漏洞检测及解释方法[J]. 软件学报, 2023, 34(6): 2543−2561, articleTitle=null, refAbstract=null), Reference(id=1327018421188931762, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=15, rfOrder=15, authorNames=null, journalName=null, refType=null, unstructuredReference=Hu Yutao, Wang Suyuan, Wu Yueming, et al. Slice-level vulnerability detection and interpretation method based on graph neural network[J]. Journal of Software, 2023, 34(6): 2543−2561 (in Chinese), articleTitle=null, refAbstract=null), Reference(id=1327018421260234931, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=16, rfOrder=16, authorNames=null, journalName=null, refType=null, unstructuredReference=Nguyen V A, Nguyen D Q, Nguyen V, et al. ReGVD: Revisiting graph neural networks for vulnerability detection[C]//Proc of the 44th ACM/IEEE Int Conf on Software Engineering. New York: ACM, 2022: 178−182, articleTitle=null, refAbstract=null), Reference(id=1327018421339926708, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=17, rfOrder=17, authorNames=null, journalName=null, refType=null, unstructuredReference=Wu Yuelong, Lu Jintian, Zhang Yueyi, et al. Vulnerability detection in C/C++ source code with graph representation learning[C]//Proc of the 11th IEEE Annual Computing and Communication Workshop and Conf (CCWC). Piscataway, NJ: IEEE, 2021: 1519−1524, articleTitle=null, refAbstract=null), Reference(id=1327018421461561525, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=18, rfOrder=18, authorNames=null, journalName=null, refType=null, unstructuredReference=Cao Sicong, Sun Xiaobing, Bo Lili, et al. MVD: Memory-related vulnerability detection based on flow-sensitive graph neural networks[C]//Proc of the 44th Int Conf on Software Engineering. New York: ACM, 2022: 1456−1468, articleTitle=null, refAbstract=null), Reference(id=1327018421562224822, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=19, rfOrder=19, authorNames=null, journalName=null, refType=null, unstructuredReference=Li Yi, Wang Shaohua, Nguyen T N. Vulnerability detection with fine-grained interpretations[C]//Proc of the 29th ACM Joint Meeting on European Software Engineering Conf and Symp on the Foundations of Software Engineering. New York: ACM, 2021: 292−303, articleTitle=null, refAbstract=null), Reference(id=1327018421654499511, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=20, rfOrder=20, authorNames=null, journalName=null, refType=null, unstructuredReference=Zheng Weining, Jiang Yuan, Su Xiaohong. Vu1SPG: Vulnerability detection based on slice property graph representation learning[C]//Proc of the 32nd IEEE Int Symp on Software Reliability Engineering (ISSRE). Piscataway, NJ: IEEE, 2021: 457−467, articleTitle=null, refAbstract=null), Reference(id=1327018421713219768, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=21, rfOrder=21, authorNames=null, journalName=null, refType=null, unstructuredReference=Hu Yutao, Wang Suyuan, Li Wenke, et al. Interpreters for GNN-Based vulnerability detection: Are we there yet?[C]//Proc of the 32nd ACM SIGSOFT Int Symp on Software Testing and Analysis. New York: ACM, 2023: 1407−1419, articleTitle=null, refAbstract=null), Reference(id=1327018421767745721, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=22, rfOrder=22, authorNames=null, journalName=null, refType=null, unstructuredReference=Wen Xincheng, Chen Yupan, Gao Cuiyun, et al. Vulnerability detection with graph simplification and enhanced graph representation learning[C]//Proc of the 45th Int Conf on Software Engineering (ICSE). Piscataway, NJ: IEEE, 2023: 2275−2286, articleTitle=null, refAbstract=null), Reference(id=1327018421834854586, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=23, rfOrder=23, authorNames=null, journalName=null, refType=null, unstructuredReference=Ferschke O, Gurevych I, Rittberger M. FlawFinder: A modular system for predicting quality flaws in Wikipedia [C] //Proc of the 3rd Conf and Labs of the Evaluation Forum. Berlin: Springer, 2012:1−10, articleTitle=null, refAbstract=null), Reference(id=1327018421906157755, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=24, rfOrder=24, authorNames=null, journalName=null, refType=null, unstructuredReference=Feng Zhangyin, Guo Daya, Tang Duyu, et al. CodeBERT: A Pre-Trained model for programming and natural languages[C]//Findings of the Association for Computational Linguistics (EMNLP 2020). Stroudsburg, PA: ACL, 2020: 1536–1547, articleTitle=null, refAbstract=null), Reference(id=1327018421964878012, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=25, rfOrder=25, authorNames=null, journalName=null, refType=null, unstructuredReference=Church K W. Word2Vec[J]. Natural Language Engineering, 2017, 23(1): 155−162, articleTitle=null, refAbstract=null), Reference(id=1327018422023598269, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=26, rfOrder=26, authorNames=null, journalName=null, refType=null, unstructuredReference=Devlin J, Chang Mingwei, Lee K, et al. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding[C]//Proc of the 2019 Conf of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Stroudsburg, PA: ACL, 2019: 4171–4186, articleTitle=null, refAbstract=null), Reference(id=1327018422086512830, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=27, rfOrder=27, authorNames=null, journalName=null, refType=null, unstructuredReference=Li Yujia, Tarlow D, Brockschmidt M, et al. Gated graph sequence neural networks[J]. arXiv preprint, arXiv: 1511.05493, 2015, articleTitle=null, refAbstract=null), Reference(id=1327018422136844479, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=28, rfOrder=28, authorNames=null, journalName=null, refType=null, unstructuredReference=Kipf T, Welling M. Semi-supervised classification with graph convolutional networks[J]. arXiv preprint, arXiv: 1609.02907, 2016, articleTitle=null, refAbstract=null), Reference(id=1327018422216536256, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=29, rfOrder=29, authorNames=null, journalName=null, refType=null, unstructuredReference=王兆慧, 沈华伟, 曹婍, 等. 图分类研究综述[J]. 软件学报, 2022, 33(1): 171−192, articleTitle=null, refAbstract=null), Reference(id=1327018422287839425, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=29, rfOrder=30, authorNames=null, journalName=null, refType=null, unstructuredReference=Wang Zhaohui, Shen Huawei, Cao Qi, et al. Survey on graph classification[J]. Journal of Software, 2022, 33(1): 171−192 (in Chinese), articleTitle=null, refAbstract=null), Reference(id=1327018422350753986, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=30, rfOrder=31, authorNames=null, journalName=null, refType=null, unstructuredReference=Ying Zhitao, You Jiaxuan, Morris C, et al. Hierarchical graph representation learning with differentiable pooling[C]//Proc of the 32nd Int Conf on Neural Information Processing Systems. Cambridge, MA: MIT, 2018: 4805−4815, articleTitle=null, refAbstract=null), Reference(id=1327018422422057155, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=31, rfOrder=32, authorNames=null, journalName=null, refType=null, unstructuredReference=Xu Keyulu, Li Chengtao, Tian Yonglong, et al. Representation learning on graphs with jumping knowledge networks[C]//Proc of the 35th Int Conf on Machine Learning. New York: PMLR, 2018: 5453−5462, articleTitle=null, refAbstract=null), Reference(id=1327018422480777412, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=32, rfOrder=33, authorNames=null, journalName=null, refType=null, unstructuredReference=Cangea C, Veličković P, Jovanović N, et al. Towards sparse hierarchical graph classifiers[J]. arXiv preprint, arXiv: 1811.01287, 2018, articleTitle=null, refAbstract=null), Reference(id=1327018422535303365, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=33, rfOrder=34, authorNames=null, journalName=null, refType=null, unstructuredReference=Morris C, Ritzert M, Fey M, et al. Weisfeiler and leman go neural: Higher-order graph neural networks[C]//Proc of the 33rd Conf on Artificial Intelligence. Palo Alto, CA : AAAI, 2019: 4602−4609, articleTitle=null, refAbstract=null), Reference(id=1327018422594023622, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=34, rfOrder=35, authorNames=null, journalName=null, refType=null, unstructuredReference=Wu Zhanghao, Jain P, Wright M, et al. Representing long-range context for graph neural networks with global attention[J]. Advances in Neural Information Processing Systems, 2021, 34: 13266−13279, articleTitle=null, refAbstract=null), Reference(id=1327018422665326791, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=35, rfOrder=36, authorNames=null, journalName=null, refType=null, unstructuredReference=Wu Zonghan, Pan Shirui, Chen Fengwen, et al. A comprehensive survey on graph neural networks[J]. IEEE Transactions on Neural Networks and Learning Systems, 2021, 32(1): 4−24, articleTitle=null, refAbstract=null), Reference(id=1327018422719852744, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=36, rfOrder=37, authorNames=null, journalName=null, refType=null, unstructuredReference=Joern Development Team. Joern: Open-source code querying engine for C/C++[CP/OL]. 2020[2025-01-19]. https://joern.io/, articleTitle=null, refAbstract=null), Reference(id=1327018422791155913, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=37, rfOrder=38, authorNames=null, journalName=null, refType=null, unstructuredReference=Veličković P, Cucurull G, Casanova A, et al. Graph attention networks[J]. arXiv preprint, arXiv: 1710.10903, 2017, articleTitle=null, refAbstract=null), Reference(id=1327018422849876170, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=38, rfOrder=39, authorNames=null, journalName=null, refType=null, unstructuredReference=Liu Chuang, Zhan Yibing, Wu Jia, et al. Graph pooling for graph neural networks: Progress, challenges, and opportunities[J]. arXiv preprint, arXiv: 2204.07321, 2022, articleTitle=null, refAbstract=null), Reference(id=1327018422929567947, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=39, rfOrder=40, authorNames=null, journalName=null, refType=null, unstructuredReference=National Institute of Standards and Technology. Software assurance reference dataset[DB/OL]. [2025-01-19]. https://samate.nist.gov/SARD, articleTitle=null, refAbstract=null), Reference(id=1327018422984093900, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=40, rfOrder=41, authorNames=null, journalName=null, refType=null, unstructuredReference=Fan Jiahao, Li Yi, Wang Shaohua, et al. A C/C++ code vulnerability dataset with code changes and CVE summaries[C]//Proc of the 17th Int Conf on Mining Software Repositories. New York: ACM, 2020: 508−512, articleTitle=null, refAbstract=null), Reference(id=1327018423047008461, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=41, rfOrder=42, authorNames=null, journalName=null, refType=null, unstructuredReference=Hin D, Kan A, Chen Huaming, et al. LineVD: Statement-level vulnerability detection using graph neural networks[C]//Proc of the 19th Int Conf on Mining Software Repositories. New York: ACM, 2022: 596−607, articleTitle=null, refAbstract=null), Reference(id=1327018423105728718, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=42, rfOrder=43, authorNames=null, journalName=null, refType=null, unstructuredReference=Ding Yangruibo, Suneja S, Zheng Yunhui, et al. VELVET: A novel ensemble learning approach to automatically locate Vulnerable statements[C]//Proc of the 29th Int Conf on Software Analysis, Evolution and Reengineering (SANER). Piscataway, NJ: IEEE, 2022: 959−970, articleTitle=null, refAbstract=null)], funds=null, companyList=[AuthorCompany(id=1327018415342071905, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=1, ext=[AuthorCompanyExt(id=1327018415350460514, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415342071905, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1School of Digital Industry, Jiangxi Normal University, Shangrao, Jiangxi 334006), AuthorCompanyExt(id=1327018415363043427, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415342071905, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1江西师范大学数字产业学院 江西上饶 334006)]), AuthorCompany(id=1327018415451123812, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=2, ext=[AuthorCompanyExt(id=1327018415463706725, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022), AuthorCompanyExt(id=1327018415476289638, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2江西师范大学计算机信息工程学院 南昌 330022)])], figs=[ArticleFig(id=1327018417921568911, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, label=Figure 1, caption=Inspiring example, figureFileSmall=aywMLMkceuOd//EgbivmFQ==, figureFileBig=x2/xg/qYmMKcaTdhHUIKkQ==, tableContent=null), ArticleFig(id=1327018418047398032, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, label=图1, caption=启发性例子, figureFileSmall=aywMLMkceuOd//EgbivmFQ==, figureFileBig=x2/xg/qYmMKcaTdhHUIKkQ==, tableContent=null), ArticleFig(id=1327018418252918929, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, label=Figure 2, caption=Flowchart of vulnerability detection, figureFileSmall=Kq8hQN+pl77NNquP7W8mYQ==, figureFileBig=9Zjnyox4yZhzkLrMXSsSug==, tableContent=null), ArticleFig(id=1327018418320027794, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, label=图2, caption=漏洞检测流程图, figureFileSmall=Kq8hQN+pl77NNquP7W8mYQ==, figureFileBig=9Zjnyox4yZhzkLrMXSsSug==, tableContent=null), ArticleFig(id=1327018418445856915, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, label=Figure 3, caption=Example of a code map for participating in representation learning, figureFileSmall=c+XwX3Nd+ScqooSF6fXrxg==, figureFileBig=lgstZ/b119jELme9q0faPw==, tableContent=null), ArticleFig(id=1327018418584268948, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, label=图3, caption=参与表示学习的代码图示例, figureFileSmall=c+XwX3Nd+ScqooSF6fXrxg==, figureFileBig=lgstZ/b119jELme9q0faPw==, tableContent=null), ArticleFig(id=1327018418655572117, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, label=Figure 4, caption=Readout function design, figureFileSmall=B+FZepjqgMvukmXYs6bYnQ==, figureFileBig=K+LIbBpRRWt7+zC0loRCOw==, tableContent=null), ArticleFig(id=1327018418777206934, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, label=图4, caption=读出函数设计, figureFileSmall=B+FZepjqgMvukmXYs6bYnQ==, figureFileBig=K+LIbBpRRWt7+zC0loRCOw==, tableContent=null), ArticleFig(id=1327018418873675927, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, label=Figure 5, caption=GNN model of LHG-VD, figureFileSmall=n3FjYNrx9go8L3vY7NmD4w==, figureFileBig=+U9RZqd4aWgCV9rN0hoktA==, tableContent=null), ArticleFig(id=1327018419024670872, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, label=图5, caption=LHG-VD的GNN模型, figureFileSmall=n3FjYNrx9go8L3vY7NmD4w==, figureFileBig=+U9RZqd4aWgCV9rN0hoktA==, tableContent=null), ArticleFig(id=1327018419095974041, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, label=Figure 6, caption=TP example features, figureFileSmall=A2xiv4gZu3EkDDcoojG80Q==, figureFileBig=viSATilRGzGDWLfb7cEMig==, tableContent=null), ArticleFig(id=1327018419171471514, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, label=图6, caption=TP例子特征, figureFileSmall=A2xiv4gZu3EkDDcoojG80Q==, figureFileBig=viSATilRGzGDWLfb7cEMig==, tableContent=null), ArticleFig(id=1327018419242774683, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, label=Figure 7, caption=Vulnerability sample snippet, figureFileSmall=iBvcJ6+SKFl7N1KVeEeZSQ==, figureFileBig=QpDtHX33/4zUPoiewANGKA==, tableContent=null), ArticleFig(id=1327018419322466460, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, label=图7, caption=漏洞样本片段, figureFileSmall=iBvcJ6+SKFl7N1KVeEeZSQ==, figureFileBig=QpDtHX33/4zUPoiewANGKA==, tableContent=null), ArticleFig(id=1327018419393769629, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, label=Table 1, caption=Ablation Experiments in Artificial Vulnerability Dataset, figureFileSmall=null, figureFileBig=null, tableContent=
数据集模型FNFPTNTPF1/%A/%R/%P/%
柱:黑体数值表示最优结果.
CWE119DeepWukong160897409126291.097.288.793.4
LHG-VD-CLS90727426133294.398.293.794.8
LHG-VD(本文)93717427132994.198.293.594.9
), ArticleFig(id=1327018419469267102, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, label=表1, caption=

在人工漏洞数据集的消融实验

, figureFileSmall=null, figureFileBig=null, tableContent=
数据集模型FNFPTNTPF1/%A/%R/%P/%
柱:黑体数值表示最优结果.
CWE119DeepWukong160897409126291.097.288.793.4
LHG-VD-CLS90727426133294.398.293.794.8
LHG-VD(本文)93717427132994.198.293.594.9
), ArticleFig(id=1327018419553153183, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, label=Table 2, caption=Ablation Experiments in Real Vulnerability Dataset %, figureFileSmall=null, figureFileBig=null, tableContent=
模型F1ARP
注:黑体数值表示最优结果.
DeepWukong67.664.475.961.0
LHG-VD-CLS68.566.374.963.1
LHG-VD(本文)71.569.079.565.0
), ArticleFig(id=1327018419620262048, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, label=表2, caption=

在真实漏洞数据集的消融实验

, figureFileSmall=null, figureFileBig=null, tableContent=
模型F1ARP
注:黑体数值表示最优结果.
DeepWukong67.664.475.961.0
LHG-VD-CLS68.566.374.963.1
LHG-VD(本文)71.569.079.565.0
), ArticleFig(id=1327018419704148129, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=EN, label=Table 3, caption=Comparative Experiment %, figureFileSmall=null, figureFileBig=null, tableContent=
类别模型F1ARP
注:黑体数值表示最优结果.
基于规则方法Flawfinder[23]22.148.714.150.9
基于函数的token图方法ReGVD[16]61.752.079.050.6
基于函数的图方法AMPLE[22]65.148.398.848.5
基于函数的文本方法LineVul[9]66.252.994.551.0
基于切片级的图方法DeepWukong[13]67.664.475.961.0
基于函数的文本方法CodeBERT69.358.595.854.3
基于切片级的图方法LHG-VD(本文)71.569.079.565.0
), ArticleFig(id=1327018419779645602, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, language=CN, label=表3, caption=

对比实验

, figureFileSmall=null, figureFileBig=null, tableContent=
类别模型F1ARP
注:黑体数值表示最优结果.
基于规则方法Flawfinder[23]22.148.714.150.9
基于函数的token图方法ReGVD[16]61.752.079.050.6
基于函数的图方法AMPLE[22]65.148.398.848.5
基于函数的文本方法LineVul[9]66.252.994.551.0
基于切片级的图方法DeepWukong[13]67.664.475.961.0
基于函数的文本方法CodeBERT69.358.595.854.3
基于切片级的图方法LHG-VD(本文)71.569.079.565.0
)], attaches=null, journal=Journal(id=1324759606947315908, delFlag=0, nameCn=计算机研究与发展, nameEn=Journal of Computer Research and Development, nameHistory1=null, nameHistory2=null, issn=1000-1239, eissn=null, cn=11-1777/TP, coden=null, periodic=0, language=CN, oaType=null, ccby=null, superviseOffice=null, ownerOffice=null, pubOffice=null, editorOffice=null, officeType=null, aims=null, clcCode=null, officeProv=null, officeCity=null, officeAddr=null, officeZip=null, officeEmail=null, officePhone=null, editDirector=null, officeDirector=null, officeDirectorPhone=null, officeStaffNum=null, officeEmpNum=null, coverPicUrl=k2l8zgqwstuxxevFX2qxVA==, journalPrice=null, startedYear=null, abbrevIsoEn=Journal of Computer Research and Development, journalRemark=null, publicationField=null, createdTime=1793776903141, updatedTime=1793850698612, createdBy=18614031015, updatedBy=13701087609, firstLetterCn=J, firstLetterEn=J, subjectCode=Electronic Information, subjectName=null, subjectCodeEn=Electronic Information, subjectNameEn=null, picCn=k2l8zgqwstuxxevFX2qxVA==, picEn=r6k0Ry+RD+c/VXj5QarmDw==, jcr=null, cjcr=null, exts=[JournalExt(id=1325069127710286688, language=CN, name=计算机研究与发展, nameHistory1=null, nameHistory2=null, managedBy=, sponsoredBy=, publishedBy=, editorOffice=, officeProv=null, officeCity=null, officeAddr=, officeZip=, editDirector=, officeDirector=null, officePhone=null, coverPicUrl=null, journalRemark=, submitArticleUrl=null, websiteUrl=, createdTime=1793850698640, updatedTime=1793850698640, createdBy=13701087609, updatedBy=13701087609, submissionGuidelinesUrl=, submissionAuthorUrl=https://crad.ict.ac.cn/journalx/authorLogOn.action, submissionEditorUrl=https://crad.ict.ac.cn/journalx/editorLogOn.action, submissionReviewUrl=https://crad.ict.ac.cn/journalx/expertLogOn.action, submissionCeEditorUrl=https://crad.ict.ac.cn/journalx/editorInChiefLogOn.action, submissionAeEditorUrl=, option={"copyright":""}), JournalExt(id=1325069127777395553, language=EN, name=Journal of Computer Research and Development, nameHistory1=null, nameHistory2=null, managedBy=, sponsoredBy=, publishedBy=, editorOffice=, officeProv=null, officeCity=null, officeAddr=, officeZip=, editDirector=, officeDirector=null, officePhone=null, coverPicUrl=null, journalRemark=, submitArticleUrl=null, websiteUrl=, createdTime=1793850698656, updatedTime=1793850698656, createdBy=13701087609, updatedBy=13701087609, submissionGuidelinesUrl=, submissionAuthorUrl=https://crad.ict.ac.cn/journalx/authorLogOn.action, submissionEditorUrl=https://crad.ict.ac.cn/journalx/editorLogOn.action, submissionReviewUrl=https://crad.ict.ac.cn/journalx/expertLogOn.action, submissionCeEditorUrl=https://crad.ict.ac.cn/journalx/editorInChiefLogOn.action, submissionAeEditorUrl=, option={"copyright":""})], databaseList=null, tenantJournalId=1324759914146529478, websiteList=[Website(id=1325070300139892771, webName=null, webTitle=null, webDomain=null, webCopyrigh=null, webIpcNo=null, seoTitle=null, seoKeywords=null, seoDescription=null, tenantJournalId=null, journalId=1324759914146529478, journalNameCn=null, journalNameEn=null, grayFlag=null, tenantId=1146029695717560320, platformId=null, journalGroupId=null, journalGroupNameCn=null, journalGroupNameEn=null, type=1, domain=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN, language=CN, createTime=1793850978169, createBy=18614031015, updateTime=1793851040259, updateBy=18614031015, name=计算机研究与发展-中文, tplId=1146099689490845704, title=计算机研究与发展, delFlag=0, indexPage=/home, props=[WebsiteProps(id=1325070893751349360, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=articleTextType, value=kx, createTime=1793851119697, updateTime=1793851119697, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893730377837, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=banner, value=null, createTime=1793851119692, updateTime=1793851119692, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893772320883, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=grayFlag, value=0, createTime=1793851119702, updateTime=1793851119702, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893721989228, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=logo, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/file/pic?fileId=U27tDsy717YF7XSPA+Vwdw==, createTime=1793851119690, updateTime=1793851119690, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893784903797, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=minRunFlag, value=0, createTime=1793851119705, updateTime=1793851119705, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893742960751, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=picServerUrl, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/file/pic, createTime=1793851119695, updateTime=1793851119695, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893780709492, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=silenceFlag, value=0, createTime=1793851119704, updateTime=1793851119704, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893738766446, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=staticResourcePath, value=https://castjournals.cast.org.cn/joweb/cast_kjdb_cn_619/, createTime=1793851119694, updateTime=1793851119694, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893755543665, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=themeColor, value=null, createTime=1793851119698, updateTime=1793851119698, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893763932274, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=themeStyle, value=null, createTime=1793851119700, updateTime=1793851119700, creator=18614031015, updator=18614031015)]), Website(id=1325070300580294698, webName=null, webTitle=null, webDomain=null, webCopyrigh=null, webIpcNo=null, seoTitle=null, seoKeywords=null, seoDescription=null, tenantJournalId=null, journalId=1324759914146529478, journalNameCn=null, journalNameEn=null, grayFlag=null, tenantId=1146029695717560320, platformId=null, journalGroupId=null, journalGroupNameCn=null, journalGroupNameEn=null, type=1, domain=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN, language=EN, createTime=1793850978274, createBy=18614031015, updateTime=1793851036638, updateBy=18614031015, name=计算机研究与发展-英文, tplId=1146101810881728533, title=Journal of Computer Research and Development, delFlag=0, indexPage=/home, props=[WebsiteProps(id=1325070925288321148, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=articleTextType, value=kx, createTime=1793851127216, updateTime=1793851127216, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925263155321, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=banner, value=null, createTime=1793851127210, updateTime=1793851127210, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925309292671, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=grayFlag, value=0, createTime=1793851127221, updateTime=1793851127221, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925254766712, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=logo, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/file/pic?fileId=U27tDsy717YF7XSPA+Vwdw==, createTime=1793851127208, updateTime=1793851127208, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925326069889, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=minRunFlag, value=0, createTime=1793851127225, updateTime=1793851127225, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925279932539, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=picServerUrl, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/file/pic, createTime=1793851127214, updateTime=1793851127214, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925317681280, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=silenceFlag, value=0, createTime=1793851127223, updateTime=1793851127223, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925271543930, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=staticResourcePath, value=https://castjournals.cast.org.cn/joweb/cast_kjdb_en_623/, createTime=1793851127212, updateTime=1793851127212, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925292515453, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=themeColor, value=null, createTime=1793851127217, updateTime=1793851127217, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925300904062, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=themeStyle, value=null, createTime=1793851127219, updateTime=1793851127219, creator=18614031015, updator=18614031015)])], journalTitle=计算机研究与发展, weixinUrl=null, journalUrl=https://crad.ict.ac.cn/, iacademicId=null, status=1, seqNo=null, journalTitleEn=Journal of Computer Research and Development, journalPhotoCn=k2l8zgqwstuxxevFX2qxVA==, journalPhotoEn=r6k0Ry+RD+c/VXj5QarmDw==, journalFirstLetter=J, journalRecommend=null, journalNew=null, journalCollection=null, jcrJf=null, cjcrJf=null, jcrJfStr=null, cjcrJfStr=null, submissionFirstDecision=null, sciSubjectClassification=null, casSubjectClassification=null, citeScore=null, totalCitationFrequency=null, icpCode=null, psCode=null, advertisingLicenseCode=null, copyrightInformation=null, country=null, option=, provinceCode=null, provinceName=null, collectFlag=false, interPubPlatform=, interPubPlatformUrl=null), detailUrlCn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/10.7544/issn1000-1239.202440171, detailUrlEn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/10.7544/issn1000-1239.202440171, pdfUrlCn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/PDF/10.7544/issn1000-1239.202440171, pdfUrlEn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/PDF/10.7544/issn1000-1239.202440171, aliStartDate=0, aliEndDate=0, collectionFlag=false, citedCount=null, citedUrl=null, previewStatus=0, delFlag=0, hasFullText=1, orderTime=1756656000000, fullTextJson=null, articleText=null, reference=null)
收藏切换
LHG-VD: 一种可学习的层次化图表示漏洞检测方法
胡菘 1 , 罗嘉驰 2 , 万文凯 2 , 闫阳 1 , 郭帆 2, * , 曲彦文 2
计算机研究与发展 | 网络与信息安全 2025,62(9): 2348-2361
收起
收藏切换
计算机研究与发展 |网络与信息安全 2025 , 62 (9) : 2348 -2361
LHG-VD: 一种可学习的层次化图表示漏洞检测方法
全屏
[Author(id=1327018415564370024, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=0, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=songhu@jxnu.edu.cn, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1327018415631478890, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415564370024, language=EN, stringName=Song Hu, firstName=Song, middleName=null, lastName=Hu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1School of Digital Industry, Jiangxi Normal University, Shangrao, Jiangxi 334006, bio={"content":"

born in 1999. Master. His main research interests include vulnerability detection and graph deep learning

"}, bioImg=null, bioContent=

born in 1999. Master. His main research interests include vulnerability detection and graph deep learning

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018415706976363, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415564370024, language=CN, stringName=胡菘, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1江西师范大学数字产业学院 江西上饶 334006, bio={"img":"Cb6Va5d3lu+52yu+HZAhnQ==","content":"

1999年生. 硕士. 主要研究方向为漏洞检测、图深度学习

"}, bioImg=Cb6Va5d3lu+52yu+HZAhnQ==, bioContent=

1999年生. 硕士. 主要研究方向为漏洞检测、图深度学习

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415342071905, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=1, ext=[AuthorCompanyExt(id=1327018415350460514, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415342071905, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1School of Digital Industry, Jiangxi Normal University, Shangrao, Jiangxi 334006), AuthorCompanyExt(id=1327018415363043427, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415342071905, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1江西师范大学数字产业学院 江西上饶 334006)])]), Author(id=1327018415765696621, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=1, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1327018415841194095, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415765696621, language=EN, stringName=Jiachi Luo, firstName=Jiachi, middleName=null, lastName=Luo, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022, bio={"content":"

born in 2002. Bachelor. His main research interest includes machine learning

"}, bioImg=null, bioContent=

born in 2002. Bachelor. His main research interest includes machine learning

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018415916691568, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415765696621, language=CN, stringName=罗嘉驰, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2江西师范大学计算机信息工程学院 南昌 330022, bio={"img":"3nFN0rg46EyBVy7H0JjLzg==","content":"

2002年生. 学士. 主要研究方向为机器学习

"}, bioImg=3nFN0rg46EyBVy7H0JjLzg==, bioContent=

2002年生. 学士. 主要研究方向为机器学习

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415451123812, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=2, ext=[AuthorCompanyExt(id=1327018415463706725, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022), AuthorCompanyExt(id=1327018415476289638, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2江西师范大学计算机信息工程学院 南昌 330022)])]), Author(id=1327018415992189042, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=2, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1327018416076075124, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415992189042, language=EN, stringName=Wenkai Wan, firstName=Wenkai, middleName=null, lastName=Wan, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022, bio={"content":"

born in 2001. Master. His main research interests include vulnerability detection and graph deep learning

"}, bioImg=null, bioContent=

born in 2001. Master. His main research interests include vulnerability detection and graph deep learning

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018416164155509, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018415992189042, language=CN, stringName=万文凯, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2江西师范大学计算机信息工程学院 南昌 330022, bio={"img":"F2XUYpKlPthcVLLbOOdq1g==","content":"

2001年生. 硕士. 主要研究方向为漏洞检测、图深度学习

"}, bioImg=F2XUYpKlPthcVLLbOOdq1g==, bioContent=

2001年生. 硕士. 主要研究方向为漏洞检测、图深度学习

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415451123812, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=2, ext=[AuthorCompanyExt(id=1327018415463706725, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022), AuthorCompanyExt(id=1327018415476289638, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2江西师范大学计算机信息工程学院 南昌 330022)])]), Author(id=1327018416243847287, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=3, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1327018416310956153, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416243847287, language=EN, stringName=Yang Yan, firstName=Yang, middleName=null, lastName=Yan, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1School of Digital Industry, Jiangxi Normal University, Shangrao, Jiangxi 334006, bio={"content":"

born in 1999. Master. His main research interests include vulnerability detection and machine learning

"}, bioImg=null, bioContent=

born in 1999. Master. His main research interests include vulnerability detection and machine learning

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018416382259322, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416243847287, language=CN, stringName=闫阳, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1江西师范大学数字产业学院 江西上饶 334006, bio={"img":"aA3ZPh1/6hww6oD3iccIjA==","content":"

1999年生. 硕士. 主要研究方向为漏洞检测、机器学习

"}, bioImg=aA3ZPh1/6hww6oD3iccIjA==, bioContent=

1999年生. 硕士. 主要研究方向为漏洞检测、机器学习

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415342071905, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=1, ext=[AuthorCompanyExt(id=1327018415350460514, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415342071905, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1School of Digital Industry, Jiangxi Normal University, Shangrao, Jiangxi 334006), AuthorCompanyExt(id=1327018415363043427, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415342071905, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1江西师范大学数字产业学院 江西上饶 334006)])]), Author(id=1327018416453562492, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=4, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=fguo@jxnu.edu.cn, emailSecond=null, emailThird=null, correspondingAuthor=1, authorType=1, ext={EN=AuthorExt(id=1327018416550031486, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416453562492, language=EN, stringName=Fan Guo, firstName=Fan, middleName=null, lastName=Guo, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, *, address=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022, bio={"content":"

born in 1977. PhD, associate professor, His main research interests include network security, program analysis, and vulnerability mining

"}, bioImg=null, bioContent=

born in 1977. PhD, associate professor, His main research interests include network security, program analysis, and vulnerability mining

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018416625528959, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416453562492, language=CN, stringName=郭帆, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, *, address=2江西师范大学计算机信息工程学院 南昌 330022, bio={"img":"zIA9J/gjCgmJDubsYioiGw==","content":"

1977年生. 博士,副教授. 主要研究方向为网络安全、程序分析、漏洞挖掘

"}, bioImg=zIA9J/gjCgmJDubsYioiGw==, bioContent=

1977年生. 博士,副教授. 主要研究方向为网络安全、程序分析、漏洞挖掘

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415451123812, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=2, ext=[AuthorCompanyExt(id=1327018415463706725, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022), AuthorCompanyExt(id=1327018415476289638, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2江西师范大学计算机信息工程学院 南昌 330022)])]), Author(id=1327018416688443521, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, orderNo=5, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1327018416768135299, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416688443521, language=EN, stringName=Yanwen Qu, firstName=Yanwen, middleName=null, lastName=Qu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022, bio={"content":"

born in 1983. PhD, lecturer. His main research interests include graph deep learning and vulnerability detection

"}, bioImg=null, bioContent=

born in 1983. PhD, lecturer. His main research interests include graph deep learning and vulnerability detection

, aboutCorrespAuthor=null), CN=AuthorExt(id=1327018416856215684, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, authorId=1327018416688443521, language=CN, stringName=曲彦文, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, address=2江西师范大学计算机信息工程学院 南昌 330022, bio={"img":"KPk6K9X+g7Zubd9ErEWBUg==","content":"

1983年生. 博士,讲师. 主要研究方向为图深度学习、漏洞检测

"}, bioImg=KPk6K9X+g7Zubd9ErEWBUg==, bioContent=

1983年生. 博士,讲师. 主要研究方向为图深度学习、漏洞检测

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1327018415451123812, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, xref=2, ext=[AuthorCompanyExt(id=1327018415463706725, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022), AuthorCompanyExt(id=1327018415476289638, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1327018411470729284, companyId=1327018415451123812, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2江西师范大学计算机信息工程学院 南昌 330022)])])]
胡菘1 , 罗嘉驰2, 万文凯2, 闫阳1, 郭帆2, * , 曲彦文2
作者信息
  • 1江西师范大学数字产业学院 江西上饶 334006
  • 2江西师范大学计算机信息工程学院 南昌 330022
通讯作者:
作者简介:

1999年生. 硕士. 主要研究方向为漏洞检测、图深度学习

2002年生. 学士. 主要研究方向为机器学习

2001年生. 硕士. 主要研究方向为漏洞检测、图深度学习

1999年生. 硕士. 主要研究方向为漏洞检测、机器学习

1977年生. 博士,副教授. 主要研究方向为网络安全、程序分析、漏洞挖掘

1983年生. 博士,讲师. 主要研究方向为图深度学习、漏洞检测

LHG-VD: A Learnable Hierarchical Graph Representation Vulnerability Detection Method
Song Hu1 , Jiachi Luo2, Wenkai Wan2, Yang Yan1, Fan Guo2, * , Yanwen Qu2
Affiliations
  • 1School of Digital Industry, Jiangxi Normal University, Shangrao, Jiangxi 334006
  • 2School of Computer Information Engineering, Jiangxi Normal University, Nanchang 330022
  • born in 1999. Master. His main research interests include vulnerability detection and graph deep learning

    born in 2002. Bachelor. His main research interest includes machine learning

    born in 2001. Master. His main research interests include vulnerability detection and graph deep learning

    born in 1999. Master. His main research interests include vulnerability detection and machine learning

    born in 1977. PhD, associate professor, His main research interests include network security, program analysis, and vulnerability mining

    born in 1983. PhD, lecturer. His main research interests include graph deep learning and vulnerability detection

出版时间: 2025-09-01 doi: 10.7544/issn1000-1239.202440171
文章导航
收藏切换

软件漏洞严重威胁了计算机系统和软件的安全稳定运行,因此针对其自动检测的相关研究一直受到广泛关注. 与传统静态漏洞检测工具采用人类专家提供的预定义规则进行代码分析不同,基于图神经网络(GNN)的漏洞检测方法通过自动学习易受攻击的代码模式,在一些数据集上的检测效果已经超越传统方法. 然而,目前基于GNN 的漏洞检测方法中,由于未结合代码自身特点对GNN 模型进行设计,导致在真实漏洞代码数据集上检测效果较差. 提出一种可学习的层次化图表示的漏洞检测方法LHG-VD,其特点是针对传统读出函数的局限提出一种可学习的读出函数,针对图池化过程中的代码局部结构信息保持问题设计了一种基于对比学习思想的跨粒度损失函数. 在真实漏洞数据集的实验结果表明,LHG-VD 的F1值为71.5%,与切片级检测方法DeepWukong 相比提升4.9个百分点,与函数级检测方法AMPLE 相比提升8.9个百分点.

漏洞检测  /  深度学习  /  图神经网络  /  对比学习  /  图池化

Software vulnerabilities pose a serious threat to the safe and stable operation of computer systems and software, so the research related to their automatic detection has been receiving extensive attention. Unlike traditional static vulnerability detection tools that use predefined rules provided by human experts to analyze the code, graph neural network (GNN)-based vulnerability detection methods have surpassed the traditional methods in some datasets by automatically learning the vulnerable code patterns. However, in the current GNN-based vulnerability detection methods, the design of GNN model is not combined with the characteristics of the code itself, which leads to poor detection effect on the real vulnerability code dataset. In this paper, we propose a learnable hierarchical graph representation vulnerability detection method LHG-VD, which is characterized by proposing a learnable readout function for the limitation of the traditional readout function, and designing a cross-granularity loss function based on the idea of comparative learning for the problem of maintaining the local structural information of the code in the process of graph pooling. Experimental results on real vulnerability datasets show that the F1 value of LHG-VD is 71.5%, which is improved by 4.9% compared with DeepWukong, a slice-level detection method, and 8.9% compared with AMPLE, a function-level detection method.

vulnerability detection  /  deep learning  /  graph neural network  /  comparative learning  /  graph pooling
胡菘, 罗嘉驰, 万文凯, 闫阳, 郭帆, 曲彦文. LHG-VD: 一种可学习的层次化图表示漏洞检测方法. 计算机研究与发展, 2025 , 62 (9) : 2348 -2361 . DOI: 10.7544/issn1000-1239.202440171
Song Hu, Jiachi Luo, Wenkai Wan, Yang Yan, Fan Guo, Yanwen Qu. LHG-VD: A Learnable Hierarchical Graph Representation Vulnerability Detection Method[J]. Journal of Computer Research and Development, 2025 , 62 (9) : 2348 -2361 . DOI: 10.7544/issn1000-1239.202440171
软件源代码安全是软件安全的重要研究领域,其核心在于对软件源代码进行缺陷检测,漏洞作为一种可为攻击者利用的代码缺陷是检测的重点. 在软件开发的过程中,由于人工测试和传统静态分析工具存在局限,很难完全排除软件中的漏洞. 传统漏洞检测方法[1-4]主要采用人类专家提供的预定义规则进行代码分析,劳动强度大且不准确. 最近,各种基于深度学习(deep learning,DL)的漏洞检测方法被提出[5-22],这些方法通过自动学习易受攻击的代码模式,在一些人工漏洞代码和真实代码数据集上取得了不错的检测效果. 基于深度学习中的自然语言处理(natural language processing,NLP)和图深度学习技术,将程序代码表示成文本序列,利用序列模型进行特征学习[5-10],或是通过静态分析提取代码中的图结构信息,从而利用图神经网络(graph neural network,GNN)进行特征学习[11-21]. 基于图的表征方式能够对代码的语法信息、语义信息、控制流和数据流等信息进行深层次的表示,相比基于文本表征的方法,在检测效果上更好.
现有基于GNN的漏洞检测方法在设计GNN模型时,往往直接使用图学习领域的通用方法,并未针对代码自身特点进行设计,具体有2方面的问题:
1)真实漏洞代码往往调用链长且复杂,导致代码表征图规模更大、结构更加复杂. 现有基于GNN的切片级漏洞检测方法虽在人工漏洞数据集上表现不错,但在真实漏洞数据集上的表现仍不理想.
2)程序代码可以分为多个代码块(如if-else块和循环块),每个代码块可以单独视为一个逻辑单元. 在GNN模型的处理过程中,代码块被映射为代码表征图的局部结构信息. 图池化过程涉及节点和边的整合和删减,引起图拓扑结构的变动,导致代码表征图的局部结构信息会丢失.
针对上述问题,本文提出了一种可学习的层次化图表示漏洞检测方法LHG-VD. LHG-VD 属于切片级漏洞检测方法,采用层次化设计的GNN 模型,能够有效捕捉不同粒度的代码表征图信息. LHG-VD 设计了一个可学习的读出函数来处理不同粒度表征图,得到全图向量表示,其对不同规模代码表征图有自适应性. LHG-VD 设计了一个基于对比学习思想的跨粒度损失函数,能够在图池化过程中保持池化前的细粒度代码表征图中的局部结构信息.
本文将LHG-VD 与6种先进的漏洞检测方法进行了实验对比,包括基于规则的检测方法Flawfinder[23]、2种基于文本序列的方法(LineVul[9]和CodeBERT[24])和3种基于GNN 的漏洞检测方法(ReGVD[16],AMPLE[22],DeepWukong[13]). 在真实漏洞代码数据集上的实验结果表明,LHG-VD 在F1得分、召回率、精确率和准确率方面超过了所有的漏洞检测方法.
本文的主要贡献有3个方面:
1)从真实漏洞代码的特点出发,针对传统图读出方法受限于固定的计算规则,无法很好适应不同粒度代码表征图中节点层次差异的问题,引入NLP 中CLS 的设计思想并结合全局注意力机制提出了一种可学习的图读出(learnable graph readout,LGR)函数.
2)针对在图池化过程中由于图规模的缩减导致细粒度图中局部结构信息可能丢失的问题,设计了一个跨粒度的对比学习损失(cross-granularity contrastive loss,CGCL)函数,能够在池化后的粗粒度图中保持原始细粒度图中的局部结构信息.
3)提出一种可学习的层次化图表示漏洞检测方法LHG-VD,在真实漏洞代码数据集上的实验结果表明,LHG-VD 的性能优于现有的6种检测方法.
基于深度学习的源码漏洞检测方法的核心思想是借助深度神经网络强大的特征学习能力来学习隐含漏洞模式,从而实现自动检测的目的. 源代码的表征形式主要分为文本序列表示和图表示.
将代码表示为文本序列时,主要采用NLP 中的处理方式,如VulDeePecker[7] 使用Word2Vec[25] 技术将输入的代码片段转化为向量表示后,利用双向长短期记忆网络(Bi-LSTM)进行训练. LineVul[9] 引入了预训练编程语言(programming language,PL)模型CodeBERT[24] 来实现语义嵌入提取的步骤,没有使用传统的RNN 模型来生成代码表示,而是利用带有自注意力层的BERT 架构[26],这些自注意力层能够使用点积运算捕获长序列中的长期依赖关系. 基于文本序列的表征方式虽然表达直观、处理相对简单,但是无法利用程序代码中丰富的结构信息.
基于代码图表征的检测方法能够充分表示从源代码中抽取的结构信息和语义信息,首先通过数据预处理将代码转化为图表征形式,然后利用GNN 来学习代码中隐含的漏洞模式,最后对代码表征图进行分类操作. 例如Devign[12] 使用图注意力神经网络[27](gated graph neural network,GGNN)对节点信息进行汇聚后执行图级别的分类任务,将待检测代码分为有缺陷和无缺陷. AMPLE[22] 使用Devign 代码表征图,在GNN 中添加用于捕获远处图节点之间关系的核缩放表示模块,涉及2个不同尺度的卷积核,分别关注远距离节点和邻近节点之间的关系. ReGVD[16] 从代码文本的token 序列中,根据Unique token-focused 和Index-focused自定义策略来构建代码表征图,并使用CoderBERT 的token 嵌入层来初始化节点特征向量. ReGVD 以图卷积网络[28](graph convolutional networks,GCN)和GGNN为基础模型,通过残差连接(residual connection)来学习代码表征图特征,读出函数通过拼接sum pooling 和max pooling 的结果实现. DeepWukong[13] 在GNN 设计中引入层次化的K-GNN(K-dimensional GNN),该结构由多个相似的模块构成,每个模块都包括图卷积层、池化层和读出层. K-GNN 旨在通过整合不同粒度的图信息,从而获得更为全面的图表征服务于分类任务.
基于GNN 的图分类方法,首先对节点特征和图结构进行卷积操作得到特征映射后的节点表示,然后进行多次池化操作,缩小图的规模,最终得到全图表示用于后续分类[29].
Ying 等人[30]提出可微分池化分类模型DiffPool,GNN 在每次卷积操作后会通过学习一个软分配矩阵将节点聚合到不同的簇中,逐步缩小图的规模. 该聚类过程,计算开销大且面临细节信息丢失问题. Xu 等人[31]引入跳跃知识(jumping knowledge)机制并提出JK-Nets(jumping knowledge networks),可与不同类型的GNN 层(如GCN、GraphSAGE等)结合使用,能够聚合来自不同GNN层的节点表示,允许模型在学习时同时考虑局部和全局的图结构信息. Cangea 等人[32]延续JK-Nets的设计,在读出每个GNN 层的信息时,拼接多个全局池化操作的结果. Morris 等人[33]受到K-WL(Weisfeiler-Lehman)算法的启发,提出了K-GNN 模型,通过考虑多个尺度来改进对高阶图结构的处理,但在高阶图结构的读出上不够灵活. Wu 等人[34]的图分类模型设计了全图自注意力来学习图中的长距离依赖关系. 它将额外的可学习节点嵌入〈CLS〉添加到节点嵌入序列中,并从Transformer 的输出中获取第1个节点嵌入作为图表示. 本文的图分类方法,从K-GNN 出发,引入CLS 设计思路,改善读出函数的自适应性,同时保留了JK-Nets 风格的设计,结合不同尺度的图信息,获得信息更丰富的全图表示.
GNN是一个关于图的特征的学习过程[35]. 对于节点分类任务,GNN 模型旨在学习每个节点的代表性特征,这些特征有助于该类任务的后续处理. 对于图分类任务,GNN 模型的目标是学习整个图的代表性特征,学习节点特征通常是一个中间步骤,通过图卷积层实现.
GCN是一种常用的图卷积操作,针对目标节点的邻居节点特征以及节点之间的边的权重进行加权融合,将邻居节点的信息传播到目标节点,式(1)说明了逐层传播的规则.
$ {\boldsymbol{H}}^{(l+1)}=\sigma \left({\boldsymbol{D}}^{-\tfrac{1}{2}}\tilde{\boldsymbol{A}}{\boldsymbol{D}}^{-\tfrac{1}{2}}{\boldsymbol{H}}^{\left(l\right)}{\boldsymbol{W}}^{\left(l\right)}\right) \text{,} $
其中$ \tilde{\boldsymbol{A}}=\boldsymbol{A}+{\boldsymbol{I}}_{N} $是增加了自连接的无向图$ G $ 的邻接矩阵,$ {\boldsymbol{I}}_{N} $ 是一个单位矩阵,$ {\tilde{\boldsymbol{D}}}_{ii}=\displaystyle\sum_{j}{\tilde{\boldsymbol{A}}}_{i,j} $ 表示度矩阵,$ {\boldsymbol{W}}^{\left(l\right)} $ 是一个特定层可训练的权重矩阵,$ \sigma (\cdot ) $表示激活函数如ReLU. $ {\boldsymbol{H}}^{\left(l\right)} $表示第$ l $层的激活矩阵,$ {\boldsymbol{H}}^{\left(0\right)}=\boldsymbol{X} $,即为输入节点的特征矩阵.
在基于GNN的图分类模型中,图池化层[33]通常插入在连续的卷积层之间,作用是降低特征维度、增强计算效率并扩大感受野. 引入池化层的目的是降低节点数量,减小图的规模,同时尽量保留最重要的信息. 在图池化策略中,Top-k 池化选择最具代表性的$ k $ 个节点组成下一层的图. Top-k 池化的核心是评分机制,它为每个节点$ v $计算一个分数$ {s}_{v} $,$ {s}_{v} $ 通过可学习的参数化函数$ g $ 来计算. 以单层神经网络为例,函数$ g $ 可以表示为
$ {s}_{v}=g\left({\boldsymbol{x}}_{v}\right)={\boldsymbol{w}}^{\mathrm{T}}\cdot {\boldsymbol{x}}_{v}+b \text{,} $
其中$ {\boldsymbol{x}}_{v} $ 是节点$ v $ 的特征向量,$ \boldsymbol{w} $ 是权重向量,$ b $ 是偏置项. 通过调整$ \boldsymbol{w} $ 和$ b $,网络可以学习最能代表节点重要性的节点特征组合.
在计算出所有节点的分数后,Top-k 池化选择分数最高的$ k $ 个节点或分数高于某个阈值$ \tau $ 的节点,构成新的图层.
图读出层也称为图汇聚层或图全局汇聚层,是GNN 的重要组成部分,主要作用是将图的节点特征聚合成全图级别的表示. 图读出层会从图中提取一个固定维度的特征向量,以便进行图级别的预测任务,例如图分类和图回归等.
层次化的图分类模型交替地执行卷积操作和池化操作,将图逐步粗化. 每次池化操作会生成1张粗粒度的图,通过图读出模块提取模型中若干层的图特征,将这些特征融合后得到全图表示进行图分类. 图分类的目标是学习图和类别标签的映射关系,并预测未知图的类别标签.
本文研究基于图分类的源代码漏洞检测模型,首先将非结构化的文本转换为有向图结构,然后采用层次化的图分类模型对有向图进行分类,实现漏洞检测.
DeepWukong[13]实验结果表明K-GNN 在漏洞检测任务上的分类性能优于GAT 和GCN 等方法,引起了我们的关注. K-GNN 使用的信息读出策略是一种JK-Nets[31]的GNN,核心思想是在网络的不同层之间直接连接,从而允许信息在多个层次上“跳跃”. 这种“跳跃”策略允许模型在不同深度上可以捕获图的多尺度特性,从而得到更丰富和更具代表性的图嵌入.
图1给出CWE119 数据集的一个代码切片示例“invalid-memory-access. c”来展示DeepWukong 的图分类过程. 每一个块由图卷积层、图池化层和图读出函数构成. 代码表征图经过不同块的处理,可以得到不同粒度的图嵌入(graph embedding,GE),融合这些GE 可以得到全图的GE. 图卷积操作通过传递目标节点的邻域节点信息到目标节点来更新目标节点特征信息,图1中节点的大小表示信息的聚集程度. 图池化方法会利用评分函数来删除显著性分数(significance scores)相对较低的节点(图1中虚线部分节点对应被丢弃的节点),逐步缩小图的规模,从而产生不同粒度的图. 粒度不同是指图拓扑结构不同和节点的抽象级别不同,相同节点在不同粒度的图中存在层级差异.
1)传统的读出策略如SUM 和MEAN,尽管操作简洁,但是均等地处理所有节点,从而可能遗漏关键节点的重要信息(如图1中第320行漏洞语句对应的节点信息). 全局注意力方法(GlobalAttention)作为一种权重分配策略,虽然为每个节点赋予了权重并进行加权平均,但其固定的计算规则可能导致权重分布不均,使得某些节点的信息被过度放大,而其他节点的信息被边缘化. 因此,为了充分捕获不同粒度图中节点的层次差异,我们需要一个更为灵活和自适应的读出策略. LGR 图读出方式在结合全局注意力的基础上,增加了自适应性,因此可以有效应对不同粒度图中节点的层次差异. 图1中图读出部分,展示了3种读出方式的差异,方块的大小表示节点信息被过度放大或缩小,颜色深浅表示节点信息汇聚时的重要程度.
2)信息丢失的固有问题也需要被关注. 程序代码可以分为多个代码块(例如,if-else 块、循环块),每个代码块可以被单独视为一个逻辑单元,在GNN 模型的处理过程中,代码块被映射为代码表征图的局部结构信息. 代码表征图经过不同层的池化后,图规模缩减,原始细粒度图中重要的局部结构信息存在丢失风险. 如图1中漏洞行对应320号节点邻域的307号节点,在切片代码中可以看出漏洞为数组越界访问造成,307号节点对应代码行为内存空间申请操作,与漏洞产生有关联. 局部结构信息对于理解代码的语义至关重要. 因此我们需要一种策略在池化后的图中保持原图中局部结构信息. 保持局部结构信息,可以通过提高池化后图中节点与原图中对应节点的相似度实现. 对比学习即通过正负样本对比,最小化正样本对的损失,这引导我们考虑对比学习.
图2展示了LHG-VD 方法的工作流程. LHG-VD 的漏洞检测模型采用层次化图表示架构,通过LGR 自适应地读出不同层次的图嵌入,设计CGCL 来保持原图中的重要局部结构信息. 数据处理模块将源代码处理为代码表征图,其先采用静态分析工具Joern[36] 提取代码的程序依赖图(program dependence graph,PDG),然后进行PDG 的切片操作,针对性地识别和分析潜在的敏感点,即那些可能出现漏洞的代码行. 代码切片是从敏感点开始进行前向和后向节点遍历,得到程序依赖图的子图. 敏感点包括系统API调用和涉及算术运算符(如“+,−,*,/”)的语句,以及指针成员访问(PtrMemberAccess)和数组索引操作(ArrayIndex).
为了将代码切片转化为模型可利用的图表征,需要进一步细化描述节点特征. LHG-VD 采用了一种通用的抽象名称替换策略来处理词汇爆炸问题,即代码中可能出现无限多的标识符(如自定义变量名和函数名)[7]. 抽象名称替换策略则是指将自定义的变量名和函数名替换为通用符号名VAR_number 和FUN_number. 例如,使用VAR_1,VAR_2等来表示变量名,以及FUN_1,FUN_2等来表示函数名. number 是基于变量名和函数名在代码中的出现顺序进行计数. 使用到的语料为训练集中的源代码. 每一行代码经过字符分割后,被用作Word2Vec 模型的输入. Word2Vec 模型训练时使用Skip-Gram 预测模型,用于学习词的向量表示. 最终参与表示学习的代码图如图3所示,图3中的节点特征为高维向量.
在基于GNN 的漏洞检测模型中,图分类任务需要描述全图的单个嵌入向量,将节点特征和图结构特征嵌入到固定维度向量的模块称为图读出模块. SUM 和MEAN 等读出方法将所有节点视为同等重要,这显然是不合理的. 在代码表征图中,漏洞触发语句通常更为关键,应该被赋予更高的权重. 采用GlobalAttention,可以使模型将注意力集中在漏洞触发语句上,而不是均匀处理所有输入,显示出良好的灵活性和通用性. 但这种基于固定计算规则的权重分配策略在实际应用中可能导致某些节点信息被过度放大,而其他节点信息被边缘化. 因此,我们需要一种能够动态调整的自适应策略,以更好地应对不同粒度图中的节点层级差异.
Wu 等人[34]提出可以使用全局注意力表示GNN 的长距离上下文,他们将特殊CLS 符号添加到节点嵌入序列,利用Transformer层的自注意力机制来捕获全局信息,如图4中虚线箭头部分所示. 本文实现思路与之不同,LGR 抛弃了原有拓扑结构,将可训练的CLS 节点与所有其他节点建立连接,利用GAT 层的图注意力机制将所有节点对交互聚合到单个分类向量中. 本文LGR 在使用GAT 计算CLS 时和Transformer 的attention 在聚合信息的核心思想上具有相似性. 但是LGR 未使用position embedding,并且LGR 仅关注于CLS 节点的特征,而Transformer 需要计算所有节点聚集后的特征.
图2的读出模块由3个可学习的读出函数构成,读出函数的设计如图4中实线箭头部分所示,首先向节点特征序列添加CLS 节点,同时修改输入图的拓扑结构,使图的所有节点均指向CLS 节点,然后通过GAT 层来学习原输入图中所有节点和CLS 节点间的关系. 该函数将CLS 节点与注意力机制相结合,采用动态权重分配策略来弥补传统方法的缺陷. 同时,CLS 节点参与了训练过程,可以在训练过程中自适应地调整. 从而根据程序代码表征图中数据的特性动态调整权重,使得模型能够更好地生成与任务相关的全图表示,更好地处理不同粒度图的信息. 读出函数的具体实现过程如下:
1)节点初始化
$ V=\left\{{v}_{1},{v}_{2},… ,{v}_{n}\right\} $是图中的原始节点集合. $ {v}_{\mathrm{c}\mathrm{l}\mathrm{s}} $是一个可学习的节点,在开始训练之前,CLS 节点的嵌入被随机初始化:
$ {e}_{\mathrm{c}\mathrm{l}\mathrm{s}}^{\left(0\right)}\sim \mathcal{D}\left(\theta \right) \text{,} $
其中$ {e}_{\mathrm{c}\mathrm{l}\mathrm{s}}^{\left(0\right)} $ 表示CLS 节点的初始嵌入,$ \mathcal{D}\left(\theta \right) $ 表示参数化的分布,比如正态分布或均匀分布,$ \theta $ 表示分布的参数.
2)结构重构
移除原图中所有的边,令$ {E'}=\varnothing $. 连接所有节点到CLS 节点,对于每个$ {v}_{i}\in V $,添加一条边$ \left({v}_{i},{v}_{\mathrm{c}\mathrm{l}\mathrm{s}}\right) $到$ {E'} $.
3)应用注意力机制
对于新图$ {G'}=\left(V\cup {v}_{\mathrm{c}\mathrm{l}\mathrm{s}},{E'}\right) $,使用GAT[37] 网络计算节点间的注意力系数:
$ {\alpha }_{ij}=\frac{\text{exp}\left({LeakyReLU}\left({\boldsymbol{a}}^{\mathrm{T}}\left[\boldsymbol{W}{\boldsymbol{h}}_{i}\| \boldsymbol{W}{\boldsymbol{h}}_{j}\right]\right)\right)}{\displaystyle\sum _{k\in N\left(i\right)\cup {v}_{\mathrm{c}\mathrm{l}\mathrm{s}}}\text{exp}\left({LeakyReLU}\left({\boldsymbol{a}}^{\mathrm{T}}\left[\boldsymbol{W}{\boldsymbol{h}}_{i}\| \boldsymbol{W}{\boldsymbol{h}}_{k}\right]\right)\right)}\text{,} $
其中$ {\boldsymbol{h}}_{i} $ 是节点$ i $ 的特征,$ \boldsymbol{W} $ 是权重矩阵,$ \boldsymbol{a} $ 是注意力系数的参数向量,$ \| $ 表示拼接操作,$ N\left(i\right) $是$ i $ 的邻居节点集合.
4)信息更新
更新每个节点的特征:
$ \boldsymbol{h}'_{\mathrm{c}\mathrm{l}\mathrm{s}}={LeakyReLU}\left(\displaystyle\sum _{i\in V\cup {v}_{\mathrm{c}\mathrm{l}\mathrm{s}}}{\alpha }_{i,\mathrm{c}\mathrm{l}\mathrm{s}}{\boldsymbol{W}}{{\boldsymbol{h}}}_{i}\right)+{e}_{\mathrm{c}\mathrm{l}\mathrm{s}}^{\left(0\right)}. $
5)全图嵌入
最终,获取CLS 节点的嵌入$ \boldsymbol{h}'_{\mathrm{c}\mathrm{l}\mathrm{s}} $ 作为整个图的表示. 读出函数不仅重构了图结构,而且通过学习到的全局注意力权重,将所有节点信息有效地集中到了CLS 节点上,从而得到了一个全图的嵌入表示. 读出函数$ R\left(G\right) $ 表示为
$ R(G)={\boldsymbol{h}}_{\mathrm{c}\mathrm{l}\mathrm{s}} . $
LHG-VD 的图池化策略为Top-k,因此在层次化图表示学习中,图池化过程涉及节点和边的整合和删减,引起图拓扑结构的变动[38],导致细粒度的局部结构信息在池化后的粗粒度图中丢失. 随着层次的增加,图的表示越来越抽象,也会导致局部结构信息丢失. 代码表征图中具有丰富的局部结构信息,这些信息对于漏洞发现非常有价值[13].
LHG-VD 设计CGCL 的核心思想是通过优化模型使得相似(正)样本对的特征表示更接近,而不相似(负)样本对的特征表示更远离. 在训练过程中添加CGCL,能够在学习如何有效地压缩和表征图的同时,保留那些对分类任务至关重要的细粒度局部块结构信息. 即使在经过池化后的粗粒度图中,这些关键的局部结构特征也得以保留,从而提高了模型的表征能力和最终的分类性能. CGCL 并不是为了直接修改池化算法本身,而是为了在图卷积时提取和保留那些对分类任务至关重要的细粒度局部块结构信息,即使在经过池化后的粗粒度图中,这些关键的局部结构特征也得以保留.
1)从正样本对角度出发,正样本对由经过图池化层和图卷积层的节点对组成(如图2橙色区域内图池化前后的5号节点). 图卷积层能够捕捉节点的局部邻域信息,而池化层则旨在减少图的复杂性,提炼出更高级的特征. 通过最大化正样本对之间的相似度,鼓励模型保持原始节点的关键信息和局部结构特征,通过强化这些节点在池化前后的相似度使得模型能够保留这些关键的局部信息. 图2中池化后的5号节点能够保持原图中5号节点的关键信息和局部结构特征(图2橙色区域).
2)从负样本对角度出发,负样本对由不共享相同局部块结构的节点组成,通过最小化负样本对之间的相似度,训练模型以区分不同的局部结构,这强化了模型对图中不同区域的敏感性和辨识能力. 通过对负样本对施加约束,模型被迫学习更具辨识力的、区分不同结构的嵌入.
3)从图卷积层参数训练过程出发,图卷积层通过聚合邻居节点的信息来更新每个节点的表示,能够捕捉复杂的局部结构模式. 在对比学习框架下,引导GNN 更加关注那些对区分正负样本对有帮助的特征,从而保持和强化局部块结构特征.
LHG-VD在训练过程中添加CGCL,能够在学习如何有效地压缩和表征图的同时,保留那些对分类任务至关重要的细粒度局部块结构信息. 即使在经过池化后的粗粒度图中,这些关键的局部结构特征也得以保留,从而提高了模型的表征能力和最终的分类性能.
在对比学习中,涉及正样本和负样本部分的对比,对比的是节点之间的相似程度. LHG-VD 使用余弦相似度来计算节点之间的相似程度,如式(7)所示. 其中,$ \boldsymbol{x}\cdot \boldsymbol{y} $ 是向量$ \boldsymbol{x} $ 和向量$\boldsymbol{y} $ 的点积,$ \| \boldsymbol{x}\| $ 和$ \| \boldsymbol{y}\| $ 分别是向量$ \boldsymbol{x} $和向量$\boldsymbol{y} $的欧几里得范数,计算方式如式(8)(9)所示. 为了保证数值稳定性,添加了一个小的常数$ \varepsilon $($\varepsilon=1{\mathrm{E}}-8 $).
$ \text{cos}(\boldsymbol{x},\boldsymbol{y})=\frac{\boldsymbol{x}\cdot \boldsymbol{y}}{\| \boldsymbol{x}\| \times \| \boldsymbol{y}\| } \text{,} $
$ \boldsymbol{x}\cdot \boldsymbol{y}=\displaystyle\sum _{i=1}^{n}{x}_{i}{y}_{i} \text{,} $
$ \| \boldsymbol{x}\| =\sqrt{\displaystyle\sum _{i=1}^{n}{x}_{i}^{2}}+\varepsilon . $
正样本对是指经过图池化和图卷积后,粗粒度图中的节点与原始图中对应节点组成的节点对. 式(10)计算正样本对的损失,其中$ {x}_{\text{pooled}} $ 和$ {x}_{\text{unpooled}} $ 分别表示经过池化和未经池化的节点特征. 负样本对是指经过图卷积和图池化后,粗粒度图中的节点与原始图中对应节点的非邻域节点组成的节点对. 式(11)计算负样本对的损失,$ {x}_{\text{non\_neighbor}} $ 表示非邻域节点的特征.
$ {L}_{\text{pos}}={\left(1-\text{cos}\left({x}_{\text{pooled}},{x}_{\text{unpooled}}\right)\right)}^{2} \text{,} $
$ {L}_{\text{neg}}=\text{cos}{\left({x}_{\text{pooled}},{x}_{\text{non\_neighbor}}\right)}^{2} \text{,} $
$ Mean\_loss=\frac{1}{M\times K}\displaystyle\sum _{j=1}^{M}\displaystyle\sum _{k=1}^{K}\left(\frac{1}{{N}_{k}}\displaystyle\sum _{i=1}^{{N}_{k}}{L}^{(i,j,k)}\right). $
式(7)~(11)是指单个样本对在单个块(包含池化层和若干卷积层)中的计算方法,在实际使用中,模型里包含若干个相同的块,$ {L}_{\text{pos}} $ 和$ {L}_{\text{neg}} $ 需要计算平均损失Mean_loss(式(12)). 为了保持池化前原图中的重要局部结构信息,在对不同块进行损失计算时,$ {x}_{\text{unpooled}} $ 始终为首次池化前的代码表征图中的节点,$ {x}_{\text{pooled}} $为对应经过第$ j $个块池化后代码表征图中的节点. $ {N}_{k} $ 为第$ k $ 张图中的样本对数量,$ K $ 表示每批训练中的图数量,即batch_size. $ M $ 表示总块数,完整的GNN 模型通常包含多个块. $ {L}^{(i,j,k)} $ 表示第$ k $ 张图中第$ i $个样本对在第$ j $ 个块中的损失,若为正样本对损失,使用式(10)进行计算,若为负样本对损失则使用式(11)进行计算.
将正样本和负样本对的平均损失结合,得到最终的平均总损失$ {L}_{\text{contrastive}} $. $ {L}_{\text{contrastive}} $ 是对每个批次中所有图、所有块和所有样本对损失的综合平均,计算方式为:
$ {L}_{\text{contrastive}}=\alpha {Mean\_loss}_{\mathrm{p}\mathrm{o}\mathrm{s}}+\beta {Mean\_loss}_{\text{neg}}\text{,} $
其中$ \alpha $ 和$ \beta $ 是权重参数,用于控制正样本和负样本损失在总损失中的相对重要性,在实验过程中,$ \alpha $ 和$ \beta $ 被设为1∶1,以平衡2种损失.
图5展示了LHG-VD 的GNN 模型设计. 经过多次卷积和池化操作后,会生成不同粒度的图,LHG-VD 为这些不同粒度的图分别配置了独立且可学习的读出模块. 图5包含了3次池化过程,配备3个独立的LGR 来自适应地学习3种不同粒度图的特征. 经过3层池化,LHG-VD 得到的3个读出结果$ R({G}^{1}) $,$ R({G}^{2}) $,$ R({G}^{3}) $分别对应3个不同粒度的代码表征图嵌入,最终的图嵌入通过拼接这3个读出结果得到:
$ {{\boldsymbol{H}}}_{\text{final}}\left(G\right)=R({G}^{1})\|R({G}^{2})\|({G}^{3}) . $
$ {{\boldsymbol{H}}}_{\text{final}}\left(G\right) $代表整个图的最终嵌入向量,$|| $表示向量拼接操作. 在LHG-VD 中,每层的读出函数都能够捕捉到不同层次的图结构信息,通过拼接这些信息,最终的图嵌入能够综合反映整个图的全局结构和局部结构信息,使得图嵌入更加丰富、表达能力更强.
LHG-VD 是一个端到端方式的图分类任务,端到端是指从输入到输出通过一个统一的模型完成,而不是分步骤处理. LHG-VD 通过交叉熵损失函数来主导训练过程,能够最小化模型预测的输出与实际标签之间的差异. 另外,加入CGCL能够比较不同图之间的相似性或差异性,增强模型在处理图数据时的判别能力. 为了简化优化过程,使得模型训练过程中的梯度下降等优化算法更加高效和直接,LHG-VD 设置一个综合的损失函数来平衡交叉熵损失和对比损失,如式(15)所示.
$ {L}_{\text{final}}=\gamma \times {L}_{\text{cross\_entropy}}+(1-\gamma )\times {L}_{\text{contrastive}}, $
其中,$ \gamma $是一个介于0和1之间的权重参数,用于调整对比函数在训练过程中的影响力度. 在最终模型中,$ \gamma $值设置为0.5,将交叉熵损失和对比学习损失的影响设置为同等重要.
为了验证LHG-VD 模型的检测能力,实验选择了6个目前最先进的工具进行对比,包括1个基于检测规则的工具Flawfinder 和5种基于深度学习的工具. 其中,3种基于GNN 的漏洞检测工具分别是ReGVD,AMPLE,DeepWukong,2种基于文本序列的方法分别是LineVul 和CodeBERT. CodeBERT的主体与LineVul 相同,差别在于CodeBERT使用默认的BPE 分词进行语义嵌入,LineVul使用重新训练过的BPE分词进行语义嵌入.
为了验证LGR 和CGCL 能否有效提升模型性能,实验从LHG-VD 模型分离出LHG-VD-CLS 模型,表示只添加了LGR 的GNN 模型,该模型没有添加CGCL. 通过实验希望回答以下3个研究问题.
1)在人工合成的数据集上,LHG-VD-CLS 和LHG-VD 的表现是否能够超过最先进的切片级漏洞级方法DeepWukong.
2)在真实漏洞数据集上,LHG-VD-CLS 和LHG-VD 的表现是否优于DeepWukong.
3)LHG-VD 的漏洞检测能力是否能够超过其他最先进的漏洞检测方法.
本文在DeepWukong 项目中开源的CWE119 数据集和广泛被使用的Big-Vul 数据集子集上进行所有的实验.
CWE119 是人工合成的漏洞数据集,大部分漏洞是非法访问内存漏洞. 样本数据来自软件保障参考数据集[39](software assurance reference dataset,SARD),每个样本(即测试用例)对应1个或多个CWE ID,即存在多种不同类型的漏洞. 样本以测试用例的形式给出,不存在函数漏洞标记,无法直接将CWE119 数据集应用于函数级漏洞检测方法. 因此,CWE119 数据集上的实验对比在切片级漏洞检测方法LHG-VD 和DeepWuKong 之间进行. 该数据集包含漏洞切片样本14 262个、无漏洞切片样本74 935个.
Big-Vul 数据集[40]是一个高质量的真实漏洞数据集,涵盖了从2002―2019年间348个真实开源项目,共有11 834个漏洞函数和253 096个无漏洞函数. LHG-VD 是切片级漏洞检测方法,为了能够与函数级漏洞检测方法进行对比,要求样本不仅包含函数的漏洞标记还要包含函数中具体漏洞行号的标记. Big-Vul提供了漏洞修复前后的源码,我们使用Big-Vul数据集中的所有易受攻击的函数共11 834个及其对应的非易受攻击的函数,参考Hu 等人[21]的处理方法,通过diff 工具比对,确定漏洞代码行信息. 实验将函数修复前的源码设置为包含漏洞的样本,将修复后的源码设置为无漏洞样本.
AMPLE 是最先进的函数级漏洞检测方法,但是其数据处理模块无法正常合成Big-Vul 的部分样本. 为了保证公平性,从Big-Vul 数据集中剔除了无对应非易受攻击样本、出错样本和AMPLE 无法合成的漏洞样本,保留了5 145个漏洞函数样本和5 464个无漏洞函数样本. 根据这些函数样本,最终生成了16 555个无漏洞切片样本和17 000有漏洞切片样本.
实验使用系统环境为Ubuntu20.04LTS,CPU 为Intel Corei7-11700 @2.5 GHz,GPU 为NVIDIA GeForce RTX3070,物理内存32 GB,硬盘大小为1 TB. 深度学习环境基于PyTorch1.9 和PyTochLightning1.3.7 框架,GNN 使用PyTorchGeometric2.1.0 搭建.
实验使用CWE119 数据集和裁剪后的Big-Vul 数据集,随机选择80%的样本用于训练,10%作为验证集数据,10%作为测试集数据.
实验使用PyTorchLightning 框架训练LHG-VD 模型,ModelCheckpoint 是训练过程中可以保存的检查点. 实验为每轮训练过程设置一个ModelCheckpoint,参数monitor 设置为“val_loss”,mode设置为“min”,save_top_k 设置为5. 设置save_top_k值为5主要有3个原因:1)保存性能最佳的前5个模型能够平衡模型性能监控与存储资源的需求,既保证有足够的数据来选择最优模型,又不至于占用太多存储空间. 2)我们在实验中观察到,在达到前5个最佳模型后,模型性能的提升变得相对平缓,表示后续的模型版本不会带来显著的性能改进. 3)在基准模型DeepWukong中,save_top_k值也设置为5,为保证对比实验的公平性,LHG-VD同样将save_top _k设置为5.
实验把每轮模型训练生成的模型参数应用于验证集数据,如果验证集上的损失值最小,就在检查点保存该次训练的模型参数.
真正例(true positive,TP)为正确预测为有漏洞的样本数量,真负例(true negative,TN)为正确预测为无漏洞的样本数量,假正例(false positive,FP)为错误预测为有漏洞的样本数量,假负例(false negative,FN)为错误预测为无漏洞的样本数量,漏洞样本数量为TP 与FN 数量之和,无漏洞样本数量为TN 与FP 数量之和.
准确率 (accuracy,A)是指模型正确预测的样本数量占总样本数量的比例,一定程度反映了模型对有漏洞和无漏洞样本的分类能力. 准确率显示了模型在所有预测中表现的正确程度. 但在类别不平衡的情况下,特别是漏洞样本很少时,即使模型全部预测为无漏洞,准确率仍然会很高. 因此,仅凭准确率判断模型性能可能具有误导性.
$ A=\frac{TP+TN}{TP+TN+FP+FN} . $
精确率(precision,P)表示TP 占所有预测为漏洞样本(TP+FP)的比例,精确率显示了模型识别漏洞时的准确性,高精确率也意味着较少的误报.
$ P=\frac{TP}{TP+FP}. $
召回率(recall,R)表示TP 占所有漏洞样本的比例. 漏报(FN)可能导致严重后果,更高的召回率意味着更低的漏报.
$ R=\frac{TP}{TP+FN}. $
F1 分数是精确率和召回率的调和平均数,提供了更全面的性能度量. 在漏洞检测中,F1 分数特别重要,模型需要在减少误报(更高的准确率)和减少漏报(更高的召回率)之间寻求平衡. 如果模型在测试集上的F1 分数越高,表示在测试集上的性能越好,具有更好的泛化能力.
$ F1=2\times \frac{P\times R}{P+R}. $
为了回答问题1,本实验在CWE119 数据集上比较LHG-VD-CLS,LHG-VD,DeepWukong 模型的漏洞检测能力,主要验证LGR 和CGCL 是否能够提高模型的性能,特别是验证读出函数是否提升了长距离图的特征学习能力.
表1给出了实验结果. 在LHG-VD-CLS 使用LGR 替换DeepWukong 使用的传统GlobalAttention 方式后,FN 数量从160下降到90,下降约43.8%,召回率提高了5%,表明使用LGR 能够实现更少的漏报. LHG-VD-CLS 模型的准确率提升了1个百分点,精确率提升了1.4个百分点,表明模型具有更少的误报. 总之,LHG-VD-CLS 在各项指标上都优于DeepWukong,F1分数提高了3.3个百分点,表明LGR 能够有效提高模型性能.
LGR 的设计初衷是为了帮助GNN 更好地学习图的长距离上下文. 因为图中节点数量可以在一定程度上反映图的复杂度和节点与节点间的距离. 实验分别统计了DeepWukong 正确预测但是LHG-VD-CLS 没有正确预测的TP 样本的节点个数,如图6(a)的散点图所示,以及LHG-VD-CLS 正确预测但是DeepWukong 没有正确预测的TP 样本的节点个数,如图6(b)散点图所示. 图6(a)(b)散点图的横坐标例子索引无特殊含义,仅表示样本的编号. 图6(c)柱状图中对节点数大于10(长距离例子)和小于等于10(短距离例子)的代码表征图数量进行统计,从中可以看出LHG-VD-CLS 对长距离图的预测能力显著优于DeepWukong,DeepWukong 很难预测节点数量较多并且结构复杂的图,LHG-VD-CLS 对长距离图和短距离图均有更好的适应性.
从表1中可以看出,添加了CGCL 后,LHG-VD 相比LHG-VD-CLS,F1分数略有下降. 因为CWE119 是人工合成的数据集,测试用例不具备真实代码的复杂性,然而,LHG-VD 提出的CGCL 的作用是区分细微的结构差异,在处理复杂数据时更有效. CWE119 的测试用例的图结构相对简单,在添加LGR后,LHG-VD-CLS 已经能够实现非常有效的分类,LHG-VD 添加对比损失函数未能继续增加模型性能.
5.4.1节验证了可学习读出函数能够有效提升模型性能,但是在人工合成的CWE119 数据集上没有体现CGCL 的作用,本节使用Big-Vul 真实漏洞数据集来验证CGCL 的作用.
实验结果如表2所示,LHG-VD-CLS 的精确率提升了2.1个百分点,但是召回率下降了1个百分点,F1分数提升了0.9个百分点,提升幅度低于在CWE119 的实验结果,因为真实漏洞代码数据集包含了更复杂的图结构、更多样的代码模式和更微妙的漏洞特征.
LGR 使用CLS 节点结合全局注意力机制更适合捕捉全局特征而不是局部细节,在处理复杂的真实数据集时,可能忽视某些局部重要特征,从而影响召回率.
增加CGCL 后,LHG-VD 的召回率提升了3.6个百分点,因为CGCL 可以强化正样本对之间的相似性和增加负样本对之间的差异性,使模型在特征空间中形成更加鲜明的分类边界,能够更准确地识别出正样本,从而减少漏报. LHG-VD 的精确率提升了4个百分点,因为CGCL 能够有效地区分正负样本对,提高了模型识别负样本的能力,从而降低误报率,F1分数提升了2.9个百分点. 最终,LHG-VD 在所有指标上都超过了DeepWukong.
在处理复杂的真实代码时,CGCL 能够通过对正负样本对的分析,捕捉到更细微的特征差异,弥补了可学习读出函数可能忽视局部细节的不足.
为了回答问题3,本实验将LHG-VD 与6种最先进的工具在Big-Vul 数据集上进行检测能力对比,结果如表3所示.
LHG-VD 的F1分数、准确率和精确率都优于其他6种方法,F1分数为71.5%,与DeepWukong 相比,提升4.9个百分点,与AMPLE 相比,提升8.9个百分点.
AMPLE,LineVul,CodeBERT的召回率都超过了90个百分点,高于LHG-VD,但3个模型的精确率和F1分数都低于LHG-VD,因为它们倾向于将样本预测为漏洞样本以减少漏报,但是增加了误报的风险.
AMPLE 通过自定义的图简化策略和边缘感知图卷积网络模块来学习代码的结构特征,能够更好地捕捉代码中的复杂关系,尤其是远距离的依赖. 但是,AMPLE 在捕捉代码结构特征时过于敏感,倾向于将包含特定结构或模式的代码错误地识别为漏洞,容易产生误报,导致精确率只有48.5%. 我们在检查AMPLE 的实验中发现,AMPLE 设置的损失函数策略倾向于将样本预测为有漏洞,以达到更少漏报,导致在Big-Vul 数据集的召回率非常高. 另外,AMPLE 受限于自身的构图机制,其数据处理模块无法正常合成Big-Vul 数据集的部分样本. 最终,实验数据集的正样本和负样本的数量相近,对AMPLE模型的训练和泛化能力也造成了一定的挑战.
LineVul 和CodeBERT 都采用BERT 架构生成代码的向量表示,专注于捕捉代码中的长期依赖关系和语义信息. BERT 架构能够有效地捕捉长期依赖关系,但是无法理解代码的精确结构和上下文. 它们在尝试捕捉尽可能多的潜在漏洞时,容易将没有漏洞的代码片段错误地分类为漏洞样本,精确率分别只有51%和54.3%. GNN 和大模型在漏洞检测方面各有优势和局限,GNN 擅长捕捉代码中的结构特征,而大模型则在代码理解和推理方面表现出色.
从表3可以看出,切片级方法DeepWukong 和LHG-VD 的精确率分别为61%和65%,优于函数级方法AMPLE(48.5%)和ReGVD(50.6%). 切片级方法会对代码进行更细致的分析,准确地定位和分析与特定行为或状态相关的代码段,更好地理解变量如何在代码中操作和传播的过程,从而更精确地捕捉潜在漏洞. Flawfinder[23]采用基于规则的方法,缺乏对代码上下文和结构的深入理解,依赖于静态预定义的规则,不能很好地适应复杂或新型的漏洞模式,其各项性能指标垫底.
ReGVD 是基于GNN 的函数级漏洞检测工具,从代码文本的token 序列中,根据自定义策略构建代码表征图. 自定义策略限制了模型对代码结构和语义的理解能力,导致GNN 的结构相对简单,无法捕捉复杂的代码模式和漏洞特征,其各项性能指标都低于LHG-VD.
图7是Big-Vul 数据集中标记为“1_CVE-2018-1000039_ghostscript_CWE-416”的漏洞样本片段,该样本总计152行代码,图7截取了部分与漏洞代码(第58行)存在数据流和控制流依赖关系的代码行. 该样本对应的代码切片表征图的完整调用链长度为24,LHG-VD成功检测了该漏洞,而DeepWuKong没有正确检测该漏洞,说明LHG-VD在长调用链的代码表征图中能获得更好的检测表现. 在该样本中,与漏洞代码相关的数据流和控制流依赖关系较为复杂,导致3种函数级方法都没有正确理解样本的结构和上下文,因此没有成功检测.
本文根据程序代码特点,在基于GNN 的漏洞检测问题上,针对现有图读出方法无法很好适应节点的层次差异问题,提出一种可学习的图读出函数LGR,针对现有图池化过程存在细粒度图的局部结构信息丢失问题,提出一个跨粒度的对比损失函数CGCL. 最终,实现了一种可学习的层次化图表示模型LHG-VD. 在真实漏洞代码数据集上的对比实验结果表明,LHG-VD 的检测性能优于目前最先进的6种漏洞检测工具.
漏洞数据库的编程语言为C/C++,如果要在其他语言上实现LHG-VD,主要难点在于漏洞数据收集、敏感函数收集和语法规则适配等方面. 我们尝试过结合CodeBERT等预训练编程语言模型实现对多种编程语言兼容,但是训练时间开销过大,实验效果不佳.
现有真实漏洞数据集的漏洞样本数量和无漏洞样本数量的差距太大,严重影响训练效果. 未来计划引入数据增强,尝试使用源码变换和图增强方式增加漏洞样本的数量. 另外,未来计划融合基于文本序列的方法与图分类方法[41-42],寻找更优的融合策略,提升漏洞模型检测能力.
作者贡献声明:胡菘提出想法思路,完成系统实现、实验和论文撰写;罗嘉驰参与创新点实现;万文凯和闫阳参与实验部分工作;郭帆提出指导意见并修改论文;曲彦文参与了研究思路的讨论并提供了修改建议.

参考文献 引证文献
排序方式:
1
Cherem S, Princehouse L, Rugina R. Practical memory leak detection using guarded value-flow analysis[C]//Proc of the 28th ACM SIGPLAN Conf on Programming Language Design and Implementation. New York: ACM, 2007: 480−491
2
Ji Xiujuan, Yang Jufeng, Xu Jing, et al. Interprocedural path-sensitive resource leaks detection for C programs[C]//Proc of the 4th Asia-Pacific Symp on Internetware. New York: ACM, 2012: 1−9
3
Kroening D, Tautschnig M. CBMC–C bounded model checker[C]//Proc of the 20th Int Conf on Tools and Algorithms for the Construction and Analysis of Systems. Berlin: Springer, 2014: 389−391
4
Fan Gang, Wu Rongxin, Shi Qingkai, et al. Smoke: Scalable path-sensitive memory leak detection for millions of lines of code[C]//Proc of the 41st IEEE/ACM Int Conf on Software Engineering (ICSE). Piscataway, NJ: IEEE, 2019: 72−82
5
Chernis B, Verma R. Machine learning methods for software vulnerability detection[C]//Proc of the 4th ACM Int Workshop on Security and Privacy Analytics. New York: ACM, 2018: 31−39
6
Russell R, Kim L, Hamilton L, et al. Automated vulnerability detection in source code using deep representation learning[C]//Proc of the 17th IEEE Int Conf on Machine Learning and Applications (ICMLA 2018). Piscataway, NJ: IEEE, 2018: 757−762
7
Li Zhen, Zou Deqing, Xu Shouhuai, et al. VulDeePecker: A deep learning-based system for vulnerability detection[C]//Proc of the 25th Network and Distributed System Security Symp (NDSS 2018). Piscataway, NJ: IEEE, 2018: 1−15
8
Aumpansub A, Huang Zhen. Detecting software vulnerabilities using neural networks[C]//Proc of the 13th Int Conf on Machine Learning and Computing. New York: ACM, 2021: 166−171
9
Fu M, Tantithamthavorn C. LineVul: A transformer-based line-level vulnerability prediction[C]//Proc of the 19th Int Conf on Mining Software Repositories. New York: ACM, 2022: 608−620
10
Feng Hantao, Fu Xiaotong, Sun Hongyu, et al. Efficient vulnerability detection based on abstract syntax tree and deep learning[C]//Proc of the IEEE Conf on Computer Communications Workshops (INFOCOM WKSHPS). Piscataway, NJ: IEEE, 2020: 722−727
11
Li Zhen, Zou Deqing, Xu Shouhuai, et al. SySeVR: A framework for using deep learning to detect software vulnerabilities[J]. IEEE Transactions on Dependable and Secure Computing, 2022, 19(4): 2244−2258
12
Zhou Yaqin, Liu Shangqing, Siow Jingkai, et al. Devign: Effective vulnerability identification by learning comprehensive program semantics via graph neural networks[C]//Proc of the 33rd Int Conf on Neural Information Processing Systems. Cambridge, MA: MIT, 2019: 10197−10207
13
Cheng Xiao, Wang Haoyu, Hua Jiayi, et al. DeepWukong: Statically detecting software vulnerabilities using deep graph neural network[J]. ACM Transactions on Software Engineering and Methodology, 2021, 30(3): 1−33
14
Chakraborty S, Krishna R, Ding Yangruibo, et al. Deep learning based vulnerability detection: Are we there yet[J]. IEEE Transactions on Software Engineering, 2021, 48(9): 3280−3296
15
胡雨涛, 王溯远, 吴月明, 等. 基于图神经网络的切片级漏洞检测及解释方法[J]. 软件学报, 2023, 34(6): 2543−2561
Hu Yutao, Wang Suyuan, Wu Yueming, et al. Slice-level vulnerability detection and interpretation method based on graph neural network[J]. Journal of Software, 2023, 34(6): 2543−2561 (in Chinese)
16
Nguyen V A, Nguyen D Q, Nguyen V, et al. ReGVD: Revisiting graph neural networks for vulnerability detection[C]//Proc of the 44th ACM/IEEE Int Conf on Software Engineering. New York: ACM, 2022: 178−182
17
Wu Yuelong, Lu Jintian, Zhang Yueyi, et al. Vulnerability detection in C/C++ source code with graph representation learning[C]//Proc of the 11th IEEE Annual Computing and Communication Workshop and Conf (CCWC). Piscataway, NJ: IEEE, 2021: 1519−1524
18
Cao Sicong, Sun Xiaobing, Bo Lili, et al. MVD: Memory-related vulnerability detection based on flow-sensitive graph neural networks[C]//Proc of the 44th Int Conf on Software Engineering. New York: ACM, 2022: 1456−1468
19
Li Yi, Wang Shaohua, Nguyen T N. Vulnerability detection with fine-grained interpretations[C]//Proc of the 29th ACM Joint Meeting on European Software Engineering Conf and Symp on the Foundations of Software Engineering. New York: ACM, 2021: 292−303
20
Zheng Weining, Jiang Yuan, Su Xiaohong. Vu1SPG: Vulnerability detection based on slice property graph representation learning[C]//Proc of the 32nd IEEE Int Symp on Software Reliability Engineering (ISSRE). Piscataway, NJ: IEEE, 2021: 457−467
21
Hu Yutao, Wang Suyuan, Li Wenke, et al. Interpreters for GNN-Based vulnerability detection: Are we there yet?[C]//Proc of the 32nd ACM SIGSOFT Int Symp on Software Testing and Analysis. New York: ACM, 2023: 1407−1419
22
Wen Xincheng, Chen Yupan, Gao Cuiyun, et al. Vulnerability detection with graph simplification and enhanced graph representation learning[C]//Proc of the 45th Int Conf on Software Engineering (ICSE). Piscataway, NJ: IEEE, 2023: 2275−2286
23
Ferschke O, Gurevych I, Rittberger M. FlawFinder: A modular system for predicting quality flaws in Wikipedia [C] //Proc of the 3rd Conf and Labs of the Evaluation Forum. Berlin: Springer, 2012:1−10
24
Feng Zhangyin, Guo Daya, Tang Duyu, et al. CodeBERT: A Pre-Trained model for programming and natural languages[C]//Findings of the Association for Computational Linguistics (EMNLP 2020). Stroudsburg, PA: ACL, 2020: 1536–1547
25
Church K W. Word2Vec[J]. Natural Language Engineering, 2017, 23(1): 155−162
26
Devlin J, Chang Mingwei, Lee K, et al. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding[C]//Proc of the 2019 Conf of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. Stroudsburg, PA: ACL, 2019: 4171–4186
27
Li Yujia, Tarlow D, Brockschmidt M, et al. Gated graph sequence neural networks[J]. arXiv preprint, arXiv: 1511.05493, 2015
28
Kipf T, Welling M. Semi-supervised classification with graph convolutional networks[J]. arXiv preprint, arXiv: 1609.02907, 2016
29
王兆慧, 沈华伟, 曹婍, 等. 图分类研究综述[J]. 软件学报, 2022, 33(1): 171−192
Wang Zhaohui, Shen Huawei, Cao Qi, et al. Survey on graph classification[J]. Journal of Software, 2022, 33(1): 171−192 (in Chinese)
30
Ying Zhitao, You Jiaxuan, Morris C, et al. Hierarchical graph representation learning with differentiable pooling[C]//Proc of the 32nd Int Conf on Neural Information Processing Systems. Cambridge, MA: MIT, 2018: 4805−4815
31
Xu Keyulu, Li Chengtao, Tian Yonglong, et al. Representation learning on graphs with jumping knowledge networks[C]//Proc of the 35th Int Conf on Machine Learning. New York: PMLR, 2018: 5453−5462
32
Cangea C, Veličković P, Jovanović N, et al. Towards sparse hierarchical graph classifiers[J]. arXiv preprint, arXiv: 1811.01287, 2018
33
Morris C, Ritzert M, Fey M, et al. Weisfeiler and leman go neural: Higher-order graph neural networks[C]//Proc of the 33rd Conf on Artificial Intelligence. Palo Alto, CA : AAAI, 2019: 4602−4609
34
Wu Zhanghao, Jain P, Wright M, et al. Representing long-range context for graph neural networks with global attention[J]. Advances in Neural Information Processing Systems, 2021, 34: 13266−13279
35
Wu Zonghan, Pan Shirui, Chen Fengwen, et al. A comprehensive survey on graph neural networks[J]. IEEE Transactions on Neural Networks and Learning Systems, 2021, 32(1): 4−24
36
Joern Development Team. Joern: Open-source code querying engine for C/C++[CP/OL]. 2020[2025-01-19]. https://joern.io/
37
Veličković P, Cucurull G, Casanova A, et al. Graph attention networks[J]. arXiv preprint, arXiv: 1710.10903, 2017
38
Liu Chuang, Zhan Yibing, Wu Jia, et al. Graph pooling for graph neural networks: Progress, challenges, and opportunities[J]. arXiv preprint, arXiv: 2204.07321, 2022
39
National Institute of Standards and Technology. Software assurance reference dataset[DB/OL]. [2025-01-19]. https://samate.nist.gov/SARD
40
Fan Jiahao, Li Yi, Wang Shaohua, et al. A C/C++ code vulnerability dataset with code changes and CVE summaries[C]//Proc of the 17th Int Conf on Mining Software Repositories. New York: ACM, 2020: 508−512
41
Hin D, Kan A, Chen Huaming, et al. LineVD: Statement-level vulnerability detection using graph neural networks[C]//Proc of the 19th Int Conf on Mining Software Repositories. New York: ACM, 2022: 596−607
42
Ding Yangruibo, Suneja S, Zheng Yunhui, et al. VELVET: A novel ensemble learning approach to automatically locate Vulnerable statements[C]//Proc of the 29th Int Conf on Software Analysis, Evolution and Reengineering (SANER). Piscataway, NJ: IEEE, 2022: 959−970
2025年第62卷第9期
112
49
0
引用本文
BibTeX
文章信息
doi: 10.7544/issn1000-1239.202440171
  • 接收时间:2024-03-12
  • 首发时间:2026-11-10
  • 出版时间:2025-09-01
补充材料
相关文章
文章信息
作者
出版历史
  • 收稿日期:2024-03-12
  • 修回日期:2025-05-21
  • 录用日期:2025-06-11
基金
作者信息
    1江西师范大学数字产业学院 江西上饶 334006
    2江西师范大学计算机信息工程学院 南昌 330022

通讯作者:

参考文献
分享链接
https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/10.7544/issn1000-1239.202440171
分享至
全文二维码

扫描看全文

引用本文
BibTeX
本文的引用情况
2种不同金属材料的力学参数
科
Family
属数
Number of
genus
种数
Number of
species
占总种数比例
Percentage of
total species (%)
属
Genus
种数
Number of
species
占总种数比例
Percentage of total
species (%)
鹅膏菌科Amanitaceae 2 11 5.26 鹅膏菌属 Amanita 10 4.78
小菇科 Mycenaceae 2 12 5.74 丝盖伞属 Inocybe 5 2.39
多孔菌科 Polyporaceae 8 14 6.70 蜡蘑属 Laccaria 5 2.39
红菇科 Russulaceae 3 23 11.00 小皮伞属 Marasmius 6 2.87
小菇属 Mycena 11 5.26
光柄菇属 Pluteus 5 2.39
红菇属 Russula 17 8.13
栓菌属 Trametes 5 2.39
关闭全屏