A Cross-Attention Gating Mechanism-Based Multimodal Feature Fusion Method for Software Defect Prediction

3Citations
Citations of this article
14Readers
Mendeley users who have this article in their library.

Abstract

Early software defect prediction research primarily relied on software metric features. However, such features struggle to fully capture semantic information in source code. Consequently, methods based on semantic features have gradually become mainstream. Nevertheless, the empirical value of traditional metric features remains significant. To address this, this paper proposes a multi-modal feature fusion method based on a cross-attention gating mechanism for software defect prediction (GMCA-SDP). This method aims to effectively fuse multiple modal features of source code to improve defect prediction performance. Unlike previous approaches, GMCA-SDP can simultaneously integrate traditional metric features and various code semantic features. During the feature fusion stage, it considers both the contribution differences among different types of features and the information interaction between modalities. This paper selects three types of modal features as input for GMCA-SDP: traditional metric features, semantic features extracted from the abstract syntax tree, and structural features extracted from the control flow graph. Our experiments on nine open-source projects demonstrate that the GMCA-SDP method outperforms six mainstream defect prediction models, with average improvements of 18.7% in F1, 10.9% in AUC, and 14.1% in G-mean.

Cite

CITATION STYLE

APA

Wang, R., & Liu, F. (2025). A Cross-Attention Gating Mechanism-Based Multimodal Feature Fusion Method for Software Defect Prediction. Applied Sciences (Switzerland), 15(20). https://doi.org/10.3390/app152011259

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free