arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.13918cs.CRcs.AI
收藏

FTSmartAudit:一种使用微调LLM的知识蒸馏增强自动化智能合约审计框架

FTSmartAudit: A Knowledge Distillation-Enhanced Framework for Automated Smart Contract Auditing Using Fine-Tuned LLMs

School of Computer Science and Technology(计算机科学与技术学院);Beijing Institute of Technology(北京理工大学);School of Computer Science(计算机科学学院);University of Auckland(奥克兰大学);School of Cyberspace Science and Technology(网络空间科学与技术学院);School of Information and Communication Technology(信息与通信技术学院);Griffith Univerity(格里菲斯大学)

Zhiyuan Wei, Jing Sun, Zijian Zhang, Xianhao Zhang, Zhe Hou

AI总结:

本文提出HKT-SmartAudit框架,通过多阶段知识蒸馏和单任务学习训练轻量级模型,在保持高准确性的同时降低计算成本,有效提升智能合约漏洞检测能力。

摘要:

区块链技术的快速发展推动了智能合约的广泛采用。然而,其固有的漏洞导致了巨大的经济损失。传统审计方法虽然必不可少,但难以跟上智能合约日益增加的复杂性和规模。大型语言模型(LLMs)为自动化漏洞检测提供了有前景的能力,但其采用往往受到高计算成本的限制。尽管先前的工作探索了通过智能体或工作流利用大型模型,但相对较少关注改进较小的、微调模型的性能——这是实现效率和数据隐私的关键因素。在本文中,我们介绍了HKT-SmartAudit,一个为智能合约审计优化的轻量级模型开发框架。它具有多阶段知识蒸馏管道,集成了经典蒸馏、外部领域知识和奖励引导学习,以从大型教师模型转移高质量见解。采用单任务学习策略训练紧凑的学生模型,在保持高准确性和鲁棒性的同时,显著降低了计算开销。实验结果表明,我们的蒸馏模型在检测复杂漏洞和逻辑缺陷方面优于商业工具和大型模型,为智能合约审计提供了实用、安全且可扩展的解决方案。源代码可在Github存储库中获取。

英文摘要:

The rapid growth of blockchain technology has driven the widespread adoption of smart contracts. However, their inherent vulnerabilities have led to significant financial losses. Traditional auditing methods, while essential, struggle to keep pace with the increasing complexity and scale of smart contracts. Large Language Models (LLMs) offer promising capabilities for automating vulnerability detection, but their adoption is often limited by high computational costs. Although prior work has explored leveraging large models through agents or workflows, relatively little attention has been given to improving the performance of smaller, fine-tuned models--a critical factor for achieving both efficiency and data privacy. In this paper, we introduce HKT-SmartAudit, a framework for developing lightweight models optimized for smart contract auditing. It features a multi-stage knowledge distillation pipeline that integrates classical distillation, external domain knowledge, and reward-guided learning to transfer high-quality insights from large teacher models. A single-task learning strategy is employed to train compact student models that maintain high accuracy and robustness while significantly reducing computational overhead. Experimental results show that our distilled models outperform both commercial tools and larger models in detecting complex vulnerabilities and logical flaws, offering a practical, secure, and scalable solution for smart contract auditing. The source code is available at Github repository.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑