Skip to main content

Enclosing Prototypical Variational Autoencoder for Explainable Out-of-Distribution Detection

  • Conference paper
  • First Online:
Computer Safety, Reliability, and Security. SAFECOMP 2024 Workshops (SAFECOMP 2024)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14989))

Included in the following conference series:

  • 644 Accesses

Abstract

Understanding the decision-making and trusting the reliability of Deep Machine Learning Models is crucial for adopting such methods to safety-relevant applications which play an important role in the digitization of the railway system. We extend self-explainable Prototypical Variational models with autoencoder-based Out-of-Distribution (OOD) detection: A Variational Autoencoder is applied to learn a meaningful latent space which can be used for distance-based classification, likelihood estimation for OOD detection, and reconstruction. The In-Distribution (ID) region is defined by a Gaussian mixture distribution with learned prototypes representing the center of each mode. Furthermore, a novel restriction loss is introduced that promotes a compact ID region in the latent space without collapsing it into single points. The reconstructive capabilities of the Autoencoder ensure the explainability of the prototypes and the ID region of the classifier, further aiding the discrimination of OOD samples. Extensive evaluations on common OOD detection benchmarks as well as a large-scale dataset from a real-world railway application demonstrate the usefulness of the approach, outperforming previous methods.

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

Access this chapter

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

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

References

  1. Bercea, C., Rueckert, D., Schnabel, J.: What do we learn? Debunking the myth of unsupervised outlier detection. arXiv preprint arXiv:2206.03698 (2022)

  2. Chen, G., Peng, P., Wang, X., Tian, Y.: Adversarial reciprocal points learning for open set recognition. In: TPAMI, pp. 8065–8081 (2022)

    Google Scholar 

  3. Denouden, T., Salay, R., Czarnecki, K., Abdelzad, V., Phan, B., Vernekar, S.: Improving reconstruction autoencoder out-of-distribution detection with Mahalanobis distance. arXiv preprint arXiv:1812.02765 (2018)

  4. Digitale Schiene Deutschland: https://www.digitale-schiene-deutschland.de/en/. Accessed 07 Jun 2024

  5. Du, X., Gozum, G., Ming, Y., Li, Y.: Siren: shaping representations for detecting out-of-distribution objects. In: NeurIPS, vol. 35, pp. 20434–20449 (2022)

    Google Scholar 

  6. Fiack, A., Weller, F., Heimes, M., Laux, T.: Digitale Schiene Deutschland - Zukunftstechnologien für das Bahnsystem. EIK 2024 (2024)

    Google Scholar 

  7. Gal, Y., Ghahramani, Z.: Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. In: ICML, pp. 1050–1059 (2016)

    Google Scholar 

  8. Gautam, S., et al.: ProtoVAE: a trustworthy self-explainable prototypical variational model. In: NeurIPS, pp. 17940–17952 (2022)

    Google Scholar 

  9. Graham, M.S., Pinaya, W.H.L., Tudosiu, P.D., Nachev, P., Ourselin, S., Cardoso, M.J.: Denoising diffusion models for out-of-distribution detection. In: CVPR Workshops, pp. 2948–2957 (2023)

    Google Scholar 

  10. Guo, C., Pleiss, G., Sun, Y., Weinberger, K.Q.: On calibration of modern neural networks. In: ICML, pp. 1321–1330 (2017)

    Google Scholar 

  11. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: CVPR, pp. 770–778 (2016)

    Google Scholar 

  12. Hendrycks, D., et al.: Scaling out-of-distribution detection for real-world settings. In: ICML, pp. 8759–8773 (2022)

    Google Scholar 

  13. Hendrycks, D., Gimpel, K.: A baseline for detecting misclassified and out-of-distribution examples in neural networks. In: ICLR (2017)

    Google Scholar 

  14. Hendrycks, D., et al.: PixMix: dreamlike pictures comprehensively improve safety measures. In: CVPR, pp. 16762–16771 (2022)

    Google Scholar 

  15. Lakshminarayanan, B., Pritzel, A., Blundell, C.: Simple and scalable predictive uncertainty estimation using deep ensembles. In: NIPS, pp. 6405–6416 (2017)

    Google Scholar 

  16. Lee, K., Lee, K., Lee, H., Shin, J.: A simple unified framework for detecting out-of-distribution samples and adversarial attacks. In: NeurIPS, pp. 7167–7177 (2018)

    Google Scholar 

  17. Nalisnick, E., Matsukawa, A., Teh, Y.W., Gorur, D., Lakshminarayanan, B.: Do deep generative models know what they don’t know? In: ICLR (2019)

    Google Scholar 

  18. Oza, P., Patel, V.M.: C2AE: class conditioned auto-encoder for open-set recognition. In: CVPR, pp. 2307–2316 (2019)

    Google Scholar 

  19. Ruff, L., et al.: Deep one-class classification. In: ICML, pp. 4393–4402 (2018)

    Google Scholar 

  20. Shi, W., et al.: Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In: CVPR, pp. 1874–1883 (2016)

    Google Scholar 

  21. Sun, X., Yang, Z., Zhang, C., Ling, K.V., Peng, G.: Conditional gaussian distribution learning for open set recognition. In: CVPR, pp. 13477–13486 (2020)

    Google Scholar 

  22. Sun, Y., Guo, C., Li, Y.: React: out-of-distribution detection with rectified activations. In: NeurIPS, pp. 144–157 (2021)

    Google Scholar 

  23. Sun, Y., Ming, Y., Zhu, X., Li, Y.: Out-of-distribution detection with deep nearest neighbors. In: ICML, pp. 20827–20840 (2022)

    Google Scholar 

  24. Wang, H., Li, Z., Feng, L., Zhang, W.: ViM: out-of-distribution with virtual-logit matching. In: CVPR, pp. 4921–4930 (2022)

    Google Scholar 

  25. Xiao, Z., Yan, Q., Amit, Y.: Likelihood regret: an out-of-distribution detection score for variational auto-encoder. In: NeurIPS, pp. 20685–20696 (2020)

    Google Scholar 

  26. Yang, J., et al.: OpenOOD: benchmarking generalized out-of-distribution detection. In: NeurIPS, pp. 32598–32611 (2022)

    Google Scholar 

  27. Yang, J., Zhou, K., Li, Y., Liu, Z.: Generalized out-of-distribution detection: a survey. arXiv preprint arXiv:2110.11334 (2021)

  28. Zhang, R., Isola, P., Efros, A.A., Shechtman, E., Wang, O.: The unreasonable effectiveness of deep features as a perceptual metric. In: CVPR, pp. 586–595 (2018)

    Google Scholar 

  29. Zhou, Y.: Rethinking reconstruction autoencoder-based out-of-distribution detection. In: CVPR, pp. 7369–7377 (2022)

    Google Scholar 

Download references

Acknowledgments

This work has been done within the sector initiative Digitale Schiene Deutschland [4], in which DB InfraGO AG is working together with industry partners on a far-reaching automation of the German railway system. Rail traffic is one of the most important building blocks for the transition to new climate-friendly traffic solutions in our society.

For higher quality traffic the railway system must be fundamentally modernized through profound, technological innovations. Numerous new capabilities are made available by digital technologies, such as fully automated driving, which will be tested and further developed for use in the system.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Conrad Orglmeister .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Orglmeister, C., Bochinski, E., Eiselein, V., Fleig, E. (2024). Enclosing Prototypical Variational Autoencoder for Explainable Out-of-Distribution Detection. In: Ceccarelli, A., Trapp, M., Bondavalli, A., Schoitsch, E., Gallina, B., Bitsch, F. (eds) Computer Safety, Reliability, and Security. SAFECOMP 2024 Workshops. SAFECOMP 2024. Lecture Notes in Computer Science, vol 14989. Springer, Cham. https://doi.org/10.1007/978-3-031-68738-9_29

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-68738-9_29

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-68737-2

  • Online ISBN: 978-3-031-68738-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics