Why DIANNA?

There are numerous other python OSS eXplainable AI (XAI) libraries, the Awsome explainable AI features 57 of them, of which 9 have more than 2000 github stars: SHAP, LIME , pytorch-cnn-visualizations, InterpretML Lucid , Pytorch-grad-cam, Deep Visualization Toolbox , Captum , ELI5 , etc.

These libraries currently have serious limitations in respect to the usage by the various scientific communities:

  • A single XAI method or single data modality is implemented

While SHAP, LIME, Pytorch-grad-cam, DeepLIFT, etc. enjoy enormous popularity, the specific methods are not always suitable for the research task and/or data modality (e.g. Grad cam is applicable only for images). Most importantly, different methods approach the AI explainability differently and so a single method provides limited explainability capacity. Which is the best method to use?

  • A single DNN format/framework/architecture is supported

Lucid supports only Tensoflow, Captum is the library for PyTorch users, iNNvstigate has been used by Keras users. Pytorch-grad-cam supports a single method for a single format and Pytorch-cnn-visualizaiton even limits the choice to a single DNN type- CNN. While this is not an issue for the current most popular framework communities, not all are supported by mature libraries (e.g. ) and most importantly are not “future-proof”, e.g. Caffe has been the most polular framework by the computer vision comminuty in 2018, while now is the era of Tensorflow, Pytorch and Keras.

  • The choice of supported XAI methods seems random

ELI5, for example, supports multiple frameworks/formats and XAI methods, but is not clear how the selection of these methods has been made. Futhermore the library is not maintained since 2020 and hence lacks any methods proposed since. Again, which are the best methods to use?

  • Requires (X)AI expertise For example the DeepVis Toolbox requires DNN knowledge and is used only by AI experts mostly within the computer vision community (which is large and can explain the number of stars).

All of the above issues have a common reason: the libraries have been developed by (X)AI researchers for the (X)AI researchers.

Even for the purpose of advancing (X)AI research, systematic study of the properties of the relevance scores is lacking and currently in the XAI literature often the human interpretation is intertwined with the one of the exlainer. Suitable datasets for such a study are lacking: the popular and simplest dataset used in publicaitons, MNIST, is too complex for such a prurpose with 10 classes and no structural content variation. The XAI community does not publish work on simple scientific datasets, which would make the technology understandable and trustworthy by non-expert scientists on intuitive level. Another important show-stopper for reproducible AI-enabled science is the plethora of current formats and the speed in which they become obsolete. Some libraries are also becoming obsolete for the lack of support of the research projects which have sponsored their creation (e.g. iNNvestigate).

DIANNA is designed to address the above challenges: the library is developed by the Research Software enigneers with XAI knowledge for scientists: both the X(AI) and especially not X(AI) experts. We have strived to create well-documented, well-tested software, conforming with the modern software engineering practices.

  • Simple datasets

To demonstrate the usefulness and enable studying the properties of the relevances on an intuitive level, DIANNA comes with two new datasets: Simple GeometricSimpleGeometric Logo and Simple Scientific (LeafSnap30)LeafSnap30 Logo – subset of LeafSnap dataset. Tree species classification on the LeafSnap data is a good simple scientific example of a problem tackled with both classical Computer Vision in the past and the superior DL method. Enhanced with explainable tool, the DL approach is a clear winner. DIANNA also uses 2 well-established benchmarks - a (modified to binary) MNIST and the Stanford Sentiment Treebank.

  • Systematically chosen generic explainers

DIANNA includes few XAI approaches which have been evaluated using systematically defined criteria. Using a relevant subset of these criteria, we have included complementary state-of-the-art XAI methods: LIME, RISE and KernelSHAP. These methods are model architecture agnostic.

  • Standard DNN format

DIANNA is future-proof, the library is conforming with the Open Neural Network eXchange (ONNX) standart. Using ONNX is not only very beneficial for interoperability, hence enabling reproducible-science, but ONNX-compatible runtimes and libraries are designed to maximize performance across hardware.

  • Multiple data modalities

Most libraries support at most 2 modalities: images and text. While DIANNA has also started with these two, there are plans to include modalities, many scientists lack support for: time series, tabular data and embeddings.