Introduction
In modern software engineering, identifying modules likely to contain defects—referred to as "fault-proneness"—is critical for efficient resource allocation. Accurate software defect prediction (SDP) allows development teams to focus testing and quality assurance efforts where they are most needed. However, SDP faces two significant challenges: extreme class imbalance, where defective modules are rare compared to "clean" ones, and high dimensionality, where complex software metrics create a difficult feature space for traditional classifiers.
While ensemble methods like Random Forests have traditionally been employed, they often struggle to generalize across varying data distributions. This study investigates the potential of deep generative models, specifically Deep Belief Networks (DBN) and Stacked Sparse Auto-Encoders (SSAE), to learn more robust features and improve prediction accuracy.
Methodology and Experimental Framework
The researchers implemented a systematic pipeline to evaluate deep learning performance on software metrics. The process begins with data acquisition from 14 public NASA datasets, followed by a preprocessing stage utilizing Z-score normalization to standardize features. To ensure statistical validity, a 10-fold cross-validation strategy was employed.
Deep Learning Architectures
Two primary architectures were evaluated:
- Deep Belief Networks (DBN): Generative models composed of stacked Restricted Boltzmann Machines (RBM). They utilize unsupervised pre-training to capture data structure before supervised fine-tuning for classification.
- Stacked Sparse Auto-Encoders (SSAE): These models compress and reconstruct input data. By incorporating a sparsity constraint, SSAE is forced to identify the most salient, unique features, effectively serving as an automated feature extractor that ignores noise.
Performance Analysis and Key Results
The study utilized 14 NASA Metrics Data Program (MDP) datasets, covering projects in C, C++, Java, and Perl. These datasets represent a wide spectrum of project sizes and defect densities, providing a rigorous testing ground for the models.
Convergence and Accuracy
A key finding of the research is the trade-off between training speed and final error rates. While DBNs typically reached convergence faster, SSAEs consistently achieved lower final error rates across the majority of datasets. This suggests that the sparsity constraint in SSAEs allows for more refined feature discovery, albeit at the cost of additional training epochs.
Comparative Performance
SSAE emerged as the superior model, achieving the highest weighted rank across all 14 datasets. It outperformed established benchmarks, including the VOTE ensemble method, Support Vector Machines (SVM), and standard DBNs. Notably, on the PC1 dataset, SSAE reached a recall of 98% and an accuracy of 94%. The results indicate that SSAE possesses superior generalization ability, making it more reliable for unseen software projects.
Conclusion and Future Directions
The application of deep generative models, particularly Stacked Sparse Auto-Encoders, represents a significant advancement in software defect prediction. By leveraging automated feature extraction and sparsity constraints, these models effectively navigate high-dimensional software metrics.
However, data imbalance remains a persistent challenge. Both DBN and SSAE showed reduced performance on datasets with extremely low defect rates. Future research should explore data augmentation techniques to balance training sets and investigate alternative deep learning architectures to further enhance prediction capabilities on small-scale or highly imbalanced software projects.
Summary updated