This paper presents LLMBugScanner, a large language model (LLM) based framework for smart contract vulnerability detection using fine-tuning and ensemble learning. Smart contract auditing presents several challenges for LLMs: different pretrained models exhibit varying reasoning abilities, and no single model performs consistently well across all vulnerability types or contract structures. These limitations persist even after fine-tuning individual LLMs. To address these challenges, LLMBugScanner combines domain knowledge adaptation with ensemble reasoning to improve robustness and generalization. Through domain knowledge adaptation, we fine-tune LLMs on complementary datasets to capture both general code semantics and instruction-guided vulnerability reasoning, using parameter-efficient tuning to reduce computational cost. Through ensemble reasoning, we leverage the complementary strengths of multiple LLMs and apply a consensus-based conflict resolution strategy to produce more reliable vulnerability assessments. We conduct extensive experiments across multiple popular LLMs and compare LLMBugScanner with both pretrained and fine-tuned individual models. Results show that LLMBugScanner achieves consistent accuracy improvements and stronger generalization, demonstrating that it provides a principled, cost-effective, and extensible framework for smart contract auditing.


翻译:本文提出LLMBugScanner,一种基于大语言模型(LLM)的智能合约漏洞检测框架,采用微调与集成学习方法。智能合约审计对LLM提出若干挑战:不同预训练模型展现出差异化的推理能力,且单一模型无法在所有漏洞类型或合约结构上均保持优异性能。即使对单个LLM进行微调,这些局限依然存在。为应对这些挑战,LLMBugScanner将领域知识适配与集成推理相结合,以提升鲁棒性与泛化能力。通过领域知识适配,我们在互补数据集上微调LLM,使其同时捕捉通用代码语义与指令引导的漏洞推理,并采用参数高效调优以降低计算成本。通过集成推理,我们融合多个LLM的互补优势,并应用基于共识的冲突解决策略,以生成更可靠的漏洞评估结果。我们在多种主流LLM上开展广泛实验,并将LLMBugScanner与预训练及微调的独立模型进行比较。结果表明,LLMBugScanner实现了持续性的准确率提升与更强的泛化能力,证明其为一个具有原则性、高性价比且可扩展的智能合约审计框架。

0
下载
关闭预览

相关内容

LibRec 每周算法:LDA主题模型
LibRec智能推荐
29+阅读 · 2017年12月4日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员