A Comprehensive Evaluation of Code Language Models for Security Patch Detection
Not on the map. Why?
Abstract (arXiv)
Automated detection of vulnerability-fixing commits (vfcs) is critical for timely security patch deployment, as advisory databases lag patch releases by a median of 25 days and many fixes never receive advisories. Code language models are increasingly adopted for identifying VFCs, yet whether they can recognize a security fix from the code change itself remains unclear, as reported performance is shaped by commit messages, project-level data leakage, and uncertain data quality. We present a rigorous re-evaluation that jointly controls these factors through a unified framework consolidating 20 fragmented datasets spanning more than 180000 commits. Training 270 models from 125M to 80B parameters, we isolate the code signal under group-stratified code-only evaluation and assess the impact of model capacity and additional code context, ranging from intra-procedural enrichment to inter-procedural repository context. Model capacity yields clear but insufficient gains, and the evaluated context signals provide no reliable improvement under strict false positive budgets. At a false positive rate of 0.5%, every evaluated fine-tuned code-only model misses at least 80% of vulnerability fixes. A manual expert audit further shows that label error concentrates in commits lacking CVE association and primarily distorts evaluation. We derive concrete recommendations for evaluating on aggregated VFC datasets and release our unified framework and evaluation suite.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 34 of its 64 references that are in the map. First posted on arXiv 13 May 2026.
Builds on
34 of 64 references.
References · 34
- 2017Axiomatic Attribution for Deep Networkscited by 3,384
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,298
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 272
- 2024To CoT or not to CoT? Chain-of-thought helps mainly on math and symbolic reasoningcited by 263
- 2024Large Language Model-Based Agents for Software Engineering: A Surveycited by 178
- 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 155
- 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 139
22 more
- 2020Dos and Don'ts of Machine Learning in Computer Securitycited by 102
- 2023CodeBERTScore: Evaluating Code Generation with Pretrained Models of Codecited by 102
- 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 102
- 2021CVEfixes: Automated Collection of Vulnerabilities and Their Fixes from Open-Source Softwarecited by 91
- 2022An Empirical Study of Deep Learning Models for Vulnerability Detectioncited by 46
- 2019A Manually-Curated Dataset of Fixes to Vulnerabilities of Open-Source Softwarecited by 28
- 2024Top Score on the Wrong Exam: On Benchmarking in Machine Learning for Vulnerability Detectioncited by 28
- 2024MegaVul: A C/C++ Vulnerability Dataset with Comprehensive Code Representationcited by 27
- 2021SPI: Automated Identification of Security Patches via Commitscited by 19
- 2018A Practical Approach to the Automatic Classification of Security-Relevant Commitscited by 13
- 2021PatchRNN: A Deep Learning-Based System for Security Patch Identificationcited by 13
- 2025Chasing Shadows: Pitfalls in LLM Security Researchcited by 13
- 2024TESSERACT: Eliminating Experimental Bias in Malware Classification across Space and Time (Extended Version)cited by 9
- 2023Just-in-Time Detection of Silent Security Patchescited by 7
- 2025Code Change Intention, Development Artifact and History Vulnerability: Putting Them Together for Vulnerability Fix Detection by LLMcited by 6
- 2023Silent Vulnerable Dependency Alert Prediction with Vulnerability Key Aspect Explanationcited by 5
- 2025Beyond the TESSERACT:Trustworthy Dataset Curation for Sound Evaluations of Android Malware Classifierscited by 5
- 2024Repository-Level Graph Representation Learning for Enhanced Security Patch Detectioncited by 3
- 2021A ground-truth dataset of real security patchescited by 2
- 2021Open or Sneaky? Fast or Slow? Light or Heavy?: Investigating Security Releases of Open Source Packagescited by 2
- 2025ICVul: A Well-labeled C/C++ Vulnerability Dataset with Comprehensive Metadata and VCCscited by 2
- 2023Multilevel Semantic Embedding of Software Patches: A Fine-to-Coarse Grained Approach Towards Security Patch Detectioncited by 1
Built on by
Not cited yet.