Back to Search Start Over

GRATDet: Smart Contract Vulnerability Detector Based on Graph Representation and Transformer.

Authors :
Peng Gong
Wenzhong Yang
Liejun Wang
Fuyuan Wei
KeZiErBieKe HaiLaTi
Yuanyuan Liao
Source :
Computers, Materials & Continua; 2023, Vol. 76 Issue 2, p1439-1462, 24p
Publication Year :
2023

Abstract

Smart contracts have led to more efficient development in finance and healthcare, but vulnerabilities in contracts pose high risks to their future applications. The current vulnerability detection methods for contracts are either based on fixed expert rules, which are inefficient, or rely on simplistic deep learning techniques that do not fully leverage contract semantic information. Therefore, there is ample room for improvement in terms of detection precision. To solve these problems, this paper proposes a vulnerability detector based on deep learning techniques, graph representation, and Transformer, called GRATDet. The method first performs swapping, insertion, and symbolization operations for contract functions, increasing the amount of small sample data. Each line of code is then treated as a basic semantic element, and information such as control and data relationships is extracted to construct a new representation in the form of a Line Graph (LG), which shows more structural features that differ from the serialized presentation of the contract. Finally, the node information and edge information of the graph are jointly learned using an improved Transformer–GP model to extract information globally and locally, and the fused features are used for vulnerability detection. The effectiveness of the method in reentrancy vulnerability detection is verified in experiments, where the F1 score reaches 95.16%, exceeding state of-the-art methods. [ABSTRACT FROM AUTHOR]

Details

Language :
English
ISSN :
15462218
Volume :
76
Issue :
2
Database :
Complementary Index
Journal :
Computers, Materials & Continua
Publication Type :
Academic Journal
Accession number :
171834671
Full Text :
https://doi.org/10.32604/cmc.2023.038878