Smart contract vulnerability detection method based on MixStyle transfer
This study presents a smart contract vulnerability detection method using MixStyle transfer to address challenges related to limited datasets and the detection of unknown vulnerabilities when new ones arise in smart contracts.The method first extracts the abstract syntax tree from the smart contract source code and uses a graph attention network to capture dependencies and information flow between nodes.Then,maximum mean discrepancy(MMD)is used to facilitate effective knowledge transfer from known vulnerabilities to emerging ones,thus expanding the dataset available for deep learning model training.Finally,the MixStyle technique is incorporated into the classifier to enhance model generalization and improve the accuracy of identifying novel vulnerability types.Experimental results show that this method outperforms BLSTM-ATT,BiGAS,and Peculiar methods in F1,ACC,and MCC metrics for detecting four types of vulnerabilities.
smart contractsvulnerability detectiontransfer learningMixStylemaximum mean discrepancy