[Paper Review] The Impact of Class Rebalancing Techniques on the Performance and Interpretation of Defect Prediction Models
This study investigates the impact of four class rebalancing techniques—oversampling, undersampling, SMOTE, and ROSE—on defect prediction models across 101 software datasets. It finds that rebalancing significantly improves recall but harms model interpretability, while AUC remains unaffected, leading the authors to recommend AUC as a standard performance metric and caution against rebalancing when deriving actionable insights from models.
Defect prediction models that are trained on class imbalanced datasets (i.e., the proportion of defective and clean modules is not equally represented) are highly susceptible to produce inaccurate prediction models. Prior research compares the impact of class rebalancing techniques on the performance of defect prediction models. Prior research efforts arrive at contradictory conclusions due to the use of different choice of datasets, classification techniques, and performance measures. Such contradictory conclusions make it hard to derive practical guidelines for whether class rebalancing techniques should be applied in the context of defect prediction models. In this paper, we investigate the impact of 4 popularly-used class rebalancing techniques on 10 commonly-used performance measures and the interpretation of defect prediction models. We also construct statistical models to better understand in which experimental design settings that class rebalancing techniques are beneficial for defect prediction models. Through a case study of 101 datasets that span across proprietary and open-source systems, we recommend that class rebalancing techniques are necessary when quality assurance teams wish to increase the completeness of identifying software defects (i.e., Recall). However, class rebalancing techniques should be avoided when interpreting defect prediction models. We also find that class rebalancing techniques do not impact the AUC measure. Hence, AUC should be used as a standard measure when comparing defect prediction models.
Motivation & Objective
- To resolve contradictory findings in prior research on class rebalancing in defect prediction by conducting a large-scale empirical study.
- To examine how rebalancing affects both performance and interpretability of defect prediction models across diverse datasets and classifiers.
- To identify experimental conditions under which rebalancing provides measurable benefits or drawbacks.
- To provide actionable guidelines for practitioners and researchers on when and how to apply rebalancing techniques.
Proposed method
- The study evaluates four rebalancing techniques: oversampling, undersampling, SMOTE, and ROSE on 101 defect prediction datasets from open-source and proprietary systems.
- Defect prediction models are trained using seven classification algorithms: random forest, logistic regression, naive Bayes, AVNNet, C5.0, xGBTree, and GBM.
- Performance is measured using 10 metrics: three threshold-independent (e.g., AUC) and seven threshold-dependent (e.g., precision, recall, F-measure).
- Statistical models are constructed to analyze the relationship between experimental settings (e.g., dataset imbalance, dimensionality) and model performance/interpretability.
- The SMOTE parameter k is tested at k=5 and k=14 to assess sensitivity, with no significant difference found in results.
- Interpretability is assessed by comparing the top-ranked features in baseline and rebalanced models to detect concept drift.
Experimental results
Research questions
- RQ1How do different class rebalancing techniques affect the performance of defect prediction models across various datasets and classifiers?
- RQ2To what extent does class rebalancing impact the interpretability of defect prediction models, particularly in terms of feature importance shifts?
- RQ3Which performance measures are sensitive to rebalancing, and which remain invariant, especially AUC?
- RQ4Under what experimental conditions (e.g., dataset imbalance, dimensionality) is rebalancing most beneficial for improving recall?
- RQ5How does the choice of classification algorithm moderate the impact of rebalancing on performance and interpretability?
Key findings
- Only 8% of defect prediction datasets have a defective ratio between 45% and 55%, indicating widespread class imbalance in real-world software systems.
- The AUC measure is not significantly affected by any of the four rebalancing techniques, contradicting findings in general machine learning literature.
- Class rebalancing techniques improve recall the most, but reduce precision the most, indicating a trade-off between completeness and accuracy.
- The largest performance gains occur when using undersampling with logistic regression on highly imbalanced, low-dimensional datasets.
- Interpretability is significantly degraded: only 23%-34% of top features in rebalanced models using neural networks overlap with baseline models, and 55%-62% for logistic regression.
- For random forest models, 68%-71% of top features in rebalanced models are not in the top rank of baseline models, indicating substantial concept drift.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.