VulnScout-C:一种用于C代码漏洞检测的轻量级Transformer VulnScout-C: A Lightweight Transformer for C Code Vulnerability Detection 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-03-30
👁️ 预览文献
💡 AI 中文简介
针对C语言漏洞检测,大模型虽强但参数太多、延迟高,难以嵌入开发流程。作者提出VulnScout-C,一个仅6.93亿参数(推理时激活3.53亿)的紧凑Transformer,并构建了含33,565个样本、经形式化验证的新数据集VulnScout。在标准基准上,它超越了推理大模型和商业静态分析工具,且推理成本极低,证明专用小模型也能高效检测漏洞。
领域软件安全 / 代码漏洞检测
适合谁读需要一定专业背景(软件安全、深度学习基础)
核心贡献1. 提出VulnScout-C,一种参数高效、推理时仅激活3.53亿参数的紧凑Transformer,专为C代码漏洞检测优化;2. 发布VulnScout数据集,含33,565个经多智能体流水线和形式化验证的样本,填补现有基准在冷门CWE类别上的空白。
关键数据模型总参数693M,推理激活353M;数据集33,565样本;在标准C漏洞检测基准上超越所有评估基线(包括最先进推理LLM和商业静态分析工具),推理成本仅为它们的一小部分。
推荐理由如果你关心如何在开发流程中低成本、低延迟地自动发现C代码漏洞,这篇工作给出了一个又小又强的解决方案,还附带了高质量数据集。
关键词["漏洞检测", "C代码安全", "轻量级Transformer", "静态分析", "数据集构建", "低延迟推理"]

原文摘要

查看英文原文摘要

Vulnerability detection in C programs is a critical challenge in software security. Although large language models (LLMs) achieve strong detection performance, their multi-billion-parameter scale makes them impractical for integration into development workflows requiring low latency and continuous analysis. We introduce VULNSCOUT-C, a compact transformer architecture with 693M total parameters (353M active during inference), derived from the Qwen model family and optimized for C code vulnerability detection. Alongside the model, we present VULNSCOUT, a new 33,565-sample curated dataset generated through a controlled multi-agent pipeline with formal verification, designed to fill coverage gaps in existing benchmarks across underrepresented CWE categories. Evaluated on a standardized C vulnerability detection benchmark, VULNSCOUT-C outperforms all evaluated baselines, including state-of-the-art reasoning LLMs and commercial static analysis tools, while offering a fraction of their inference cost. These results demonstrate that task-specialized compact architectures can match or even outperform the detection capability of models orders of magnitude larger, making continuous, low-latency vulnerability analysis practical within real-world development workflows.