A smart contract vulnerability line detection method based on graph neural network and fusion of multidimensional code representation

被引:0
作者
Xiong, Huanliang [1 ]
Wu, Canghai [2 ]
Chen, Jiaxin [2 ]
Wang, Yinglong [1 ]
Zhong, Yulin [2 ]
机构
[1] JiangXi Agr Univ, Sch Comp Sci & Engn, Nanchang 330045, Peoples R China
[2] JiangXi Agr Univ, Sch Software, Nanchang 330045, Peoples R China
关键词
Vulnerability detection; Smart contracts; Blockchain; Deep learning;
D O I
10.1016/j.asoc.2025.113435
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
To address the limitations of existing smart contract vulnerability detection methods-particularly incomplete semantic information and insufficient detection accuracy caused by reliance on single-code representations-this study proposes MCR-VD, an interpretable vulnerability detection method based on graph neural networks (GNNs). The innovation of MCR-VD lies in three key aspects. First, a code property graph (CPG) is constructed by integrating the abstract syntax tree (AST), control flow graph (CFG), and program dependency graph (PDG) of smart contracts. This approach combines syntactic, control-flow, and data-flow semantic information across multiple dimensions, overcoming the limitations of single-representation methods. Second, a graph transformation mechanism for Graph of Vulnerability Region Candidates (GVRCs) and a GNN model are designed. By leveraging graph attention mechanisms, MCR-VD achieves line-level granularity in vulnerability localization, significantly enhancing the interpretability of detection results. Third, extensive evaluations on three benchmark datasets-Smartbugs Curated, Solidifi-Benchmark, and Clean Smart Contracts-demonstrate that MCR-VD outperforms state-of-the-art methods in critical metrics, including an F1-score of 92.7 %, accuracy of 94.1 %, precision of 93.5 %, and recall of 91.9 %. Furthermore, the method requires only 2.3 s per contract on average, achieving a two-order-of-magnitude efficiency improvement compared to traditional symbolic execution tools. This work presents a novel solution for smart contract security detection that balances high precision with computational efficiency.
引用
收藏
页数:15
相关论文
共 32 条
[1]   Can neural networks estimate parameters in epidemiology models using real observed data? [J].
Ahmad, Muhammad Jalil ;
Gunel, Korhan .
APPLIED INTELLIGENCE, 2025, 55 (02)
[2]  
alina Cat., 2018, Towards Sparse Hierarchical Graph Classifiers
[3]  
Brent L., 2018, Vandal: A Scalable Security Analysis Framework for Smart Contracts J
[4]   Deep Learning Based Vulnerability Detection: Are We There Yet? [J].
Chakraborty, Saikat ;
Krishna, Rahul ;
Ding, Yangruibo ;
Ray, Baishakhi .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2022, 48 (09) :3280-3296
[5]  
Durieux T., ICSE 20 42 INT C SOF
[6]  
Durieux T., 2019, EMPIRICAL REV AUTOMA
[7]  
FarmEOS, 2019, About us
[8]   Slither: A Static Analysis Framework For Smart Contracts [J].
Feist, Josselin ;
Greico, Gustavo ;
Groce, Alex .
2019 IEEE/ACM 2ND INTERNATIONAL WORKSHOP ON EMERGING TRENDS IN SOFTWARE ENGINEERING FOR BLOCKCHAIN (WETSEB 2019), 2019, :8-15
[9]  
Ferreira J.F., 2020, SmartBugs: a framework to analyze solidity smart contracts
[10]  
Ghaleb A., 2020, Evaluating smart contract static analysis tools using bug injection J