MACD: Source Code Vulnerability Detection Method Integrating Mamba and Attention
With the rapid development of information technology, software security has become increasingly critical. Source code vulnerability detection is essential for maintaining system stability and data security. While deep learning has shown promise through advances in code representation and pre-trained models, existing RNNs struggle with long-range dependencies, and Transformers, though powerful, are resource-intensive. To address these issues, this paper proposes a vulnerability detection method that integrates Mamba with self-attention. The approach uses BPE tokenizer, embeds code semantics, and extracts features via a Mamba-enhanced encoder with multi-head attention, ultimately predicting vulnerabilities accurately. Experiments show the model achieves strong performance across accuracy, F1 score, precision, and recall, combining high effectiveness with efficient inference.
Institutions
- Shandong University of Science and Technology (CN)
Publication Details
- Published
- 2025-07-18
- DOI
- https://doi.org/10.1109/ecnct66493.2025.11172583
- Primary Topic
- Banking stability, regulation, efficiency
- Type
- article
- Field-Weighted Citation Impact
- 0.00