mlsanityData to 14 Oct 2026

LLM-based Vulnerability Discovery through the Lens of Code Metrics

arXiv 2509.19117 ↗First posted 23 Sep 2025cs.CR cs.LG cs.SEcited by 4

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

  1. 2016Understanding intermediate layers using linear classifier probescited by 1,353
  2. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  3. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  4. 2023The Linear Representation Hypothesis and the Geometry of Large Language Modelscited by 716
  5. 2020On the Bottleneck of Graph Neural Networks and its Practical Implicationscited by 631
  6. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
  7. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  8. 2023A critical look at the evaluation of GNNs under heterophily: Are we really making progress?cited by 343
  9. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
  10. 2019Don't Take the Easy Way Out: Ensemble Based Methods for Avoiding Known Dataset Biasescited by 280
  11. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
  12. 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 139
10 more
  1. 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 125
  2. 2018Automated Vulnerability Detection in Source Code Using Deep Representation Learningcited by 114
  3. 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 102
  4. 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 97
  5. 2021CVEfixes: Automated Collection of Vulnerabilities and Their Fixes from Open-Source Softwarecited by 91
  6. 2024Top Score on the Wrong Exam: On Benchmarking in Machine Learning for Vulnerability Detectioncited by 28
  7. 2024Pre-training by Predicting Program Dependencies for Vulnerability Analysis Taskscited by 17
  8. 2019LEOPARD: Identifying Vulnerable Code for Vulnerability Assessment through Program Metricscited by 10
  9. 2024Toward Improved Deep Learning-based Vulnerability Detectioncited by 9
  10. 2025SoK: Where to Fuzz? Assessing Target Selection Methods in Directed Fuzzingcited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 3.

4 papers.