Code-only models miss over 93% of vulnerability-fixing commits at 0.5% false positive rate
Code language models trained on diffs alone do not acquire transferable security-relevant code understanding
Software arXiv 13 May 2026 Measurement Simulation evidence
Published as “Code-Centric Detection of Vulnerability-Fixing Commits: A Unified Benchmark and Empirical Study”
Why it matters
Current code-language models cannot reliably detect vulnerability-fixing commits without textual cues, limiting their utility for automated security patch triage.
Summary
All fine-tuned code-only models miss over 93 % of vulnerability-fixing commits at a 0.5 % false-positive rate; commit messages dominate model attention and removing them leaves only modest attention to code changes. Across 180 experiments the authors find no evidence that code-language models learn transferable security-relevant code understanding, and performance drops about 17 % under group-stratified splits. Prompt-based generative classification without task-specific training modestly outperforms fine-tuned models on a CVE-confirmed test set, though possible data contamination is noted. The evidence comes from a unified benchmark of 20 VFC datasets (>180 k commits) evaluated on multiple code LM architectures and scaling up to 14 B parameters.
What they found 5
- Code-only models miss >93% of vulnerabilities at low false-positive rate
“At a false positive rate of 0.5% all fine-tuned code-only models miss over 93% of vulnerabilities.”
- Commit messages dominate model attention
“When commit messages are available, they dominate model attention, confirming prior observations at larger scale.”
- Group-stratified splits cause ~17% performance drop versus random splits
“Group-stratified evaluation exposes approximately 17% performance drops compared to random splits”
- Scaling to 14B parameters yields only marginal gains
“Neither scaling fine-tuned model capacity from 125M to 14B parameters nor enriching diffs with intra-procedural data-flow context changes this picture.”
- Prompt-based generative classification outperforms fine-tuned models on CVE split
“Without any task-specific training, DA outperforms all finetuned models on the same CVE split by a consistent margin”
Caveats 5
- Prompt-based generative classification (direct answer) achieves higher F1 (0.61) than any fine-tuned code-only model on the CVE-confirmed test set, suggesting some capability despite overall negative findings
- Identifying representations that capture the security semantics of code changes well remains a core challenge.
- The intra-procedural diff-based inputs appear insufficient; richer semantic representations may be necessary.
- Data contamination from internet-scale pretraining cannot be excluded for the generative approach.
- Due to licensing restrictions we cannot redistribute the raw data or trained model weights directly.
What’s new here 4
- Unified framework consolidating 20 fragmented VFC datasets (>180 k commits) for systematic evaluation
- Comprehensive analysis of code-only versus message-augmented inputs across many model sizes and architectures
- Lightweight intra-procedural context enrichment method for diff representations
- Systematic evaluation of splitting strategies (random, group-stratified, temporal, CVE) revealing dataset-level confounds