Dynamic Feature-Aware Attention Fusion of DRN and Machine Learning Models for Software Defect Prediction

M. Murali Mohana Kumara Varma, M Giri

Abstract


Software Defect Prediction (SDP) is significant for making sure the software developed is of quality. This is achieved by detecting error-prone components early in the development process. This allows prioritizing testing and quality assurance efforts to minimize maintenance costs, to avoid system failures, and finally to ensure the delivery of a reliable software system. Traditional machine learning (ML) models and ensemble approaches such as soft voting and stacking have shown promise, yet often rely on static weighting strategies that fail to adapt to instance-specific variations. In order to overcome this limitation, they proposed a new Feature-Aware Attention-Based Fusion Model to learn the outputs of multiple base learners and a Deep Residual Network (DRN) based on a dynamic attention mechanism conditioned on the base model predictions and the original input features that allows the model to learn adaptive, instance-specific weights for making the final prediction. The approach incorporates a PSO-CSO hybrid feature selection strategy for dimensionality reduction and uses SMOTE for handling class imbalance. In the fusion layer, a context-aware attention mechanism dynamically integrates the base predictions with the outputs of the Deep Residual Network (DRN). Extensive experiments were conducted on five NASA benchmark datasets (PC5, PC1, KC1, KC2, JM1), and evaluated in comparison to the individual classifiers, soft voting, stacking, and the DRN with static attention. The Empirical evidence suggests that the proposed model outperformed all standard approaches, achieving an accuracy of 0.99, an F1-score of 0.99, a precision of 0.98, a recall of 0.9976, and an impressive ROC (Receiver Operating Characteristic)-AUC (Area Under the Curve) of 0.9992. The results indicate that combining the feature context with the model outputs using attention can form a robust and high-accuracy framework for SDP.


Full Text:

PDF

References


A. Ali, N. Khan, M. Abu-Tair, J. Noppen, S. McClean and I. McChesney, "Discriminating features-based cost-sensitive approach for software defect prediction." Automated Software Engineering, Vol.28, no. 2, p.11, 2021.

S. Haldar and L.F. Capretz, "Interpretable software maintenance and support effort prediction using machine learning." In Proceedings of the 2024 IEEE/ACM 46th International Conference on Software Engineering: Companion Proceedings, pp. 288-289. 2024.

K. Tanaka, A. Monden and Z. Yücel, "Prediction of software defects using automated machine learning." In 2019 20th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD), pp. 490-494. IEEE, 2019.

F. Matloob, T.M. Ghazal, N. Taleb, S. Aftab, M. Ahmad, M.A. Khan, S. Abbas and T.R. Soomro, "Software defect prediction using ensemble learning: A systematic literature review." IEEe Access, Vol. 9, pp. 98754-98771, 2021.

R.J. Jacob, R.J. Kamat, N.M. Sahithya, S.S. John and S.P. Shankar, "Voting based ensemble classification for software defect prediction." In 2021 IEEE Mysore Sub Section International Conference (MysuruCon), pp. 358-365. IEEE, 2021.

L. Chen, C. Wang and S. Song, "Software defect prediction based on nested-stacking and heterogeneous feature selection." Complex & Intelligent Systems, Vol. 8, no. 4, pp. 3333-3348, 2022.

G. Giray, K.E. Bennin, Ö. Köksal, Ö. Babur and B. Tekinerdogan, "On the use of deep learning in software defect prediction." Journal of Systems and Software, Vol.195, p. 111537, 2023.

M.A. Khan, N.S. Elmitwally, S. Abbas, S. Aftab, M. Ahmad, M. Fayaz and F. Khan, "Software defect prediction using artificial neural networks: A systematic literature review." Scientific Programming, Vol. 2022, no. 1, p. 2117339, 2022.

M. Ali, T. Mazhar, A. Al-Rasheed, T. Shahzad, Y.Y. Ghadi and M.A. Khan, "Enhancing software defect prediction: a framework with improved feature selection and ensemble machine learning." PeerJ Computer Science, Vol. 10, p. e1860, 2024.

W. Albattah and M. Alzahrani, "Software Defect Prediction Based on Machine Learning and Deep Learning Techniques: An Empirical Approach." AI, Vol. 5, no. 4, pp. 1743-1758, 2024.

Á.J. Sánchez-García, X. Limon, S. Dominguez-Isidro, D.J. Olvera-Villeda and J.C. Perez-Arriaga, "Class Balancing Approaches to Improve for Software Defect Prediction Estimations: A Comparative Study." Programming and Computer Software, Vol. 50, no. 8, pp. 621-647, 2024.

V. Yakovyna and O. Nesterchuk, "Cross-Project Software Defect Prediction Using Ensemble Model with Individual Data Balancing and Feature Selection." In International Conference on Advances in Mobile Computing and Multimedia Intelligence, pp. 161-175. Cham: Springer Nature Switzerland, 2024.

E.N. Akimova, A.Y. Bersenev, A.A. Deikov, K.S. Kobylkin, A.V. Konygin, I.P. Mezentsev and V.E. Misilov, "A survey on software defect prediction using deep learning." Vol. 9, No.11, p. 1180, 2021.

A.T. Elbosaty, W.M. Abdelmoez and E. Elfakharany, "Within-Project Defect Prediction Using Improved CNN Model via Extracting the Source Code Features." In 2022 International Arab Conference on Information Technology (ACIT), pp. 1-8. IEEE, 2022.

W. Zhuang, H. Wang and X. Zhang, "Just-in-time defect prediction based on AST change embedding." Knowledge-Based Systems, Vol. 248, p.108852, 2022.

N.A.A Khleel and K. Nehéz, "A novel approach for software defect prediction using CNN and GRU based on SMOTE Tomek method." Journal of Intelligent Information Systems, Vol. 60, no. 3, pp. 673-707, 2023.

K. Rajnish and V. Bhattacharjee, "A cognitive and neural network approach for software defect prediction." Journal of Intelligent & Fuzzy Systems, Vol. 43, no. 5, pp. 6477-6503, 2022.

R.B. Bahaweres, D. Jumral, I. Hermadi, A.I. Suroso and Y. Arkeman, "Hybrid software defect prediction based on LSTM (long short term memory) and word embedding." In 2021 2nd International Conference On Smart Cities, Automation & Intelligent Computing Systems (ICON-SONICS), pp. 70-75. IEEE, 2021.

N.A.A Khleel and K. Nehéz, "Software defect prediction using a bidirectional LSTM network combined with oversampling techniques." Cluster Computing, Vol. 27, no. 3, pp. 3615-3638, 2024.

H. Wang, W. Zhuang and X. Zhang, "Software defect prediction based on gated hierarchical LSTMs." IEEE Transactions on Reliability, Vol. 70, no. 2, pp. 711-727, 2021.

H. Bandhu, A. Ali, S. McClean, H. Ullah, M. Abu-Tair, A. Ziolkowski and J. Noppen, "TML: A Transformer-Based Meta-Learning Framework for Cross-Project Software Defect Prediction." (2024).

F. Matloob, T.M. Ghazal, N. Taleb, S. Aftab, M. Ahmad, M.A. Khan, S. Abbas and T.R. Soomro, "Software defect prediction using ensemble learning: A systematic literature review." IEEe Access, Vol. 9, pp. 98754-98771, 2021.

H. Yang and M. Li, "Software defect prediction based on SMOTE-Tomek and XGBoost." In International Conference on Bio-Inspired Computing: Theories and Applications, pp. 12-31. Singapore: Springer Singapore, 2021.

T.Y. Yu, C.Y. Huang, and N.C. Fang, "Use of deep learning model with attention mechanism for software fault prediction." In 2021 8th international conference on dependable systems and their applications (DSA), pp. 161-171. IEEE, 2021.

S. Qiu, B.E and J. He, "Features extraction and fusion by attention mechanism for software defect prediction." PloS one, Vol. 20, no. 4, p. e0320808, 2025.

P. Dhavakumar and S. Vengadeswaran, "Software Defect Prediction using Graph Sample and Aggregate-Attention Network optimized with Nomadic People optimizer for Enhancing the Software Reliability." Computer Standards & Interfaces, Vol.95, p.104033, 2025.




DOI: https://doi.org/10.31449/inf.v49i32.12139

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.