Back to Search Start Over

Smart Contract Vulnerability Detection Model Based on Multi-Task Learning.

Authors :
Huang J
Zhou K
Xiong A
Li D
Source :
Sensors (Basel, Switzerland) [Sensors (Basel)] 2022 Feb 25; Vol. 22 (5). Date of Electronic Publication: 2022 Feb 25.
Publication Year :
2022

Abstract

The key issue in the field of smart contract security is efficient and rapid vulnerability detection in smart contracts. Most of the existing detection methods can only detect the presence of vulnerabilities in the contract and can hardly identify their type. Furthermore, they have poor scalability. To resolve these issues, in this study, we developed a smart contract vulnerability detection model based on multi-task learning. By setting auxiliary tasks to learn more directional vulnerability features, the detection capability of the model was improved to realize the detection and recognition of vulnerabilities. The model is based on a hard-sharing design, which consists of two parts. First, the bottom sharing layer is mainly used to learn the semantic information of the input contract. The text representation is first transformed into a new vector by word and positional embedding, and then the neural network, based on an attention mechanism, is used to learn and extract the feature vector of the contract. Second, the task-specific layer is mainly employed to realize the functions of each task. A classical convolutional neural network was used to construct a classification model for each task that learns and extracts features from the shared layer for training to achieve their respective task objectives. The experimental results show that the model can better identify the types of vulnerabilities after adding the auxiliary vulnerability detection task. This model realizes the detection of vulnerabilities and recognizes three types of vulnerabilities. The multi-task model was observed to perform better and is less expensive than a single-task model in terms of time, computation, and storage.

Details

Language :
English
ISSN :
1424-8220
Volume :
22
Issue :
5
Database :
MEDLINE
Journal :
Sensors (Basel, Switzerland)
Publication Type :
Academic Journal
Accession number :
35270976
Full Text :
https://doi.org/10.3390/s22051829