跳到主要导航 跳到搜索 跳到主要内容

ParaVul: A Parallel Large Language Model and Retrieval-Augmented Framework for Smart Contract Vulnerability Detection

  • Tenghui Huang
  • , Jinbo Wen
  • , Jiawen Kang*
  • , Siyong Chen
  • , Zhengtao Li
  • , Tao Zhang
  • , Dongning Liu
  • , Jiacheng Wang
  • , Chengjun Cai
  • , Yinqiu Liu
  • *此作品的通讯作者
  • Guangdong University of Technology
  • City University of Hong Kong
  • Beijing Jiaotong University
  • Nanyang Technological University

科研成果: 期刊稿件文章同行评审

摘要

Smart contracts play a significant role in automating blockchain services. Nevertheless, vulnerabilities in smart contracts pose serious threats to blockchain security. Currently, traditional detection methods primarily rely on static analysis and formal verification, which can result in high false-positive rates and poor scalability. Large Language Models (LLMs) have recently made significant progress in smart contract vulnerability detection. However, they still face challenges such as high inference costs and substantial computational overhead. In this paper, we propose ParaVul, a parallel LLM and retrieval-augmented framework to improve the reliability and accuracy of smart contract vulnerability detection. Specifically, we first develop Sparse Low-Rank Adaptation (SLoRA), a technique for efficient LLM fine-tuning tailored to smart contract vulnerability detection. Distinct from existing LoRA methods, SLoRA inserts parallel sparse and low-rank branches after the attention projection and the feed-forward block, enabling LLMs to capture both global code semantics and localized vulnerability patterns while maintaining low training overhead. We then construct a vulnerability contract knowledge base and develop a hybrid Retrieval-Augmented Generation (RAG) system that integrates Okapi BM25 with dense retrieval to provide complementary lexical and semantic evidence for smart contract vulnerability verification. Furthermore, we propose a meta-learner-based gated verification module to fuse the outputs of the SLoRA detector and the two RAG-based detectors, thereby generating the final detection results. After completing vulnerability detection, we design chain-of-thought prompts to guide LLMs to generate comprehensive vulnerability detection reports. Simulation results demonstrate the superiority of ParaVul, especially in terms of F1 scores, achieving 0.9398 for single-label detection and 0.9930 for multi-label detection.

源语言英语
页(从-至)5017-5030
页数14
期刊IEEE Transactions on Information Forensics and Security
21
DOI
出版状态已出版 - 2026

指纹

探究 'ParaVul: A Parallel Large Language Model and Retrieval-Augmented Framework for Smart Contract Vulnerability Detection' 的科研主题。它们共同构成独一无二的指纹。

引用此