MARATTO

article

AI-Powered Vulnerability Detection in Code Using BERT-Based LLM with Transparency Measures

Abstract

Vulnerabilities in source code are major risk in software-intensive systems, making their effective detection essential. Artificial Intelligence (AI) supports this process by analyzing large datasets and identifying threat patterns. However, AI-based methods face challenges in handling big data and understanding context. This research introduces a novel approach to enhance transparency in vulnerability detection using BERT-based Large Language Models (LLMs), integrated with eXplainable AI (XAI) techniques like SHAP, LIME, and attention heatmaps. This architecture ensures transparency throughout the model's lifecycle. An experiment on a large source code dataset achieved 85% accuracy, with XAI tools highlighting influential tokens such as “vulnerable,” “function,” “mysql_tmpdir_list,” and “strmov.” Attention heatmaps also provided insights into token-level interactions, improving the interpretability of the model's decisions.

Research topics

  • Software Reliability and Analysis Research

Read the original research

This page summarises published work. The authoritative version sits with the publisher.

DOI: 10.1109/itc-egypt66095.2025.11186618

Is something wrong with this record? Report it or request removal.

Discussion

Discuss this research

Have you built on this work, tried to replicate it, or seen it applied in practice? Share what you know. Verified researchers and MARATTO™ domain experts can open a discussion, and any member can reply. Contributions are reviewed before they appear.

No discussion yet. Open the first thread.