Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 Apr:54:101094.
doi: 10.1016/j.dcn.2022.101094. Epub 2022 Feb 25.

Time-resolved multivariate pattern analysis of infant EEG data: A practical tutorial

Affiliations

Time-resolved multivariate pattern analysis of infant EEG data: A practical tutorial

Kira Ashton et al. Dev Cogn Neurosci. 2022 Apr.

Abstract

Time-resolved multivariate pattern analysis (MVPA), a popular technique for analyzing magneto- and electro-encephalography (M/EEG) neuroimaging data, quantifies the extent and time-course by which neural representations support the discrimination of relevant stimuli dimensions. As EEG is widely used for infant neuroimaging, time-resolved MVPA of infant EEG data is a particularly promising tool for infant cognitive neuroscience. MVPA has recently been applied to common infant imaging methods such as EEG and fNIRS. In this tutorial, we provide and describe code to implement time-resolved, within-subject MVPA with infant EEG data. An example implementation of time-resolved MVPA based on linear SVM classification is described, with accompanying code in Matlab and Python. Results from a test dataset indicated that in both infants and adults this method reliably produced above-chance accuracy for classifying stimuli images. Extensions of the classification analysis are presented including both geometric- and accuracy-based representational similarity analysis, implemented in Python. Common choices of implementation are presented and discussed. As the amount of artifact-free EEG data contributed by each participant is lower in studies of infants than in studies of children and adults, we also explore and discuss the impact of varying participant-level inclusion thresholds on resulting MVPA findings in these datasets.

Keywords: Decoding; EEG; Infants; MVPA; Representations.

PubMed Disclaimer

Conflict of interest statement

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Figures

Fig. 1
Fig. 1
Example of the process for pseudotrial generation and classification, performed on one stimulus pair for one participant and time-point. This process is repeated for all timepoints, stimulus pairs, and participants. Available trials for each condition are randomly permuted, then divided into 4 bins of approximately equal size (+/- 1 when trial number is not evenly divisible by 4). The trials in each bin are averaged to create 4 pseudotrials per condition, which are then used for training and testing the classifier. The resulting classification accuracies are averaged over all 200 trial order permutations for final pairwise.
Fig. 2
Fig. 2
Left: Average overall classification accuracy across the time series as generated by the Matlab and Python implementations for infants (A, n = 10), and adults (B, n = 8) with standard error highlighted. Right: Average classification accuracy as generated by z-scored and non-z-scored data for infants (C, n = 10) and adults (D, n = 8). Time windows of cluster corrected above chance accuracy are denoted by the corresponding-colored horizontal solid lines. The black bars in panel D denote a significant difference between z-scored and non-z-scored classification accuracy.
Fig. 3
Fig. 3
Top: Representational dissimilarity matrices of pairwise classification accuracy and cross validated Euclidean distance for the subsets of infants (A, n = 10) and adults (B, n = 8) with highest overall RDM reliability. RDMs calculated in the time windows during the window of highest classification accuracy (for all time windows see Supplemental Materials). Spearman’s r between the classification and Euclidian-distance RDMs is reported above RDMs, with significantly correlations for both infants and adults (ps < 0.001). Bottom: Multidimensional scaling (MDS) used to render the Euclidean distance between stimuli representations in a two-dimensional space in infants (C) and adults (D). MDS is a method for visualizing a distance matrix in two-dimensional space while maintaining the distance between stimuli. Grouping of animals vs. body parts is clearly visible in adults.
Fig. 4
Fig. 4
Number of participants from the test data included vs. trial threshold for infants (A) and adults (B). Trial thresholds tested are highlighted in purple, and number of participants included at each threshold are noted at the top of the bars.
Fig. 5
Fig. 5
Left: Overall average decoding accuracy when number of trials per condition was restricted to exactly each of the trial thresholds, with 95% confidence interval highlighted, for (A) infants and (C) adults. Time windows of cluster corrected above chance accuracy are denoted by the horizontal solid lines. Participants with fewer than the specified number of artifact-free trials are excluded (see Fig. 1). Right: Average pairwise split-half reliability of the group-level Representational Dissimilarity Matrices of both classification accuracy and Euclidean distance obtained at each trial number threshold with corresponding average and 2.5–97.5 percentiles of the null split-half noise ceiling calculated in the time windows of highest classification accuracy for infants (B) and adults (D). Reliability plots for pre- and post-peak time-windows are additionally shown in Supplementary Fig. S5.

References

    1. Allefeld C., Görgen K., Haynes J.-D. Valid population inference for information-based imaging: from the second-level t-test to prevalence inference. NeuroImage. 2016;141:378–392. doi: 10.1016/j.neuroimage.2016.07.040. - DOI - PubMed
    1. Alwosheel A., van Cranenburgh S., Chorus C.G. Is your dataset big enough? Sample size requirements when using artificial neural networks for discrete choice analysis. J. Choice Model. 2018;28:167–182. doi: 10.1016/j.jocm.2018.07.002. - DOI
    1. Anderson A.J., Zinszer B.D., Raizada R.D.S. Representational similarity encoding for fMRI: Pattern-based synthesis to predict brain activity using stimulus-model-similarities. NeuroImage. 2016;128:44–53. doi: 10.1016/j.neuroimage.2015.12.035. - DOI - PubMed
    1. Aslin R.N., Fiser J. Methodological challenges for understanding cognitive development in infants. Trends Cogn. Sci. 2005;9(3):92–98. doi: 10.1016/j.tics.2005.01.003. - DOI - PubMed
    1. Bayet L., Saville A., Balas B. Sensitivity to face animacy and inversion in childhood: evidence from EEG data. Neuropsychologia. 2021;156 doi: 10.1016/j.neuropsychologia.2021.107838. - DOI - PubMed

Publication types