VulInject: Multi-Type Samples Generation for Learning-based Vulnerability Detection

Deep learning-based source code vulnerability analysis has become a prominent trend in vulnerability detection, offering the capability to automatically extract vulnerability features and reduce manual effort. However, the limited availability of vulnerability data prevents models from comprehensively capturing diverse vulnerability patterns. In addition, the scarcity of samples labeled with specific vulnerability types restricts models to merely identifying the presence of vulnerabilities, without providing fine-grained type information that is crucial for efficient vulnerability diagnosis and remediation. To address these challenges, we propose VulInject, the first automated tool for generating multi-type vulnerable samples for learning-based detection. Our approach extracts edit patterns from existing vulnerability datasets and applies them to benign projects, thereby synthesizing realistic vulnerable code resembling real-world cases. Furthermore, we adopt a hybrid strategy that integrates static analysis with large language models to annotate the generated samples with precise vulnerability types. By augmenting existing datasets with these generated samples, we conduct extensive experiments on state-of-the-art binary and multi-class vulnerability detection models. Results demonstrate substantial performance gains, with binary classification models achieving up to a 13.50% increase in F1 score, and multi-class models improving by 7.65%.

Authors

Institutions

Publication Details

Journal
ACM Transactions on Software Engineering and Methodology
Published
2026-05-22
DOI
https://doi.org/10.1145/3816249
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

VulInject: Multi-Type Samples Generation for Learning-based Vulnerability Detection

Hai Jin, Zhiyuan Yang, Yueming Wu, Z L Li et al.
ACM Transactions on Software Engineering and Methodology
Software Engineering Research
article

VulInject: Multi-Type Samples Generation for Learning-based Vulnerability Detection

Hai Jin, Zhiyuan Yang, Yueming Wu, Z L Li, Y H Wu, Deqing Zou
article en

Abstract

Deep learning-based source code vulnerability analysis has become a prominent trend in vulnerability detection, offering the capability to automatically extract vulnerability features and reduce manual effort. However, the limited availability of vulnerability data prevents models from comprehensively capturing diverse vulnerability patterns. In addition, the scarcity of samples labeled with specific vulnerability types restricts models to merely identifying the presence of vulnerabilities, without providing fine-grained type information that is crucial for efficient vulnerability diagnosis and remediation. To address these challenges, we propose VulInject, the first automated tool for generating multi-type vulnerable samples for learning-based detection. Our approach extracts edit patterns from existing vulnerability datasets and applies them to benign projects, thereby synthesizing realistic vulnerable code resembling real-world cases. Furthermore, we adopt a hybrid strategy that integrates static analysis with large language models to annotate the generated samples with precise vulnerability types. By augmenting existing datasets with these generated samples, we conduct extensive experiments on state-of-the-art binary and multi-class vulnerability detection models. Results demonstrate substantial performance gains, with binary classification models achieving up to a 13.50% increase in F1 score, and multi-class models improving by 7.65%.

ACM Transactions on Software Engineering and Methodology
Huazhong University of Science and Technology (CN)
Reduced inequalities
Openalex Percentile: Top 2%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.