Giter VIP home page Giter VIP logo

scrutinizing-xai's Introduction

Pattern and Distractor

This repository contains all the experiments presented in the corresponding paper: "Scrutinizing XAI using linear ground-truth data with suppressor variables".

We use Pipfiles to create Python environments. Since we use innvestigate to create the saliency maps, and this framework uses particular dependencies, there is one extra Pipfile included in the saliency_method folder.

In three steps we can reproduce the results: (i) we generate the ground truth data, (ii) train the linear models and apply the XAI methods, (iii) run the evaluation steps and generate plots.

Generate data

Set the parameter pattern_type=0 to use the signal pattern and suppressor combination analyzed in the paper (see image above). Use pattern_type=3 to generate the data, used to produce the result in the supplementary material.

python -m data.main --path data/config.json 

Run the experiments of model agnostic XAI methods

Update the data_path parameter of the agnostic_methods/conf.json with the path to the freshly generated pickle file containing the ground truth data.

python -m agnostic_methods.main_global_explanations --path agnostic_methods/config.json

Run experiment for sample based explanation, which will take a couple hours, depending on your machine. Here update the data_path of the file agnostic_methods/config_sample_based.json.

python -m agnostic_methods.main_sample_based_explanations --path agnostic_methods/config_sample_based.json

Run experiment of saliency methods

Create a new Python environment, and run the experiments for heat-mapping methods by running through the notebook, change the file_path variable in the notebook.

compute_explanations_heatmapping.ipynb

Run evaluation and generate plots

Update the parameter data_path and results_paths of the config.json. Add the data path and the paths to the artifacts of the experiments.

python run_evaluation_and_visualization.py --path config.json

scrutinizing-xai's People

Contributors

rickwg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.