mlsanityData to 7 Oct 2026

Vulnerability Detection with Code Language Models: How Far Are We?

arXiv 2403.18624 ↗First posted 27 Mar 2024cs.SE cs.CLcited by 133

Not on the map. Why?

Cited by 41 in LLM agents and tool use, but placed by its own abstract, which didn’t fit.

Abstract (arXiv)

In the context of the rising interest in code language models (code LMs) and vulnerability detection, we study the effectiveness of code LMs for detecting vulnerabilities. Our analysis reveals significant shortcomings in existing vulnerability datasets, including poor data quality, low label accuracy, and high duplication rates, leading to unreliable model performance in realistic vulnerability detection scenarios. Additionally, the evaluation methods used with these datasets are not representative of real-world vulnerability detection. To address these challenges, we introduce PrimeVul, a new dataset for training and evaluating code LMs for vulnerability detection. PrimeVul incorporates a novel set of data labeling techniques that achieve comparable label accuracy to human-verified benchmarks while significantly expanding the dataset. It also implements a rigorous data de-duplication and chronological data splitting strategy to mitigate data leakage issues, alongside introducing more realistic evaluation metrics and settings. This comprehensive approach aims to provide a more accurate assessment of code LMs' performance in real-world conditions. Evaluating code LMs on PrimeVul reveals that existing benchmarks significantly overestimate the performance of these models. For instance, a state-of-the-art 7B model scored 68.26% F1 on BigVul but only 3.09% F1 on PrimeVul. Attempts to improve performance through advanced training techniques and larger models like GPT-3.5 and GPT-4 were unsuccessful, with results akin to random guessing in the most stringent settings. These findings underscore the considerable gap between current capabilities and the practical requirements for deploying code LMs in security roles, highlighting the need for more innovative research in this domain.

Key facts. Cited by 133 papers in the map (data through 7 Oct 2026). Builds on 32 of its 52 references that are in the map. First posted on arXiv 27 Mar 2024.

Builds on

32 of 52 references.

References · 32

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  3. 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
  4. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  5. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  6. 2023Large Language Modelscited by 774
  7. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  8. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  9. 2019Confident Learning: Estimating Uncertainty in Dataset Labelscited by 411
  10. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
  11. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  12. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
20 more
  1. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  2. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
  3. 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
  4. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 149
  5. 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 142
  6. 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
  7. 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 98
  8. 2018SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilitiescited by 91
  9. 2021CVEfixes: Automated Collection of Vulnerabilities and Their Fixes from Open-Source Softwarecited by 89
  10. 2023Understanding the Effectiveness of Large Language Models in Detecting Security Vulnerabilitiescited by 58
  11. 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoningcited by 57
  12. 2023Data Quality for Software Vulnerability Datasetscited by 49
  13. 2022An Empirical Study of Deep Learning Models for Vulnerability Detectioncited by 44
  14. 2023Uncovering the Limits of Machine Learning for Automatic Vulnerability Detectioncited by 30
  15. 2023The Larger They Are, the Harder They Fail: Language Models do not Recognize Identifier Swaps in Pythoncited by 29
  16. 2014Learning Natural Coding Conventionscited by 28
  17. 2024The Counterfeit Conundrum: Can Code Language Models Grasp the Nuances of Their Incorrect Generations?cited by 20
  18. 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 17
  19. 2023CONCORD: Clone-aware Contrastive Learning for Source Codecited by 5
  20. 2023Do Language Models Learn Semantics of Code? A Case Study in Vulnerability Detectioncited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 13; 2025: 54; 2026: 66.

133 papers.

Sort:

By area:

  1. 2024From LLMs to LLM-based Agents for Software Engineering: A Survey of Current, Challenges and Futurecited by 85
  2. 2025Persona Features Control Emergent Misalignmentcited by 76
  3. 2025SEC-bench: Automated Benchmarking of LLM Agents on Real-World Software Security Taskscited by 69
  4. 2024Vul-RAG: Enhancing LLM-based Vulnerability Detection via Knowledge-level RAGcited by 67
  5. 2026Qwen3-Coder-Next Technical Reportcited by 60
  6. 2025RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditingcited by 47
  7. 2025LLMs in Software Security: A Survey of Vulnerability Detection Techniques and Insightscited by 44
  8. 2025Benchmarking LLMs and LLM-based Agents in Practical Vulnerability Detection for Code Repositoriescited by 29
  9. 2025Frontier AI's Impact on the Cybersecurity Landscapecited by 21
  10. 2025Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World Taskscited by 18
  11. 2025PurpCode: Reasoning for Safer Code Generationcited by 17
  12. 2025From CVE Entries to Verifiable Exploits: An Automated Multi-Agent Framework for Reproducing CVEscited by 17
38 more
  1. 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
  2. 2024VulDetectBench: Evaluating the Deep Capability of Vulnerability Detection with Large Language Modelscited by 11
  3. 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agentscited by 11
  4. 2025FaultLine: Automated Proof-of-Vulnerability Generation Using LLM Agentscited by 11
  5. 2025VulnLLM-R: Specialized Reasoning LLM with Agent Scaffold for Vulnerability Detectioncited by 11
  6. 2025CASTLE: Benchmarking Dataset for Static Code Analyzers and LLMs towards CWE Detectioncited by 10
  7. 2025Rethinking the Evaluation of Secure Code Generationcited by 10
  8. 2024From Vulnerabilities to Remediation: A Systematic Literature Review of LLMs in Code Securitycited by 9
  9. 2025Large Language Models for Security Operations Centers: A Comprehensive Surveycited by 9
  10. 2025SV-TrustEval-C: Evaluating Structure and Semantic Reasoning in Large Language Models for Source Code Vulnerability Analysiscited by 8
  11. 2025Locus: Agentic Predicate Synthesis for Directed Fuzzingcited by 8
  12. 2025VulAgent: Hypothesis-Validation based Multi-Agent Vulnerability Detectioncited by 8
  13. 2026ARVO: Atlas of Reproducible Vulnerabilities for Open-Source Softwarecited by 8
  14. 2024VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMscited by 7
  15. 2025Vulnerability Detection: From Formal Verification to Large Language Models and Hybrid Approaches: A Comprehensive Overviewcited by 7
  16. 2025R2Vul: Learning to Reason about Software Vulnerabilities with Reinforcement Learning and Structured Reasoning Distillationcited by 7
  17. 2024Revisiting the Performance of Deep Learning-Based Vulnerability Detection on Realistic Datasetscited by 6
  18. 2025MAVUL: Multi-Agent Vulnerability Detection via Contextual Reasoning and Interactive Refinementcited by 6
  19. 2025One Bug, Hundreds Behind: LLMs for Large-Scale Bug Discoverycited by 6
  20. 2026MulVul: Retrieval-augmented Multi-Agent Code Vulnerability Detection via Cross-Model Prompt Evolutioncited by 6
  21. 2026Co-RedTeam: Orchestrated Security Discovery and Exploitation with LLM Agentscited by 6
  22. 2026CyberGym-E2E: Scalable Real-World Benchmark for AI Agents' End-to-End Cybersecurity Capabilitiescited by 6
  23. 2026Reducing False Positives in Static Bug Detection with LLMs: An Empirical Study in Industrycited by 5
  24. 2026CVE-Factory: Scaling Expert-Level Agentic Tasks for Code Security Vulnerabilitycited by 5
  25. 2024SeCodePLT: A Unified Platform for Evaluating the Security of Code GenAIcited by 4
  26. 2025XOXO: Stealthy Cross-Origin Context Poisoning Attacks against AI Coding Assistantscited by 4
  27. 2025AutoPatch: Multi-Agent Framework for Patching Real-World CVE Vulnerabilitiescited by 4
  28. 2025LPASS: Linear Probes as Stepping Stones for vulnerability detection using compressed LLMscited by 4
  29. 2025A Mixture of Linear Corrections Generates Secure Codecited by 4
  30. 2025LLM-based Vulnerability Discovery through the Lens of Code Metricscited by 4
  31. 2025A Systematic Study of Code Obfuscation Against LLM-based Vulnerability Detectioncited by 4
  32. 2026Secure Code Generation via Online Reinforcement Learning with Vulnerability Reward Modelcited by 4
  33. 2026From SFT to RL: Demystifying the Post-Training Pipeline for LLM-based Vulnerability Detectioncited by 4
  34. 2024Can LLM Prompting Serve as a Proxy for Static Analysis in Vulnerability Detectioncited by 3
  35. 2024On the Compression of Language Models for Code: An Empirical Study on CodeBERTcited by 3
  36. 2025Revisiting Pre-trained Language Models for Vulnerability Detectioncited by 3
  37. 2025VULPO: Context-Aware Vulnerability Detection via On-Policy LLM Optimizationcited by 3
  38. 2026FuzzingBrain V2: A Multi-Agent LLM System for Automated Vulnerability Discovery and Reproductioncited by 3

50 most cited of 133 All 133 (JSON)