[Paper Review] Transfer-Learning Oriented Class Imbalance Learning for Cross-Project Defect Prediction
This paper proposes TOMOFWTNB, a transfer-learning-oriented approach for cross-project defect prediction that addresses class imbalance and feature importance simultaneously. By introducing a novel minority over-sampling technique (TOMO) that reduces distribution differences between source and target projects and integrating feature weighting into a naive Bayes classifier, the method improves G-Measure by at least 27.8% and MCC by at least 71.5% over state-of-the-art methods.
Cross-project defect prediction (CPDP) aims to predict defects of projects lacking training data by using prediction models trained on historical defect data from other projects. However, since the distribution differences between datasets from different projects, it is still a challenge to build high-quality CPDP models. Unfortunately, class imbalanced nature of software defect datasets further increases the difficulty. In this paper, we propose a transferlearning oriented minority over-sampling technique (TOMO) based feature weighting transfer naive Bayes (FWTNB) approach (TOMOFWTNB) for CPDP by considering both classimbalance and feature importance problems. Differing from traditional over-sampling techniques, TOMO not only can balance the data but reduce the distribution difference. And then FWTNB is used to further increase the similarity of two distributions. Experiments are performed on 11 public defect datasets. The experimental results show that (1) TOMO improves the average G-Measure by 23.7\%$\sim$41.8\%, and the average MCC by 54.2\%$\sim$77.8\%. (2) feature weighting (FW) strategy improves the average G-Measure by 11\%, and the average MCC by 29.2\%. (3) TOMOFWTNB improves the average G-Measure value by at least 27.8\%, and the average MCC value by at least 71.5\%, compared with existing state-of-theart CPDP approaches. It can be concluded that (1) TOMO is very effective for addressing class-imbalance problem in CPDP scenario; (2) our FW strategy is helpful for CPDP; (3) TOMOFWTNB outperforms previous state-of-the-art CPDP approaches.
Motivation & Objective
- To address the challenge of class imbalance in cross-project defect prediction (CPDP), where target projects often have far fewer defect instances than non-defects.
- To reduce the distribution shift between source and target projects, which hinders effective transfer learning in CPDP.
- To improve prediction performance by jointly considering feature importance and data imbalance in transfer learning.
- To develop a method that outperforms existing state-of-the-art CPDP approaches in terms of G-Measure and Matthews Correlation Coefficient (MCC).
Proposed method
- TOMO (Transfer-Learning Oriented Minority Over-sampling) is proposed to generate synthetic minority class samples in the target dataset by leveraging both source and target data distributions.
- The method computes a hybrid distance matrix combining distances from the target minority cluster centroid to source minority samples and to target minority samples, using a weighted average with coefficient λ.
- Nearest neighbors in the hybrid space are identified to guide synthetic sample generation, ensuring diversity and distributional alignment.
- Synthetic samples are generated via interpolation between a minority instance and its nearest neighbor in the hybrid space, with the number of samples adjusted to achieve a desired imbalance ratio.
- Feature weighting (FW) is applied to the naive Bayes classifier to emphasize more informative features, enhancing model robustness and generalization.
- The final FWTNB model is trained on the reweighted and balanced dataset, improving similarity between source and target distributions.
Experimental results
Research questions
- RQ1Can a transfer-learning-oriented over-sampling technique effectively reduce both class imbalance and distribution shift in cross-project defect prediction?
- RQ2Does incorporating feature weighting into the naive Bayes classifier improve prediction performance in CPDP scenarios?
- RQ3How does the proposed TOMOFWTNB method compare to existing state-of-the-art CPDP approaches in terms of G-Measure and MCC?
- RQ4To what extent does TOMO reduce the distribution difference between source and target datasets compared to traditional over-sampling methods?
Key findings
- TOMO improves the average G-Measure by 23.7% to 41.8% and the average MCC by 54.2% to 77.8% compared to baseline methods.
- The feature weighting (FW) strategy alone improves the average G-Measure by 11% and the average MCC by 29.2%.
- TOMOFWTNB achieves at least a 27.8% improvement in average G-Measure and at least a 71.5% improvement in average MCC over existing state-of-the-art CPDP approaches.
- The proposed method is highly effective in mitigating class imbalance in CPDP, especially when target datasets are severely imbalanced.
- The integration of feature weighting with TOMO significantly enhances model performance, indicating that feature importance is a critical factor in CPDP.
- The hybrid distance computation in TOMO successfully reduces distribution shift between source and target projects, improving transferability of learned models.
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.