This folder contains DIANNA tutorial notebooks. To install the dependencies for the tutorials, run (in the main dianna folder)
pip install .[notebooks]
๐ For general demonstration of DIANNA click on the logo or run it in Colab: .
๐ For tutorials on how to convert an Keras, PyTorch, Scikit-learn or Tensorflow model to ONNX, please see the conversion tutorials.
๐ For specific XAI methods (explainers):
- Click on the explainer names to watch explanatory videos for the respective method.
- Click on the logos for direct access to a tutorial notebook. Run the tutorials directly in Google Colab by clicking on the Colab buttons.
Illustrative (Simple)
Data modality | Dataset | Task | Logo |
---|---|---|---|
Images | Binary MNIST | Binary digit classification | |
Simple Geometric (circles and triangles) | Binary shape classificaiton | ||
Imagenet |
|
||
Text | Stanford sentiment treebank | Positive or negative movie reviews sentiment classification | |
Timeseries | Coffee dataset | Binary classificaiton of Robusta and Aribica coffee beans | |
Weather dataset | Binary classification (warm/cold season) of temperature time-series | ||
Tabular | Penguin dataset |
|
|
Weather dataset | Next day sunshine hours prediction (regression) |
Scientific use-cases
Data modality | Dataset | Task | Logo |
---|---|---|---|
Images | Simple Scientific (LeafSnap30) |
|
|
Text | EU-law statements | Regulatory or non-regulatory classification | |
Timeseries | Fast Radio Burst (FRB) dataset (not publicly available) | Binary classificaiton of Fast Radio Burst (FRB) timeseries data : noise or a real FRB. | |
Tabular | Land atmosphere dataset | Prediction of "latent heat flux" (regression). The random forest model is used as an emulator to replace the physical model STEMMUS_SCOPE to predict global maps of latent heat flux. |
The ONNX models used in the tutorials are available at dianna/models, or linked from their respective tutorial notebooks.
All tutorials can be accessed by clicking on the dataset & task logo in the tables below.
The explainers' output for the models trained on the datasets & tasks which are included in the dashboard are marked with .
Illustrative (Simple)
Modality \ Method | RISE | LIME | KernelSHAP |
---|---|---|---|
Images | or | or | |
or | or | ||
Text | or | or | |
Time series | or | or | |
or | |||
Tabular | or | or | or |
or | or |
To learn more about how we aproach the masking for time-series data, please read our Masking time-series for XAI blog-post.
Scientific use-cases
Modality \ Method | RISE | LIME | KernelSHAP |
---|---|---|---|
Images | or | ||
Text | or | ||
Time series | or | ||
Tabular | or |
Settings per explainer
The XAI methods (explainers) are sensitive to the choice of their hyperparameters! In this master Thesis, this sensitivity is researched and useful conclusions are drawn. The default hyperparameters used in DIANNA for each explainer as well as the choices for some tutorials and their data modality (i - images, txt - text, ts - time series and tab - tabular) are given in the tables below. Also the main conclusions (๐ ) from the thesis (on images and text) about the hyperparameters effect are listed.
RISE
๐ The most crucial parameter is
๐ The feature resolution
๐ Larger
LIME
Hyperparameter | Default value | (i) | (ts) | (ts) | |
---|---|---|---|---|---|
2000 | |||||
Kernel Width | default | default | default | default | |
default | default | 999 |
๐ The most crucial parameter is the Kernel width: low values cause high sensitivity, however that observation was dependent on the evaluation metric.
KernelSHAP
Hyperparameter | Default value | (i) | (i) | (tab) |
---|---|---|---|---|
auto/int | ||||
default | ||||
default | default | default |
๐ The most crucial parameter is the nubmer of super-pixels
๐ Regularization had only a marginal detrimental effect, the best results were obtained using no regularization (no smoothing,