Skip to main content

Advertisement

Log in

Exploring Root Causes of CNN-Based Image Classifier Failures Using 3-Nearest Neighbors

  • Original Research
  • Published:
SN Computer Science Aims and scope Submit manuscript

Abstract

The black-box characteristics of deep learning models make it imperative to explain decision-making mechanisms of these models in a way that humans can understand or interpret. This requirement has become more important as artificial intelligence-based applications take increasingly more critical roles in our lives. To this end, we, in this study, develop a model-agnostic post-hoc explanation method that brings explanations such as underfitting, overfitting, or outlier particularly about the possible root cause of inaccurate decisions produced by convolutional neural network (CNN) based image classification models. Our approach relies on analysis of the model’s response to the k-nearest neighbors in training dataset of the mispredicted test instance. To find visually and semantically similar images in the process of extracting k-nearest neighbors, we measure the distance between the features extracted from internal layers of the model. For the experimental analysis, we first build several underfitted, overfitted and well-fitted CNN models for MNIST and CIFAR-10 datasets. Then, for each different model, we identify the mispredicted test samples in these datasets, and extract their 3-nearest neighbors from the related training sets. We feed the extracted 3-nearest neighbors into the associated model and perform both sample-based and statistical post-hoc explanation for the inaccurately predicted test samples based on the models’ responses to the 3-nearest neighbors.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

Explore related subjects

Discover the latest articles and news from researchers in related subjects, suggested using machine learning.

References

  1. Arrieta AB, 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, et al. Explainable artificial intelligence (xai): concepts, taxonomies, opportunities and challenges toward responsible ai. Inf Fusion. 2020;58:82–115.

    Article  Google Scholar 

  2. Barbado A, Corcho Ó. Rule extraction in unsupervised anomaly detection for model explainability: application to oneclass svm. arXiv preprintarXiv:1911.09315; 2019.

  3. Bien J, Tibshirani R. Prototype selection for interpretable classification. Ann Appl Stat. 2011;2011:2403–24.

    MathSciNet  MATH  Google Scholar 

  4. Bilgin Z. Code2image: intelligent code analysis by computer vision techniques and application to vulnerability prediction. arXiv preprint arXiv:2105.03131; 2021.

  5. Bilgin Z, Gunestas M. Explaining inaccurate predictions of models through k-nearest neighbors. ICAART. 2021;2:228–36.

    Google Scholar 

  6. Bologna G. A simple convolutional neural network with rule extraction. Appl Sci. 2019;9(12):2411.

    Article  Google Scholar 

  7. Bologna G, Fossati S. A two-step rule-extraction technique for a CNN. Electronics. 2020;9(6):990.

    Article  Google Scholar 

  8. Bologna G, Hayashi Y. Characterization of symbolic rules embedded in deep dimlp networks: a challenge to transparency of deep learning. J Artif Intell Soft Comput Res. 2017;7(4):265–86.

    Article  Google Scholar 

  9. Caruana R, Kangarloo H, Dionisio J, Sinha U, Johnson D. Case-based explanation of non-case-based learning methods. In: Proceedings of the AMIA symposium. 1999. 212. American Medical Informatics Association.

  10. Castelvecchi D. Can we open the black box of ai? Nat News. 2016;538(7623):20.

    Article  Google Scholar 

  11. Chakraborti T, Sreedharan S, Kambhampati S. The emerging landscape of explainable ai planning and decision making. arXiv preprint arXiv:2002.11697; 2020.

  12. Cui X, Lee JM, Hsieh J. An integrative 3c evaluation framework for explainable artificial intelligence. 2019.

  13. Das A, Rad P. Opportunities and challenges in explainable artificial intelligence (xai): a survey. arXiv preprint arXiv:2006.11371; 2020.

  14. Goodman B, Flaxman S. European union regulations on algorithmic decision-making and a“right to explanation’’. AI Mag. 2017;38(3):50–7.

    Google Scholar 

  15. Gryz J, Rojszczak M. Black box algorithms and the rights of individuals: no easy solution to the “explainability’’ problem. Internet Policy Rev. 2021;10(2):1–24.

    Article  Google Scholar 

  16. Gunning D, Aha DW. Darpa’s explainable artificial intelligence program. AI Mag. 2019;40(2):44–58.

    Google Scholar 

  17. Hall P. On the art and science of machine learning explanations. arXiv preprint arXiv:1810.02909; 2018.

  18. Hendricks LA, Akata Z, Rohrbach M, Donahue J, Schiele B, Darrell T. Generating visual explanations. In: European conference on computer vision, p. 3–19. Springer; 2016.

  19. Holzinger A, Langs G, Denk H, Zatloukal K, Müller H. Causability and explainability of artificial intelligence in medicine. Wiley Interdiscipl Rev Data Min Knowl Discov. 2019;9(4):e1312.

    Google Scholar 

  20. Kenny EM, Ford C, Quinn M, Keane MT. Explaining black-box classifiers using post-hoc explanations-by-example: the effect of explanations and error-rates in xai user studies. Artif Intell. 2021;294:103459.

    Article  MathSciNet  MATH  Google Scholar 

  21. Krizhevsky A, Hinton G, et al. Learning multiple layers of features from tiny images. 2009.

  22. Kundu S. Ai in medicine must be explainable. Nat Med. 2021; 1–1.

  23. LeCun Y, Cortes C, Burges C. Mnist handwritten digit database. ATT Labs (online). http://yann.lecun.com/exdb/mnist. 2010;2.

  24. Li O, Liu H, Chen C, Rudin C. Deep learning for case-based reasoning through prototypes: a neural network that explains its predictions. In: Thirty-second AAAI conference on artificial intelligence. 2018.

  25. Lipton ZC. The mythos of model interpretability. Queue. 2018;16(3):31–57.

    Article  Google Scholar 

  26. Papernot N, McDaniel P. Deep k-nearest neighbors: towards confident, interpretable and robust deep learning. arXiv preprint arXiv:1803.04765; 2018.

  27. Paredes JN, Teze JCL, Simari GI, Martinez MV. On the importance of domain-specific explanations in ai-based cybersecurity systems (technical report). arXiv preprint arXiv:2108.02006; 2021.

  28. Petkovic D, Altman RB, Wong M, Vigil A. Improving the explainability of random forest classifier-user centered approach. In: PSB. 2018. p. 204–215. World Scientific.

  29. Rai A. Explainable AI: from black box to glass box. J Acad Market Sci. 2020;48(1):137–41.

    Article  Google Scholar 

  30. Ribeiro MT, Singh S, Guestrin C. 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. 2016. p. 1135–1144.

  31. Roscher R, Bohn B, Duarte MF, Garcke J. Explainable machine learning for scientific insights and discoveries. IEEE Access. 2020;8:42200–16.

    Article  Google Scholar 

  32. Tjoa E, Guan C. A survey on explainable artificial intelligence (XAI): towards medical XAI. arXiv preprint arXiv:1907.07374. 2019.

  33. Turk G, Ozdemir M, Zeydan R, Turk Y, Bilgin Z, Zeydan E. On the identification of thyroid nodules using semi-supervised deep learning. Int J Numer Methods Biomed Eng. 2021;37(3):e3433.

    Article  MathSciNet  Google Scholar 

  34. Vilone G, Rizzo L, Longo L. A comparative analysis of rule-based, model-agnostic methods for explainable artificial intelligence. 2020.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zeki Bilgin.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This article is part of the topical collection “Agents and Artificial Intelligence” guest edited by Jaap van den Herik, Ana Paula Rocha and Luc Steels.

Rights and permissions

Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Bilgin, Z., Gunestas, M. Exploring Root Causes of CNN-Based Image Classifier Failures Using 3-Nearest Neighbors. SN COMPUT. SCI. 3, 452 (2022). https://doi.org/10.1007/s42979-022-01360-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s42979-022-01360-1

Keywords