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
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 of the 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 two RCVs
See the functions:
Dependencies
cv2.cv2 3.4.0 keras 2.1.3 numpy 1.13.3 skimage 0.13.0 tensorflow 1.5.0, 1.5.0 statsmodels
If you make use of the code, please cite the paper in resulting publications.
@article{graziani2020concept,
title = "Concept attribution: Explaining {{CNN}} decisions to physicians",
journal = "Computers in Biology and Medicine",
pages = "103865",
year = "2020",
issn = "0010-4825",
doi = "https://doi.org/10.1016/j.compbiomed.2020.103865",
author = "Graziani M. and Andrearczyk V. and Marchand-Maillet S. and Müller H."
}
or
@incollection{graziani2018regression,
title={Regression concept vectors for bidirectional explanations in histopathology},
author={Graziani, Mara and Andrearczyk, Vincent and M{\"u}ller, Henning},
booktitle={Understanding and Interpreting Machine Learning in Medical Image Computing Applications},
pages={124--132},
year={2018},
publisher={Springer, Cham}
}
Three of the four datasets used for the experiments are publicly available and can be downloaded at the following links:
This work was supported by PROCESS and AI4MEDIA (EU H2020).
For general questions, please email [email protected]