The Impact of Input Types on Smart Contract Vulnerability Detection Performance Based on Deep Learning: A Preliminary Study
Open Access
- 24 May 2024
- journal article
- research article
- Published by MDPI AG in Information
- Vol. 15 (6) , 302
Abstract
Stemming vulnerabilities out of a smart contract prior to its deployment is essential to ensure the security of decentralized applications. As such, numerous tools and machine-learning-based methods have been proposed to help detect vulnerabilities in smart contracts. Furthermore, various ways of encoding the smart contracts for analysis have also been proposed. However, the impact of these input methods has not been systematically studied, which is the primary goal of this paper. In this preliminary study, we experimented with four common types of input, including Word2Vec, FastText, Bag-of-Words (BoW), and Term Frequency–Inverse Document Frequency (TF-IDF). To focus on the comparison of these input types, we used the same deep-learning model, i.e., convolutional neural networks, in all experiments. Using a public dataset, we compared the vulnerability detection performance of the four input types both in the binary classification scenarios and the multiclass classification scenario. Our findings show that TF-IDF is the best overall input type among the four. TF-IDF has excellent detection performance in all scenarios: (1) it has the best F1 score and accuracy in binary classifications for all vulnerability types except for the delegate vulnerability where TF-IDF comes in a close second, and (2) it comes in a very close second behind BoW (within 0.8%) in the multiclass classification.Keywords
Funding Information
- Natural Science Foundation of Beijing Municipality (L211020, M21032)
This publication has 23 references indexed in Scilit:
- Smart Contract Vulnerability Detection Based on Hybrid Attention Mechanism ModelApplied Sciences, 2023
- SPCBIG-EC: A Robust Serial Hybrid Model for Smart Contract Vulnerability DetectionSensors, 2022
- CBGRU: A Detection Method of Smart Contract Vulnerability Based on a Hybrid ModelSensors, 2022
- CodeNet: Code-Targeted Convolutional Neural Network Architecture for Smart Contract Vulnerability DetectionIEEE Access, 2022
- Systematic Review of Security Vulnerabilities in Ethereum Blockchain Smart ContractIEEE Access, 2022
- A Dynamic Convolutional Neural Network Based Shared-Bike Demand Forecasting ModelACM Transactions on Intelligent Systems and Technology, 2021
- Towards Automated Reentrancy Detection for Smart Contracts Based on Sequential ModelsIEEE Access, 2020
- Understanding a Revolutionary and Flawed Grand Experiment in BlockchainJournal of Cases on Information Technology, 2019
- Smart contracts: terminology, technical limitations and real world complexityLaw, Innovation and Technology, 2017
- SMOTE: Synthetic Minority Over-sampling TechniqueJournal of Artificial Intelligence Research, 2002