Two-Phase Feature Optimization for Fast and Accurate Software Defect Prediction

In software defect prediction, improving model efficiency and training speed is as important as maintaining accuracy. Traditional machine learning and deep learning methods often rely on a large number of features, which can lead to excessive complexity and slower training times without providing significant gains in predictive power. These challenges are particularly prominent in complex software architectures, where understanding feature dependencies and interactions is critical for effective defect prediction. Reducing model complexity and enhancing training efficiency through the generation and analysis of feature interactions is therefore essential for optimizing performance. In this paper, we propose a two-phase training approach integrated with Synthetic Minority Over-sampling Technique (SMOTE) to address the inherent class imbalance in defect data. In the first phase, mutual information and Lasso regularization are applied to reduce feature redundancy, filtering out irrelevant features and retaining only those most predictive of defects. This streamlined feature extraction aggressively shrinks the feature space, directly reducing the overall model complexity. In the second phase, we focus on exploring multi-feature interactions by generating interaction terms using polynomial feature expansion. Subsequently, Partial Dependence Plots (PDP) are employed strictly as a post-hoc interpretability tool to visualize and validate the impact of these high-order relationships, ensuring the model captures essential feature synergies without altering original code semantics. Extensive experiments on the BugHunter dataset demonstrate the superiority of our approach. By explicitly decoupling offline feature preparation from online model fitting, we reveal that our dimensional reduction leads to a substantial 53.1% decrease in pure model fitting time for baseline classifiers like Logistic Regression. More importantly, comparative evaluations against classical baselines, including Principal Component Analysis (PCA) and tree-based feature importance, confirm that our method achieves an optimal balance between computational efficiency and predictive robustness. When applied to complex architectures such as Neural Networks, our selected feature subset attains a peak overall F1-Score of 0.786 and a Matthews Correlation Coefficient of 0.363. Furthermore, perturbation-based consistency evaluations demonstrate a 97% stability rate across iterations, proving that the extracted interactions represent robust architectural patterns rather than statistical anomalies. Ultimately, this method simplifies the model while preserving robust performance, making it more suitable for large-scale software defect prediction tasks, and contributing to both improved training efficiency and reliable defect prediction.

Authors

Institutions

Publication Details

Journal
International Journal of Software Engineering and Knowledge Engineering
Published
2026-07-17
DOI
https://doi.org/10.1142/s0218194026500592
Primary Topic
Software Engineering Research
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Two-Phase Feature Optimization for Fast and Accurate Software Defect Prediction

Weidong Wang, Shenghan Gao
International Journal of Software Engineering and Knowledge Engineering
Software Engineering Research
article

Two-Phase Feature Optimization for Fast and Accurate Software Defect Prediction

Weidong Wang, Shenghan Gao
article en

Abstract

In software defect prediction, improving model efficiency and training speed is as important as maintaining accuracy. Traditional machine learning and deep learning methods often rely on a large number of features, which can lead to excessive complexity and slower training times without providing significant gains in predictive power. These challenges are particularly prominent in complex software architectures, where understanding feature dependencies and interactions is critical for effective defect prediction. Reducing model complexity and enhancing training efficiency through the generation and analysis of feature interactions is therefore essential for optimizing performance. In this paper, we propose a two-phase training approach integrated with Synthetic Minority Over-sampling Technique (SMOTE) to address the inherent class imbalance in defect data. In the first phase, mutual information and Lasso regularization are applied to reduce feature redundancy, filtering out irrelevant features and retaining only those most predictive of defects. This streamlined feature extraction aggressively shrinks the feature space, directly reducing the overall model complexity. In the second phase, we focus on exploring multi-feature interactions by generating interaction terms using polynomial feature expansion. Subsequently, Partial Dependence Plots (PDP) are employed strictly as a post-hoc interpretability tool to visualize and validate the impact of these high-order relationships, ensuring the model captures essential feature synergies without altering original code semantics. Extensive experiments on the BugHunter dataset demonstrate the superiority of our approach. By explicitly decoupling offline feature preparation from online model fitting, we reveal that our dimensional reduction leads to a substantial 53.1% decrease in pure model fitting time for baseline classifiers like Logistic Regression. More importantly, comparative evaluations against classical baselines, including Principal Component Analysis (PCA) and tree-based feature importance, confirm that our method achieves an optimal balance between computational efficiency and predictive robustness. When applied to complex architectures such as Neural Networks, our selected feature subset attains a peak overall F1-Score of 0.786 and a Matthews Correlation Coefficient of 0.363. Furthermore, perturbation-based consistency evaluations demonstrate a 97% stability rate across iterations, proving that the extracted interactions represent robust architectural patterns rather than statistical anomalies. Ultimately, this method simplifies the model while preserving robust performance, making it more suitable for large-scale software defect prediction tasks, and contributing to both improved training efficiency and reliable defect prediction.

International Journal of Software Engineering and Knowledge Engineering
Twitter (United States) (US)
Openalex Percentile: Top 3%
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.