Suppr超能文献

基于多任务学习的智能合约漏洞检测模型。

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

机构信息

Faculty of Information Technology, Beijing University of Technology, Beijing 100124, China.

Beijing Key Laboratory of Computational Intelligence and Intelligence System, Beijing 100124, China.

出版信息

Sensors (Basel). 2022 Feb 25;22(5):1829. doi: 10.3390/s22051829.

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.

摘要

智能合约安全领域的关键问题是在智能合约中高效快速地发现漏洞。现有的大多数检测方法只能检测到合约中存在漏洞,而很难识别其类型。此外,它们的可扩展性较差。为了解决这些问题,在本研究中,我们开发了一种基于多任务学习的智能合约漏洞检测模型。通过设置辅助任务来学习更有针对性的漏洞特征,提高了模型的检测能力,从而实现漏洞的检测和识别。该模型基于硬共享设计,由两部分组成。首先,底层共享层主要用于学习输入合约的语义信息。首先将文本表示通过词和位置嵌入转换为新向量,然后基于注意力机制的神经网络用于学习和提取合约的特征向量。其次,特定于任务的层主要用于实现每个任务的功能。使用经典的卷积神经网络为每个任务构建分类模型,从共享层中学习和提取特征进行训练,以实现各自的任务目标。实验结果表明,在添加辅助漏洞检测任务后,该模型可以更好地识别漏洞类型。该模型实现了漏洞的检测,并识别了三种类型的漏洞。与单任务模型相比,多任务模型在时间、计算和存储方面的性能更好,成本更低。

https://cdn.ncbi.nlm.nih.gov/pmc/blobs/da46/8914670/34352ec03db8/sensors-22-01829-g001.jpg

文献AI研究员

20分钟写一篇综述,助力文献阅读效率提升50倍。

立即体验

用中文搜PubMed

大模型驱动的PubMed中文搜索引擎

马上搜索

文档翻译

学术文献翻译模型,支持多种主流文档格式。

立即体验