An Adaptive Cluster-Guided Ensemble Learning Framework for Robust software defect prediction and Overfitting Mitigation
Keywords:
Prediction, Ensemble Learning, Adaptive Clustering, Overfitting Mitigation, Tabular Foundation ModelAbstract
Software defect prediction (SDP) improves testing efficiency, maintenance planning, and quality assurance by identifying fault-prone modules before deployment. However, existing approaches often struggle with heterogeneous software modules, redundant correlated metrics, class-imbalanced defect data, and overfitting caused by excessive adaptation to training observations, which limit generalization to unseen modules. To address these challenges, this paper proposes an Adaptive Cluster-Guided Ensemble Learning Framework (ACGELFW) built around the Mitra-v2 tabular foundation model. The framework preprocesses software-metric data and applies correlation-based feature optimization to obtain a compact, non-redundant representation. Adaptive K-Means clustering, guided by silhouette analysis, groups structurally similar software modules, and the resulting cluster identity is supplied as contextual information to a shared Mitra-v2 model for defect probability estimation. Overfitting is controlled through L2 regularization, validation-based early stopping, and stratified partitioning across training, validation, and test sets. Cluster-level predictions are combined using validation-derived weights to produce an aggregated defect probability, thresholded for final binary classification. Experiments on a combined dataset of 14,625 software modules from JM1, KC1, CM1, KC2, and PC1 show that silhouette analysis identifies four homogeneous clusters, while feature optimization reduces the metric set from 20 to 15 attributes. The proposed framework achieves a testing accuracy of 97.64%, precision of 97.51%, recall of 97.82%, F1-score of 97.66%, MCC of 95.31%, ROC-AUC of 98.18%, and PR-AUC of 97.94%, outperforming Random Forest, PCA-LDA with IMJAYA-ELM, and Bi-LSTM baselines. These findings confirm that combining adaptive clustering with a single shared foundation model yields robust, generalizable defect predictions without requiring separate classifiers for each module group.
Downloads
Downloads
Published
Issue
Section
License
You are free to:
- Share — copy and redistribute the material in any medium or format for any purpose, even commercially.
- Adapt — remix, transform, and build upon the material for any purpose, even commercially.
- The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
- Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made . You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation .
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.

