Explanations toolbox for Tensorflow 2
Project description
Xplique is a Python module dedicated to explainability. It provides several submodules to learn more about your tensorflow models (โฅ2.1). The three main submodules are Attributions Methods, Explainability Metrics and Feature Visualization tools.
The Attributions Method submodule implements various methods, with explanations, examples and links to official papers.
Soon, the Explainability Metrics submodule will implement the current metrics related to explainability. These evaluations used in conjunction with the attribution methods allow to measure the quality of the explanations.
Soon, the Feature Visualization submodule will allow to represent neurons, channels or layers by maximizing an input.
The package is released under MIT license.
Contents
Installing
The library has been tested on Linux, MacOSX and Windows and relies on the following Python modules:
- Tensorflow (>=2.1)
- Numpy (>=1.18)
You can install Xplique using pip with:
pip install xplique
Getting Started
let's start with a simple example, by computing Grad-CAM for several images (or a complete dataset) on a trained model.
from xplique.attributions import GradCAM
# load images, labels and model
# ...
method = GradCAM(model)
explanations = method.explain(images, labels)
Notebooks
Core features
Attributions Methods
- Deconvolution ๐Api ๐arxiv
- Grad-CAM ๐Api ๐arxiv
- Grad-CAM++ ๐Api ๐arxiv
- Gradient Input ๐Api ๐arxiv
- Guided Backprop ๐Api ๐arxiv
- Integrated Gradients ๐Api ๐arxiv
- Occlusion ๐Api ๐arxiv
- Rise ๐Api ๐arxiv
- Saliency ๐Api ๐arxiv
- SmoothGrad ๐Api ๐arxiv
- SquareGrad ๐Api ๐arxiv
- VarGrad ๐Api ๐arxiv
- Ablation-CAM
- Xray
Concept-based Methods
- Concept Activation Vector [^12]
- Testing with Concept Activation Vector [^12]
- Robust TCAV
- Automatic Concept Extraction
Metrics
- Aocp
- Fidelity correlation
- Irof
- Pixel Flipping
- Stability
Feature Visualization
- Vanilla
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.