TY - GEN
T1 - Smart Contract Vulnerability Detection via Heterogeneous Graph Representation and Dual Attention Mechanisms
AU - Qu, Yingying
AU - Cui, Jiangtao
AU - Chi, Haotian
AU - Geng, Haijun
AU - Jiang, Shunrong
AU - Du, Xiaojiang
AU - Meng, Weizhi
N1 - Publisher Copyright:
© 2025 IEEE.
PY - 2025
Y1 - 2025
N2 - In recent years, smart contracts have been widely used in decentralized finance (DeFi), digital asset management, and other blockchain applications. However, security vulnerabilities in smart contracts can result in severe financial losses. Even heterogeneous graph neural network based vulnerability detection methods can learn vulnerability patterns, they consider only a limited set of smart contract properties. Besides, they fail to fully leverage the heterogeneous nature of the graph during feature extraction, restricting their detection performance. To address these challenges, we propose RHGDA-SVD, a method based on rich heterogeneous graph representations and a dual attention mechanism for smart contract vulnerability detection. Specifically, we extends the control flow graph (CFG) by incorporating data dependencies, function calls, and contract inheritance, thereby constructing a heterogeneous graph with enriched smart contract semantics. During feature extraction, RHGDA-SVD employs a dual attention mechanism, capturing the contribution of both intra-type and inter-type nodes to vulnerability detection. Experimental results show that RHGDA-SVD outperforms ten state-of-the-art methods on a dataset aggregated from three data sources. It achieves the highest F1-score across seven high-risk vulnerabilities, with the maximum improvement reaching up to 34.02%.
AB - In recent years, smart contracts have been widely used in decentralized finance (DeFi), digital asset management, and other blockchain applications. However, security vulnerabilities in smart contracts can result in severe financial losses. Even heterogeneous graph neural network based vulnerability detection methods can learn vulnerability patterns, they consider only a limited set of smart contract properties. Besides, they fail to fully leverage the heterogeneous nature of the graph during feature extraction, restricting their detection performance. To address these challenges, we propose RHGDA-SVD, a method based on rich heterogeneous graph representations and a dual attention mechanism for smart contract vulnerability detection. Specifically, we extends the control flow graph (CFG) by incorporating data dependencies, function calls, and contract inheritance, thereby constructing a heterogeneous graph with enriched smart contract semantics. During feature extraction, RHGDA-SVD employs a dual attention mechanism, capturing the contribution of both intra-type and inter-type nodes to vulnerability detection. Experimental results show that RHGDA-SVD outperforms ten state-of-the-art methods on a dataset aggregated from three data sources. It achieves the highest F1-score across seven high-risk vulnerabilities, with the maximum improvement reaching up to 34.02%.
KW - Dual Attention Mechanism
KW - Heterogeneous Graphs
KW - Smart Contracts
KW - Vulnerability Detection
UR - https://www.scopus.com/pages/publications/105036292124
UR - https://www.scopus.com/pages/publications/105036292124#tab=citedBy
U2 - 10.1109/GLOBECOM59602.2025.11431925
DO - 10.1109/GLOBECOM59602.2025.11431925
M3 - Conference contribution
AN - SCOPUS:105036292124
T3 - Proceedings - IEEE Global Communications Conference, GLOBECOM
SP - 2916
EP - 2921
BT - GLOBECOM 2025 - 2025 IEEE Global Communications Conference
T2 - 2025 IEEE Global Communications Conference, GLOBECOM 2025
Y2 - 8 December 2025 through 12 December 2025
ER -