Skip to content
Inferring the Similarity of Task-Derived Representations from Brain Activity
HTML Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


Inferring the Similarity of Task-Derived Representations from Brain Activity

This repository contains code for Neural Taskonomy paper, accepted to NeurIPS 2019.

Setup and Installation

Step 1: Clone the code from Github

git clone
cd NeuralTaskonomy

You will also need to clone the taskonomy model bank.

git clone

BOLD5000 data and stimuli is available for download here.

Step 2: Install requirements

Requirements.txt contains the necessary package for to run the code in this project.

python3 -m venv venv
source venv/bin/activate
pip install -r requirement.txt --no-index

Please also follow installation page to install another environment to use taskonomy model bank.

Step 3: Generate model activations from each task specific models for all BOLD5000 Images

sh scripts/

To run encoding models (ridge regression) using task presentaitons from all tasks on ROI data and whole brain data.

sh scripts/
sh scripts/

To run permutatation tests on ROI and whole brain data

sh scripts/
sh scripts/

This permutates the brain response 5000 times to obtain the null distribution.

To process permutation results:

cd code
python --subj $subj
python --use_mask_corr --subj $subj --empirical
python --subj $subj --whole_brain --use_empirical_p

To generate task similarity matrix:

cd code
python --method "cosine" --use_mask_corr --empirical

To generate task trees:

cd code
python --subj $subj --method masked_corr
You can’t perform that action at this time.