ExplainabilitySafetySecuritycs.CR
Code Vulnerability Detection Across Different Programming Languages with AI Models
Hael Abdulhakim Ali Humran, Ferdi Sonmez
August 14, 2025
arXiv.org
Key Takeaways
-
AI models can outperform traditional security tools: The paper demonstrates that fine-tuned transformer-based models like CodeBERT achieved accuracy greater than 97%, potentially surpassing some existing static analyzers at detecting code vulnerabilities across multiple programming languages.
-
The false positive problem requires careful attention: While AI models achieved "close-to-perfect recall," the paper notes that precision can decrease significantly. This means the models may flag many safe code segments as vulnerable, creating practical challenges for developers who would waste time investigating false alarms.
-
Hybrid approaches and validation are necessary safeguards: The researchers found that combining AI models with validation procedures and ensemble learning methods helps reduce false positives, suggesting that AI vulnerability detection works best as part of a broader verification system rather than as a standalone tool.
-
AI solutions can generalize across programming languages: The study shows that properly trained models can detect vulnerabilities across different programming languages and vulnerability types, which is valuable since real-world codebases often mix multiple languages.
-
Explainability matters for trustworthy deployment: The methodology explicitly incorporates explainable AI techniques, recognizing that security professionals need to understand why a model flagged code as vulnerable before acting on those recommendations—a critical requirement for responsible AI in high-stakes security applications.