Article’s

An Explainable AI Framework for Bug Prediction and Pedagogical Feedback in Student Code

Kushagra Mani Tripathi

(06 – 2026)

DOI: 10.5281/zenodo.20609399

 

The traditional software bug prediction model is a black-box model which does not provide any clarity on the reason behind the predicted outcome. This proposed research work makes use of a state-of-the-art technology called Explainable Artificial Intelligence (XAI), which combines the machine learning model of bug predictions with the Self-Explainable Technique of SHapley Additive exPlanations (SHAP) to produce a model which helps in generating a clear and pedagogy-friendly result set for the student-written code. The model comprises a total of five different blocks. They are Code Acquisition, Radon library-based Code Characterization Metric set of 11 metrics, Bug Prediction model based on the XGBoost algorithm, Tree-based SHAP Technique-based Explanation model, and the result set generation model called the Pedagogy Feedback model. This proposed model helps to provide a real-time result explanation model incorporating all the necessary metrics like the Cyclomatic complexity, Halstead measures of Volume, Difficulty, Effort, Maintains the values of the code index, and code structure. This proposed model achieves a result of 84.7% accuracy with a correct explanation model value of 0.83. Preliminary findings demonstrate the effectiveness of the new approach in improving the efficiency of student debugging and understanding, making it an important improvement over defect prediction tools.

 

 

Scroll to Top