LLM-based Vulnerability Discovery through the Lens of Code Metrics
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) excel in many tasks of software engineering, yet progress in leveraging them for vulnerability discovery has stalled in recent years. To understand this phenomenon, we investigate LLMs through the lens of classic code metrics. Surprisingly, we find that a classifier trained solely on these metrics performs on par with state-of-the-art LLMs for vulnerability discovery. A root-cause analysis reveals a strong correlation and a causal effect between LLMs and code metrics: When the value of a metric is changed, LLM predictions tend to shift by a corresponding magnitude. This dependency suggests that LLMs operate at a similarly shallow level as code metrics, limiting their ability to grasp complex patterns and fully realize their potential in vulnerability discovery. Based on these findings, we derive recommendations on how research should more effectively address this challenge.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 22 of its 76 references that are in the map. First posted on arXiv 23 Sep 2025.
Builds on
22 of 76 references.
References · 22
- 2016Understanding intermediate layers using linear classifier probescited by 1,353
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2023The Linear Representation Hypothesis and the Geometry of Large Language Modelscited by 716
- 2020On the Bottleneck of Graph Neural Networks and its Practical Implicationscited by 631
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2023A critical look at the evaluation of GNNs under heterophily: Are we really making progress?cited by 343
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2019Don't Take the Easy Way Out: Ensemble Based Methods for Avoiding Known Dataset Biasescited by 280
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
- 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 139
10 more
- 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 125
- 2018Automated Vulnerability Detection in Source Code Using Deep Representation Learningcited by 114
- 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 102
- 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 97
- 2021CVEfixes: Automated Collection of Vulnerabilities and Their Fixes from Open-Source Softwarecited by 91
- 2024Top Score on the Wrong Exam: On Benchmarking in Machine Learning for Vulnerability Detectioncited by 28
- 2024Pre-training by Predicting Program Dependencies for Vulnerability Analysis Taskscited by 17
- 2019LEOPARD: Identifying Vulnerable Code for Vulnerability Assessment through Program Metricscited by 10
- 2024Toward Improved Deep Learning-based Vulnerability Detectioncited by 9
- 2025SoK: Where to Fuzz? Assessing Target Selection Methods in Directed Fuzzingcited by 4
Built on by
Citing papers per year: 2025: 1; 2026: 3.
4 papers.
- 2026From SFT to RL: Demystifying the Post-Training Pipeline for LLM-based Vulnerability Detectioncited by 4
- 2025VULPO: Context-Aware Vulnerability Detection via On-Policy LLM Optimizationcited by 3
- 2026Veritas: Grounding LLM Agents for Reliable Vulnerability Reasoning over Stripped Binariescited by 1
- 2026Are Frontier LLMs Ready for Cybersecurity? Evidence for Vertical Foundation Models from Dual-Mode Vulnerability Benchmarkscited by 0
- 2026Are Frontier LLMs Ready for Cybersecurity? Evidence for Vertical Foundation Models from Dual-Mode Vulnerability Benchmarks22 May 2026
- 2026Veritas: Grounding LLM Agents for Reliable Vulnerability Reasoning over Stripped Binaries14 May 2026
- 2026From SFT to RL: Demystifying the Post-Training Pipeline for LLM-based Vulnerability Detection15 Feb 2026
- 2025VULPO: Context-Aware Vulnerability Detection via On-Policy LLM Optimization14 Nov 2025