This repository contains the main code and link to the datasets necessary to replicate the experiments in the paper "Concept Attribution: Explaining CNN decisions to physicians" published in Computers in Biology and Medicine, Volume 123, August 2020, 103865
Three of the four datasets used for the experiments are publicly available and can be downloaded at the following links:
With this library you will be able to apply concept attribution to your task. The main steps are:
- Extraction of concept measures
- Finding the vector representing the concept in the activation space
- Generating concept-based explanations
Color and texture measures can be extracted from the images in your data to be represented as concepts. See the functions:
We compute RCVs by least squares linear regression ofthe concept measures for a set of inputs. The concept vector (RCV) represents the direction of greatest increase of the measures for a single continuous concept. Different parameters can be specified to compute the regression:
- compute linear regression
- compute ridge regression
- compute local linear regression -- not yet supported
See the functions:
The regression is evaluated in different ways:
- on training or held-out data, with rsquared, mse and adjusted rsquared
- by evaluating angle between to rcvs
See the functions: