Explainable AI for Decision Support in Quality Inspection and Defect Classification Systems
Keywords:
explainable artificial intelligence; quality inspection; defect classification; cost-sensitive decision making; counterfactual explanations; uncertainty calibrationAbstract
Automated visual inspection increasingly relies on deep neural classifiers to identify surface defects, but high predictive accuracy alone does not provide the evidence that quality engineers need to accept, reject, rework, or escalate a part. The central problem addressed here is how explanation mechanisms can be coupled to cost-sensitive inspection decisions without overstating the reliability of post-hoc interpretability. This manuscript develops a methodological framework for explainable decision support in defect classification. The framework formulates inspection as a cost-sensitive decision problem, distinguishes predictive uncertainty from explanation uncertainty, and integrates local feature attribution, counterfactual explanation, and calibrated probability estimates into a human-in-the-loop workflow. A decision-theoretic formulation is used to show that explanation content should be evaluated against the action it is meant to support, not only against model fidelity. The analysis yields three defensible insights. First, attribution maps and counterfactuals answer different operator questions and should be combined selectively rather than presented as interchangeable evidence. Second, explanation stability and calibration are necessary boundary conditions for threshold-based acceptance rules because unstable explanations can induce inappropriate overrides. Third, decision-aligned evaluation requires joint assessment of predictive performance, explanation fidelity, action cost, and operator workload. The framework provides a principled basis for designing and auditing explainable inspection systems in manufacturing settings where defect costs are asymmetric and traceability is required.
References
1. Adadi, A., & Berrada, M. (2018). Peeking inside the black-box: A survey on Explainable Artificial Intelligence (XAI). IEEE Access, 6, 52138–52160.
2. Arrieta, A. B., Díaz-Rodríguez, N., Del Ser, J., Bennetot, A., Tabik, S., Barbado, A., García, S., Gil-López, S., Molina, D., Benjamins, R., Chatila, R., & Herrera, F. (2020). Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI. Information Fusion, 58, 82–115.
3. Czimmermann, T., Ciuti, G., Milazzo, M., Chiurazzi, M., Roccella, S., Oddo, C. M., & Dario, P. (2020). Visual-based defect detection and classification approaches for industrial applications—A survey. Sensors, 20(5), 1459.
4. Bergmann, P., Fauser, M., Sattlegger, D., & Steger, C. (2019). MVTec AD—A comprehensive real-world dataset for unsupervised anomaly detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (pp. 9592–9600).
5. Tabernik, D., Šela, S., Skvarč, J., & Skočaj, D. (2020). Segmentation-based deep-learning approach for surface-defect detection. Journal of Intelligent Manufacturing, 31(3), 759–776.
6. Ribeiro, M. T., Singh, S., & Guestrin, C. (2016). "Why should I trust you?" Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (pp. 1135–1144).
7. Lundberg, S. M., & Lee, S.-I. (2017). A unified approach to interpreting model predictions. In Advances in Neural Information Processing Systems 30 (pp. 4765–4774).
8. Wachter, S., Mittelstadt, B., & Russell, C. (2017). Counterfactual explanations without opening the black box: Automated decisions and the GDPR. Harvard Journal of Law & Technology, 31(2), 841–887.
9. Rudin, C. (2019). Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nature Machine Intelligence, 1(5), 206–215.
10. Letham, B., Rudin, C., McCormick, T. H., & Madigan, D. (2015). Interpretable classifiers using rules and Bayesian analysis: Building a better stroke prediction model. Annals of Applied Statistics, 9(3), 1350–1371.
11. Guo, C., Pleiss, G., Sun, Y., & Weinberger, K. Q. (2017). On calibration of modern neural networks. In Proceedings of the 34th International Conference on Machine Learning (pp. 1321–1330).
12. Kendall, A., & Gal, Y. (2017). What uncertainties do we need in Bayesian deep learning for computer vision? In Advances in Neural Information Processing Systems 30 (pp. 5574–5584).
13. Samek, W., Binder, A., Montavon, G., Lapuschkin, S., & Müller, K.-R. (2017). Evaluating the visualization of what a deep neural network has learned. IEEE Transactions on Neural Networks and Learning Systems, 28(11), 2660–2673.
14. Doshi-Velez, F., & Kim, B. (2017). Towards a rigorous science of interpretable machine learning. arXiv preprint arXiv:1702.08608.
15. Holzinger, A., Langs, G., Denk, H., Zatloukal, K., & Müller, H. (2019). Causability and explainability of artificial intelligence in medicine. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 9(4), e1312.
16. Luo, D., Gattas, J. M., & Tan, P. S. S. (2020, July). Real-time defect recognition and optimized decision making for structural timber jointing. In The International Conference on Computational Design and Robotic Fabrication (pp. 36-45). Singapore: Springer Singapore.
17. Miller, T. (2019). Explanation in artificial intelligence: Insights from the social sciences. Artificial Intelligence, 267, 1–38.
18. Lipton, Z. C. (2018). The mythos of model interpretability. Communications of the ACM, 61(10), 36–43.
19. Molnar, C. (2022). Interpretable machine learning (2nd ed.). Independently published.
20. Gunning, D., Stefik, M., Choi, J., Miller, T., Stumpf, S., & Yang, G.-Z. (2019). XAI—Explainable artificial intelligence. Science Robotics, 4(37), eaay7120.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Journal of Intelligent Engineering Systems

This work is licensed under a Creative Commons Attribution 4.0 International License.