DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning-Based Vulnerability DetectionDiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detection
The researchers release the DiverseVul vulnerable source code dataset, containing 18945 vulnerable functions and 330492 non-vulnerable functions, covering 150 CWEs. The dataset was constructed by crawling security vulnerability information websites and extracting vulnerability-fixing commits; it comes from 7514 commits and covers 295 more projects than all previous datasets combined. The paper conducts experiments on 11 architectures across 4 model families, and the results show that deep learning is still insufficient for vulnerability detection, with problems such as high false positive rates, low F1 scores, and difficulty detecting hard CWEs. The experiments also show that increasing the amount of training data does not necessarily improve detection performance, but may improve generalization to unseen projects; large language models outperform graph neural networks (GNNs) with code structure features in the experiments, and source-code-oriented pretraining objectives are a promising research direction.