arXiv:2412.11175cs.CRcs.LG2024-12被引 1

无需原始数据迁移知识,提升智能合约漏洞检测能力。

Knowledge Migration Framework for Smart Contract Vulnerability Detection

  • 用无数据知识蒸馏,将教师模型知识迁移到学生模型。
  • 对四类漏洞平均F1达91.16%,新漏洞检测准确率91.02%。
  • 轻量高效,适合资源受限环境部署,适配新型漏洞检测。

作为区块链3.0时代的核心技术,智能合约在区块链系统演化中扮演关键角色。针对现有漏洞检测模型泛化能力不足的问题,本文提出AF-STip框架,结合高效的无数据知识迁移方法。该框架以教师网络为主模型,通过无数据知识蒸馏将智能合约处理的知识迁移至学生模型,增强其漏洞检测能力。同时引入自适应融合模块,强化特征信息的交互与融合,显著提升特征提取与跨类别适应能力,并降低计算开销。实验表明,STip模型在不披露原始智能合约数据的情况下,对四类漏洞的平均F1值达91.16%。为验证轻量化迁移方案的有效性,学生模型在新漏洞类型迁移学习任务中取得91.02%准确率和90.46% F1值。据我们所知,AF-STip是首个将无数据知识迁移应用于智能合约漏洞检测的模型,在显著降低计算开销的同时,仍具备出色的新型漏洞检测性能。

原文摘要 · Abstract (English)

As a cornerstone of blockchain technology in the 3.0 era, smart contracts play a pivotal role in the evolution of blockchain systems. In order to address the limitations of existing smart contract vulnerability detection models with regard to their generalisation capability, an AF-STip smart contract vulnerability detection framework incorporating efficient knowledge migration is proposed. AF-STip employs the teacher network as the main model and migrates the knowledge processed by the smart contract to the student model using a data-free knowledge distillation method. The student model utilises this knowledge to enhance its vulnerability detection capabilities. The approach markedly enhances the model's capacity for feature extraction and cross-class adaptation, while concurrently reducing computational overhead.In order to further enhance the extraction of vulnerability features, an adaptive fusion module is proposed in this paper, which aims to strengthen the interaction and fusion of feature information.The experimental results demonstrate that the STip model attains an average F1 value detection score of 91.16% for the four vulnerabilities without disclosing the original smart contract data. To validate the viability of the proposed lightweight migration approach, the student model is deployed in a migration learning task targeting a novel vulnerability type, resulting in an accuracy of 91.02% and an F1 score of 90.46%. To the best of our knowledge, AF-STip is the inaugural model to apply data-free knowledge migration to smart contract vulnerability detection. While markedly reducing the computational overhead, the method still demonstrates exceptional performance in detecting novel vulnerabilities.

智能合约漏洞检测知识迁移轻量化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。