SCGRU: A Model for Ethereum Smart Contract Vulnerability Detection Combining CNN and BiGRU-Attention
Abstract
Smart contracts have driven the development of blockchain technology, but their security vulnerabilities pose numerous problems for blockchain applications.The existing smart contract vulnerability detection methods based on deep learning are not comprehensive in detecting vulnerability categories, have low accuracy, and are limited to binary classification tasks. This paper proposes a smart contract vulnerability detection model called SCGRU combining CNN and bidirectional gating recurrent unit-attention mechanism (BiGRU-Attention) for Ethereum smart contracts to solve these problems. The model transforms the standardized data into word vectors representation of smart contracts with semantic information through the Word2Vec word embedding module. The feature extraction module takes the word vector as input. It uses CNN and BiGRU training to extract high-level abstract features and sequence features of the smart contract respectively. Following the BiGRU feature extraction, an attention mechanism is introduced to highlight the key features related to vulnerabilities of the smart contract code. The features extracted by CNN are concatenated with the features extracted by BiGRU-Attention as the input to the vulnerability classification module. The softmax function normalizes the vulnerability classification module to complete the detection of vulnerabilities in Ethereum smart contracts. The experiments in this paper show that SCGRU has a high accuracy rate of vulnerability detection on the current public dataset. Moreover, SCGRU can identify all categories of smart contract vulnerabilities in the dataset with an average accuracy rate of 92.64%, among which the precision of Infinite Loop vulnerability detection is 99.06%.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.