Papers1 provider Ā· 1 record
March 29, 2024Ā· 2024 5th International Seminar on Artificial Intelligence, Networking and Information Technology (AINIT)
conference-paper

Smart Contract Reentrancy Vulnerability Detection Based on CNN and LSTM-Attention

Authors:Liuqing Han *

Abstract

To address the shortcomings of traditional smart contract vulnerability detection methods with low accuracy and the limitations of single-model deep learning approaches, this paper focuses on reentrancy vulnerabilities, one of the most representative vulnerabilities in smart contracts. It introduces an intelligent contract reentrancy vulnerability detection method based on a hybrid CNN and LSTM-Attention model. Initially, the opcode sequences of smart contracts undergo preprocessing and simplification operations. The processed opcode sequences are then trained using the Word2Vec model to obtain word vectors. Subsequently, CNN is employed to extract local features from the opcode sequences, while LSTM is used to extract global features. An attention mechanism is introduced after LSTM to compute attention scores for the output information. Finally, the outputs of CNN and LSTM-Attention are fused for vulnerability detection. Experimental results demonstrate that compared to both deep learning models and traditional tools, this approach significantly improves accuracy, recall, and F1 score, achieving an accuracy of 89.79%and exhibiting effective detection capabilities.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.