ML-AGNN: Smart Contract Vulnerability Detection Method Based on a Multi-Level Attention Graph Neural Network

Smart contracts and blockchain mutually reinforce each other, leveraging their core attribute of decentralized interoperability to play crucial roles in both on-chain code and off-chain data. Nonetheless, this dual-edged nature, characterized by immutability once deployed and an immature language ecosystem, introduces significant risks. Consequently, smart contract vulnerabilities have emerged as a major security threat within trusted blockchain environments. With the exponential growth in the number of smart contracts, traditional detection methods necessitate considerable data overhead. On the other hand, the growing complexity of code semantic relationships and the cumulative error effects of conventional detection techniques further compound the issue. To address these challenges and enhance the learning capability for complex semantic relationships, we proposed a novel deep learning approach: Multi-Level Attention Graph Neural Network (ML-AGNN). This method integrates adaptive attention mechanisms and channel aggregation within a message passing neural network, effectively tackling the limitations of local semantic information and inaccuracies in modeling semantic information due to deeper network layers. We have implemented this approach in a prototype named GNN and validated it using over 40,000 smart contracts from Ethereum. Our extensive results demonstrated that this solution achieves an accuracy of 91.77<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">%</sup> and a recall of 87.17% in detecting reentrancy vulnerabilities, significantly surpassing state-of-the-art methods. Additionally, another experiment confirms that our approach markedly outperforms contemporary methods in detecting timestamp dependency vulnerabilities.

Authors

Institutions

Publication Details

Published
2024-12-20
DOI
https://doi.org/10.1109/msn63567.2024.00066
Primary Topic
Imbalanced Data Classification Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

ML-AGNN: Smart Contract Vulnerability Detection Method Based on a Multi-Level Attention Graph Neural Network

Chunjie Cao, Jingzhang Sun, Qi Zhang, Zhi Li et al.
Imbalanced Data Classification Techniques
article

ML-AGNN: Smart Contract Vulnerability Detection Method Based on a Multi-Level Attention Graph Neural Network

Chunjie Cao, Jingzhang Sun, Qi Zhang, Zhi Li, Haochen Li, Mengnan Wang
article en

Abstract

Smart contracts and blockchain mutually reinforce each other, leveraging their core attribute of decentralized interoperability to play crucial roles in both on-chain code and off-chain data. Nonetheless, this dual-edged nature, characterized by immutability once deployed and an immature language ecosystem, introduces significant risks. Consequently, smart contract vulnerabilities have emerged as a major security threat within trusted blockchain environments. With the exponential growth in the number of smart contracts, traditional detection methods necessitate considerable data overhead. On the other hand, the growing complexity of code semantic relationships and the cumulative error effects of conventional detection techniques further compound the issue. To address these challenges and enhance the learning capability for complex semantic relationships, we proposed a novel deep learning approach: Multi-Level Attention Graph Neural Network (ML-AGNN). This method integrates adaptive attention mechanisms and channel aggregation within a message passing neural network, effectively tackling the limitations of local semantic information and inaccuracies in modeling semantic information due to deeper network layers. We have implemented this approach in a prototype named GNN and validated it using over 40,000 smart contracts from Ethereum. Our extensive results demonstrated that this solution achieves an accuracy of 91.77<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">%</sup> and a recall of 87.17% in detecting reentrancy vulnerabilities, significantly surpassing state-of-the-art methods. Additionally, another experiment confirms that our approach markedly outperforms contemporary methods in detecting timestamp dependency vulnerabilities.

Hainan University (CN), City University of Macau (MO)
Openalex Percentile: Top 72%
Imbalanced Data Classification Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.