Blockchain Smart Contract Classification Method Based on Double Siamese Neural Network
At present, methods for classifying blockchain smart contracts using deep learning methods are becoming increasingly popular. However, methods based on deep learning often require a large amount of sample label data for supervised model training to achieve high classification performance. A blockchain smart contract classification method based on a two-level twin neural network in a small sample scenario is proposed to address the problem that currently available smart contract datasets have uneven data categories and insufficient labeled data volumes, which can lead to difficulty in model training and poor classification performance. Firstly, by analyzing the characteristics of smart contract data, a two-level twin neural network model that can capture the characteristics of longer contract data is constructed; Then, based on this model, a training strategy and classification method for smart contracts in small sample scenarios are designed. Finally, experimental results show that the classification performance of the proposed method in this paper is superior to the most advanced smart contract classification methods in small sample scenarios, with a classification accuracy of 94.7% and an F1 value of 94.6%. At the same time, this method requires less tag data, requiring only about 20% data from other methods of the same type.