An Empirical Evaluation of Model Design and Code Representation for Deep Learning-Based Source Code Vulnerability Detection
Abstract
As modern software systems continue to grow in scale and complexity, ensuring their security has become an increasingly demanding challenge, with hidden vulnerabilities threatening both reliability and safety. Deep learning offers powerful approaches to automating vulnerability detection by capturing structural and semantic code patterns that are often missed by traditional rule-based techniques. Research in this area has largely advanced along two main paradigms: sequence-based, which treat code as token streams, and graph-based, which leverage structural representations of code. The rise of pre-trained transformers has further accelerated progress by modeling semantic and contextual nuances with greater fidelity. Yet key questions remain unresolved, including the specific contribution of pre-training to vulnerability detection, the relative merits of sequence-based and graph-based approaches, the influence of structural design choices within graph models, and the ability of these methods to generalize across different programming languages. This work undertakes a comprehensive empirical study to address these gaps. The results demonstrate that pre-training substantially improves detection performance, underscoring the value of contextualized embeddings for capturing code semantics. Graph-based architectures, particularly those built on code property graphs, consistently deliver more accurate results by integrating syntactic structures with semantic dependencies. The findings further reveal that fusing syntactic and semantic representations produces the most reliable detection of complex, real-world vulnerabilities. At the same time, current methods exhibit significant performance degradation when applied in multilingual settings, highlighting the urgent need for language-independent strategies. By examining the interplay of pre-training, model architecture, and code representation, this study establishes a rigorous evaluation framework that clarifies their individual and collective contributions to reliable vulnerability detection. Beyond advancing accuracy, it emphasizes the importance of explainability in helping developers understand detected risks, laying the groundwork for scalable, generalizable systems capable of securing today’s increasingly diverse and heterogeneous software environments.
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.