Enhancing Security and Acuity of Smart Contract Vulnerability Detection based on Federated Learning and BiLSTM-Attention
Bin Jia, Xiaosong Zhang, Xinze Zhang, Ting Chen, Wenjuan LianOver the course of more than a decade, blockchain technology has made significant advancements and found applications in various domains. Smart contract, as an integral component of blockchain technology, plays a pivotal role in ensuring the security and robustness of blockchain’s development and diverse applications. Currently, smart contract vulnerabilities have caused millions of dollars in economic losses. Due to the inherent immutability of blockchain technology, once smart contracts are deployed on the blockchain, effecting changes becomes a formidable task. Most of the vulnerability detection tools currently available employ traditional security technologies, which require high expertise and have unsatisfactory detection results. In recent years, deep learning technologies have emerged. Although they do not require extensive expert knowledge, they do require a large amount of labeled data for training. The biggest issue in this field is the lack of a large-scale, accurately annotated public dataset. Hence, we propose a method for detecting smart contract vulnerabilities by leveraging federated learning and BiLSTM, called FASCVD. Our approach not only utilizes federated learning technology to aggregate multiple small datasets while ensuring data privacy but also introduces a bidirectional information extraction technique based on BiLSTM, thereby significantly enhancing the accuracy of vulnerability detection. The experimental results show that our method has already surpassed the best existing methods in terms of accuracy, precision, recall, F1-score, etc., with an accuracy rate of 95.04%.