LLM-based Vulnerable Code Augmentation: Generate or Refactor?
Not on the map. Why?
Abstract (arXiv)
Vulnerability code-bases often suffer from severe imbalance, limiting the effectiveness of Deep Learning-based vulnerability classifiers. Data Augmentation could help solve this by mitigating the scarcity of under-represented vulnerability types. In this context, we investigate LLM-based augmentation for vulnerable functions, comparing controlled generation of new vulnerable samples with semantics-preserving refactoring of existing ones. Using Qwen2.5-Coder to produce augmented data and CodeBERT as a classifier on the SVEN dataset, we find that our approaches are indeed effective in enriching vulnerable code-bases through a simple process and with reasonable quality, and that a hybrid strategy best boosts vulnerability classifiers' performance. Code repository is available here : https://github.com/DynaSoumhaneOuchebara/LLM-based-code-augmentation-Generate-or-Refactor-
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 8 of its 13 references that are in the map. First posted on arXiv 9 Dec 2025.
Builds on
8 of 13 references.
References · 8
- 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 155
- 2021Self-Supervised Bug Detection and Repaircited by 59
- 2023VGX: Large-Scale Sample Generation for Boosting Learning-Based Software Vulnerability Analysescited by 9
- 2023Boosting Source Code Learning with Text-Oriented Data Augmentation: An Empirical Studycited by 5
- 2024Enhancing Code Vulnerability Detection via Vulnerability-Preserving Data Augmentationcited by 5
- 2022MIXCODE: Enhancing Code Classification by Mixup-Based Data Augmentationcited by 4
- 2023Source Code Data Augmentation for Deep Learning: A Surveycited by 3
- 2024Enhancing Pre-Trained Language Models for Vulnerability Detection via Semantic-Preserving Data Augmentationcited by 1
Built on by
Not cited yet.