SAGE amplifies vulnerability signals, boosting MCC up to 318% on unseen code
SAGE increases Matthews Correlation Coefficient by up to 318% compared to prior baselines
Security & privacy arXiv 21 Apr 2026 Method Prototype evidence
Published as “SAGE: Signal-Amplified Guided Embeddings for LLM-based Vulnerability Detection”
Why it matters
SAGE enables a modest 7B LLM to match or exceed much larger proprietary models for vulnerability detection while using far less compute, making high-quality security analysis affordable for many organizations.
Summary
SAGE dramatically improves LLM-based vulnerability detection, achieving up to a 318% MCC gain and amplifying the internal signal-to-noise ratio by 12.7×, while remaining backbone-agnostic and faster to train. The authors add task-conditional sparse autoencoders to frozen LLM layers to recover weak vulnerability signals (Signal Submersion) and evaluate on three public benchmarks (BigVul, PrimeVul, PreciseBugs) across four 7-8B model families, comparing against 10 SOTA methods and commercial models. Evidence is strong: SAGE reaches 0.7874 MCC on BigVul and 0.2375 MCC on PrimeVul, outperforms larger models, and shows consistent gains across languages, though performance drops on some unseen datasets.
What they found 3
- SAGE sets new MCC records on major benchmarks.
“SAGE (CodeLlama) sets new records on BigVul (0.7874 MCC) and PrimeVul (0.2375 MCC).”
- Signal-to-noise ratio is amplified dramatically.
“SAGE amplifies the SNR by 12.7× compared to the baseline peak.”
- Vulnerability activations are a tiny fraction of total activation energy in standard models.
“vulnerability activations constitute less than 5% of the total energy (ρl< 0.05).”
Caveats 4
- the absolute performance decreases on unseen datasets like PrimeVul and PreciseBugs.
- While this approach results in lower Recall, it ensures that the detections are reliable, leading to higher Precision and MCC.
- languages with very small test sets (e.g., Kotlin, Swift, and Rust) should be interpreted as qualitative case studies rather than stable performance estimates.
- SAGE is designed to recover hidden vulnerability signals that already exist within the model’s representations. However, it cannot compensate for the total absence of knowledge regarding new attack vectors that were not present in the pre-training data.
What’s new here 4
- Identifies and quantifies the Signal Submersion bottleneck in LLMs for security tasks.
- Introduces task-conditional Sparse Autoencoders inserted at each layer without modifying the backbone.
- Amplifies vulnerability signal-to-noise ratio up to 12.7×, recovering signals before they decay in deep layers.
- Delivers backbone-agnostic performance gains and large efficiency improvements (up to 26× faster training).