Transformer-based Vulnerability Detection in Code at EditTime: Zero-shot, Few-shot, or Fine-tuning?
Not on the map. Why?
Abstract (arXiv)
Software vulnerabilities bear enterprises significant costs. Despite extensive efforts in research and development of software vulnerability detection methods, uncaught vulnerabilities continue to put software owners and users at risk. Many current vulnerability detection methods require that code snippets can compile and build before attempting detection. This, unfortunately, introduces a long latency between the time a vulnerability is injected to the time it is removed, which can substantially increases the cost of fixing a vulnerability. We recognize that the current advances in machine learning can be used to detect vulnerable code patterns on syntactically incomplete code snippets as the developer is writing the code at EditTime. In this paper we present a practical system that leverages deep learning on a large-scale data set of vulnerable code patterns to learn complex manifestations of more than 250 vulnerability types and detect vulnerable code patterns at EditTime. We discuss zero-shot, few-shot, and fine-tuning approaches on state of the art pre-trained Large Language Models (LLMs). We show that in comparison with state of the art vulnerability detection models our approach improves the state of the art by 10%. We also evaluate our approach to detect vulnerability in auto-generated code by code LLMs. Evaluation on a benchmark of high-risk code scenarios shows a reduction of up to 90% vulnerability reduction.
Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). Builds on 18 of its 54 references that are in the map. First posted on arXiv 23 May 2023.
Builds on
18 of 54 references.
References · 18
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2020Evaluation: from precision, recall and F-measure to ROC, informedness, markedness and correlationcited by 420
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
- 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 142
- 2018Automated Vulnerability Detection in Source Code Using Deep Representation Learningcited by 114
- 2018SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilitiescited by 91
- 2021Vulnerability Detection with Fine-grained Interpretationscited by 56
6 more
- 2018Superion: Grammar-Aware Greybox Fuzzingcited by 12
- 2017End-to-End Prediction of Buffer Overruns from Raw Source Code via Neural Memory Networkscited by 10
- 2018Towards security defect prediction with AIcited by 6
- 2014Building Program Vector Representations for Deep Learningcited by 5
- 2021Linear-time Temporal Logic guided Greybox Fuzzingcited by 5
- 2022Path Transitions Tell More:Optimizing Fuzzing Schedules via Runtime Program Statescited by 2
Built on by
Citing papers per year: 2023: 4; 2024: 7; 2025: 1; 2026: 1.
13 papers.
Sort:
By area:
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2023How Far Have We Gone in Vulnerability Detection Using Large Language Modelscited by 27
- 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 21
- 2024To Err is Machine: Vulnerability Detection Challenges LLM Reasoningcited by 17
- 2025R2Vul: Learning to Reason about Software Vulnerabilities with Reinforcement Learning and Structured Reasoning Distillationcited by 7
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsificationcited by 2
- 2024EaTVul: ChatGPT-based Evasion Attack Against Software Vulnerability Detectioncited by 2
- 2024A Qualitative Study on Using ChatGPT for Software Security: Perception vs. Practicalitycited by 2
- 2024Direction for Detection: A Survey of Automated Vulnerability Detection and all of its Pain Pointscited by 0
- 2024Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generationcited by 0
- 2026A systematic literature Review for Transformer-based Software Vulnerability detection27 Apr 2026
- 2025R2Vul: Learning to Reason about Software Vulnerabilities with Reinforcement Learning and Structured Reasoning Distillation7 Apr 2025
- 2024Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generation18 Dec 2024
- 2024Direction for Detection: A Survey of Automated Vulnerability Detection and all of its Pain Points15 Dec 2024
- 2024A Qualitative Study on Using ChatGPT for Software Security: Perception vs. Practicality1 Aug 2024
- 2024EaTVul: ChatGPT-based Evasion Attack Against Software Vulnerability Detection27 Jul 2024
- 2024Large Language Models for Cyber Security: A Systematic Literature Review8 May 2024
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsification14 Apr 2024
- 2024To Err is Machine: Vulnerability Detection Challenges LLM Reasoning25 Mar 2024
- 2023How Far Have We Gone in Vulnerability Detection Using Large Language Models21 Nov 2023
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Code14 Nov 2023
- 2023Reinforcement Learning from Automatic Feedback for High-Quality Unit Test Generation3 Oct 2023
1 more
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2023How Far Have We Gone in Vulnerability Detection Using Large Language Modelscited by 27
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsificationcited by 2
- 2024EaTVul: ChatGPT-based Evasion Attack Against Software Vulnerability Detectioncited by 2
- 2024A Qualitative Study on Using ChatGPT for Software Security: Perception vs. Practicalitycited by 2
- 2024Direction for Detection: A Survey of Automated Vulnerability Detection and all of its Pain Pointscited by 0
- 2026A systematic literature Review for Transformer-based Software Vulnerability detectioncited by 0
- 2026A systematic literature Review for Transformer-based Software Vulnerability detection27 Apr 2026
- 2024Direction for Detection: A Survey of Automated Vulnerability Detection and all of its Pain Points15 Dec 2024
- 2024A Qualitative Study on Using ChatGPT for Software Security: Perception vs. Practicality1 Aug 2024
- 2024EaTVul: ChatGPT-based Evasion Attack Against Software Vulnerability Detection27 Jul 2024
- 2024Large Language Models for Cyber Security: A Systematic Literature Review8 May 2024
- 2024Generative transformations and patterns in LLM-native approaches for software verification and falsification14 Apr 2024
- 2023How Far Have We Gone in Vulnerability Detection Using Large Language Models21 Nov 2023
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Code14 Nov 2023
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023