Netinfo Security ›› 2024, Vol. 24 ›› Issue (11): 1624-1631.doi: 10.3969/j.issn.1671-1122.2024.11.002

Previous Articles     Next Articles

Smart Contract Vulnerability Detection Method Based on Graph Convolutional Network with Dual Attention Mechanism

LI Pengchao1,2(), ZHANG Quantao1, HU Yuan3   

  1. 1. Department of Information Security, Chongqing Police College, Chongqing 401331, China
    2. School of Computer and Information Science, Southwest University, Chongqing 400715, China
    3. Hechuan Branch of Chongqing Public Security Bureau, Chongqing 400153, China
  • Received:2024-08-10 Online:2024-11-10 Published:2024-11-21

Abstract:

With the widespread adoption of blockchain technology, an increasing number of smart contracts exhibiting complex internal logic are being deployed. However, most existing methods for detecting vulnerabilities in smart contracts suffer from high false positive rates and low detection accuracy. To address these challenges, this paper proposed a smart contract vulnerability detection method based on graph convolutional network with dual attention mechanism, aiming to improve both the accuracy and efficiency of the detection process. Initially, a multi-head attention mechanism was integrated into the convolutional layer of the graph convolutional network, enabling the dynamic calculation of attention weights based on the information from adjacent nodes during the feature propagation stage. This enhancement allowed the model to concentrate more on the neighbors most relevant to the current node during each feature aggregation, thereby improving the recognition of critical features. Subsequently, during the graph pooling stage, an attention-based pooling mechanism was employed to select and aggregate node features, further emphasizing key nodes and enhancing the identification of features that significantly influence vulnerability detection. The proposed method was evaluated using the ethereum smart contract (ESC) vulnerability sample dataset. Experimental results demonstrate that compared to other detection techniques, the proposed method can identify complex smart contract vulnerabilities with greater speed and accuracy.

Key words: smart contract, vulnerability detection, attention mechanism, graph convolutional network

CLC Number: