Skip to main content
Cerebral Cortex (New York, NY) logoLink to Cerebral Cortex (New York, NY)
. 2021 Aug 27;32(6):1142–1151. doi: 10.1093/cercor/bhab273

Dynamic Time Warping Identifies Functionally Distinct fMRI Resting State Cortical Networks Specific to VTA and SNc: A Proof of Concept

Ryan T Philips 1,, Salvatore J Torrisi 2, Adam X Gorka 3, Christian Grillon 4, Monique Ernst 5
PMCID: PMC9077269  PMID: 34448816

Abstract

Functional connectivity (FC) is determined by similarity between functional magnetic resonance imaging (fMRI) signals from distinct brain regions. However, traditional FC analyses ignore temporal phase differences. Here, we addressed this limitation, using dynamic time warping (DTW) within a machine-learning framework, to study cortical FC patterns of 2 spatially adjacent but functionally distinct subcortical regions, namely Substantia Nigra Pars Compacta (SNc) and ventral tegmental area (VTA). We evaluate: 1) the influence of pair of brain regions considered, 2) the influence of warping window sizes, 3) the classification efficacy of DTW, and 4) the uniqueness of features identified. Whole brain 7 Tesla resting state fMRI scans from 81 healthy participants were used. FC between 2 subcortical regions of interests (ROIs) and 360 cortical parcels were computed using: 1) Pearson correlations (PCs), 2) dynamic time-warped PCs (DTW-PC). The separability of SNc-cortical and VTA-cortical network was validated on 40 participants and tested on the remaining 41, using a support vector machine (SVM). The SVM separated the SNc-cortical versus VTA-cortical network with 74.39 and 97.56% test accuracy using PC and DTW-PC, respectively. SVM–recursive feature elimination yielded 20 DTW-PC features that most strongly contributed to the separation of the networks and revealed novel VTA versus SNc preferential connections (P < 0.05, Bonferroni–Holm corrected).

Keywords: 7 Tesla fMRI, cortical parcellation, machine learning, phase difference, Recursive feature elimination

Introduction

Analysis of resting state functional magnetic resonance imaging (fMRI) data has gained prominence as a tool to infer functional connectivity (FC) in brain networks. Functional connectivity is defined as the similarity in neural activity of anatomically distinct brain regions. Surprisingly, an underlying assumption of most FC analyses is temporal stationarity, that is, no phase difference between the signals considered.

However, there is increasing evidence that challenges this assumption. Several studies have demonstrated dynamic changes in FC on the order of seconds (Chang and Glover 2010; Kiviniemi et al. 2011; Handwerker et al. 2012;Jones et al. 2012; Allen et al. 2014). In 1 study, the Pearson correlations (PCs) between a seed region in the posterior cingulate cortex (PCC) and all other brain voxels, were examined as a function of different time windows (32, 64, 128 s) (Handwerker et al. 2012). Findings revealed clear differences in FC in most voxels as a function of the time window lengths and where they were positioned within the entire time series. Similarly, another study, using a time-frequency coherence analysis wavelet transform, reported that the anticorrelations between the default mode network and “task positive” regions were transient (Chang and Glover 2010). There is some evidence that these dynamic changes in FC could reflect changes in underlying neural activity (Chang et al. 2013; Allen et al. 2014). Thus, ignoring the dynamic changes in FC might result in misinterpreting the underlying neural signal and by extension, the connectivity schema.

Different approaches have been proposed that either capture the dynamics or control for the nonstationarity. Methods that capture the dynamic nature of the FC include sliding window approaches (Kiviniemi et al. 2011; Handwerker et al. 2012), spontaneous co-activation pattern analysis (Liu and Duyn 2013; Chen et al. 2015), and Dynamic Conditional Correlation (Choe et al. 2017). These methods essentially provide additional data points that reflect the temporal dynamics.

An approach that corrects the phase differences is dynamic time warping (DTW) (Meszlényi et al. 2017). Rather than reporting the dynamics, DTW performs a nonlinear warp. DTW is a widely used signal processing method, initially introduced for speech recognition (Sakoe and Chiba 1978) and employed to identify the optimal temporal alignment between a pair of signals subject to certain constraints. DTW has been used to identify patterns of similar activity in single neuron recordings (Chi et al. 2007; Cao et al. 2016), and EEG signals (Aarabi et al. 2009). The goal of DTW is to perform a nonlinear time warp of the 2 signals such that the distance between them is minimized. Constraints restrict the amount of warping allowed. DTW reduces phases differences arising from time lags, compressions, and dilations.

Both dynamic FC methods and DTW address the issue of phase difference between resting state fMRI (rsfMRI) signals using different techniques. Dynamic FC methods increase the dimensionality of the input space to account for these phase differences, whereas DTW warps the signal to minimize the phase differences. One advantage of DTW over methods that merely capture the dynamics is that phase differences due to shifts between different brain states (Sadaghiani et al. 2015; Preti et al. 2017), errors arising from variability in the hemodynamic response (Lindquist et al. 2009) as well as spurious ones introduced due to noise (Hutchison et al. 2013) can be corrected.

One study has documented the feasibility of using DTW on resting state data (Meszlényi et al. 2017). They report 2 important findings using 3 Tesla fMRI data. Firstly, DTW correlation coefficients show lower variability as compared with the standard zero-lagged correlation scores across 20 runs on the same participant. Secondly, DTW correlation coefficients at the whole brain level improve gender classification accuracy as compared with the standard correlation coefficients on the consortium for reliability and reproducibility (Zuo et al. 2014) LMU 1 dataset (Blautzik, Keeser, et al. 2013; Blautzik, Vetter, et al. 2013). Another recent study showed that DTW improves the detection of atypical FC in autism spectrum disorders (Linke et al. 2020).

In these studies, the signals X and Y are warped such that the global distance d(Xwarp,Ywarp) between them is minimized. The distance metric used is Euclidean; however, other metrics such as absolute differences (Manhattan, city block) or Symmetric Kullback–Leibler, Mutual information, cross-correlation have also been proposed (Mohanty et al. 2020). In order to compare their results with correlation scores, they multiplied the global DTW distance by −1 and then demeaned them, so that the potentially irrelevant DTW values are close to zero. In the present study, we also used Euclidean distance as the distance metric. However, rather than artificially converting the DTW distance scores to resemble correlation scores, we first reconstruct the signals Xwarp and Ywarp that minimize global Euclidean distance and then simply look at the PCs between the warped signals, that is, corr (Xwarp,Ywarp).

Dissociating brain networks is crucial for identifying potential pathways and macro-circuits involved in unique brain functions. The ventral tegmental area (VTA) and Substantia Nigra pars compacta (SNc) are 2 such subcortical hubs with quite distinct cortical projections. Prior work in rodents and primates has revealed the existence of parallel VTA and SNc dopaminergic networks. In humans, as the VTA stretches laterally out over the SNc it is not easily separable. More recently; however, efforts have been made to isolate the VTA nucleus as a subregion of the VTA region using high-resolution fMRI (Halliday et al. 2012). In the current study, we use the CIT168 Atlas (Pauli et al. 2018) for the VTA nucleus mask. An explicit boundary with the red nucleus exists, but the transition from PBP to VTA nucleus is implicitly defined using subjective raters.

There has also been some prior work in exploring VTA and SNc projections in humans. For example, a dual regression approach with 3 T resting state data (voxel resolution: 3.8 mm isotropic) was used to identify voxels at the whole brain level that showed greater connectivity with the VTA versus the SNc and vice versa (Murty et al. 2014). Another study examined the projections of subregions of the VTA and SNc using resting state and diffusion data and identified 3 functional subdivisions associated with limbic, cognitive and motor function, respectively (Zhang et al. 2017). It should be noted that these studies do not consider phase differences between the signals of interest.

However, several questions remain unanswered regarding DTW, including: 1) “How useful is DTW for identifying and/or isolating brain networks?” Although prior work has shown that DTW is a more robust measure of FC as compared with PC, the usefulness of this methodology in separating brain networks is yet to be established. 2) “Are DTW-related changes invariant across all pairs of brain regions, or does it differ as a function of the pairs considered?” Because each brain region would be expected to have differing phase relationships, DTW might have varying impacts depending on the pair of brain regions considered. 3) “Does DTW merely accentuate intrinsic correlations between subcortical regions of interest (ROI) pairs, or does it reveal new ROI pairs that were undetected prior to DTW?” Although DTW is expected to improve the correlation between ROI pairs, if this improvement makes all ROI pair uniformly highly correlated, its ability to separate brain networks would be minimal. 4) “If DTW helps separate brain networks, what is the optimal amount of warping?” Although the maximal possible warping is set due to the high-pass filter at 0.01 Hz (100 s), the ideal warping required to separate brain networks may differ.

In order to answer these questions, we propose a hybrid (model-based + model-free) framework. Most FC analyses methods fall into 2 major categories: model-based and model-free. Model-based approaches answer questions about the whole brain connectivity of a region of interest selected based on an a priori hypothesis or from a task-related activation. The traditional model-based method known as seed-based correlation analysis tests the PC between the resting state activity in the seed region and all other voxels in the brain (Biswal et al. 1997). Model-free approaches answer questions about patterns of connectivity at the whole-brain level without an a priori seed. Model-free methods include independent component analysis (Calhoun et al. 2001), principal component analysis (Friston et al. 1993) and clustering methods (Thirion et al. 2006; Van Den Heuvel et al. 2008) and graph theoretic methods (Braun et al. 2012). Clustering methods seek to identify regions that show high and low similarity in activation patterns. A detailed description of various FC analysis methods with their advantages and disadvantages are reviewed by Van Den Heuvel and Pol (2010). Here, we used a hybrid framework where the seeds are selected a priori (model-based) and the classification is performed using a support vector machine (SVM) (model-free).

A preliminary analysis between left versus right ROIs was performed to empirically evaluate the influence of brain region and warping window size. For the main analysis, 2 a priori seed regions (model-based) were selected, namely the VTA and the SNc, because these midbrain nuclei are located close to each other and are known to have distinct cortical projections. The warped and unwarped correlations of these subcortical ROIs with the whole brain parcellation scheme were computed. Various warping adjustments of the window lengths were considered. The “normalized” correlation between each subcortical ROI and each cortical parcel served as the input for a SVM classifier (model-free) to identify SNc versus VTA correlations. A leave-one-out cross-validation (LOOCV) method was used to probe the accuracies achieved with and without different levels of warping. The top features (i.e., subcortico-cortical pairs) responsible for the classification were then identified using a model-free recursive feature elimination (RFE) technique. Finally, the performance of the approach was tested on an entirely separate test set, using the RFE derived features.

Materials and Methods

Participants

Ninety volunteers were recruited for this study. Data from 9 participants were not included for further analysis due to excessive motion. Only right-handed volunteers were recruited. For the 81 participants included in the analysis, the mean age was 26.03 years [5.49 standard deviation (SD)], and 41 were females. Informed written consent was obtained from all participants and approved by the National Institute of Mental Health (NIMH) Combined Neuroscience institutional review board. All participants were certified as being healthy using the following exclusion criteria: 1) current or past Axis I psychiatric disorder as assessed via a clinician administered SCID-I/NP (First et al. 2001), 2) first-degree relative with a psychotic disorder, 3) a medical condition conflicting with safety or design of the study, 4) brain abnormality on magnetic resonance imaging (MRI) as assessed by a radiologist, (e) positive toxicology screen, or (f) MRI contraindication.

Data Acquisition

Functional and structural scans were acquired using a Siemens Magnetom 7T scanner and 32-chanel head coil with the following parameters. The structural scan was an MP2rage scan with a voxel resolution of 0.7 mm isotropic, repetition time (TR) of 6000 ms, echo time (TE) of 3.02 ms, acquisition matrix of 320 × 320, flip angle of 0°. The functional scan, collected for 10 min, had a voxel resolution of 1.2 mm isotropic, TR of 2500 ms, TE of 27 ms, acquisition matrix of 160 × 160, and flip angle of 55°. For physiological noise removal, respiration was measured with a belt around the diaphragm, and cardiac pulse was measured with a pulse oximeter on the index finger. Physiological data were sampled at 500 hz using AcqKnowledge software connected via a BioPac MP150 system.

Masks and Atlases

Two ROIs and 360 cortical target parcels were defined based on the CIT168 Atlas (Pauli et al. 2018) and the Glasser HCP Atlas (Glasser et al. 2016), respectively. The probabilistic subcortical ROIs for the VTA and SNc were thresholded at 50% to minimize the overlap between them.

Preprocessing

The resting state fMRI and structural MRI data were preprocessed using the afni_proc pipeline (Cox 1996). The major steps were: “despike, ricor, tshift, align, tlrc, volreg, mask, and regress.” The “despike” step truncated spikes from the time series data at the voxel level. The “ricor” step was used to remove the cardiac and respiratory signals using retrots.py’s implementation of retrospective image correction (RETROICOR) (Glover et al. 2000). The “tshift” step was used to time align the volumes at the beginning of each TR. The “align” block aligned the structural data to the echo planar imaging (EPI) using the local pearson coefficient (LPC) algorithm (Saad et al. 2009). A “blip” module was included to correct nonlinear distortions in the gradient echo EPI, using a short (10 TRs) blip sequence with reverse phase encoding The “tlrc” step nonlinearly warped the structural data to a template in MNI space using AFNI’s 3dQwarp. The “volreg” step aligned the EPI data to the minimum outlier volume and warped the EPI data to the standard space. The regress step included modules that regressed out the first 2 principal components from the ventricles, segmented with FreeSurfer 6 (Fischl 2012). In addition, the mean activity in the csf cisterns was also regressed out. The motion regressors were demeaned and their derivatives were computed and added as additional regressors of no interest. Those TRs in which the Euclidean norm of the motion derivative exceeded 0.3 were censored out. The average censoring was 4.04 TRs (out of 238). In addition, TRs in which more than 20% of the voxels were flagged as outliers were censored. Bandpass regressors of 0.01–0.1 Hz were additionally incorporated into noise regressions. The “anaticor” algorithm was used to regress out local noise signals within 12 mm of eroded white mater volume (Jo et al. 2010). No smoothing was performed because we averaged the signal within each ROI and parcel (Details in the “Processing” section). A general linear model was constructed with the regressors described above, and the residual signal was computed and used as the output signal for further analysis.

Processing

Resampling the Masks and Atlas to Define ROIs

The Glasser HCP atlas and the CIT168 Atlas were down-sampled to the same voxel resolution as the EPI resting state data. The subcortical ROIs (i.e., probabilistic maps) of interest were then thresholded at 50% in order to minimize their overlap with each other.

Extracting the Signal within each ROI and Parcel

The resting state activity in each ROI and parcel was extracted using the “3dROIstats” function. In total, the average activity of each of the 360 cortical parcels (Glasser HCP atlas) and 2 primary subcortical ROIs (CIT168 Atlas) were computed for each participant.

Computing Functional Connectivity

A total of 360 (cortical) × 2 (subcortical) = 720 pairs of parcel-ROI pairs were defined for each participant.

The PCs were computed using the formula:

graphic file with name DmEquation1.gif

where Inline graphic is the covariance between the averaged activity in each subcortical ROI and cortical parcel pair Inline graphic and Inline graphic, Inline graphic are the standard deviations corresponding to Inline graphic.

DTW stretches the signal from each pair of ROIs to a common set of instants, such that the sum of Euclidian distances between the transformed points is minimized. The MATLAB function “dtw(S,C,maxsamp)” was used to warp the signals; where S,C correspond to the signals from the subcortical and cortical ROIs respectively, and “maxsamp denotes the width of the adjustment window in which warping is allowed. Thus, it restricts the warping path to be within “maxsamp” samples of a straight-line fit between S, C, and helps avoid overfitting. Different “maxsamp” values from 1 to 12 TRs were chosen. (For representational purposes “maxsamp” = 1,2,6,12 TR are shown in Fig. 2). The function returns the Euclidean distance and a set of indices that indicates the warping required for the 2 signals. The MATLAB dtw function has additional output variables in addition to the distance score:

Figure 2 .


Figure 2

LOOCV accuracy (A) and test accuracy (B) for different warping window sizes (maxsamp). Larger window sizes resulted in higher accuracy levels. Similarly, increasing the number of top features (determined using the RFE), resulted in an initial increase in accuracy which saturated at around 7 features. The maxsamp = 0 (while not matlab acceptable) is merely used to denote that the is no warping done prior to the PC. Similarly, a maxsamp of 6 corresponded to a warping window of 6 TRs, that is, 15 s. (C) From left to right: VTA ROI, SNc ROI, Glasser atlas parcels, and reduced opacity Glasser atlas parcels superimposed on the averaged standard space anatomical image.

[dist,ix,iy] = dtw(x,y) returns the common set of instants, or warping path, such that x(ix) and y(iy) have the smallest possible dist between them. The vectors ix and iy have the same length. Each contains a monotonically increasing sequence in which the indices to the elements of the corresponding signal, x or y, are repeated the necessary number of times. We use ix and iy to reconstruct the warped signals. The PC is computed on these warped signals.

Classification Using SVM

The 2 types of functional connectivity, computed using the 2 techniques described above, were used as feature vectors for a SVM with a training set of 40 participants (randomly selected from the 81 participants), and the remaining 41 participants form the test set. A feature vector was defined as the functional connectivity scores between every cortical parcel and a given subcortical ROI. Thus, each feature vector had a dimension of 360 × 1. The correlations for each feature were normalized across participants [(x-mean)/SD]. Note: The mean and SD were calculated based on the data from the training set. A LOOCV approach was used for validation. A RFE technique was used to determine and rank the features (here FC from each ROI-parcel pair) most important for classification. Additional SVMs were trained with dimensions corresponding to the top k features (as determined by the RFE) and validated in a similar fashion. This process was repeated using the LOOCV approach. The trained classifier was then tested on an independent sample of 41 participants.

Additional Statistics

A 2-sample t-test was performed on each of the top k features identified by RFE, with VTA-to-cortical features and SNc-to-cortical features considered as the 2 groups. The Bonferroni–Holm correction was used to correct for multiple comparisons. Of note, there was a possibility that different subsets of features were selected at each iteration of the SVM-RFE-LOOCV procedure. The reproducibility of the top k features across LOOCV iterations was then evaluated using Fleiss’s coefficient (Fleiss and Cohen 1973).

Results

Influence of Warping Window and Brain Regions

In order to empirically evaluate the role of window sizes (“maxsamp”) and their effect on subsequent correlation scores, the average activity in the left versus right hemispheres of a few selected ROI pairs were compared (see Fig. 1). The 2 regions considered are the left ROI and the right ROI, respectively. These bilateral ROI pairs were selected to include 1) primary regions, 2) associative regions, and 3) higher cognitive regions. A 2-way analysis of variance (ANOVA) with 11 selected ROI pairs and 4 window widths as factors was performed. There was a significant ROI × “maxsamp” interaction F (30 1716) = 12.29, P < 0.0001.

Figure 1 .


Figure 1

Influence of warping window sizes on the correlation between left versus right ROI pairs selected to include 1) primary regions 2) associative regions and 3) higher cognitive regions. Primary regions such as the primary visual cortex, primary motor cortex, and primary sensory motor cortex have similarly high left versus right correlation scores, irrespective of the warping window used. Increasing the warping caused a small increase in correlation scores for regions with moderate correlation, prior to warping (e.g., left vs. right parietal cortex, PCC, ACC, insula, hippocampus). The bilateral ROI pairs with the largest effect of warping were vmPFC, dlPFC, and Broca’s area. The y-axis has rows that correspond to individual participants repeated for 4 blocks with different maxsamp.

The factors (ROI, maxsamp) were decomposed, and for each ROI pair a 1-way ANOVA with maxsamp as the factor was performed. Primary regions such as the primary visual cortex, primary motor cortex, primary sensory motor cortex have similar left versus right correlation scores, irrespective of the warping window used. The 1-way ANOVA P values for these regions were 0.3355, 0.3355, and 0.1174, respectively. Increasing the warping caused a small increase in correlation scores for regions with moderate correlation, prior to warping (e.g., left vs. right parietal cortex, PCC, anterior cingulate cortex (ACC), insula, hippocampus). The 1-way ANOVA P values were less than 0.0001, 0.0001, 0.0053, 0.0001, and 0.0001, respectively. The bilateral ROI pairs with the largest effect of warping were vmPFC, dlPFC, and Broca’s area. The 1-way ANOVA P values were all less than 0.0001.

To understand the effect of the warping window width, we considered the ROI pair with the largest effect size (i.e., left vs. right Area 45, Broca’s region). The 1-way ANOVA was significant F (3156) = 43.5, P < 0.0001. The post hoc Bonferroni corrected pair wise t-tests showed no significant difference between “maxsamp” = 6 and “maxsamp” = 12, P = 1.0. Therefore, window lengths larger than “maxsamp” = 6 did not improve the correlations.

DTW Increases Classification Accuracy

Furthermore, we considered the dynamic time-warped (DTW) correlations between VTA-cortical pairs and SNc-cortical pairs (360 pairs for each seed), to separate out these 2 networks. The top k features (ROI-parcel pairs) corresponding to each of the 2 midbrain seeds were identified using SVM-RFE. Figure 2A,B presents the accuracy results of a LOOCV and subsequent classification on the test set. Specifically, Figure 2A,B illustrates the results with increasing the number of top features and different warping windows. A “maxsamp” of 0 signified no warping. Thus, the PCs performed on the unwarped signals served as inputs to the SVM classifier. Similarly, a “maxsamp” of 6 corresponded to a warping window of 6 TRs, that is, 15 s.

For a given number of top k features, increasing the “maxsamp” improved accuracy. On the other hand, increasing the number of top features used in the analysis resulted in an initial increase in classification accuracy, which saturated after about 7 features, for every “maxsamp considered. The best cross-validation accuracy achieved with the unwarped signals was around 70%; whereas 99% cross-validation accuracy was achieved with a warping window of 12 TRs. On subsequent testing of the test set containing data from 41 participants, similar trends were observed. The testing accuracies were 74.39% for the unwarped signals and 97.56% for the warped signal with maxsamp = 12 TRs. In order to better understand the role of these warped features, the top k features corresponding to each of the 2 midbrain ROIs were further analyzed and described in the next section.

Top Features (ROI Pairs)

The previous section showed that appropriately warped top k features contributed to near perfect cross-validation accuracy. These top k features contributed maximally to separate out the 2 networks. Figure 3 presents the PCs of the top 20 features, with and without DTW. The ROIs (features) and the pairwise 2-sample (SNc pair vs. VTA pair) t-test significance values (Bonferroni–Holm corrected) are shown for each of the methods. Correlations of the top 20 features using DTW [maxsamp = 12] or no warping [maxsamp = 0] are shown in Figure 3A and C, respectively. In Figure 3B the unwarped [maxsamp = 0] correlations in the top 20 features identified using DTW [maxsamp = 12] are shown, to assess the effect of warping.

Figure 3 .


Figure 3

Correlations of the top 20 features of the “training data” using (A) DTW (maxsamp = 12), (C) No warping (maxsamp = 0). (B) The top 20 features identified using DTW (maxsamp = 12), unwarped (maxsamp = 0) correlations. (D) Correlations in the top 20 features of the “testing data” using DTW (maxsamp = 12). The top half of rows correspond to correlations between the SNc (subscript indicates participant number) and the cortical parcels, whereas the bottom half corresponds to those between VTA (subscript indicates participant number) and the corticial parcels. The correlations were normalized across participants [(x-mean)/SD].

The top features identified using DTW–SVM–RFE showed significant differences of the SNc versus VTA correlation for each of the top 20 features on both the LOOCV (see Fig. 3A) and test set (see Fig. 3D). Table 1 lists the ROI-parcel pairs which, when warped, showed highly correlated activity with the SNc and VTA respectively. However, only a handful of unwarped features showed significant differences in correlations (see Fig. 3C). The top 20 features identified with and without DTW had little overlap with each other. Additionally, the nonwarped correlations of the top 20 features, identified using DTW, were examined and showed no significant correlations (see Fig. 3B).

Table 1.

Top features identified using DTW–SVM–RFE which showed highly correlated warped activity with the SNc and VTA respectively

SNc VTA
Para hippocampal area 2 Parieto occipital sulcus
Area TG dorsal (Granular Temporal pole) Seventh visual area
Dorsal area 24 (ACC) Area PG (inferior parietal lobule)
Area posterior 24 (ACC) Medial area 7 (parietal)
Piriform cortex Ventral 23 a + b (PCC)
Area s32 (dACC) Dorsal 23 a + b (PCC)
Area STS Intraparietal area 2
Posterior Insula
Hippocampus

Discussion

Phase differences between signals result in dynamic changes in FC. Here, we use DTW to warp the signals of interest such that phase differences arising from changing brain states, hemodynamic responses and random noise are minimized. We attempted to answer questions regarding: 1) the influence of the pair of brain regions considered, 2) the influence of warping window sizes, 3) the efficacy of the DTW in separating networks, and 4) the uniqueness of features identified. We first assess the influence of brain regions and warping window by considering FC between left and right parcels. In order to assess the efficacy of DTW in separating networks and the uniqueness of features identified, we used a machine learning framework. As a proof of method, we focused on cortical networks of 2 adjacent, but functionally distinct, subcortical ROIs, namely the VTA and the SNc. We developed a FC analysis pipeline, which used DTW correlations between the subcortico-cortical ROI pairs as features to train a SVM. We demonstrated that the warped features provided better discriminatory power as compared with the nonwarped ones. Additionally, using a RFE technique, we identified those top features (ROI-pairs) that contributed to higher classification accuracy.

First, DTW generally increased the “absolute” pairwise correlation between signals. When considering signal from left versus right hemispheres of a given ROI, regions with high intrinsic correlation prior to warping (primary cortical regions), however, showed minimal or no significant increase in correlations after DTW. However, regions with lower intrinsic correlations (higher cognitive regions) showed the biggest improvement in correlation scores post warping. Interestingly, the latter regions are considered functionally to be higher in the cognitive hierarchy, whereas the former are considered to be functionally lower. Thus, the phase differences might reflect the role of the increasing complexity of representations and increasing feedback (recurrent) connections.

Second, although larger warping windows did increase the correlations between the signals, there appeared to be a ceiling effect at around 6 TRs (15 s) after which the improvement in correlations was marginal. Because the bandpass filter used had a high-pass cut-off frequency of 0.01 Hz (cycles of 100 s), a 100 s (40 TR s) warping window would be able to warp any possible phase shifts in the signals. A previous study had shown that a window size of 20 s was sufficient to detect highly positively correlated regions (Meszlényi et al. 2017). The SVM LOOCV results suggest that a “maxsamp” of 6 TRs (15 s) was enough to adequately classify the subcortico-cortical networks (SNc-cortical vs. VTA-cortical). However, these results may be dataset and task specific. The DTW algorithm provides flexibility to determine the adequate warping levels.

Third, the efficacy of DTW in separating the 2 subcortical projections was demonstrated by using the SVM-RFE framework. The warped features outperformed the nonwarped features across the board. The accuracy of classification improved as the warping window was increased. In addition, as the warping window size increased, the number of features required to separate the 2 networks was also reduced. These results held true for both the LOOCV and testing of the independent test set. In summary, these results provided clear evidence that warping, and the amount of warping, improved classification accuracy.

Finally, the uniqueness of the features identified using DTW–SVM–RFE were examined. The “relative” difference in pairwise correlations served as feature vectors for the SVM. Thus, discrimination improved when one of the subcortical ROIs showed higher correlations with a cortical parcel, across participants, as compared with the other ROI. On the contrary, if both subcortical ROIs showed similar correlations for a particular cortical parcel, this feature (ROI-parcel pair) would hinder classification. Furthermore, if 2 or more features showed similar correlations, these additional features were redundant as far as classification was concerned. Identifying these ROI-parcel pairs that contributed to the classification accuracy, were expected, by extension, to reveal those ROI-parcel pairs, which showed a “relative” difference in warped correlations, and by inference, preferential contribution to 1 of the 2 subcortico-cortical networks. The RFE technique provided a principled way to determine such pairs. The RFE method, as the name suggests, recursively eliminated features that did not contribute to the SVM accuracy and ranked the top features that did. The top 20 features identified using DTW–SVM–RFE were different from the ones identified without DTW. Therefore, warping did not merely accentuate the difference between the regions that already showed significant intrinsic differences in correlations. Rather, DTW–SVM–RFE seemed to reveal regions having phase-shifted correlations, which would not have been identified without warping. As a confirmatory step, we identified the top 20 features using DTW–SVM–RFE and observed that they did not show significant differences in their standard PCs.

The top features provide important information on the cortical regions with preferential connections with 1 or the other ROI. Such preferential connections could be used to map the circuits underlying the unique roles of these small contiguous but functionally distinct structures. These ROIs are dopaminergic hubs and previous animal research has shown that they have widespread yet distinct cortical connections, namely the mesocorticolimbic pathway and the nigrostriatal pathway. The cortical parcels which show such preferential connectivity in the current study were compared with prior human and animal findings. The cortical parcels, which we found to have privileged connectivity with either the SNc or the VTA, echoed findings from previous human studies (Murty et al. 2014; Zhang et al. 2017). The “dorsal area 24, area posterior 24, Area s32, Superior Temporal Gyrus and Insula” have been reported to show SNc > VTA connectivity (Murty et al. 2014; Zhang et al. 2017). The 1 inconsistency is with the “hippocampus/para-hippocampus” activations, which, although also discriminating between VTA and SNc, showed preferential connectivity to the SNc rather than the VTA.

Additionally, the present study reports novel preferential connectivity in humans. The SNc showed preferential connectivity to the “piriform cortex,” a link previously reported in rodents (Xiong and Wesson 2016). As for the VTA, this region exhibited preferential connectivity to the “occipital, parietal, and PCC” (see Table 1). This connectivity between VTA and posterior cortex in humans matches evidence from a primate study (Arsenault et al. 2014). This study reported activation of the inferior parietal lobule by VTA-micro stimulation in primates. Furthermore, a case study of deep brain stimulation (DBS) in swine (n = 8) found that VTA-DBS activated the “PCC” (Settell et al. 2017). Before further interpreting their potential functional significance, these finding need to be validate through replications.

The present work has several strengths: First, the use of a high-resolution (7T) dataset enables the extraction of precise signals from small subcortical ROIs. Second, the cortical parcellation scheme provides better specificity of cortical projections while simultaneously reducing the number of comparisons required, as compared with voxel-based analysis. Third, the dynamic warping approach allows to correct for the phase differences between signals and provides a principled way to study similarity between brain signals. Finally, the SVM approach identifies cortical parcels which show preferential time-warped connectivity to 1 of the 2 subcortical ROIs, and thus avoids the issue of overlapping projections.

It is important to note a few points regarding the interpretation of results and implementation of the methodology used in this study. Firstly, DTW, by its very nature, might make signals that are anticorrelated appear to be correlated. For example, a high correlation score after DTW could also arise from originally anticorrelated signals. On the other hand, low correlation scores after DTW reinforce the finding that the signals do not share a common basis. Thus, warping could possibly phase-shift waveforms such that signals, which were originally anticorrelated, appear to be correlated. This leads to a deeper question regarding ground truth: What do phase shifts in rsfMRI represent? One possible explanation for 2 signals that are anticorrelated is that they are the actually positively correlated signals, with the phase differences arising due to the brain dynamics and temporal delays. Another possible explanation is that they are actually negatively coupled, with 1 region shows deactivations when the other simultaneously shows activations and vice versa. By simply looking at the correlation between the 2 signals, we cannot determine which explanation is correct (ground truth), without some a priori knowledge. This raises the more fundamental question regarding the significance of anticorrelations.

Second, because the method was primarily designed to identify those cortical parcels that showed preferential connectivity to 1 ROI versus the other (VTA vs. SNc), those parcels that showed high but similar correlations with both ROIs were not identified using this method. As a corollary, certain ROI-parcel pairs may show low “absolute” correlations but show strong “relative” correlations [with respect to each ROI (SNc vs. VTA)]. Thus, if the goal of a particular study is to study absolute correlations rather than the difference in correlations between 2 ROI-parcel pairs, the method described may not be optimal.

In summary, the DTW–SVM–RFE approach shows potential for separating brain networks in a principled fashion. As with all novel approaches, the reliability of this method needs to be established via replication, perhaps using datasets with different scanner parameters, preprocessing pipelines, hub ROIs, and parcellation schemes.

Contributor Information

Ryan T Philips, Section on Neurobiology of Fear and Anxiety, National Institute of Mental Health, NIH, Bethesda, MD 20892, USA.

Salvatore J Torrisi, Helen Wills Neuroscience Institute, University of California, Berkeley, CA 94720, USA.

Adam X Gorka, Section on Neurobiology of Fear and Anxiety, National Institute of Mental Health, NIH, Bethesda, MD 20892, USA.

Christian Grillon, Section on Neurobiology of Fear and Anxiety, National Institute of Mental Health, NIH, Bethesda, MD 20892, USA.

Monique Ernst, Section on Neurobiology of Fear and Anxiety, National Institute of Mental Health, NIH, Bethesda, MD 20892, USA.

Funding

This work was supported by the Intramural Research Program of the National Institutes of Mental Health, project no. ZIAMH002798 (clinical protocol 02-M-0321, NCT00047853) to C.G.

Notes

This work utilized the computational resources of the NIH HPC Biowulf cluster (http://hpc.nih.gov).

Conflict of Interest: None declared.

References

  1. Aarabi  A, Kazemi  K, Grebe  R, Moghaddam  HA, Wallois  F. 2009. Detection of EEG transients in neonates and older children using a system based on dynamic time-warping template matching and spatial dipole clustering. Neuroimage. 48:50–62. [DOI] [PubMed] [Google Scholar]
  2. Allen  EA, Damaraju  E, Plis  SM, Erhardt  EB, Eichele  T, Calhoun  VD. 2014. Tracking whole-brain connectivity dynamics in the resting state. Cereb Cortex. 24:663–676. [DOI] [PMC free article] [PubMed] [Google Scholar]
  3. Arsenault  JT, Rima  S, Stemmann  H, Vanduffel  W. 2014. Role of the primate ventral tegmental area in reinforcement and motivation. Curr Biol. 24:1347–1353. [DOI] [PMC free article] [PubMed] [Google Scholar]
  4. Biswal  BB, Kylen  JV, Hyde  JS. 1997. Simultaneous assessment of flow and BOLD signals in resting-state functional connectivity maps. NMR Biomed. 10:165–170. [DOI] [PubMed] [Google Scholar]
  5. Blautzik J, Keeser D, Berman A, Paolini M, Kirsch V, Mueller S, Coates U, Reiser M, Teipel SJ, Meindl T. 2013. Long-term test-retest reliability of resting-state networks in healthy elderly subjects and patients with amnestic mild cognitive impairment. J Alzheimers Dis. 34:741–754. [DOI] [PubMed] [Google Scholar]
  6. Blautzik J, Vetter C, Peres I, Gutyrchik E, Keeser D, Berman A, Kirsch V, Mueller S, Pöppel E, Reiser M. 2013. Classifying fMRI-derived resting-state connectivity patterns according to their daily rhythmicity. Neuroimage. 71:298–306. [DOI] [PubMed] [Google Scholar]
  7. Braun  U, Plichta  MM, Esslinger  C, Sauer  C, Haddad  L, Grimm  O, Mier  D, Mohnke  S, Heinz  A, Erk  S. 2012. Test–retest reliability of resting-state connectivity network characteristics using fMRI and graph theoretical measures. Neuroimage. 59:1404–1412. [DOI] [PubMed] [Google Scholar]
  8. Calhoun  VD, Adali  T, Pearlson  GD, Pekar  JJ. 2001. A method for making group inferences from functional MRI data using independent component analysis. Hum Brain Mapp. 14:140–151. [DOI] [PMC free article] [PubMed] [Google Scholar]
  9. Cao  Y, Rakhilin  N, Gordon  PH, Shen  X, Kan  EC. 2016. A real-time spike classification method based on dynamic time warping for extracellular enteric neural recording with large waveform variability. J Neurosci Methods. 261:97–109. [DOI] [PMC free article] [PubMed] [Google Scholar]
  10. Chang  C, Glover  GH. 2010. Time–frequency dynamics of resting-state brain connectivity measured with fMRI. Neuroimage. 50:81–98. [DOI] [PMC free article] [PubMed] [Google Scholar]
  11. Chang  C, Liu  Z, Chen  MC, Liu  X, Duyn  JH. 2013. EEG correlates of time-varying BOLD functional connectivity. Neuroimage. 72:227–236. [DOI] [PMC free article] [PubMed] [Google Scholar]
  12. Chen  JE, Chang  C, Greicius  MD, Glover  GH. 2015. Introducing co-activation pattern metrics to quantify spontaneous brain network dynamics. Neuroimage. 111:476–488. [DOI] [PMC free article] [PubMed] [Google Scholar]
  13. Chi  Z, Wu  W, Haga  Z, Hatsopoulos  NG, Margoliash  D. 2007. Template-based spike pattern identification with linear convolution and dynamic time warping. J Neurophysiol. 97:1221–1235. [DOI] [PubMed] [Google Scholar]
  14. Choe  AS, Nebel  MB, Barber  AD, Cohen  JR, Xu  Y, Pekar  JJ, Caffo  B, Lindquist  MA. 2017. Comparing test-retest reliability of dynamic functional connectivity methods. Neuroimage. 158:155–175. [DOI] [PMC free article] [PubMed] [Google Scholar]
  15. Cox  RW. 1996. AFNI: software for analysis and visualization of functional magnetic resonance neuroimages. Comput Biomed Res. 29:162–173. [DOI] [PubMed] [Google Scholar]
  16. Fischl  B. 2012. FreeSurfer. Neuroimage. 62:774–781. [DOI] [PMC free article] [PubMed] [Google Scholar]
  17. Fleiss  JL, Cohen  J. 1973. The equivalence of weighted kappa and the intraclass correlation coefficient as measures of reliability. Educ Psychol Meas. 33:613–619. [Google Scholar]
  18. Friston  K, Frith  C, Liddle  P, Frackowiak  R. 1993. Functional connectivity: the principal-component analysis of large (PET) data sets. J Cereb Blood Flow Metab. 13:5–14. [DOI] [PubMed] [Google Scholar]
  19. Glasser  MF, Coalson  TS, Robinson  EC, Hacker  CD, Harwell  J, Yacoub  E, Ugurbil  K, Andersson  J, Beckmann  CF, Jenkinson  M. 2016. A multi-modal parcellation of human cerebral cortex. Nature. 536:171. [DOI] [PMC free article] [PubMed] [Google Scholar]
  20. Glover  GH, Li  TQ, Ress  D. 2000. Image-based method for retrospective correction of physiological motion effects in fMRI: RETROICOR. Magn Reson Med. 44:162–167. [DOI] [PubMed] [Google Scholar]
  21. Halliday  G, Reyes  S, Double  K. 2012. Substantia nigra, ventral tegmental area and retrorubral fields. The human nervous system. Academic Press; Elsevier, pp. 439–455. [Google Scholar]
  22. Handwerker  DA, Roopchansingh  V, Gonzalez-Castillo  J, Bandettini  PA. 2012. Periodic changes in fMRI connectivity. Neuroimage. 63:1712–1719. [DOI] [PMC free article] [PubMed] [Google Scholar]
  23. Hutchison RM, Womelsdorf T, Allen EA, Bandettini PA, Calhoun VD, Corbetta M, Della Penna S, Duyn JH, Glover GH, Gonzalez-Castillo J. 2013. Dynamic functional connectivity: promise, issues, and interpretations. Neuroimage. 80:360–378. [DOI] [PMC free article] [PubMed] [Google Scholar]
  24. Jo  HJ, Saad  ZS, Simmons  WK, Milbury  LA, Cox  RW. 2010. Mapping sources of correlation in resting state FMRI, with artifact detection and removal. Neuroimage. 52:571–582. [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Jones  DT, Vemuri  P, Murphy  MC, Gunter  JL, Senjem  ML, Machulda  MM, Przybelski  SA, Gregg  BE, Kantarci  K, Knopman  DS. 2012. Non-stationarity in the “resting brain’s” modular architecture. PLoS One. 7:e39731. [DOI] [PMC free article] [PubMed] [Google Scholar]
  26. Kiviniemi  V, Vire  T, Remes  J, Elseoud  AA, Starck  T, Tervonen  O, Nikkinen  J. 2011. A sliding time-window ICA reveals spatial variability of the default mode network in time. Brain Connect. 1:339–347. [DOI] [PubMed] [Google Scholar]
  27. Lindquist MA, Loh JM, Atlas LY, Wager TD. 2009. Modeling the hemodynamic response function in fMRI: efficiency, bias and mis-modeling. Neuroimage. 45:S187–S198. [DOI] [PMC free article] [PubMed] [Google Scholar]
  28. Linke  A, Mash  L, Fong  C, Kinnear  M, Kohli  J, Wilkinson  M, Tung  R, Keehn  RJ, Carper  R, Fishman  I. 2020. Dynamic time warping outperforms Pearson correlation in detecting atypical functional connectivity in autism spectrum disorders. Neuroimage. 223:117383. [DOI] [PMC free article] [PubMed] [Google Scholar]
  29. Liu  X, Duyn  JH. 2013. Time-varying functional network information extracted from brief instances of spontaneous brain activity. Proc Natl Acad Sci. 110:4392–4397. [DOI] [PMC free article] [PubMed] [Google Scholar]
  30. Meszlényi  RJ, Hermann  P, Buza  K, Gál  V, Vidnyánszky  Z. 2017. Resting state fMRI functional connectivity analysis using dynamic time warping. Front Neurosci. 11:75. [DOI] [PMC free article] [PubMed] [Google Scholar]
  31. Mohanty  R, Sethares  WA, Nair  VA, Prabhakaran  V. 2020. Rethinking measures of functional connectivity via feature extraction. Sci Rep. 10:1–17. [DOI] [PMC free article] [PubMed] [Google Scholar]
  32. Murty  VP, Shermohammed  M, Smith  DV, Carter  RM, Huettel  SA, Adcock  RA. 2014. Resting state networks distinguish human ventral tegmental area from substantia nigra. Neuroimage. 100:580–589. [DOI] [PMC free article] [PubMed] [Google Scholar]
  33. Pauli  WM, Nili  AN, Tyszka  JM. 2018. A high-resolution probabilistic in vivo atlas of human subcortical brain nuclei. Scientific Data. 5:180063. [DOI] [PMC free article] [PubMed] [Google Scholar]
  34. Preti MG, Bolton TA, Van De Ville D. 2017. The dynamic functional connectome: State-of-the-art and perspectives. Neuroimage. 160:41–54. [DOI] [PubMed] [Google Scholar]
  35. Sadaghiani S, Poline J-B, Kleinschmidt A, D'Esposito M. 2015. Ongoing dynamics in large-scale functional connectivity predict perception. Proc Natl Acad Sci. 112:8463–8468. [DOI] [PMC free article] [PubMed] [Google Scholar]
  36. Saad  ZS, Glen  DR, Chen  G, Beauchamp  MS, Desai  R, Cox  RW. 2009. A new method for improving functional-to-structural MRI alignment using local Pearson correlation. Neuroimage. 44:839–848. [DOI] [PMC free article] [PubMed] [Google Scholar]
  37. Sakoe  H, Chiba  S. 1978. Dynamic programming algorithm optimization for spoken word recognition. IEEE Trans Acoust Speech Signal Process. 26:43–49. [Google Scholar]
  38. Settell  ML, Testini  P, Cho  S, Lee  JH, Blaha  CD, Jo  HJ, Lee  KH, Min  H-K. 2017. Functional circuitry effect of ventral tegmental area deep brain stimulation: imaging and neurochemical evidence of mesocortical and mesolimbic pathway modulation. Front Neurosci. 11:104. [DOI] [PMC free article] [PubMed] [Google Scholar]
  39. Thirion  B, Dodel  S, Poline  J-B. 2006. Detection of signal synchronizations in resting-state fMRI datasets. Neuroimage. 29:321–327. [DOI] [PubMed] [Google Scholar]
  40. Van Den Heuvel  M, Mandl  R, Pol  HH. 2008. Normalized cut group clustering of resting-state FMRI data. PLoS One. 3:e2001. [DOI] [PMC free article] [PubMed] [Google Scholar]
  41. Van Den Heuvel  MP, Pol  HEH. 2010. Exploring the brain network: a review on resting-state fMRI functional connectivity. Eur Neuropsychopharmacol. 20:519–534. [DOI] [PubMed] [Google Scholar]
  42. Xiong  A, Wesson  DW. 2016. Illustrated review of the ventral striatum’s olfactory tubercle. Chem Senses. 41:549–555. [DOI] [PMC free article] [PubMed] [Google Scholar]
  43. Zhang  Y, Larcher  KM-H, Misic  B, Dagher  A. 2017. Anatomical and functional organization of the human substantia nigra and its connections. Elife. 6:e26653. [DOI] [PMC free article] [PubMed] [Google Scholar]
  44. Zuo X-N, Anderson JS, Bellec P, Birn RM, Biswal BB, Blautzik J, Breitner JC, Buckner RL, Calhoun VD, Castellanos FX. 2014. An open science resource for establishing reliability and reproducibility in functional connectomics. Sci Data. 1:1–13. [DOI] [PMC free article] [PubMed] [Google Scholar]

Articles from Cerebral Cortex (New York, NY) are provided here courtesy of Oxford University Press

RESOURCES