基于混合风格迁移的智能合约漏洞检测方法
Smart contract vulnerability detection method based on MixStyle transfer
李敏 1时瑞浩 2张莹 3袁海兵 4姜立标 5缪丹云6
作者信息
- 1. 广汽埃安新能源汽车股份有限公司,广州 510440
- 2. 广州汽车集团股份有限公司,广州 511458
- 3. 星河智联汽车科技有限公司,广州 510335
- 4. 广汽能源科技有限公司,广州 511453
- 5. 广州城市理工学院 机械工程学院与机器人工程学院,广州 510800;华南理工大学 机械与汽车工程学院,广州 510641
- 6. 广州城市理工学院 机械工程学院与机器人工程学院,广州 510800
- 折叠
摘要
研究提出了一种基于混合风格迁移的智能合约漏洞检测方法,旨在解决智能合约新漏洞出现时数据集不足和无法有效检测未知漏洞问题.首先,从智能合约源代码中提取抽象语法树,使用图注意力网络捕获节点间的依赖关系和信息流;然后,采用最大均值差异实现从旧漏洞到新漏洞的有效知识迁移,从而增加深度学习模型训练的数据量;最后,在分类器中融入MixStyle技术增强模型的泛化能力并提高对新型漏洞类型的识别准确度.实验结果表明,在4种漏洞类型的检测上,该方法在F1、ACC、MCC指标上优于BLSTM-ATT、BiGAS、Peculiar方法.
Abstract
This study presents a smart contract vulnerability detection method using MixStyle transfer to address challenges related to limited datasets and the detection of unknown vulnerabilities when new ones arise in smart contracts.The method first extracts the abstract syntax tree from the smart contract source code and uses a graph attention network to capture dependencies and information flow between nodes.Then,maximum mean discrepancy(MMD)is used to facilitate effective knowledge transfer from known vulnerabilities to emerging ones,thus expanding the dataset available for deep learning model training.Finally,the MixStyle technique is incorporated into the classifier to enhance model generalization and improve the accuracy of identifying novel vulnerability types.Experimental results show that this method outperforms BLSTM-ATT,BiGAS,and Peculiar methods in F1,ACC,and MCC metrics for detecting four types of vulnerabilities.
关键词
智能合约/漏洞检测/迁移学习/MixStyle/最大均值差异Key words
smart contracts/vulnerability detection/transfer learning/MixStyle/maximum mean discrepancy引用本文复制引用
出版年
2024