SAGE:面向基于大语言模型漏洞检测的信号放大引导嵌入 SAGE: Signal-Amplified Guided Embeddings for LLM-based Vulnerability Detection 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-04-21
👁️ 预览文献
💡 AI 中文简介
大语言模型在漏洞检测中常因功能语义过强而淹没微弱的漏洞信号,导致漏报。本文提出SAGE框架,利用任务条件稀疏自编码器分离并放大这些微弱信号,在BigVul等数据集上实现最优性能,将信噪比提升12.7倍,使7B模型在未见分布上MCC提升318%,并支持13种编程语言,优于34B基线模型。
领域软件安全 / 基于大语言模型的漏洞检测
适合谁读需要一定专业背景(了解大语言模型、软件漏洞检测或稀疏表示)
核心贡献1. 识别并定义了大语言模型漏洞检测中的“信号淹没”瓶颈;2. 提出SAGE框架,通过任务条件稀疏自编码器主动恢复并放大微弱漏洞信号,显著提升检测性能。
关键数据信噪比提升12.7倍;7B模型在未见分布上MCC提升318%,经典数据集上提升319%;支持13种编程语言;性能超越34B基线模型。
推荐理由如果你关注大模型在安全领域的落地,这篇工作用巧妙的信号放大思路,让小模型也能精准挖漏洞,效果惊艳,值得一读!
关键词["漏洞检测", "大语言模型", "稀疏自编码器", "信号放大", "信噪比", "软件安全"]

原文摘要

查看英文原文摘要

Software vulnerabilities are a primary threat to modern infrastructure. While static analysis and Graph Neural Networks have long served as the foundation for vulnerability detection, the emergence of Large Language Models (LLMs) has introduced a transformative paradigm driven by superior semantic reasoning and cross-environment generalization. However, in the context of LLM-based vulnerability detection, we identify a fundamental bottleneck in these models termed \textbf{Signal Submersion}: a state where features related to vulnerability are activated internally but numerically overwhelmed by dominant functional semantics. To address this, we propose \textbf{SAGE} (\textbf{S}ignal-\textbf{A}mplified \textbf{G}uided \textbf{E}mbeddings), a framework that shifts from passive signal submersion to active signal recovery. SAGE integrates task-conditional Sparse Autoencoders (SAEs) to isolate and amplify these faint vulnerability signals. Extensive evaluations on BigVul, PrimeVul, and PreciseBugs demonstrate that SAGE achieves state-of-the-art performance. Notably, SAGE mitigates Signal Submersion by increasing the internal Signal-to-Noise Ratio (SNR) by 12.7$\times$ via sparse manifold projection. This mechanistic intervention enables a 7B model to achieve up to 318\% Matthews Correlation Coefficient (MCC) gains on unseen distributions and a 319\% gain on classic datasets. By maintaining robust performance across 13 programming languages and outperforming 34B baselines, SAGE establishes a more efficient and scalable path to software security than simple parameter scaling.