Metric Information Mining with Metric Attention to Boost Software Defect Prediction Performance
33 Pages Posted: 4 Mar 2025
Abstract
In the field of software engineering, defect prediction has always been a popular research direction. Currently, the research on traditional software defect prediction mainly focuses on metric features, which are derived from various descriptive rules. Many researchers have proposed a large number of defect prediction models based on these metric features and various framework models. However, the problem of data scarcity has severely hindered the development of the field. Therefore, this work proposes a new method, namely the Metric Attention Module (MAM), which excavates the correlations within the metric data features, between features, within modules, and between modules. By learning new data representations, MAM guides the model’s learning process and ultimately improves the model’s performance without changing the network framework structure. Additionally, the method is interpretable.In this work, experiments were conducted in various task environments and on different datasets, all resulting in varying degrees of improvement. In the context of within-project defect prediction (WPDP), experiments with the MAM data model showed an average improvement of 11.5% in Accuracy, 12.6% in F1 score, 26.1% in AUC, and 58.2% in MCC. In cross-project defect prediction (CPDP), under more complex task environments, the model demonstrated excellent performance across multiple standard datasets. Compared to the baseline models and training results, the F1, Accuracy, and MCC scores improved by approximately 40%, 20%, and 50%, respectively.
Keywords: Software defects prediction, Feature selection, Feature transformation, Attention mechanism, Metric Data Mining
Suggested Citation: Suggested Citation