Abstract
Background:
Repetitive transcranial magnetic stimulation (TMS) is clinically effective for major depressive disorder (MDD) and investigational for other conditions including posttraumatic stress disorder (PTSD). Understanding the mechanisms of TMS action and developing biomarkers predicting response remain important goals. We applied a combination of machine learning and electroencephalography (EEG), testing whether machine learning analysis of EEG coherence would 1) predict clinical outcomes in individuals with comorbid MDD and PTSD, and 2) determine whether an individual had received a TMS course.
Methods:
We collected resting-state 8-channel EEG before and after TMS (5Hz to the left dorsolateral prefrontal cortex). We used Lasso regression and Support Vector Machine (SVM) to test the hypothesis that baseline EEG coherence predicted the outcome and to assess if EEG coherence changed after TMS.
Results:
In our sample, clinical response to TMS were predictable based on pretreatment EEG coherence (n = 29). After treatment, 13/29 had more than 50% reduction in MDD self-report score 12/29 had more than 50% reduction in PTSD self-report score. For MDD, area under roc curve was for MDD was 0.83 (95% confidence interval 0.69–0.94) and for PTSD was 0.71 (95% confidence interval 0.54–0.87). SVM classifier was able to accurately assign EEG recordings to pre- and post-TMS treatment. The accuracy for Alpha, Beta, Theta and Delta bands was 75.4±1.5%, 77.4±1.4%, 73.8±1.5%, and 78.6±1.4%, respectively, all significantly better than chance (50%, p<0.001).
Limitation:
Limitations of this work include lack of sham condition, modest sample size, and a sparse electrode array. Despite these methodological limitations, we found validated and clinically meaningful results.
Conclusions:
Machine learning successfully predicted non-response to TMS with high specificity, and identified pre- and post-TMS status using EEG coherence. This approach may provide mechanistic insights and may also become a clinically useful screening tool for TMS candidates.
Keywords: resting state EEG, major depressive disorder, posttraumatic stress disorder, transcranial magnetic stimulation, machine learning, functional connectivity
INTRODUCTION
Posttraumatic stress disorder (PTSD) and major depressive disorder (MDD) are common, impairing conditions. Their symptoms overlap, and they are notably comorbid: up to half of those with PTSD also have MDD (Campbell et al., 2007; Franklin and Zimmerman, 2001). Conventional pharmacologic and behavioral treatments fail to provide adequate relief for many individuals with either illness (Rush et al., 2006).
Repetitive transcranial magnetic stimulation (rTMS, hereafter simply TMS) is effective for pharmacoresistant MDD. TMS uses a pulsed magnetic field to induce an electrical current and modulate activity in a brain region. For MDD, this is typically left dorsolateral prefrontal cortex (DLPFC). Mechanisms of action of TMS for MDD and other conditions are thought to include changes within and across brain circuits implicated in symptomatology.
For both MDD and PTSD, functional magnetic resonance imaging (fMRI) and EEG research have led to hypotheses that symptoms may arise from deficits within cortical networks and how they interact. In symptomatic MDD, functional connections within the frontoparietal network and connectivity between the frontoparietal and dorsal attention networks may both be diminished. In contrast, connectivity between the frontoparietal and the default networks may be enhanced (Kaiser et al. 2015). Similarly, PTSD is associated with deficits within the frontoparietal network, and with enhanced salience network connectivity and dysregulated default mode network connectivity (Koch et al., 2016). In both disorders, deficits within the frontoparietal network might indicate a shared deficit in cognitive control, resulting in inefficient regulation of ruminative and task- or context-irrelevant thoughts. Supporting these hypothesized mechanisms of TMS action, we recently reported data suggesting TMS reduces fMRI default mode network connectivity and increases network-to-network connectivity relationships in patients with comorbid MDD and PTSD (Philip et al., 2017a).
Since TMS imposes notable financial and logistical burdens, a practical biomarker to screen patients and guide treatment would be highly valuable. EEG biomarkers have been proposed in MDD (Fingelkurts et al., 2007; Leuchter et al., 2012; Olbrich and Arns, 2013). Of particular relevance are EEG metrics that quantify the similarity and correlation (coherence) of the signal at recording sites (Bendat and Piersol, 2010), providing insight into brain functional connectivity. As an example, Leuchter et al (2012) have compared the EEG coherence between patients with MDD and healthy controls and found increased coherence in patients with MDD, most notably in short and long-range connections originating from frontal electrodes. Studies have also pointed to changes in EEG functional connectivity after TMS treatment (Bailey et al., 2018; Noda et al., 2017). Despite these attempts, a recent meta-analysis (Widge et al., 2019) of the predictive abilities of EEG biomarkers of depression have pointed to a notable publication bias, suggesting that the previous attempts in finding EEG correlates of depression are generally unreliable. Overall, it seems that approaches that combine machine learning algorithms with biological data tend to provide better insight in predicting therapeutic outcomes (See Lee et al., 2018 for a review).
EEG signals are complex, time-varying, and have low spatial resolution, resulting in historically limited development of brain-circuit based models of illness and actions of therapies. Data-driven approaches such as machine learning are particularly relevant to the use of EEG to understand effects of TMS. TMS treatment for MDD is typically delivered over left DLPFC, a relatively localized target compared to that for pharmacotherapy. EEG investigations of TMS can focus on signal over regions anatomically and functionally linked to the PFC site of stimulation (Li et al., 2004; Paus et al., 2001). Consistency in TMS coil placement and stimulation parameters makes study of its effects computationally tractable.
Here, we used a novel data-driven approach to analyzing EEG coherence before and after a TMS course to delineate how a course the treatment affects circuit coherence and to identify candidate biomarkers of potential clinical utility. We hypothesized that cortico-cortical coherence would be modulated after TMS treatment in patients with MDD+PTSD, and tested how pre-treatment EEG might predict treatment outcome in patients receiving TMS treatment.
EXPERIMENTAL PROCEDURES
Thirty-five participants (60% male, 94.3% Caucasian, mean age 51.6, SD=10.3) enrolled in this prospective, unblinded trial of 5 Hz TMS at the Providence VA Medical Center (PVAMC) and Butler Hospital (NCT02273063). All met DSM-5 criteria for MDD+PTSD, of at least moderate severity (clinical global impressions, CGI), and criteria for TMS. Medication and psychotherapeutic treatments were stable. See Supplement methods for entry criteria details. Pre-treatment EEG was obtained in 34 out of 35 participants, and 30 participants also had post-TMS EEG. PTSD and MDD severity were measured with the checklist for DSM-5 PTSD (PCL-5; Weathers et al., 2013) and the Inventory of Depressive Symptomatology, Self-Report (IDS-SR; Rush et al., 1996), respectively. Both scales were administered at baseline and within 72 hours after the final TMS treatment. The improvement was quantified by calculating percent reduction in PCL-5 and IDS-SR relative to baseline. Written informed consent was obtained for all study procedures, which were approved by the PVAMC and Butler Institutional Review Boards. Neuroimaging findings from a partially overlapping group are reported separately (Philip et al., 2017b).
TMS Stimulation was delivered via the NeuroStar TMS device (Neuronetics, Inc., Malvern, PA). Treatments were delivered over the left DLPFC (F3 using the international EEG 10/20 system, (Beam et al., 2009)). Stimulation was delivered at a maximum intensity of 120% of resting motor threshold (MT), in 5-second trains with a 14-second inter-train interval at 5 Hz. There with 3,000 pulses/session initially, which could be increased to 4,000/session for participants without ≥50% improvement by the end of week 3 (further details in (Philip et al., 2017a)).
EEG Acquisition.
Resting-state eyes-closed EEG was acquired while participants lay quietly in a sound-attenuated room. Participants were asked to avoid moving during recordings, and to keep eyes open for 1 minute, closed for 10–12 minutes, then open for another minute. Only eyes closed data were analyzed. Dry electrodes were placed over FP1, FP2, FPz, F3, Fz, Cz, Pz, and Oz (Figure 1a, 10–20 system), referenced against two connected mastoid electrodes, using an electrode cap and a commercial 8-channel EEG device (ENOBIO8, Neuroelectrics, Cambridge, MA, USA). This sparse montage and dry electrode method was chosen to minimize setup time and participant burden. Electrodes covered the TMS target area in frontal cortex plus midline sites where we expected modulation in coherence, informed by previous work (Leuchter et al., 2012). EEG acquisition used a low pass filter (50Hz), a high-pass filter (0.5 Hz), sampled at 500Hz and were digitized at 24-bit precision.
Figure 1. EEG electrode placement and Coherence Maps.
Panel a depicts the placement of 8 recording electrodes. TMS was delivered over site F3 targeting left DLPFC. To avoid noise introduced by a common reference, we used a bipolar montage by subtracting the signal from neighboring electrodes. Red dots mark the location of the bipolar montage sites. Coherence was calculated between all possible pairings of recording sites (panel b, n = 28). The coherence before and after treatment with TMS in Alpha, Beta, Delta and Theta bands are depicted. The pre-treatment coherence is presented in the left lower corner and post-treatment coherence in the right upper corner. Overall, coherence did not significantly change after treatment.
EEG Analysis:
EEG preprocessing was conducted using custom computer scripts written for MATLAB. EEG data were re-referenced through amplitude subtraction into eight nearest-neighbor bipolar electrode pairs. We used coherence to calculate functional connectivity. Coherence quantifies the statistical dependence between two signals in frequency domain and as such, is vulnerable to noise that is shared between electrodes. Use of bipolar montage enabled us to avoid such common noise issues (e.g. noise introduced by a common reference electrode, zero-lag noise from volume conduction, etc …) when calculating coherence as these types of noise would be subtracted through bipolar referencing (Nunez et al., 1997). The data were then segmented into 2-second non-overlapping epochs; any epochs containing artifacts (eye movement, muscle, or movement-related) or amplifier drift were removed after manual inspection (masked for responders’ status). Only data from individuals with >120 seconds of usable data (sixty 2-second epochs) were used in the analysis. We also excluded EEG data when it was not recorded in all 8 electrodes or one or more electrodes had low quality of data; this was necessarily as extrapolating the signal from neighboring sites was not feasible with 8 recording electrodes. Data from 29 participants (83% of the original data set) fulfilled the above criteria. Eye closed recording were done for 10–12 minutes and the sessions that met the above criteria, we had an average of 7.8 ± 2.9 minutes of usable data. Power spectral density of artifact-free 2-second epochs was calculated using a Welch Power Spectral Density estimate and a Hamming window with a 50% overlap (MATLAB Signal Processing Toolbox). Power was calculated for frequency bands corresponding to delta (1–4 Hz), theta (4–8 Hz), alpha (8–13 Hz), beta (13–30 Hz), for all nearest-neighbor bipolar electrode pairs (see list in supplementary methods).
We used coherence to quantify the statistical dependence between two EEG signals and as a tool to make inferences about functional connectivity between two recorded sites. We calculated coherence between all possible pairings of the eight bipolar recording sites (28 possible pairings for 8 recording sites). Coherence was calculated based on spectral density (estimated via Welch method and a Hamming window with a 50% overlap) using the following function:
where for each frequency, f, Gx,y(f) is the cross-spectral density between x and y, and Gx,x(f) and Gy,y(f) are the auto-spectral density of x and y respectively. |G| denotes the modulus of G. Coherence values, Cx,y(f), vary between 0 and 1 with 0 denoting no statistical relationship and 1 being full coherence. Coherence values from individual bins within a frequency band were averaged to obtain the coherence for that band.
Machine Learning:
Conceptual design of our analytic pipeline followed recommendations of Huys et al. (2016). The analyses were conducted using MATLAB and MATLAB Statistics and Machine Learning Toolbox’s implementation of LASSO regression. For Support Vector Machine, we used the LIBLINEAR library (Fan et al., 2008) compiled in MATLAB. We defined post treatment changes in PCL-5 and IDS-SR (percent change after treatment) as our ground truth. We then used least absolute shrinkage and selection operator (LASSO; (Tibshirani, 1996)) regression; trained on 28 coherence values (features) to predict the percent change in the above clinical scores. LASSO is similar to conventional regression in minimizing the sum of squared errors but has additional features to limit the model complexity. We built the regression model for a range of penalty coefficients (Lambda) and picked the Lambda with the lowest Standard Error of the Mean (based on leave-one-out cross validation). To this end, we tested the model using a geometric sequence of 100 Lambda values. In each case, we picked the largest number that gave a nonnull model as the largest lambda and set the ratio between smallest to the largest value to 10−4. The model performance and standard error was assessed using a leave-one-out cross-validation (re-running the analysis 29 times, leaving one sample out at each iteration) (Kohavi, 1995). We used coefficient of determination, R2, to quantify the goodness of fit. The significance of R2 was assessed by calculating Standard Error through bootstrapping. To make sure that the results presented are not a function of our (leave-one-out) cross-validation regimen,we repeated the analysis with different validation schemes(see Suppl figure 5).
The Receiver Operating Characteristic (ROC) curves, area under ROC (AUC), sensitivity and specificity were calculated by defining a 50% reduction in clinical scales as clinical response. Choosing a 50% reduction as clinical response for IDS-SR is well-established (Rush et al., 1996). There are conflicting definitions of response on the PCL-5 (e.g.,>10 point change, Weathers et al., 2013) but we chose to use a more conservative thresholds, i.e., 50% change.
The optimal sensitivity and specificity values are selected by finding the optimal operating point of the ROC curve (using iso-performing line, using implementation in MATLAB Machine Learning and Statistics Toolbox). The confidence intervals for AUC are calculated by 10,000 resampling with replacement (bootstrapping). Sample size estimates and consideration are discussed in the supplementary methods.
We used shuffling to confirm that results obtained with the prediction was not affected by overfitting. To do this, we randomly shuffled the clinical outcome values (changes in PCL-5 and IDS-SR) and reran the LASSO regression, training the model to use the EEG data to predict the (now randomly shuffled) outcome values. We repeated this process 5,000 times, each time shuffling the outcome data and rerunning the model. Similar to the original analysis, the model’s ability to predict outcome was assessed with leave-one-out cross validation (i.e. Shuffled training set used to predict outcome of one left-out shuffled test set and this was repeated for all possible iterations).
We also used Support Vector Machine (SVM, specifically an L1 regularized SVM implementation through LIBLINEAR, (Fan et al., 2008), see supplementary methods) to train a linear classifier and then assign observations as pre- or post-TMS. The analysis was done only on participants where we had a noise free pre-and post-TMS EEG recording (n = 21). The algorithm was trained on 28 features (i.e., coherence in all possible pairings of the eight recording sites). Linear SVM has one modifying parameter, C (i.e., misclassification cost, error penalty). When a small misclassification cost is used, the algorithm can find more global and generalizable trends in the data but is prone to making errors. A higher misclassification cost is associated with more specific solutions, a lower error rate, but less generalizability. The goal is a misclassification cost best balancing error and generalizability.
We thus explored misclassifications (C) values ranging from 0.1 – 100 (log scale) to find the C with the best balance between error and generalizability. The classifier was trained on a training data set comprising all EEG recordings except for one each pre- and post-TMS (i.e. leave-2-out cross validation). Note that this was different from the cross-validation used by LASSO where we used leave-one-our cross validation. We used leave-two out with the classifier in order to have both conditions represented on the test set of each cross-validation iteration. This process was repeated for all possible iterations of leave-2-out. The performance was then examined on the test set left out of training. The classifier was independently trained for the four frequency bands.
To investigate how the classifier solved the problem we divided coherence data into three groups: local (between the left frontal electrodes), midline (central and occipital electrodes), and a set between a left frontal and a midline electrode. In a series of tests, we then sequentially “left out” one of these three coherence sets and retrained the classifier to identify pre- and post-TMS sessions, an approach called “feature bagging” (Bryll et al., 2003). Comparing the performance of the classifier with one “bagged” feature set to its performance when using all features allows estimation of the importance (weight) of the omitted feature for classification. To calculate 95% confidence intervals, the process was repeated in resampled with replacement for 10,000 iterations (bootstrapping).
RESULTS
TMS was associated with significant improvement in both PTSD and MDD severity (all p<0.05; additional detail in Supplement). Coherence between individual electrode pairs did not change significantly with treatment (p = 0.28 for Alpha, p = 0.22 for Beta, p = 0.47 for Delta and, p = 0.26 for Theta, Figure 1b). Treatment led to clinical response (defined as 50% reduction in symptom scales for MDD or PTSD) in 13/29 for MDD symptoms and in 12/29 for PTSD symptoms.
Pretreatment EEG coherence as a predictor of clinical improvement after TMS:
Using LASSO regression, we were able to predict TMS treatment outcome based on pre-treatment EEG Alpha coherence. The scatter plot in figure 2 depicts the patients’ clinical improvement (quantified as percent reduction in their PCL-5 and IDS-SR score) versus the prediction from the LASSO regression model. The model used Alpha coherence values (i.e. functional connectivity maps based on Alpha coherence) to calculate the prediction. Alpha coherence maps were a significant predictor of post-treatment reduction in IDS-SR scores (R2 = 0.41 ± 0.14). The same trend existed for PCL-5 but did not reach statistical significance (R2 = 0.18 ± 0.19). The number of features with non-zero weight for predicting IDS-SR was 5 and the number of features in with non-zeros weights predicting PCL-5 was 8 (Figure 3). Theta coherence was also a significant predictor of improvement measured by reduction in IDS-SR scores (R2 = 0.19 ± 0.16, number of features with non-zero weights was 2). We used a shuffling analysis to affirm that the results that the predictions were not affected by overfitting (i.e. the algorithm is just “learning” our dataset and the results are not generalizable). We retrained our model with a shuffled data set and assessed if the machine learning algorithm can learn “any” random pattern (see methods and supplementary results). A model trained by random data had a median R2 of −0.09 for PCL-5 (95% confidence interval of −0.16, 0.20) and −0.09 for IDS-SR (95% confidence interval of −0.16, 0.21). This means that the R2 reported for the clinical data was higher than 99.02% of shuffled R2 values for IDS-SR and higher than 93.92% for PCL-5 (see supplementary results). These results show that the machine learning approach used here was not able to learn random pattern in the data and the predictions reported in figure 2 relied on trends in the EEG coherence patterns and their relationship with clinical improvement.
Figure 2. Sparse regression model is predicting the clinical outcome based on Alpha coherence.
The figure depicts the observed percent change in clinical score versus the cross-validated LASSO regression prediction of clinical outcome based on baseline Alpha coherence calculated from pre-treatment EEG. Sensitivity and Specificity of the model to predict clinical response, defined as 50% reduction in IDS-SR or PCL-5, are plotted in lower panel. The model’s significant performance (defined by r2 value significantly greater than 0) are marked with an asterisk.
Figure 3. Alpha coherence weights that were used by the model to predict change in IDSSR and PCL-5.
The weights used by the model to predict the treatment outcome are depicted here. The width of each diamond represents the value of the weight, blue diamonds represent negative weights, and red diamonds represent positive weights. Lasso is a sparse regression, and as a result, only a few of connections had nonzero weights. Note that for both IDS-SR and PCL-5, most weights in local connections (demarcated by a circle) were negative (blue) and most weights between left prefrontal and midline central-occipital were positive (red).
AUC, Sensitivity and specificity for categorical TMS responses:
When Alpha coherence map was used, the model predicted categorical “response” status (defined as 50% or greater improvement on PTSD and MDD scales) with an AUC of 0.83 (95% confidence interval (CI): 0.70, 0.94) for predicting IDS-SR and 0.71 (95% CI: 0.53–0.87) predicting PCL-5. For Theta, AUC was 0.69 (95% CI: 0.51–0.86) in predicting a reduction in IDS-SR. The optimal sensitivity and specificity for of alpha trained regression predicting MDD clinical response was 100% and 46% respectively and 94% and 50% for PTSD. The beta trained regression had an optimal sensitivity and specificity of 69% and 92% respectively. All of these predictions were based on cross-validated sample.
Prediction of response with specific electrode pairs:
Figure 3 summarizes results using the LASSO algorithm to delineate which electrode pairs contributed to response prediction for the Alpha band. For both IDS-SR and PCL-5, the weights within local frontal and local midline connections were negative (blue), such that high local coherence before TMS was associated with worse treatment outcomes. Conversely, weights between the left prefrontal and midline central-occipital regions were positive (red), indicating that high coherence in long-distance connections predicted better outcomes on both measures.
Classifying EEG as pre- vs post-TMS:
The SVM-trained classifier correctly identified pre- and post-TMS EEG sessions above chance (>50%) for all frequency bands (all p<0.001). Maximum classifier performance for Alpha, Beta, Delta and Theta bands was 75.40 ±1.47%, 77.44 ±1.44%, 73.81 ±1.47% and 78.57 ±1.42%, respectively (Figure 4). Most relevant to correct classification of pre- and post-treatment EEG recordings was an increase in coherence after TMS, observed in the Alpha band between left prefrontal and midline central/occipital sites. This was notable as we did not find a significant difference in coherence for “individual” electrode pairs (reported earlier in the results). However, the linear classifier, which used a weighted aggregate of coherence values, was able to find differences and distinguish pre-and post EEGs.
Figure 4. Performance of an SVM-trained classifier in assigning EEG sessions to pre- and post-treatment based on coherence.
The plots show the performance of the classifier as a function of C, the misclassification penalty term. Lower C values indicate that the classifier has a large scope and can detect global features but can undertrain, higher C values mean that the classifier relies on more global features but can overfit. To detect an optimal C value, we assessed the performance of the classifier for a range of C values. The classifier performed at close to 75% with coherence data from each of frequency bands.
Features best classifying EEG as pre- vs. post-TMS:
Results of the machine learning “feature bagging” analysis are presented in Figure 5. In the Alpha band, the local left prefrontal connections were significant in the performance of classifier (by 12.13%, 95% CI: 9.18%–14.85% on bootstrap). This was also true for connections between prefrontal electrodes and midline electrodes where performance depended on these connections by 7.26% (95% CI: 4.31%–9.86%), but performance did not depend on local-midline connections. Beta frequency band features followed a similar pattern, wherein classifier performance depended on local prefrontal connections by 8.5% (95% CI: 6.58%–11.00%), local midline occipital-central connections by 4.19% (95% CI: 1.93%–6.01%) and connections between left prefrontal and midline by 13.04% (95% CI: 10.71%–15.76%). Within the Delta band, classifier performance only depended on local midline occipital-central connections (7.03%, 95% CI: 3.97%–9.86%) and within the Theta band, only on local left prefrontal connections (11.56%, 95% CI: 14.06%–8.84%). It was remarkable that most of the connection sets with high predictive value (all those which were larger than 10%) were either local to left prefrontal cortex (where the stimulus was delivered) or were those connecting the left prefrontal area to midline occipital central.
Figure 5. Local and long-distance connections and their contributions to classifier performance in identifying pre- and post-treatment sessions.
The figure depicts the contribution of three sets of coherences in classifier performance. The thickness of each bar represents how much of performance was lost when those connections were removed (i.e., “feature bagging,” see methods). Local prefrontal connections and frontal-midline electrodes played a prominent role in classifier performance.
DISCUSSION
This report describes a novel application of machine learning to EEG correlates and predictors of clinical outcome following a course of TMS treatments. While there are several notable limitations (described below) which render the findings preliminary, the data suggested high pre-treatment connectivity in regions close to the DLPFC, as reflected by coherence of alpha EEG signals between pairs of neighboring electrodes in that area, were associated with worse outcomes. However, greater connectivity from DLPFC to midline parietal region (measured as alpha band coherence between these electrode sites) predicted greater PTSD and MDD symptom improvement with TMS.
Clinical response to TMS was predictable with high specificity using pretreatment Alpha coherences and a regression model. Accuracies reported here are comparable with those found in other psychiatric studies using clinical rating scales. We found an AUC of 0.83 (95% CI: 0.70, 0.94) for detection of clinical response based on MDD symptoms which is nearly identical to values reported by Widge et al (2019, AUC of 0.76, 95% CI=0.71–0.80) and Lee et al (2018, overall accuracy of 0.82, 95% CI=0.77, 0.87). If replicated, an office-based EEG approach like this could be useful for anticipating which patients considering TMS therapy would be less likely to benefit, potentially sparing individuals who are unlikely to respond the investment of substantial time and resources for many weeks of daily treatment sessions.
We found a great similarity in the performance of the model in predicting change in MDD and PTSD symptoms (Figure 2) as well as in the strategy that was used by the model to predict those outcomes (Figure 3), This was because the studied population had co-morbid MDD and PTSD and the reduction in these symptoms were highly correlated (r = 0.92, p<0.0001) meaning that the treatment had similar effect of PTSD and MDD symptoms. We repeated the analysis and used the model to predict the average reduction of PTSD and MDD scores as a measure of general wellness after treatment which yielded similar results (see supplementary results).
We showed that a SVM classifier, trained on functional connectivity extracted from a practical and sparse EEG array, successfully identified patients who had received a course of TMS for symptoms of comorbid PTSD and MDD in approximately 3 of 4 cases. The most important contributors to the classifier involved coherence at or near the (left prefrontal) site of stimulation, as well as coherence between that region and midline central-occipital sites. This finding was significant because, when studying individual electrode pairs, we did not observe a significant change in EEG coherence after TMS. SVM, however, builds a model based on weighted sum of coherence values and the performance of the classifier means that there were global changes in the connectivity map which were not apparent when investigating individual electrode pairs. Our findings thus raise the possibility that EEG and machine learning could be combined inexpensively in the treatment clinic setting for ongoing therapeutic monitoring and to provide a window into mechanisms of action of TMS, which could inform the development of individualized treatment methods.
Mechanisms of TMS action in depression are thought to involve changes in plasticity in cortical networks (Hoogendam et al., 2010) and previous studies have used EEG measures of brain function in depressed populations (Iosifescu et al., 2016). We however are aware of no studies that have included individuals with comorbid PTSD. Early studies found limited changes in EEG power (Jandl et al., 2005) but an increase in coherence after a brief treatment session of TMS (Jing and Takigawa, 2000; Strens et al., 2002). Other studies aimed to find EEG biomarkers predicting TMS treatment outcomes in depression. Most studies tracking changes in EEG power failed to find a reliable predictor (Price et al., 2008; Spronk et al., 2008; Widge et al., 2013). More elaborate methods, intended to capture multielectrode and global cortical dynamics (Cordance or non-linear metrics), have shown potential for response prediction (Arns et al., 2014; Bares et al., 2015; Erguzel et al., 2015; reviewed in Silverstein et al., 2015). Notably, all the studies cited above have focused on predicting treatment response in patients with MDD, and none explicitly examined comorbid populations.
We used EEG coherence, calculated on a nearest neighbor bipolar montage. Use of bipolar montage would mitigate many issues that affect coherence, namely common-noise from shared reference and error introduced by volume conductance. The use of bipolar montage could also lead to an underestimate of coherence as it treats all common signal between the two electrodes as noise. A bipolar montage also misses dipoles with certain locations and tangential orientations (Hu et al., 2010; Zaveri et al., 2006). This had minimal effect on the task that we trained our algorithm for and was beneficial as it help us remove the unwanted noise in our dataset.
Functional MRI data support the idea that TMS alters cortical circuit activity in MDD. Default mode network (DMN) connectivity normalized after a TMS course (Liston et al., 2014). To our knowledge, in the only study of patients with comorbid PTSD and MDD (Philip et al., 2017a), which overlapped with the present sample), clinical improvement was associated with a reduction in resting state MRI functional connectivity between subgenual anterior cingulate cortex and the DMN, DLPFC, and insula. Although EEG is not able to delineate activity in deep cortical structures, our present findings are consistent with modulation of activity in similar prefrontal cortex and midline regions.
The major novel aspect of this study was applying predictive analytics and machine learning to interpret and summarize EEG coherence data. Interpretation of EEG is challenging, as signals are complex, multidimensional, and time-varying. Machine learning enabled us to extract salient features from a large amount of data to identify outcome predictors not otherwise detectable. Machine learning also holds promise when used with resting state MRI connectivity to, e.g., identify subtypes of depression using resting neuroimaging and to predict treatment responses to TMS (Drysdale et al., 2017) or antidepressants (Khodayari-Rostamabad et al., 2013). The performance of this approach in predicting outcome was on-par with predictions made based on fMRI data (Drysdale et al., 2017; Lee et al., 2018). Use of EEG is important here given the ease and cost efficiency of data collection in screening and tracking treatment response.
Limitations of this work include lack of sham condition. Previous work points to changes in cortical networks during placebo responses (Benedetti et al., 2011; Hunter et al., 2006; Leuchter et al., 2002). Furthermore, brain connectivity on functional imaging may predict placebo responses (Tétreault et al., 2016), underscoring the need for future sham-controlled studies. We had a modest sample size. A common issue with these methods in the risk of overfitting, in which the algorithm learns trends in the data not generalizable to other samples. We addressed this by 1) using regularization (limiting model complexity), 2) using cross-validation in which the model was trained and tested upon two separate datasets; and 3) using shuffling and demonstrating that the approach proposed here is not able to learn any random pattern in the data. Replication with larger samples however, would be required to bolster the strength of our observed results. Finally, the sparse electrode array, and uncertainties regarding the location of the relevant EEG generators, limited our ability to make detailed anatomical inferences. However, despite these methodological limitations, we found validated and clinically meaningful results.
In conclusion, in applying EEG and machine learning in a standard clinical context of TMS therapy for MDD comorbid with PTSD, we obtained results suggesting that these methods represent viable tools to study cortical networks and potentially guide TMS treatment. The algorithms chosen allowed us to constrain the inherent complexity of the data, and select electrophysiological features of relevance to therapy-induced changes and response prediction. Given the affordability and accessibility of EEG and application of data-driven approaches, this approach holds promise in designing treatment regimens, devices and measurements to make screening and personalizing treatment possible in the office setting.
Supplementary Material
HIGHLIGHTS.
A machine learning algorithm trained on EEG coherence can predict TMS treatment outcome. The algorithm used both local frontal functional connectivity and frontal-midline partial connections.
An SVM trained classifier was able to find changes in EEG coherence after TMS treatment.
The classifier’s performance was based on the aggregate changes in EEG coherence and not individual connections.
ACKNOWLEDGEMENTS
We would like to thank Amir-Massoud Farahmand PhD, for his input during data analysis, Causey Dunlap BS, Sarah Albright BA, and Eric Tirrel, BS, for their assistance with participant procedures. We also would like to thank Michael Frank, PhD for his comments on an earlier version of this manuscript. The opinions herein represent those of the authors and not the U.S. Department of Veterans Affairs, or Neuronetics. The funders were not involved in the collection, analysis, and interpretation of the data, in the writing of the report, or in the decision to submit these results for publication. We thank all the participants.
ROLE OF THE FUNDING SOURCES
Supported by NIMH R25MH101076 (AZ), Institutional Development Award NIGMS U54GM115677 (AZ), an investigator-initiated grant from Neuronetics, Inc. (LLC and NSP), a Career Development Award (IK2 CX000724) from the U.S. Department of Veterans Affairs (NSP) and the Center for Neurorestoration and Neurotechnology at the Providence VA Medical Center (NSP, BDG, SRJ). None of the funding sources had a role in study design, in the collection, analysis and interpretation of data, in the writing of the report, and in the decision to submit the paper for publication.
Footnotes
Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final citable form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.
CONFLICT OF INTEREST
Drs. Carpenter, Tyrka, and Philip have received grant support from Neuronetics, NeoSync, and Janssen through clinical trial contracts. Dr. Philip has been an unpaid scientific advisory board member for Neuronetics. Dr. Carpenter is a consultant for Magstim. Drs. Greenberg, Jones, and Zandvakili have no conflicts of interest.
REFERENCES
- Arns M, Cerquera A, Gutierrez RM, Hasselman F, Freund JA, 2014. Non-linear EEG analyses predict non-response to rTMS treatment in major depressive disorder. Clin Neurophysiol 125, 1392–1399. [DOI] [PubMed] [Google Scholar]
- Bailey NW, Hoy KE, Rogasch NC, Thomson RH, McQueen S, Elliot D, Sullivan CM, Fulcher BD, Daskalakis ZJ, Fitzgerald PB, 2018. Responders to rTMS for depression show increased fronto-midline theta and theta connectivity compared to non-responders. Brain Stimul 11, 190–203. [DOI] [PubMed] [Google Scholar]
- Bares M, Brunovsky M, Novak T, Kopecek M, Stopkova P, Sos P, Hoschl C, 2015. QEEG Theta Cordance in the Prediction of Treatment Outcome to Prefrontal Repetitive Transcranial Magnetic Stimulation or Venlafaxine ER in Patients With Major Depressive Disorder. Clin EEG Neurosci 46, 73–80. [DOI] [PubMed] [Google Scholar]
- Beam W, Borckardt JJ, Reeves ST, George MS, 2009. An efficient and accurate new method for locating the F3 position for prefrontal TMS applications. Brain Stimulation: Basic, Translational, and Clinical Research in Neuromodulation 2, 50–54. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Bendat JS, Piersol AG, 2010. Random data : analysis and measurement procedures, 4th ed. Wiley, Hoboken, N.J. [Google Scholar]
- Benedetti F, Carlino E, Pollo A, 2011. How placebos change the patient’s brain. Neuropsychopharmacology 36, 339–354. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Bryll R, Gutierrez-Osuna R, Quek F, 2003. Attribute bagging: improving accuracy of classifier ensembles by using random feature subsets. Pattern Recognit. 36, 1291–1302. [Google Scholar]
- Campbell DG, Felker BL, Liu CF, Yano EM, Kirchner JE, Chan D, Rubenstein LV, Chaney EF, 2007. Prevalence of depression-PTSD comorbidity: implications for clinical practice guidelines and primary care-based interventions. J Gen Intern Med 22, 711–718. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Drysdale AT, Grosenick L, Downar J, Dunlop K, Mansouri F, Meng Y, Fetcho RN, Zebley B, Oathes DJ, Etkin A, Schatzberg AF, Sudheimer K, Keller J, Mayberg HS, Gunning FM, Alexopoulos GS, Fox MD, Pascual-Leone A, Voss HU, Casey BJ, Dubin MJ, Liston C, 2017. Resting-state connectivity biomarkers define neurophysiological subtypes of depression. Nat Med 23, 28–38. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Erguzel TT, Ozekes S, Gultekin S, Tarhan N, Hizli Sayar G, Bayram A, 2015. Neural Network Based Response Prediction of rTMS in Major Depressive Disorder Using QEEG Cordance. Psychiatry Investig 12, 61–65. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Fan R-E, Chang K-W, Hsieh C-J, Wang X-R, Lin C-J, 2008. LIBLINEAR: A Library for Large Linear Classification. J. Mach. Learn. Res 9, 1871–1874. [Google Scholar]
- Fingelkurts AA, Fingelkurts AA, Rytsala H, Suominen K, Isometsa E, Kahkonen S, 2007. Impaired functional connectivity at EEG alpha and theta frequency bands in major depression. Hum Brain Mapp 28, 247–261. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Franklin CL, Zimmerman M, 2001. Posttraumatic stress disorder and major depressive disorder: investigating the role of overlapping symptoms in diagnostic comorbidity. J Nerv Ment Dis 189, 548–551. [DOI] [PubMed] [Google Scholar]
- Hoogendam JM, Ramakers GMJ, Di Lazzaro V, 2010. Physiology of repetitive transcranial magnetic stimulation of the human brain. Brain Stimul. 3, 95–118. [DOI] [PubMed] [Google Scholar]
- Hu S, Stead M, Dai Q, Worrell GA, 2010. On the recording reference contribution to EEG correlation, phase synchrony, and coherence. IEEE Trans Syst Man Cybern B Cybern 40, 1294–1304. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hunter AM, Leuchter AF, Morgan ML, Cook IA, 2006. Changes in brain function (quantitative EEG cordance) during placebo lead-in and treatment outcomes in clinical trials for major depression. Am. J. Psychiatry 163, 1426–1432. [DOI] [PubMed] [Google Scholar]
- Huys QJ, Maia TV, Frank MJ, 2016. Computational psychiatry as a bridge from neuroscience to clinical applications. Nature neuroscience 19, 404–413. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Iosifescu DV, Neborsky RJ, Valuck RJ, 2016. The use of the Psychiatric Electroencephalography Evaluation Registry (PEER) to personalize pharmacotherapy. Neuropsychiatr Dis Treat 12, 2131–2142. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jandl M, Bittner R, Sack A, Weber B, Gunther T, Pieschl D, Kaschka WP, Maurer K, 2005. Changes in negative symptoms and EEG in schizophrenic patients after repetitive transcranial magnetic stimulation (rTMS): an open-label pilot study. J Neural Transm (Vienna) 112, 955–967. [DOI] [PubMed] [Google Scholar]
- Jing H, Takigawa M, 2000. Observation of EEG coherence after repetitive transcranial magnetic stimulation. Clin Neurophysiol 111, 1620–1631. [DOI] [PubMed] [Google Scholar]
- Kaiser RH, Andrews-Hanna JR, Wager TD, Pizzagalli DA, 2015. Large-Scale Network Dysfunction in Major Depressive Disorder: A Meta-analysis of Resting-State Functional Connectivity. JAMA Psychiatry 72, 603–611. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Khodayari-Rostamabad A, Reilly JP, Hasey GM, de Bruin H, Maccrimmon DJ, 2013. A machine learning approach using EEG data to predict response to SSRI treatment for major depressive disorder. Clin Neurophysiol 124, 1975–1985. [DOI] [PubMed] [Google Scholar]
- Koch SB, van Zuiden M, Nawijn L, Frijling JL, Veltman DJ, Olff M, 2016. Aberrant Resting-State Brain Activity in Posttraumatic Stress Disorder: A Meta-Analysis and Systematic Review. Depress Anxiety 33, 592–605. [DOI] [PubMed] [Google Scholar]
- Kohavi R, 1995. A study of cross-validation and bootstrap for accuracy estimation and model selection. [Google Scholar]
- Lee Y, Ragguett RM, Mansur RB, Boutilier JJ, Rosenblat JD, Trevizol A, Brietzke E, Lin K, Pan Z, Subramaniapillai M, Chan TCY, Fus D, Park C, Musial N, Zuckerman H, Chen VC, Ho R, Rong C, McIntyre RS, 2018. Applications of machine learning algorithms to predict therapeutic outcomes in depression: A meta-analysis and systematic review. J Affect Disord 241, 519–532. [DOI] [PubMed] [Google Scholar]
- Leuchter AF, Cook IA, Hunter AM, Cai C, Horvath S, 2012. Resting-state quantitative electroencephalography reveals increased neurophysiologic connectivity in depression. PloS one 7, e32508. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Leuchter AF, Cook IA, Witte EA, Morgan M, Abrams M, 2002. Changes in brain function of depressed subjects during treatment with placebo. Am. J. Psychiatry 159, 122–129. [DOI] [PubMed] [Google Scholar]
- Li X, Nahas Z, Kozel FA, Anderson B, Bohning DE, George MS, 2004. Acute left prefrontal transcranial magnetic stimulation in depressed patients is associated with immediately increased activity in prefrontal cortical as well as subcortical regions. Biol Psychiatry 55, 882–890. [DOI] [PubMed] [Google Scholar]
- Liston C, Chen AC, Zebley BD, Drysdale AT, Gordon R, Leuchter B, Voss HU, Casey BJ, Etkin A, Dubin MJ, 2014. Default mode network mechanisms of transcranial magnetic stimulation in depression. Biol Psychiatry 76, 517–526. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Noda Y, Zomorrodi R, Saeki T, Rajji TK, Blumberger DM, Daskalakis ZJ, Nakamura M, 2017. Resting-state EEG gamma power and theta-gamma coupling enhancement following high-frequency left dorsolateral prefrontal rTMS in patients with depression. Clin Neurophysiol 128, 424–432. [DOI] [PubMed] [Google Scholar]
- Nunez PL, Srinivasan R, Westdorp AF, Wijesinghe RS, Tucker DM, Silberstein RB, Cadusch PJ, 1997. EEG coherency. I: Statistics, reference electrode, volume conduction, Laplacians, cortical imaging, and interpretation at multiple scales. Electroencephalogr Clin Neurophysiol 103, 499–515. [DOI] [PubMed] [Google Scholar]
- Olbrich S, Arns M, 2013. EEG biomarkers in major depressive disorder: discriminative power and prediction of treatment response. Int Rev Psychiatry 25, 604–618. [DOI] [PubMed] [Google Scholar]
- Paus T, Castro-Alamancos MA, Petrides M, 2001. Cortico-cortical connectivity of the human mid-dorsolateral frontal cortex and its modulation by repetitive transcranial magnetic stimulation. Eur J Neurosci 14, 1405–1411. [DOI] [PubMed] [Google Scholar]
- Philip NS, Barredo J, van ‘t Wout-Frank M, Tyrka AR, Price LH, Carpenter LL, 2017a. Network Mechanisms of Clinical Response to Transcranial Magnetic Stimulation in Posttraumatic Stress Disorder and Major Depressive Disorder. Biol Psychiatry. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Philip NS, Barredo J, van ‘t Wout-Frank M, Tyrka AR, Price LH, Carpenter LL, 2017b. Network Mechanisms of Clinical Response to Transcranial Magnetic Stimulation in Posttraumatic Stress Disorder and Major Depressive Disorder. Biol. Psychiatry [DOI] [PMC free article] [PubMed] [Google Scholar]
- Price GW, Lee JW, Garvey C, Gibson N, 2008. Appraisal of sessional EEG features as a correlate of clinical changes in an rTMS treatment of depression. Clin EEG Neurosci 39, 131–138. [DOI] [PubMed] [Google Scholar]
- Rush AJ, Gullion CM, Basco MR, Jarrett RB, Trivedi MH, 1996. The Inventory of Depressive Symptomatology (IDS): psychometric properties. Psychol Med 26, 477–486. [DOI] [PubMed] [Google Scholar]
- Rush AJ, Trivedi MH, Wisniewski SR, Stewart JW, Nierenberg AA, Thase ME, Ritz L, Biggs MM, Warden D, Luther JF, Shores-Wilson K, Niederehe G, Fava M, Team SDS, 2006. Bupropion-SR, sertraline, or venlafaxine-XR after failure of SSRIs for depression. N Engl J Med 354, 1231–1242. [DOI] [PubMed] [Google Scholar]
- Silverstein WK, Noda Y, Barr MS, Vila-Rodriguez F, Rajji TK, Fitzgerald PB, Downar J, Mulsant BH, Vigod S, Daskalakis ZJ, Blumberger DM, 2015. Neurobiological Predictors of Response to Dorsolateral Prefrontal Cortex Repetitive Transcranial Magnetic Stimulation in Depression: A Systematic Review. Depress Anxiety 32, 871–891. [DOI] [PubMed] [Google Scholar]
- Spronk D, Arns M, Bootsma A, van Ruth R, Fitzgerald PB, 2008. Long-term effects of left frontal rTMS on EEG and ERPs in patients with depression. Clin EEG Neurosci 39, 118–124. [DOI] [PubMed] [Google Scholar]
- Strens LH, Oliviero A, Bloem BR, Gerschlager W, Rothwell JC, Brown P, 2002. The effects of subthreshold 1 Hz repetitive TMS on cortico-cortical and interhemispheric coherence. Clin Neurophysiol 113, 1279–1285. [DOI] [PubMed] [Google Scholar]
- Tétreault P, Mansour A, Vachon-Presseau E, Schnitzer TJ, Apkarian AV, Baliki MN, 2016. Brain Connectivity Predicts Placebo Response across Chronic Pain Clinical Trials. PLoS Biol. 14, e1002570. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Tibshirani R, 1996. Regression Shrinkage and Selection via the Lasso. J. R. Stat. Soc. Series B Stat. Methodol 58, 267–288. [Google Scholar]
- Weathers FW, Litz BT, Keane TM, Palmieri PA, Marx BP, Schnurr PP, 2013. The ptsd checklist for dsm-5 (pcl-5). Scale available from the National Center for PTSD at www.ptsd.va.gov. [Google Scholar]
- Widge AS, Avery DH, Zarkowski P, 2013. Baseline and treatment-emergent EEG biomarkers of antidepressant medication response do not predict response to repetitive transcranial magnetic stimulation. Brain Stimul 6, 929–931. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Widge AS, Bilge MT, Montana R, Chang W, Rodriguez CI, Deckersbach T, Carpenter LL, Kalin NH, Nemeroff CB, 2019. Electroencephalographic Biomarkers for Treatment Response Prediction in Major Depressive Illness: A Meta-Analysis. Am J Psychiatry 176, 44–56. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zaveri HP, Duckrow RB, Spencer SS, 2006. On the use of bipolar montages for time-series analysis of intracranial electroencephalograms. Clin Neurophysiol 117, 2102–2108. [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.





