Skip to content

Codes needed to replicate results for 'Can I Trust my Anomaly Detection System, A Case Study'

License

Notifications You must be signed in to change notification settings

rashidrao-pk/anomaly_detection_trust_case_study

Repository files navigation

Explaining Anomaly Detection based on VAE-GAN Model 🦠⚠️✅🫱🏻‍🫲🏼

Version

License: MIT GitHub contributors

GitHub repo size

GitHub commit activity (branch) GitHub contributors GitHub closed issues GitHub issues GitHub closed pull requests GitHub pull requests

GitHub last commit

GitHub watchers GitHub forks GitHub Repo stars

Visitors

This Repositry contains codes to for our accepted paper 'Can I trust my anomaly detection system? A case study based on eXaplainable AI' into The 2nd World Conference on eXplainable Artificial Intelligence [17-19 July 2024].

we investigate the robustness of the Anomaly Detection process followed by AI 🤖 based Quality Control Inspection being adopetd in Industries 🏭.

Dependencies and Installation 🔧

  • Python 3.9.18
  • Tensorflow
  • Option: NVIDIA GPU + CUDA

Clone the repositry and install all the required libraries by running following lines:

git clone https://github.com/rashidrao-pk/anomaly_detection_trust_case_study/
cd anomaly_detection_trust_case_study
pip install -r requirements.txt

Supplementary Material 📊

Following are the two Generated files for the results analyzed in the paper MVTech dataset [Screw🔩 and Hazelnut 🌰], file containing results for;

  1. Screw Dataset is uploaded as PDF and HTML file.
  2. Hazelnut Dataset is uploaded as PDF and HTML file.

Structure of the Artifact 💻

This artifact is structured as follows:

  • the results/ folder contains the results after running the artifact.
  • the models/ folder contains the models trained and used for testing purposes.
  • two notebooks AD_VAE_GAN_SCREW.ipynb and VAE_GAN_AD_HAZELNUT.ipynb which are main files to have all the working to reproduce the results for the proposed approach.
  • models.py contains the codes for VAE-GAN model used in the proposed appoach and utils.py contains all the functions required to run both notebooks ( AD_VAE_GAN_SCREW.ipynb & VAE_GAN_AD_HAZELNUT.ipynb).

Contributions 📃

In this research, we:

  1. Review an explainable Anomaly Detection system architecture that combines VAE-GAN models with the LIME and SHAP explanation methods;
  2. Quantify the capacity of the Anomaly Detection system in performing anomaly detection using anomaly scores;
  3. Use XAI methods to determine if anomalies are actually detected for the right reason by comparing with a ground truth. Results show that it is not uncommon to find samples that were classified as anomalous, but for the wrong reason. We adopt a methodology based on optimal Jaccard score to detect such samples.

Paper PDF:

Paper can be found at LINK uploaded on

Authors ✍️

Sr. No. Author Name Affiliation Google Scholar
1. Muhammad Rashid University of Torino, Computer Science Department, C.so Svizzera 185, 10149 Torino, Italy Muhammad Rashid
2. Elvio G. Amparore University of Torino, Computer Science Department, C.so Svizzera 185, 10149 Torino, Italy Elvio G. Amparore
3. Enrico Ferrari Rulex Innovation Labs, Rulex Inc., Via Felice Romani 9, 16122 Genova, Italy Enrico Ferrari
4. Damiano Verda Rulex Innovation Labs, Rulex Inc., Via Felice Romani 9, 16122 Genova, Italy Damiano Verda

Cite Us

@InProceedings{10.1007/978-3-031-63803-9_13, author="Rashid, Muhammad and Amparore, Elvio and Ferrari, Enrico and Verda, Damiano", editor="Longo, Luca and Lapuschkin, Sebastian and Seifert, Christin", title="Can I Trust My Anomaly Detection System? A Case Study Based on Explainable AI", booktitle="Explainable Artificial Intelligence",
year="2024", publisher="Springer Nature Switzerland",
address="Cham", pages="243--254"}

Keywords 🔍

Anomaly detection · variational autoencoder · eXplainable AI

Copyright Notice:

MIT license Author: Muhammad Rashid ([email protected]) University of Turin, Italy.

Contributors


Note

Contributions to improve the completeness of this list are greatly appreciated. If you come across any overlooked papers, please feel free to create pull requests, open issues or contact me via email. Your participation is crucial to making this repository even better.

About

Codes needed to replicate results for 'Can I Trust my Anomaly Detection System, A Case Study'

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published