Explainable AI for Software Engineering

Chakkrit Tantithamthavorn,Jirayus Jiarpakdee,John Grundy
DOI: https://doi.org/10.48550/arXiv.2012.01614
2020-12-03
Abstract:Artificial Intelligence/Machine Learning techniques have been widely used in software engineering to improve developer productivity, the quality of software systems, and decision-making. However, such AI/ML models for software engineering are still impractical, not explainable, and not actionable. These concerns often hinder the adoption of AI/ML models in software engineering practices. In this article, we first highlight the need for explainable AI in software engineering. Then, we summarize three successful case studies on how explainable AI techniques can be used to address the aforementioned challenges by making software defect prediction models more practical, explainable, and actionable.
Software Engineering,Artificial Intelligence,Computers and Society
What problem does this paper attempt to address?
The problems that this paper attempts to solve are several key challenges in applying artificial intelligence (AI) and machine learning (ML) techniques in software engineering, especially the inexplicability and inoperability of these techniques in practical applications. Specifically, the paper focuses on how to enhance the practicality, interpretability and operability of software defect prediction models through Explainable AI (XAI) techniques. ### Main problems: 1. **Lack of interpretability**: Current applications of AI/ML models in software engineering often fail to provide sufficient explanations, making it difficult for developers to understand the reasons behind model predictions. This leads to low trust in model predictions and affects the practical application of the models. 2. **Legal and ethical requirements**: According to the General Data Protection Regulation (GDPR) of the European Union, any decision affecting an individual or a group must be interpretable. However, existing software analysis systems often do not meet this requirement and pose privacy and ethical risks. 3. **Insufficient research**: Through the analysis of relevant literature, the author found that only a very small number of studies (about 5%) focus on using interpretable AI techniques to generate local explanations, indicating that this field is still in the preliminary research stage. ### Solutions: The paper shows how to use interpretable AI techniques to solve the above problems through three successful case studies: 1. **Fine - grained prediction**: By using LIME (Local Interpretable Model - agnostic Explanations) technique, it helps developers locate which lines of code are most likely to have defects, so as to allocate quality assurance resources more effectively. 2. **Interpret prediction results**: Also using the LIME technique, it provides detailed explanations for defect predictions of each file, helping developers understand why a certain file is predicted to be defective. 3. **Generate actionable guidance**: Through rule - based model interpretation techniques (such as LoRMikA), it provides specific quality improvement plan suggestions for managers, telling developers what they should and should not do to reduce the defect risk. ### Conclusion: The paper draws the conclusion through literature analysis and case studies that interpretable AI is very important in software engineering, but it is still in the early research stage at present. By introducing interpretable AI techniques, more reliable prediction explanations and actionable guidance can be provided for software engineering tasks, thereby improving the quality and reliability of software systems.