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 条
[41]   A Smart Contract Vulnerability Detection Method Based on Heterogeneous Contract Semantic Graphs and Pre-Training Techniques [J].
Zhang, Jie ;
Lu, Gehao ;
Yu, Jia .
ELECTRONICS, 2024, 13 (18)
[42]   Smart Contract Timestamp Vulnerability Detection Based on Code Homogeneity [J].
Wang, Weizhi ;
Xia, Lei ;
Zhang, Zhuo ;
Meng, Xiankai .
IEICE TRANSACTIONS ON INFORMATION AND SYSTEMS, 2024, E107D (10) :1362-1366
[43]   Smart contract vulnerability detection method based on pre-training and novel timing graph neural network [J].
Zhuang, Yuan ;
Fan, Zekai ;
Wang, Cheng ;
Sun, Jianguo ;
Li, Yaolin .
Tongxin Xuebao/Journal on Communications, 2024, 45 (09) :101-114
[44]   DA-GNN: A smart contract vulnerability detection method based on Dual Attention Graph Neural Network [J].
Zhen, Zixian ;
Zhao, Xiangfu ;
Zhang, Jinkai ;
Wang, Yichen ;
Chen, Haiyue .
COMPUTER NETWORKS, 2024, 242
[45]   A Hierarchical Feature Fusion-based Method for Defect Recognition with a Small Sample [J].
Gao, Yiping ;
Gao, Liang ;
Li, Xinyu .
2019 IEEE INTERNATIONAL CONFERENCE ON INDUSTRIAL ENGINEERING AND ENGINEERING MANAGEMENT (IEEM), 2019, :1048-1052
[46]   A Universal and Efficient Multi-Modal Smart Contract Vulnerability Detection Framework for Big Data [J].
Lian, Wenjuan ;
Bao, Zikang ;
Zhang, Xinze ;
Jia, Bin ;
Zhang, Yang .
IEEE TRANSACTIONS ON BIG DATA, 2025, 11 (01) :190-207
[47]   Optimizing smart contract vulnerability detection via multi-modality code and entropy embedding [J].
Yuan, Dawei ;
Wang, Xiaohui ;
Li, Yao ;
Zhang, Tao .
JOURNAL OF SYSTEMS AND SOFTWARE, 2023, 202
[48]   MVD-HG: multigranularity smart contract vulnerability detection method based on heterogeneous graphs [J].
Xu, Jingjie ;
Wang, Ting ;
Lv, Mingqi ;
Chen, Tieming ;
Zhu, Tiantian ;
Ji, Baiyang .
CYBERSECURITY, 2024, 7 (01)
[49]   Intelligent Contract Vulnerability Detection Method Based on Bic-RL [J].
Zhang, Shuhui ;
Hu, Changdong ;
Lan, Tian ;
Wang, LianHai ;
Xu, Shujiang ;
Shao, Wei .
2023 INTERNATIONAL CONFERENCE ON DATA SECURITY AND PRIVACY PROTECTION, DSPP, 2023, :128-135
[50]   Detection of Smart Contract Timestamp Vulnerability Based on Data-flow Path Learning [J].
Zhang Z. ;
Liu Y.-P. ;
Xue J.-X. ;
Yan M. ;
Chen J.-C. ;
Mao X.-G. .
Ruan Jian Xue Bao/Journal of Software, 2024, 35 (05) :2325-2339