mlsanityData to 7 Oct 2026

Top Score on the Wrong Exam: On Benchmarking in Machine Learning for Vulnerability Detection

arXiv 2408.12986 ↗First posted 23 Aug 2024cs.CR cs.LGcited by 27

Not on the map. Why?

Abstract (arXiv)

According to our survey of machine learning for vulnerability detection (ML4VD), 9 in every 10 papers published in the past five years define ML4VD as a function-level binary classification problem: Given a function, does it contain a security flaw? From our experience as security researchers, faced with deciding whether a given function makes the program vulnerable to attacks, we would often first want to understand the context in which this function is called. In this paper, we study how often this decision can really be made without further context and study both vulnerable and non-vulnerable functions in the most popular ML4VD datasets. We call a function "vulnerable" if it was involved in a patch of an actual security flaw and confirmed to cause the program's vulnerability. It is "non-vulnerable" otherwise. We find that in almost all cases this decision cannot be made without further context. Vulnerable functions are often vulnerable only because a corresponding vulnerability-inducing calling context exists while non-vulnerable functions would often be vulnerable if a corresponding context existed. But why do ML4VD techniques achieve high scores even though there is demonstrably not enough information in these samples? Spurious correlations: We find that high scores can be achieved even when only word counts are available. This shows that these datasets can be exploited to achieve high scores without actually detecting any security vulnerabilities. We conclude that the prevailing problem statement of ML4VD is ill-defined and call into question the internal validity of this growing body of work. Constructively, we call for more effective benchmarking methodologies to evaluate the true capabilities of ML4VD, propose alternative problem statements, and examine broader implications for the evaluation of machine learning and programming analysis research.

Key facts. Cited by 27 papers in the map (data through 7 Oct 2026). Builds on 28 of its 66 references that are in the map. First posted on arXiv 23 Aug 2024.

Builds on

28 of 66 references.

References · 28

  1. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  2. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  3. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  4. 2020An Investigation of Why Overparameterization Exacerbates Spurious Correlationscited by 310
  5. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
  6. 2022On Feature Learning in the Presence of Spurious Correlationscited by 145
  7. 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 142
  8. 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 98
  9. 2023LLMs Cannot Reliably Identify and Reason About Security Vulnerabilities (Yet?): A Comprehensive Evaluation, Framework, and Benchmarkscited by 94
  10. 2021Vulnerability Detection with Fine-grained Interpretationscited by 56
  11. 2023Data Quality for Software Vulnerability Datasetscited by 49
  12. 2022An Empirical Study of Deep Learning Models for Vulnerability Detectioncited by 44
16 more
  1. 2024A Deep Dive into Large Language Models for Automated Bug Localization and Repaircited by 39
  2. 2023Uncovering the Limits of Machine Learning for Automatic Vulnerability Detectioncited by 30
  3. 2022Dataflow Analysis-Inspired Deep Learning for Efficient Vulnerability Detectioncited by 18
  4. 2024Pre-training by Predicting Program Dependencies for Vulnerability Analysis Taskscited by 17
  5. 2024SCALE: Constructing Structured Natural Language Comment Trees for Software Vulnerability Detectioncited by 17
  6. 2024Graph Neural Networks for Vulnerability Detection: A Counterfactual Explanationcited by 12
  7. 2023Distinguishing Look-Alike Innocent and Vulnerable Code by Subtle Semantic Representation Learning and Explanationcited by 11
  8. 2024On the Effectiveness of Function-Level Vulnerability Detectors for Inter-Procedural Vulnerabilitiescited by 10
  9. 2023Towards Causal Deep Learning for Vulnerability Detectioncited by 9
  10. 2024Toward Improved Deep Learning-based Vulnerability Detectioncited by 9
  11. 2023Vulnerability Detection with Graph Simplification and Enhanced Graph Representation Learningcited by 8
  12. 2023When Less is Enough: Positive and Unlabeled Learning Model for Vulnerability Detectioncited by 8
  13. 2024Coca: Improving and Explaining Graph Neural Network-Based Vulnerability Detection Systemscited by 8
  14. 2021VulSPG: Vulnerability detection based on slice property graph representation learningcited by 7
  15. 2023CONCORD: Clone-aware Contrastive Learning for Source Codecited by 5
  16. 2018Semantic Fuzzing with Zestcited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 12; 2026: 13.

27 papers.

Sort:

By area:

  1. 2025RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditingcited by 47
  2. 2025Benchmarking LLMs and LLM-based Agents in Practical Vulnerability Detection for Code Repositoriescited by 29
  3. 2025From CVE Entries to Verifiable Exploits: An Automated Multi-Agent Framework for Reproducing CVEscited by 17
  4. 2025SecureVibeBench: Benchmarking Secure Vibe Coding of AI Agents via Reconstructing Vulnerability-Introducing Scenarioscited by 11
  5. 2025VulnLLM-R: Specialized Reasoning LLM with Agent Scaffold for Vulnerability Detectioncited by 11
  6. 2025A Systematic Literature Review on Detecting Software Vulnerabilities with Large Language Modelscited by 8
  7. 2025Locus: Agentic Predicate Synthesis for Directed Fuzzingcited by 8
  8. 2025Assessing the Impact of Code Changes on the Fault Localizability of Large Language Modelscited by 4
  9. 2025LLM-based Vulnerability Discovery through the Lens of Code Metricscited by 4
  10. 2026From SFT to RL: Demystifying the Post-Training Pipeline for LLM-based Vulnerability Detectioncited by 4
  11. 2026DREA: Decoupled Reasoning and Exploration Agents for Repository-Level Vulnerability Detectioncited by 3
  12. 2024BlockScan: Detecting Anomalies in Blockchain Transactionscited by 2
15 more
  1. 2025An Empirical Study of Vulnerabilities in Python Packages and Their Detectioncited by 2
  2. 2025Repairing vulnerabilities without invisible hands. A differentiated replication study on LLMscited by 1
  3. 2026LLM-Based Agents for Identifying Bug-Introducing Commitscited by 1
  4. 2024Direction for Detection: A Survey of Automated Vulnerability Detection and all of its Pain Pointscited by 0
  5. 2025On the Difficulty of Selecting Few-Shot Examples for Effective LLM-based Vulnerability Detectioncited by 0
  6. 2026Toward Scalable Automated Repository-Level Datasets for Software Vulnerability Detectioncited by 0
  7. 2026VulStyle: A Multi-Modal Pre-Training for Code Stylometry-Augmented Vulnerability Detectioncited by 0
  8. 2026A Comprehensive Evaluation of Code Language Models for Security Patch Detectioncited by 0
  9. 2026Evaluating LLMs for Real-World Web Vulnerability Detectioncited by 0
  10. 2026ExplainBench: Evaluating Code Explanations from Agentscited by 0
  11. 2026CyberForge: Verified Vulnerability Injection at Repository Level for Cybersecurity Agent Trainingcited by 0
  12. 2026On Predicting Vulnerability Severity Using In-Context Learning: An Industrial Case Studycited by 0
  13. 2026Plug 'n' Pray: Agentic LLM-based Detection of Potential Log File Exposures in Third-Party Content Management System Pluginscited by 0
  14. 2026SelfOp: An Optimization Algorithm for Self-Improving Security Agentscited by 0
  15. 2026A Function-Level Vulnerability Score Measures Flag Rate More Than the Model: Protocol Effects on Paired Benchmarkscited by 0