Cargando…

Smart Contract Vulnerability Detection Model Based on Multi-Task Learning

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....

Descripción completa

Detalles Bibliográficos
Autores principales: Huang, Jing, Zhou, Kuo, Xiong, Ao, Li, Dongmeng
Formato: Online Artículo Texto
Lenguaje:English
Publicado: MDPI 2022
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8914670/
https://www.ncbi.nlm.nih.gov/pubmed/35270976
http://dx.doi.org/10.3390/s22051829
_version_ 1784667777850671104
author Huang, Jing
Zhou, Kuo
Xiong, Ao
Li, Dongmeng
author_facet Huang, Jing
Zhou, Kuo
Xiong, Ao
Li, Dongmeng
author_sort Huang, Jing
collection PubMed
description 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.
format Online
Article
Text
id pubmed-8914670
institution National Center for Biotechnology Information
language English
publishDate 2022
publisher MDPI
record_format MEDLINE/PubMed
spelling pubmed-89146702022-03-12 Smart Contract Vulnerability Detection Model Based on Multi-Task Learning Huang, Jing Zhou, Kuo Xiong, Ao Li, Dongmeng Sensors (Basel) Article 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. MDPI 2022-02-25 /pmc/articles/PMC8914670/ /pubmed/35270976 http://dx.doi.org/10.3390/s22051829 Text en © 2022 by the authors. https://creativecommons.org/licenses/by/4.0/Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
spellingShingle Article
Huang, Jing
Zhou, Kuo
Xiong, Ao
Li, Dongmeng
Smart Contract Vulnerability Detection Model Based on Multi-Task Learning
title Smart Contract Vulnerability Detection Model Based on Multi-Task Learning
title_full Smart Contract Vulnerability Detection Model Based on Multi-Task Learning
title_fullStr Smart Contract Vulnerability Detection Model Based on Multi-Task Learning
title_full_unstemmed Smart Contract Vulnerability Detection Model Based on Multi-Task Learning
title_short Smart Contract Vulnerability Detection Model Based on Multi-Task Learning
title_sort smart contract vulnerability detection model based on multi-task learning
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8914670/
https://www.ncbi.nlm.nih.gov/pubmed/35270976
http://dx.doi.org/10.3390/s22051829
work_keys_str_mv AT huangjing smartcontractvulnerabilitydetectionmodelbasedonmultitasklearning
AT zhoukuo smartcontractvulnerabilitydetectionmodelbasedonmultitasklearning
AT xiongao smartcontractvulnerabilitydetectionmodelbasedonmultitasklearning
AT lidongmeng smartcontractvulnerabilitydetectionmodelbasedonmultitasklearning