This repo accompanies the article "Measuring shared responses across subjects using intersubject correlation" by Nastase, Gazzola, Hasson, and Keysers (2019) in the "tools of the trade" series at Social Cognitive and Affective Neuroscience. Here, you'll find a Jupyter Notebook tutorial (isc_tutorial.ipynb
) introducing basic intersubject correlation (ISC) analyses and statistical tests as implemented in Python using the Brain Imaging Analysis Kit (BrainIAK). The notebook uses both simulated data and an example fMRI dataset publicly available as part of the Narratives collection (Nastase et al., 2019). Using Google Colaboratory, you can run the analyses interactively in the tutorial notebook entirely in the cloud. To navigate directly to the notebook on Google Colab, click here: Tutorial on Google Colab.
This notebook is geared toward early-career cognitive neuroscientists (e.g., graduate students) or researchers unfamiliar with ISC analysis. We assume some basic familiarity with Python. The tutorial provides an introductory treatment of the following topics:
- Computing ISCs
- Computing ISFCs
- Statistical tests for ISCs
- Correcting for multiple tests
- Loading and visualizing fMRI data
In addition to the tutorial, this repo contains (a) MATLAB code for computing leave-one-out ISCs (isc_loo.m
) and (b) a Python-based command-line interface for computing leave-one-out ISCs (isc_cli.py
; requires a Python 3 installation with NumPy/SciPy and NiBabel on Linux or Mac). Given two or more NIfTI images containing BOLD time series (one file per subject), the command-line tool computes leave-one-out ISCs with a variety of options for supplying a mask image, z-scoring inputs, and Fisher z-transforming or summarizing the output (run python3 isc_cli.py --help
for more detailed documentation). Usage examples:
python3 isc_cli.py --input s1.nii.gz s2.nii.gz s3.nii.gz --output isc.nii.gz \
--mask mask.nii.gz --zscore
pyhon3 isc_cli.py --input /input/path/s*.nii.gz --output /output/path/isc.nii.gz \
--mask /input/path/mask.nii.gz --zscore --fisherz
python3 isc_cli.py --input s*.nii.gz --output mean_isc.nii.gz \
--mask mask.nii.gz --zscore --summarize mean
ISC analyses measure stimulus-evoked responses that are shared across individuals. For example, in a conventional ISC analysis, we compute the correlation between response time series for a given brain area across individuals while they watch a movie or listen to a story (Hasson et al., 2004, 2010). This type of analysis reveals brain areas that are reliably engaged by the stimulus, ranging from low-level sensory structures to brain areas processing high-level narrative qualities of the stimulus (Hasson et al., 2008; Lerner et al., 2011). This is method is particularly useful for studying social communication (Hasson et al., 2014), because we can measure brain-to-brain coupling between speakers and listeners (Stephens et al., 2010; Silbert et al., 2014). Rather than computing ISCs between corresponding brain across subjects, we can compute ISCs between brain regions, an approach called intersubject functional correlation (ISFC) analysis (Simony et al., 2016). This approach measures reliable, stimulus-evoked functional integration, or "connectivity", across brain areas. As shown in the schematic below, ISFC analysis is a generalization of ISC analysis: the diagonal elements of the ISFC matrix represent the ISCs for each voxel, while the off-diagonal elements capture connectivity between voxels.
-
Hasson, U., Ghazanfar, A. A., Galantucci, B., Garrod, S., & Keysers, C. (2012). Brain-to-brain coupling: a mechanism for creating and sharing a social world. Trends in Cognitive Sciences, 16(2), 114–121. https://doi.org/10.1016/j.tics.2011.12.007
-
Hasson, U., Malach, R., & Heeger, D. J. (2010). Reliability of cortical activity during natural stimulation. Trends in Cognitive Sciences, 14(1), 40–48. https://doi.org/10.1016/j.tics.2009.10.011
-
Hasson, U., Nir, Y., Levy, I., Fuhrmann, G., & Malach, R. (2004). Intersubject synchronization of cortical activity during natural vision. Science, 303(5664), 1634–1640. https://doi.org/10.1126/science.1089506
-
Hasson, U., Yang, E., Vallines, I., Heeger, D. J., & Rubin, N. (2008). A hierarchy of temporal receptive windows in human cortex. Journal of Neuroscience, 28(10), 2539–2550. https://doi.org/10.1523/jneuroosci.5487-07.2008
-
Lerner, Y., Honey, C. J., Silbert, L. J., & Hasson, U. (2011). Topographic mapping of a hierarchy of temporal receptive windows using a narrated story. Journal of Neuroscience, 31(8), 2906–2915. https://doi.org/10.1523/jneurosci.3684-10.2011
-
Nastase, S. A., Gazzola, V., Hasson, U., & Keysers, C. (2019). Measuring shared responses across subjects using intersubject correlation. Social Cognitive and Affective Neuroscience, 14(6), 667–685. https://doi.org/10.1093/scan/nsz037
-
Nastase, S. A., Liu, Y.-F., Hillman, H., Zadbood, A., Hasenfratz, L., Keshavarzian, N., Chen, J., Honey, C. J., Yeshurun, Y., Regev, M., Nguyen, M., Chang, C. H. C., Baldassano, C. B., Lositsky, O., Simony, E., Chow, M. A., Leong, Y. C., Brooks, P. P., Micciche, E., Choe, G., Goldstein, A., Halchenko, Y. O., Norman, K. A., & Hasson, U. Narratives: fMRI data for evaluating models of naturalistic language comprehension. OpenNeuro, ds002345. https://doi.org/10.18112/openneuro.ds002345.v1.0.1
-
Silbert, L. J., Honey, C. J., Simony, E., Poeppel, D., & Hasson, U. (2014). Coupled neural systems underlie the production and comprehension of naturalistic narrative speech. Proceedings of the National Academy of Sciences of the United States of America, 111(43), E4687–E4696. https://doi.org/10.1073/pnas.1323812111
-
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. https://doi.org/10.1038/ncomms12141
-
Stephens, G. J., Silbert, L. J., & Hasson, U. (2010). Speaker–listener neural coupling underlies successful communication. Proceedings of the National Academy of Sciences of the United States of America, 107(32), 14425–14430. https://doi.org/10.1073/pnas.1008662107