An Expectation-Based Scoring Approach for Explainable Software Defect Prediction

Published: 01 Jan 2026, Last Modified: 25 May 2026IEEE Transactions on ReliabilityEveryoneRevisionsCC BY-SA 4.0
Abstract: Explainability is a crucial aspect of practical defect prediction. Recently, model-agnostic explanation methods like LIME have been employed to explain individual predictions made by defect prediction models, providing the importance of each feature to a single prediction. However, the provided explanations are often inaccurate and even misleading. To this end, we propose an interpretable scoring approach for effort-aware defect prediction, named ScoringDP, to enhance its explainability. ScoringDP ranks software modules based on the scores assigned to them, which reflect their defect densities. The score of a module is calculated by adding up the scores assigned to its features, and each feature score represents the deviation between two values indicated by the corresponding feature value: the actual defect ratio and the expected defect ratio, which are statistically derived based on a defect dataset. For a given prediction, these feature scores directly serve as feature importance to the prediction, i.e., the explanations provided by ScoringDP are directly derived from its internal decision-making process. Such expectation-based direct explanations are more tangible for developers compared to post-hoc explanations resulting from model-agnostic explanation methods. Besides, ScoringDP achieves competitive prediction performance compared to state-of-the-art approaches for effort-aware defect prediction.
Loading