arXiv:2512.02069cs.CRcs.AI2025-12被引 4

用大模型集成+领域适配,提升智能合约漏洞检测准确率

Large Language Model based Smart Contract Auditing with LLMBugScanner

  • 通过领域知识微调和多模型集成增强推理能力
  • 在多个合约数据集上实现更高且稳定的漏洞检测准确率
  • 适合安全审计人员和区块链开发团队使用

本文提出LLMBugScanner,一种基于大语言模型(LLM)的智能合约漏洞检测框架,结合微调与集成学习。智能合约审计对LLM构成挑战:不同预训练模型推理能力差异大,单一模型难以在各类漏洞或合约结构上持续表现良好,即使微调后仍存在局限。为解决此问题,LLMBugScanner融合领域知识适配与集成推理以提升鲁棒性和泛化能力。通过领域知识适配,利用参数高效微调,在互补数据集上对LLM进行微调,捕捉通用代码语义与指令引导的漏洞推理;通过集成推理,利用多个LLM的互补优势,并采用基于共识的冲突解决策略,生成更可靠的漏洞评估结果。我们在多个主流LLM上开展实验,对比预训练及微调后的单个模型。结果表明,LLMBugScanner在多维度均实现一致的准确率提升,且具备更强泛化能力,证明其是一种原则性强、成本低、可扩展的智能合约审计框架。

原文摘要 · Abstract (English)

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.

智能合约漏洞检测大模型集成学习

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