Ensemble Machine Learning and Explainable AI for Defect Prediction in Safety-Critical Aerospace Software
摘要
Safety-critical software is software that, upon failure, may result in substantial harm, injury, or loss of life. The prediction of software defects is crucial to maintain the reliability of safety-critical systems, where undetected defects can lead to significant risks. Aerospace software is considered "safety critical" because its defects may cause catastrophic consequences. In this work, to identify software defects in safety-critical systems, the proposed approach employs a two-step prediction procedure. In the first step, six Machine Learning (ML) algorithms Random Forest (RF), XGBoost (XGB), Decision Tree (DT), Support Vector Machine (SVM), Nave Bayes (NB) and K-Nearest Neighbors (KNN) are used. In the subsequent phase, based on the individual model’s predictive accuracy, classifiers are combined into stacking, voting, and meta-ensemble frameworks to obtain the final predictions. This ensemble method improves the precision and reliability of software defect predictions. To mitigate class imbalance, the Synthetic Minority Oversampling Technique (SMOTE) is applied, ensuring better representation of minority class instances and improving classification performance. Twelve historical software defect datasets from the NASA MDP repository, CM1, MC1, MC2, JM1, MW1, KC1, KC3, PC1, PC2, PC3, PC4 and PC5, are used to develop and evaluate the proposed defect prediction system. Additionally, Explainable Artificial Intelligence (XAI) with Local Interpretable Model-agnostic Explanations (LIME) is utilized to interpret model decisions and identify significant software defect features. The experimental results indicate that the proposed framework achieves a maximum accuracy of 98.3%, thus demonstrating its effectiveness in accurately identifying software defects.