Period: September 2021 - December 2025
Where: MPI CBS, Leipzig, Germany
| Authors | Simon M. Hofmann | Ole Goltermann | Frauke Beyer |
|---|---|---|---|
| Contact | simon.hofmann[ät]cbs.mpg.de | o.goltermann[ät]uke.de | fbeyer[ät]cbs.mpg.de |
Scripts for processing and analysis are combined in a Python package relevancerelated
in ./relevancerelated/.
This includes the processing and analysis of MRIs, brain features
and relevance maps generated from the brain-age prediction models.
To install the package, refer to the README
in the root folder of the repository.1
The following modules of the package are briefly described:
relevancerelated.dataloader
contains code to load and preprocess various MRI datasets.
PVS is extracted from T1 & FLAIR images.
A bash script to run the PVS segmentation can be found in ./scripts/.
This script makes use of the code in
relevancerelated.modeling.pvs_extraction.
PVS segmentation is based on SHIVA_PVS.
relevancerelated.modeling.MRInet.trained contains loader functions
for the 3D-convolutional neural networks (CNN) models that were trained to predict brain-age from MRI images,
and were then subject to the XAI analysis (using LRP) generating relevance maps.
For details see our previous study Hofmann et al. (NeuroImage, 2022).
Submodule relevancerelated.modeling.LRP contains scripts for the application
of the XAI-method Layer-wise relevance propagation (LRP; Bach et al., 2015)
on MRI-based prediction models.
As a post-hoc XAI-method, LRP highlights information in the input space
being relevant for the given model prediction.
Here, the LRP is applied to the predictions of the MRInet
extracting voxels in the MRI image that were relevant for brain-age estimations.
The code is built around the iNNvestigate toolbox.
In this project, we related relevance maps with other brain features (e.g., PVS, cortical thickness, etc.),
which is mainly done in the script relevancerelated.py
in the LRP submodule and subsequently applied R scripts.
The pipeline of relevancerelated.py can be run with the following line (use the --help flag for an overview):
python relevancerelated.run --helpStatistical analyses are primarily performed in R (see the folder ./Rscripts/),
and some in Python (see relevancerelated.statistics).
Most of the project configuration is collected in the ./configs/config.toml file 2.
The file is read out with the script configs.py.
The general project structure follows the scilaunch template.
If you are interested in training deep learning models and applying relevance mapping (XAI) on your own data,
we refer to the xai4mri toolbox,
which is a generalized form of the code presented here.
See the LICENSE file for details.