[Paper Review] Explainable Software Defect Prediction: Are We There Yet?
This study investigates the reliability and stability of model-agnostic explanation techniques—LIME and BreakDown—in software defect prediction across varying data sampling, machine learning classifiers, and prediction scenarios. Results show inconsistent explanations across settings and failure to reflect root causes, challenging the practical usability of these techniques despite prior claims of effectiveness.
Explaining the prediction results of software defect prediction models is a challenging while practical task, which can provide useful information for developers to understand and fix the predicted bugs. To address this issue, recently, Jiarpakdee et al. proposed to use {two state-of-the-art} model-agnostic techniques (i.e., LIME and BreakDown) to explain the prediction results of bug prediction models. Their experiments show these tools can generate promising results and the generated explanations can assist developers understand the prediction results. However, the fact that LIME and BreakDown were only examined on a single software defect prediction model setting calls into question about their consistency and reliability across software defect prediction models with various settings. In this paper, we set out to investigate the consistency and reliability of model-agnostic technique based explanation generation approaches (i.e., LIME and BreakDown) on software defect prediction models with different settings , e.g., different data sampling techniques, different machine learning classifiers, and different prediction scenarios. Specifically, we use both LIME and BreakDown to generate explanations for the same instance under software defect prediction models with different settings and then check the consistency of the generated explanations for the instance. We reused the same defect data from Jiarpakdee et al. in our experiments. The results show that both LIME and BreakDown generate inconsistent explanations under different software defect prediction settings for the same test instances, which makes them unreliable for explanation generation. Overall, with this study, we call for more research in explainable software defect prediction towards achieving consistent and reliable explanation generation.
Motivation & Objective
- To assess the reliability and stability of model-agnostic explanation techniques (LIME and BreakDown) in software defect prediction under diverse modeling settings.
- To investigate whether explanations remain consistent when defect prediction models are built with different data sampling techniques, classifiers, and prediction scenarios.
- To evaluate whether the generated explanations reflect the actual root causes of defects, as opposed to superficial or spurious feature contributions.
- To challenge the practical validity of prior claims that LIME and BreakDown provide actionable and trustworthy explanations for developers.
- To call for more rigorous evaluation of explanation techniques and development of more reliable methods for explainable software defect prediction.
Proposed method
- Reused the same defect dataset from Jiarpakdee et al. [1], comprising 32 versions of file-level defect data from nine large-scale open-source Java projects.
- Applied LIME and BreakDown to generate instance-level explanations for the same test instances across multiple defect prediction models with varying settings.
- Systematically varied three key settings: data sampling techniques (five methods), machine learning classifiers (six models), and prediction scenarios (cross-version and cross-project).
- Measured explanation consistency by comparing feature importance rankings across different model configurations for the same instance.
- Conducted manual analysis on a subset of instances to assess whether generated explanations align with actual root causes of defects.
- Used both quantitative consistency checks and qualitative manual inspection to evaluate the reliability and usefulness of explanations.
Experimental results
Research questions
- RQ1How consistent are the explanations generated by LIME and BreakDown when defect prediction models are built with different data sampling techniques?
- RQ2How stable are the explanations across different machine learning classifiers used in defect prediction models?
- RQ3How do explanation outputs vary across different prediction scenarios (e.g., cross-version vs. cross-project) in defect prediction?
- RQ4To what extent do the generated explanations reflect the actual root causes of the predicted defects, as determined by manual inspection?
- RQ5Are model-agnostic explanation techniques like LIME and BreakDown reliable and stable enough for practical use in software defect prediction?
Key findings
- LIME and BreakDown generate significantly inconsistent explanations across different defect prediction settings, including varying data sampling techniques, classifiers, and prediction scenarios.
- The inconsistency in feature importance rankings undermines the reliability of explanations, making them unsuitable for consistent decision support in practice.
- Manual analysis confirmed that none of the generated explanations accurately reflect the true root causes of the predicted defects.
- The study contradicts prior claims that LIME and BreakDown produce actionable and insightful explanations, as the explanations often highlight irrelevant or spurious features.
- The findings suggest that model-agnostic explanation techniques are neither reliable nor stable for use in real-world software defect prediction systems.
- The results call for a re-evaluation of existing model-agnostic approaches and emphasize the need for more robust, trustworthy explanation methods in software engineering.
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.