PyExplainer: explaining the predictions of Just-In-Time defect models

Chanathip Pornprasit, Chakkrit Tantithamthavorn, Jirayus Jiarpakdee, Michael Fu, Patanamon Thongtanunam

Research output: Chapter in Book/Report/Conference proceedingConference PaperResearchpeer-review

13 Citations (Scopus)

Abstract

Just-In-Time (JIT) defect prediction (i.e., an AI/ML model to predict defect-introducing commits) is proposed to help developers prioritize their limited Software Quality Assurance (SQA) resources on the most risky commits. However, the explainability of JIT defect models remains largely unexplored (i.e., practitioners still do not know why a commit is predicted as defect-introducing). Recently, LIME has been used to generate explanations for any AI/ML models. However, the random perturbation approach used by LIME to generate synthetic neighbors is still suboptimal, i.e., generating synthetic neighbors that may not be similar to an instance to be explained, producing low accuracy of the local models, leading to inaccurate explanations for just-in-time defect models. In this paper, we propose PyExplainer - i.e., a local rule-based model-agnostic technique for generating explanations (i.e., why a commit is predicted as defective) of JIT defect models. Through a case study of two open-source software projects, we find that our PyExplainer produces (1) synthetic neighbors that are 41%-45% more similar to an instance to be explained; (2) 18%-38% more accurate local models; and (3) explanations that are 69%-98% more unique and 17%-54% more consistent with the actual characteristics of defect-introducing commits in the future than LIME (a state-ofthe-art model-agnostic technique). This could help practitioners focus on the most important aspects of the commits to mitigate the risk of being defect-introducing. Thus, the contributions of this paper build an important step towards Explainable AI for Software Engineering, making software analytics more explainable and actionable. Finally, we publish our PyExplainer as a Python package to support practitioners and researchers (https://github.com/awsm-research/PyExplainer).

Original languageEnglish
Title of host publicationProceedings - 2021 36th IEEE/ACM International Conference on Automated Software Engineering, ASE 2021
EditorsDan Hao, Denys Poshyvanyk
Place of PublicationPiscataway NJ USA
PublisherIEEE, Institute of Electrical and Electronics Engineers
Pages407-418
Number of pages12
ISBN (Electronic)9781665403375
ISBN (Print)9781665447843
DOIs
Publication statusPublished - 2021
EventInternational Conference on Automated Software Engineering 2021 - Online, Australia
Duration: 15 Nov 202119 Nov 2021
Conference number: 36th
https://ieeexplore.ieee.org/xpl/conhome/9678507/proceeding (Website)

Publication series

NameProceedings - 2021 36th IEEE/ACM International Conference on Automated Software Engineering, ASE 2021
PublisherIEEE, Institute of Electrical and Electronics Engineers
ISSN (Print)1938-4300
ISSN (Electronic)2643-1572

Conference

ConferenceInternational Conference on Automated Software Engineering 2021
Abbreviated titleASE 2021
Country/TerritoryAustralia
Period15/11/2119/11/21
Internet address

Keywords

  • Explainable AI
  • Explainable Software Analytics
  • Just-In-Time Defect Prediction

Cite this