Brainiak Education: User-Friendly Tutorials for Advanced, Computationally-Intensive fMRI Analysis

Presented During:

Poster No:


Submission Type:

Abstract Submission 


Manoj Kumar1, Cameron Ellis2, Qihong Lu1, Hejia Zhang1, Mihai Capota3, Theodore Willke3, Peter Ramadge1, Nicholas Turk-Browne2, Kenneth Norman1


1Princeton University, Princeton, NJ, 2Yale University, New Haven, CT, 3Intel Corporation, Hillsboro, OR

First Author:

Manoj Kumar  
Princeton University
Princeton, NJ


Cameron Ellis  
Yale University
New Haven, CT
Qihong Lu  
Princeton University
Princeton, NJ
Hejia Zhang  
Princeton University
Princeton, NJ
Mihai Capota  
Intel Corporation
Hillsboro, OR
Theodore Willke  
Intel Corporation
Hillsboro, OR
Peter Ramadge  
Princeton University
Princeton, NJ
Nicholas Turk-Browne  
Yale University
New Haven, CT
Kenneth Norman  
Princeton University
Princeton, NJ


Advanced brain imaging analysis methods, including multivariate pattern analysis (MVPA), functional connectivity, and functional alignment, have become powerful tools in cognitive neuroscience over the past decade. There now exist multiple software packages that implement some of these techniques. Although these packages are useful for expert practitioners, novice users face a steep learning curve because of the computational skills required. Furthermore, most standard fMRI analysis packages (e.g., AFNI, FSL, SPM) focus primarily on preprocessing and univariate analyses, leaving a gap in how to integrate advanced tools. BrainIAK ( is a newer, open-source Python software package that seamlessly combines several cutting-edge, computationally efficient techniques with other Python packages (e.g., nilearn, scikit-learn) for file handling, visualization, and machine learning, picking up where other packages leave off. As part of efforts to disseminate this package, we have developed user-friendly tutorials and exercises in Jupyter notebook format for learning BrainIAK and advanced fMRI analysis in Python more generally ( (Kumar et al., in press). These materials cover cutting-edge techniques including: MVPA (Norman et al., 2006); representational similarity analysis (Kriegeskorte et al., 2008); background connectivity (Al-Aidroos et al., 2012); full correlation matrix analysis (Wang et al., 2015); inter-subject correlation (Hasson et al., 2004); inter-subject functional connectivity (Simony et al., 2016); shared response modeling (Chen et al., 2015); real-time fMRI (deBettencourt et al., 2015); and event segmentation using hidden Markov models (Baldassano et al., 2017). For long running jobs, with large memory consumption, we have provided detailed information on using high-performance computing clusters (HPCs). These notebooks were successfully deployed and have been extensively tested at multiple sites, including advanced fMRI analysis courses at Yale and Princeton and at multiple workshops and hackathons. We hope that these materials become part of a growing pool of open-source software and educational materials for large-scale, reproducible fMRI analysis.


Our learning materials are built entirely using open-source tools: Jupyter notebooks using Python, along with libraries for machine learning (scikit-learn), data loading (nibabel), masking, feature selection, and plotting (nilearn), and BrainIAK - an advanced fMRI analysis package that is scalable for HPC. Each notebook has an associated, publicly-available, pre-processed dataset that is analyzed using the code. The notebooks may be executed on individual laptops, remote servers, or on the cloud for free using Google Colaboratory.


We have created 13 tutorials, covering general topics such as normalization, dimensionality reduction, and parallelization, along with specific advanced fMRI analysis techniques. The tutorials consist primarily of Jupyter notebooks, sometimes with batch scripts for long-running jobs. We have provided detailed explanations, using text and figures, for each section of the code. The accompanying pre-processed datasets make it easy for a new user to start using the notebooks. The theme for each notebook and analysis approach is a scientific question relevant to cognitive neuroscience. The multiple exercises in each notebook help the user better understand the method by writing their own analysis code. We also facilitate the transition to running jobs on HPC by providing detailed guidelines and scripts.


The materials we describe here will help users learn cutting-edge fMRI analysis in an accessible way. These materials cover a wide range of advanced techniques and fill a gap by enabling even novice users to learn these techniques and implement them on cutting-edge computing frameworks using BrainIAK.

Modeling and Analysis Methods:

Connectivity (eg. functional, effective, structural)
Methods Development 1
Multivariate Approaches 2


Computational Neuroscience
Machine Learning

1|2Indicates the priority used for review

My abstract is being submitted as a Software Demonstration.


Please indicate below if your study was a "resting state" or "task-activation” study.


Healthy subjects only or patients (note that patient studies may also involve healthy subjects):

Healthy subjects

Are you Internal Review Board (IRB) certified? Please note: Failure to have IRB, if applicable will lead to automatic rejection of abstract.


Was any human subjects research approved by the relevant Institutional Review Board or ethics panel? NOTE: Any human subjects studies without IRB approval will be automatically rejected.


Was any animal research approved by the relevant IACUC or other animal research panel? NOTE: Any animal studies without IACUC approval will be automatically rejected.

Not applicable

Please indicate which methods were used in your research:

Functional MRI

Which processing packages did you use for your study?

Other, Please list  -   fmriprep

Provide references using author date format

Al-Aidroos, N., Said, C. P., & Turk-Browne, N. B. (2012). Top-down attention switches coupling between low-level and high-level areas of human visual cortex. Proceedings of the National Academy of Sciences, 109(36), 14675–14680.
Anderson, M. J., Capota, M., Turek, J. S., Zhu, X., Willke, T. L., Wang, Y., … Norman, K. A. (2016). Enabling factor analysis on thousand-subject neuroimaging datasets (pp. 1151–1160). IEEE.
Baldassano, C., Chen, J., Zadbood, A., Pillow, J. W., Hasson, U., & Norman, K. A. (2017). Discovering Event Structure in Continuous Narrative Perception and Memory. Neuron, 95(3), 709–721.e5.
Chen, P.-H., Chen, J., Yeshurun, Y., Hasson, U., Haxby, J., & Ramadge, P. J. (2015). A Reduced-Dimension fMRI Shared Response Model. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, & R. Garnett (Eds.), Advances in Neural Information Processing Systems 28 (pp. 460–468). Curran Associates, Inc.
deBettencourt, M. T., Cohen, J. D., Lee, R. F., Norman, K. A., & Turk-Browne, N. B. (2015). Closed-loop training of attention with real-time brain imaging. Nature Neuroscience, 18(3), 470–475.
Kriegeskorte, N., Mur, M., & Bandettini, P. (2008). Representational Similarity Analysis – Connecting the Branches of Systems Neuroscience. Frontiers in Systems Neuroscience, 2.
Kumar, M., Ellis, C. T., Lu, Q., Zhang, H., Capota, M., Willke, T. L., Ramadge, P. J., Turk-Browne, N.B., Norman, K. (in press). BrainIAK tutorials: User-friendly learning materials for advanced fMRI analysis. PLOS Computational Biology.
Norman, K. A., Polyn, S. M., Detre, G. J., & Haxby, J. V. (2006). Beyond mind-reading: multi-voxel pattern analysis of fMRI data. Trends in Cognitive Sciences, 10(9), 424–430.
Hasson U, Nir Y, Levy I, Fuhrmann G, Malach R (2004) Intersubject synchronization of cortical activity during natural vision. Science 303:1634-1640.
Simony, E., Honey, C. J., Chen, J., Lositsky, O., Yeshurun, Y., Wiesel, A., & Hasson, U. (2016). Dynamic reconfiguration of the default mode network during narrative comprehension. Nature Communications, 7, 12141. doi:10.1038/ncomms12141
Wang, Y., Anderson, M. J., Cohen, J. D., Heinecke, A., Li, K., Satish, N., … Willke, T. L. (2015). Full correlation matrix analysis of fMRI data on Intel® X