mlsanityData to 7 Oct 2026

VulScribeR: Exploring RAG-based Vulnerability Augmentation with LLMs

arXiv 2408.04125 ↗First posted 7 Aug 2024cs.SE cs.CR cs.LGcited by 7

Not on the map. Why?

Abstract (arXiv)

Detecting vulnerabilities is vital for software security, yet deep learning-based vulnerability detectors (DLVD) face a data shortage, which limits their effectiveness. Data augmentation can potentially alleviate the data shortage, but augmenting vulnerable code is challenging and requires a generative solution that maintains vulnerability. Previous works have only focused on generating samples that contain single statements or specific types of vulnerabilities. Recently, large language models (LLMs) have been used to solve various code generation and comprehension tasks with inspiring results, especially when fused with retrieval augmented generation (RAG). Therefore, we propose VulScribeR, a novel LLM-based solution that leverages carefully curated prompt templates to augment vulnerable datasets. More specifically, we explore three strategies to augment both single and multi-statement vulnerabilities, with LLMs, namely Mutation, Injection, and Extension. Our extensive evaluation across four vulnerability datasets and DLVD models, using three LLMs, show that our approach beats two SOTA methods Vulgen and VGX, and Random Oversampling (ROS) by 27.48%, 27.93%, and 15.41% in f1-score with 5K generated vulnerable samples on average, and 53.84%, 54.10%, 69.90%, and 40.93% with 15K generated vulnerable samples. Our approach demonstrates its feasibility for large-scale data augmentation by generating 1K samples at as cheap as US 1.88.

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

Builds on

33 of 70 references.

References · 33

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2017mixup: Beyond Empirical Risk Minimizationcited by 5,155
  3. 2019CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Featurescited by 2,875
  4. 2017Improved Regularization of Convolutional Neural Networks with Cutoutcited by 1,623
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  6. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  7. 2020Evaluation: from precision, recall and F-measure to ROC, informedness, markedness and correlationcited by 420
  8. 2023A Survey on Large Language Model (LLM) Security and Privacy: The Good, the Bad, and the Uglycited by 380
  9. 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
  10. 2020ClassMix: Segmentation-Based Data Augmentation for Semi-Supervised Learningcited by 209
  11. 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 142
  12. 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 133
21 more
  1. 2019Augmenting Data with Mixup for Sentence Classification: An Empirical Studycited by 125
  2. 2024LLM Agents can Autonomously Exploit One-day Vulnerabilitiescited by 125
  3. 2023An Analysis of the Automatic Bug Fixing Performance of ChatGPTcited by 108
  4. 2024Vul-RAG: Enhancing LLM-based Vulnerability Detection via Knowledge-level RAGcited by 67
  5. 2023Comparing Code Explanations Created by Students and Large Language Modelscited by 63
  6. 2021Vulnerability Detection with Fine-grained Interpretationscited by 56
  7. 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
  8. 2020Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformationscited by 49
  9. 2023Data Quality for Software Vulnerability Datasetscited by 49
  10. 2018Diversity in Machine Learningcited by 48
  11. 2023What Makes Good In-context Demonstrations for Code Intelligence Tasks with LLMs?cited by 47
  12. 2024Securing Large Language Models: Threats, Vulnerabilities and Responsible Practicescited by 36
  13. 2024LLMParser: An Exploratory Study on Using Large Language Models for Log Parsingcited by 32
  14. 2023Uncovering the Limits of Machine Learning for Automatic Vulnerability Detectioncited by 30
  15. 2021Learning Structural Edits via Incremental Tree Transformationscited by 16
  16. 2024LLM-Powered Code Vulnerability Repair with Reinforcement Learning and Semantic Rewardcited by 16
  17. 2022The impact of feature importance methods on the interpretation of defect classifierscited by 12
  18. 2023VGX: Large-Scale Sample Generation for Boosting Learning-Based Software Vulnerability Analysescited by 9
  19. 2022Exploring Representation-Level Augmentation for Code Searchcited by 8
  20. 2022Impact of Discretization Noise of the Dependent variable on Machine Learning Classifiers in Software Engineeringcited by 6
  21. 2024Enhancing Code Vulnerability Detection via Vulnerability-Preserving Data Augmentationcited by 5

Built on by

Cited by year (2026 to 7 Oct)

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

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Revisiting Vul-RAG: Reproducibility and Replicability of RAG-based Vulnerability Detection with Open-Weight Models
  2. 2026VulTriage: Triple-Path Context Augmentation for LLM-Based Vulnerability Detection
  3. 2025Automated Vulnerability Validation and Verification: A Large Language Model Approach
  4. 2026Retrieve, Reproduce, Reveal: Dissecting Retrieval-Augmented Software Vulnerability Detection
  5. 2024Towards Explainable Vulnerability Detection with Large Language Models
  6. 2025Boosting Vulnerability Detection of LLMs via Curriculum Preference Optimization with Synthetic Reasoning Data
  7. 2025VulInstruct: Teaching LLMs Root-Cause Reasoning for Vulnerability Detection via Security Specifications
  8. 2025Reasoning with LLMs for Zero-Shot Vulnerability Detection