ExplainabilityMethods.jl


Documentation Build Status DOI

Explainable AI in Julia using Flux.jl.

Installation

To install this package and its dependencies, open the Julia REPL and run

julia> ]add ExplainabilityMethods

⚠️ This package is still in early development, expect breaking changes. ⚠️

Example

Let's use LRP to explain why an image of a cat gets classified as a cat:

using ExplainabilityMethods
using Flux
using Metalhead

# Load model
vgg = VGG19()
model = strip_softmax(vgg.layers)

# Run XAI method
analyzer = LRPEpsilon(model)
expl = analyze(img, analyzer)

# Show heatmap
heatmap(expl)

Methods

Currently, the following analyzers are implemented:

├── Gradient
├── InputTimesGradient
└── LRP
    ├── LRPZero
    ├── LRPEpsilon
    └── LRPGamma

One of the design goals of ExplainabilityMethods.jl is extensibility. Individual LRP rules like ZeroRule, EpsilonRule, GammaRule and ZBoxRule can be composed and are easily extended by custom rules.

Acknowledgements

Adrian Hill acknowledges support by the Federal Ministry of Education and Research (BMBF) for the Berlin Institute for the Foundations of Learning and Data (BIFOLD) (01IS18037A).