Small sample smart contract vulnerability detection method based on multi-layer feature fusion

被引:0
作者
Fan, Jinlin [1 ]
He, Yaqiong [1 ]
Wu, Huaiguang [1 ]
机构
[1] Zhengzhou Univ Light Ind, Zhengzhou 450001, Peoples R China
基金
中国国家自然科学基金;
关键词
Smart contract; BERT model; Vulnerability detection; Small sample; Data enhancement;
D O I
10.1007/s40747-025-01782-3
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
The identification of vulnerabilities in smart contracts is necessary for ensuring their security. As a pre-trained language model, BERT has been employed in the detection of smart contract vulnerabilities, exhibiting high accuracy in tasks. However, it has certain limitations. Existing methods solely depend on features extracted from the final layer, thereby disregarding the potential contribution of features from other layers. To address these issues, this paper proposes a novel method, which is named multi-layer feature fusion (MULF). Experiments investigate the impact of utilizing features from other layers on performance improvement. To the best of our knowledge, this is the first instance of multi-layer feature sequence fusion in the field of smart contract vulnerability detection. Furthermore, there is a special type of patched contract code that contains vulnerability features which need to be studied. Therefore, to overcome the challenges posed by limited smart contract vulnerability datasets and high false positive rates, we introduce a data augmentation technique that incorporates function feature screening with those special smart contracts into the training set. To date, this method has not been reported in the literature. The experimental results demonstrate that the MULF model significantly enhances the performance of smart contract vulnerability identification compared to other models. The MULF model achieved accuracies of 98.95% for reentrancy vulnerabilities, 96.27% for timestamp dependency vulnerabilities, and 87.40% for overflow vulnerabilities, which are significantly higher than those achieved by existing methods.
引用
收藏
页数:26
相关论文
共 50 条
[31]   Smart Contract Vulnerability Detection Based on Hybrid Attention Mechanism Model [J].
Wu, Huaiguang ;
Dong, Hanjie ;
He, Yaqiong ;
Duan, Qianheng .
APPLIED SCIENCES-BASEL, 2023, 13 (02)
[32]   Smart contract vulnerability detection method based on Bi-modal cross-attention mechanism [J].
Chen, Jinfu ;
Hu, Xinyi ;
Cai, Saihua ;
Min, Xirun .
Tongxin Xuebao/Journal on Communications, 2025, 46 (06) :218-232
[33]   Research on smart contract vulnerability detection method based on domain features of solidity contracts and attention mechanism [J].
Wang, Changjing ;
Jiang, Huiwen ;
Wang, Yuxin ;
Huang, Qing ;
Zuo, Zhengkang .
JOURNAL OF INTELLIGENT & FUZZY SYSTEMS, 2023, 45 (01) :1513-1525
[34]   Smart contract reentrancy vulnerability detection method based on manifold pigeon optimization algorithm [J].
Liu F. ;
Huang H. ;
Xiang Y. ;
Hao Z. .
Zhongguo Kexue Jishu Kexue/Scientia Sinica Technologica, 2023, 53 (11) :1922-1938
[35]   Smart Contract Symbol Execution Vulnerability Detection Method Based on CFG Path Pruning [J].
Wang, Yichuan ;
Zhao, Jingjing ;
Zhang, Yaling ;
Hei, Xinhong ;
Zhu, Lei .
PROCEEDINGS OF THE 5TH ACM INTERNATIONAL SYMPOSIUM ON BLOCKCHAIN AND SECURE CRITICAL INFRASTRUCTURE, ACM BSCI 2023, 2023, :132-139
[36]   A Smart Contract Vulnerability Detection Mechanism Based on Deep Learning and Expert Rules [J].
Liu, Zhenpeng ;
Jiang, Mingxiao ;
Zhang, Shengcong ;
Zhang, Jialiang ;
Liu, Yi .
IEEE ACCESS, 2023, 11 :77990-77999
[37]   GraBit: A Sequential Model-Based Framework for Smart Contract Vulnerability Detection [J].
Zhu, Huijuan ;
Yang, Kaixuan ;
Wang, Liangmin ;
Xu, Zhicheng ;
Sheng, Victor S. .
2023 IEEE 34TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING, ISSRE, 2023, :568-577
[38]   Slice Level Smart Contract Reentrancy Vulnerability Detection Based on Hybrid Semantics [J].
Jiang, Shuchen ;
Niu, Baoning ;
Gao, Yan .
Computer Engineering and Applications, 2025, 61 (01) :321-329
[39]   PSCVFinder: A Prompt-Tuning Based Framework for Smart Contract Vulnerability Detection [J].
Yu, Lei ;
Lu, Junyi ;
Liu, Xianglong ;
Yang, Li ;
Zhang, Fengjun ;
Ma, Jiajia .
2023 IEEE 34TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING, ISSRE, 2023, :556-567
[40]   Ethereum Smart Contract Vulnerability Detection Model Based on Triplet Loss and BiLSTM [J].
Wang, Meiying ;
Xie, Zheyu ;
Wen, Xuefan ;
Li, Jianmin ;
Zhou, Kuanjiu .
ELECTRONICS, 2023, 12 (10)