A Novel Adaptive Feature Selection and GAN Augmented Bidirectional LSTM Transformer Framework for Software Defect Prediction
Authors:
- Bhuvaneshwaran ABABhuvaneshwaran A
- Deisy CDCDeisy C
Preprint
- 12 August 2026
- preprint
- Published by Elsevier in SSRN Electronic Journal
Abstract
Background: Software Defect Prediction (SDP) is a pivotal quality assurance activity that identifies faultprone modules prior to testing, optimizing resource allocation and reducing maintenance costs. Despite substantial advances, existing methods suffer from three fundamental limitations: severe class imbalance in defect datasets, inadequate joint exploitation of temporal and contextual feature dependencies, and suboptimal generalization across heterogeneous software projects.Objective: This study aims to develop a novel four-phase framework, Proposed-Transformer, that synergistically addresses class imbalance, feature dependency exploitation, and cross-project generalization challenges in software defect prediction.Methods: The proposed framework integrates four core components: an Adaptive Feature Selection module (AFS-SHAP) for dimensionality reduction, a Defect-Conditional Wasserstein GAN (DC-GAN) for minority class augmentation, a Bidirectional LSTM encoder for capturing temporal patterns, and a Multi-head Self-Attention Transformer for modelling global contextual dependencies, culminating in a stacked ensemble meta-learner. The framework was evaluated on five NASA PROMISE benchmark datasets, namely CM1, JM1, KC1, PC1, and MC2. Performance was assessed using F1-Score, AUC-ROC, and Matthews Correlation Coefficient (MCC), and compared against multiple state-of-the-art competing methods. Ablation studies and hyperparameter analyses were also conducted to examine the individual and synergistic contribution of each component.Results: Experimental results demonstrate that the proposed framework achieves a mean F1-Score of 0.918, AUC-ROC of 0.967, and MCC of 0.877 across all benchmark datasets, outperforming the best competing method by statistically significant margins. Ablation studies and visualizations further confirm that each component contributes meaningfully to the overall performance, with synergistic gains observed when all modules are integrated.Conclusion: The proposed transformer framework effectively addresses the key limitations of existing software defect prediction methods by combining adaptive feature selection, generative data augmentation, sequential modelling, and attention-based context learning within a unified ensemble architecture. The results demonstrate superior and consistent predictive performance, offering a robust and practical solution for enhancing software quality assurance across diverse software projects.Keywords
This publication has 8 references indexed in Scilit:
- Deep Learning Architectures for Software Fault Prediction: The Impact of Error‐Type Metrics and Class ImbalanceConcurrency and Computation: Practice and Experience, 2025
- An ensemble model for addressing class imbalance and class overlap in software defect predictionInternational Journal of System Assurance Engineering and Management, 2024
- Effective data generation for imbalanced learning using conditional generative adversarial networksExpert Systems with Applications, 2018
- A Systematic Literature Review on Fault Prediction Performance in Software EngineeringIEEE Transactions on Software Engineering, 2011
- Predicting defect-prone software modules using support vector machinesJournal of Systems and Software, 2008
- Data Mining Static Code Attributes to Learn Defect PredictorsIEEE Transactions on Software Engineering, 2006
- SMOTE: Synthetic Minority Over-sampling TechniqueJournal of Artificial Intelligence Research, 2002
- Long Short-Term MemoryNeural Computation, 1997