Smart Contract Vulnerability Detection Method Based on Node Feature Augmentation Graph Convolutional Network
摘要
In recent years, frequent smart contract security vulnerability incidents have seriously threatened the ecological security of blockchain. This paper combines data enhancement, contrast loss and graph convolutional network, and proposes a smart contract vulnerability detection method based on node feature enhanced graph convolutional network, to improve the accuracy of the smart contract vulnerability detection method and reduce false alarm rate. First, this paper constructs a smart contract graph for the smart contract's source code and retains the source code's logic and order to the maximum extent. Then, this paper vectorizes the smart contract graph and proposes a mask-based smart contract graph node feature enhancement method, which uses the node features of the graph structure to perform attribute-level feature enhancement. Secondly, the enhanced vector and the original vector are simultaneously input into the graph convolutional network model for training. Finally, the two training results are calculated and back-propagated with contrast loss and cross-entropy loss. The purpose of adding contrast loss is to improve the generalization ability of the model and improve detection efficiency.