Data and Context Matter: Towards Generalizing AI-based Software Vulnerability Detection

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Safdar, Rijha, Mateen, Danyail, Ali, Syed Taha, Ashfaq, M. Umer, Hussain, Wajahat
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866909828176150528
author Safdar, Rijha
Mateen, Danyail
Ali, Syed Taha
Ashfaq, M. Umer
Hussain, Wajahat
author_facet Safdar, Rijha
Mateen, Danyail
Ali, Syed Taha
Ashfaq, M. Umer
Hussain, Wajahat
contents AI-based solutions demonstrate remarkable results in identifying vulnerabilities in software, but research has consistently found that this performance does not generalize to unseen codebases. In this paper, we specifically investigate the impact of model architecture, parameter configuration, and quality of training data on the ability of these systems to generalize. For this purpose, we introduce VulGate, a high quality state of the art dataset that mitigates the shortcomings of prior datasets, by removing mislabeled and duplicate samples, updating new vulnerabilities, incorporating additional metadata, integrating hard samples, and including dedicated test sets. We undertake a series of experiments to demonstrate that improved dataset diversity and quality substantially enhances vulnerability detection. We also introduce and benchmark multiple encoder-only and decoder-only models. We find that encoder-based models outperform other models in terms of accuracy and generalization. Our model achieves \textbf{6.8\%} improvement in recall on the benchmark BigVul dataset and outperforms others on unseen projects, demonstrating enhanced generalizability. Our results highlight the role of data quality and model selection in the development of robust vulnerability detection systems. Our findings suggest a direction for future systems with high cross-project effectiveness.
format Preprint
id arxiv_https___arxiv_org_abs_2508_16625
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Data and Context Matter: Towards Generalizing AI-based Software Vulnerability Detection
Safdar, Rijha
Mateen, Danyail
Ali, Syed Taha
Ashfaq, M. Umer
Hussain, Wajahat
Cryptography and Security
Artificial Intelligence
Software Engineering
AI-based solutions demonstrate remarkable results in identifying vulnerabilities in software, but research has consistently found that this performance does not generalize to unseen codebases. In this paper, we specifically investigate the impact of model architecture, parameter configuration, and quality of training data on the ability of these systems to generalize. For this purpose, we introduce VulGate, a high quality state of the art dataset that mitigates the shortcomings of prior datasets, by removing mislabeled and duplicate samples, updating new vulnerabilities, incorporating additional metadata, integrating hard samples, and including dedicated test sets. We undertake a series of experiments to demonstrate that improved dataset diversity and quality substantially enhances vulnerability detection. We also introduce and benchmark multiple encoder-only and decoder-only models. We find that encoder-based models outperform other models in terms of accuracy and generalization. Our model achieves \textbf{6.8\%} improvement in recall on the benchmark BigVul dataset and outperforms others on unseen projects, demonstrating enhanced generalizability. Our results highlight the role of data quality and model selection in the development of robust vulnerability detection systems. Our findings suggest a direction for future systems with high cross-project effectiveness.
title Data and Context Matter: Towards Generalizing AI-based Software Vulnerability Detection
topic Cryptography and Security
Artificial Intelligence
Software Engineering
url https://arxiv.org/abs/2508.16625