Graph saliency maps through spectral convolutional networks for brain mapping
The code in this repository provides the implementation of an activation-based visual attribution method for irregular graphs, which works integrated with graph convolutional neural networks (GCNs). The method has been validated via a sex classification task using functional brain connectivity networks and data from the UK Biobank and is presented in our paper:
The paper is presented at the Second International Workshop on Graphs in Biomedical Image Analysis, organised as a part of Medical Image Computing and Computer-Assisted Interventions (MICCAI) 2018 in Granada.
Here are the slides, poster (which has won the best poster award!) and a copy of the paper. The visual abstract is provided below:
The code is released under the terms of the MIT license. Please cite the above paper if you use it.
Our implementation is integrated to the spectral convolutional network codebase provided in this repository
Click the below picture or scan the QR code to see the method in action (you will be directed to our Youtube channel).
Clone this repository.
git clone https://github.com/sarslancs/graph_saliency_maps.git
cd graph_saliency_maps
Install the dependencies. Please edit requirements.txt
to choose the TensorFlow version (CPU / GPU, Linux / Mac) you need to install, or install it before attempting to use the code.
pip install -r requirements.txt # or make install
The codebase is based on Python 2.7.14, Anaconda custom (64-bit)
. We tested the code on tensorflow 1.3.0
, tensorflow-gpu 1.4.1
, and tensorflow-tensorboard 0.1.8
on a workstation running Ubuntu 16.04
. The CUDA version was release 8.0, V8.0.61
. At the time of release, versions of other libraries were as follows: numpy 1.12.1, sklearn 0.19.1, scipy 1.1.0, matplotlib 2.2.2
.
In order to get started, you need to provide:
num_subjects x num_regions x num_signals
.num_regions x num_regions
that represents the underlying graph and is subsequently used to compute the Laplacian matrix. If not provided, the code computes one based on the train data.To run the model in training mode:
python main.py -c ./config/gender_biobank.conf
To run the model in test mode (i.e. via a pre-trained model):
python main.py -c ./config/gender_biobank.conf -m ./log/sex_biobank_model_2018-09-24-13-01
Send an e-mail to [username_on_github]@gmail.com. You may also find me on twitter.