Skip to main content
AMIA Summits on Translational Science Proceedings logoLink to AMIA Summits on Translational Science Proceedings
. 2024 May 31;2024:613–622.

Detecting Cerebral Ischemia From Electroencephalography During Carotid Endarterectomy Using Machine Learning

Amir I Mina 1, Jessi U Espino 1, Allison M Bradley 1, Parthasarathy D Thirumala 2, Kayhan Batmanghelich 3, Shyam Visweswaran 1
PMCID: PMC11141851  PMID: 38827046

Abstract

Monitoring cerebral neuronal activity via electroencephalography (EEG) during surgery can detect ischemia, a precursor to stroke. However, current neurophysiologist-based monitoring is prone to error. In this study, we evaluated machine learning (ML) for efficient and accurate ischemia detection. We trained supervised ML models on a dataset of 802 patients with intraoperative ischemia labels and evaluated them on an independent validation dataset of 30 patients with refined labels from five neurophysiologists. Our results show moderate-to-substantial agreement between neurophysiologists, with Cohen’s kappa values between 0.59 and 0.74. Neurophysiologist performance ranged from 58-93% for sensitivity and 83-96% for specificity, while ML models demonstrated comparable ranges of 63-89% and 85-96%. Random Forest (RF), LightGBM (LGBM), and XGBoost RF achieved area under the receiver operating characteristic curve (AUROC) values of 0.92-0.93 and area under the precision-recall curve (AUPRC) values of 0.79-0.83. ML has the potential to improve intraoperative monitoring, enhancing patient safety and reducing costs.

Introduction

The risk of perioperative stroke, which occurs during or within 30 days of surgery, has increased over the past 10 years despite improvements in medical optimization and surgical technique1. The incidence of perioperative stroke is associated with high mortality and morbidity, leading to detrimental long-term effects on patient health and quality of life. Most perioperative strokes, which affect about 50,000 patients annually in the US, happen during surgery2. The incidence of stroke during surgery is as high as 6% for cardiovascular and neurological procedures and as low as 1% for general surgical procedures2. Cardiovascular and neurological procedures make up about one million of the 50 million surgical procedures done annually in the US. Reduction in the risk of perioperative stroke would significantly improve patient safety and ease the financial burden.

During surgery, continuous blood flow to the brain is essential for brain function, as it ensures the delivery of oxygen and nutrients. Because of the brain’s limited capacity to store oxygen and nutrients, even brief cerebral blood flow (CBF) disruptions can cause debilitating brain damage3. Initially, when CBF is reduced or stopped, it results in reversible brain damage from ischemia4. If CBF is not restored rapidly, the brain damage becomes irreversible due to the death of brain cells and results in a stroke. Therefore, early detection of ischemia can lead to timely preventive measures, lowering the risk of stroke and permanent brain damage.

Electroencephalography (EEG) can continuously and non-invasively measure brain function. The EEG reflects alterations in the metabolic and electrical activity of cortical neurons that accompany decreased CBF5. Animal studies show that when CBF falls below 15–18 ml/100 g/min, it rapidly affects electrical activity and leads to “electrical failure,” which can be reversed by increasing CBF. This corresponds to ischemia, resulting in reversible brain damage. A persistent decrease in CBF to 10-12 ml/100gm/min causes “membrane failure,” which ultimately leads to cell death. This corresponds to a stroke, resulting in irreversible brain damage. Depending on the severity of the reduction in CBF, the transition from ischemia to stroke may occur within minutes or take several hours.

Intraoperative neurophysiological monitoring (IONM) with EEG is routinely used in the operating room to detect ischemia during high-risk procedures such as carotid endarterectomies (CEAs)6. CEA is a surgical procedure that removes plaque inside the common or internal carotid artery. Carotid artery clamping is a necessary component of the surgical procedure. At the time of clamping, and shortly thereafter, the brain is most susceptible to ischemic alterations. Beyond CEA, patients who undergo high-risk cardiovascular and neurological surgery are increasingly monitored with intraoperative EEG because of the risk of cerebral ischemia. However, human visual monitoring by neurophysiologists is susceptible to error and requires considerable skill and resources. This limits the human monitoring of EEG during surgery. Neurophysiologists can be aided by computer-based methods employing machine learning (ML) to detect ischemia rapidly and accurately on EEG. In this study, we describe the training of supervised ML models on a large dataset of intraoperative EEGs performed for CEAs. Five neurophysiologists labelled an independent dataset; we report the interrater agreement among the neurophysiologists and the performance of the ML models on this dataset.

Background

In this section, we provide brief descriptions of the EEG and quantitative parameters derived from it, EEG changes related to ischemia, and the application of ML to EEG.

EEG and continuous EEG. The EEG measures and records the brain’s electrical activity in terms of voltage over time, and the recording is obtained by attaching electrodes to standard locations on the scalp. IONM typically utilizes eight electrodes attached to four locations on the left side and four on the right side of the head. Each electrode is identified by a letter and a number. The letter indicates the region of the brain beneath the electrode, such as F for the frontal lobe, P for the parietal lobe, T for the temporal lobe, and O for the occipital lobe. Even numbers represent the right side of the head, whereas odd numbers represent the left. Consequently, F3 is an electrode location above the brain’s left frontal lobe, while O2 is an electrode location above the right occipital lobe. Voltage is typically measured between two electrodes and displayed as a channel. Consequently, the F3 – P3 channel measures the voltage across the F3 and P3 electrodes (Figure 1). In typical IONM, eight distinct channels are displayed, each displaying the voltage difference between two electrodes comprising that channel (Figure 1). Technological advancements in the 1990s enabled the EEG to be digitized and recorded in electronic data storage, allowing continuous EEG (cEEG) recordings over hours.

Figure 1.

Figure 1.

An eight channel EEG segment is shown. Channels F3-P3, P3-O1, F3-T3, and T3-O1 (blue) are for the left side of the head, while channels F4-P4, P4-O2, F4-T4, and T4-O2 (red) are for the right side.

In the operating room for the past few decades, cEEG has been used by anesthesiologists to monitor the depth of anesthesia and by neurophysiologists to monitor cerebral ischemia. Visual interpretation focuses on amplitude and morphology changes in EEG waveforms over time in specific frequency bands4; the clinically used frequency bands are delta (0 – 4 Hz), theta (4 – 8 Hz), alpha (8 – 12 Hz), beta (12 – 30 Hz), and gamma (30 – 100 Hz) in increasing order of frequency. Typically, as the frequency increases, the amplitude of the EEG signal decreases. Thus, the delta and theta bands have lower frequencies but larger amplitudes (and are referred to as slow activity by neurophysiologists), while the alpha, beta, and gamma bands have higher frequencies but smaller amplitudes (and are referred to as fast activity).

Quantitative EEG. Performing visual analysis of the cEEG for extended periods of time in real-time is challenging. Furthermore, such analysis requires practice, and subtle changes in pattern can be missed with only visual inspection. Consequently, quantitative parameters for detecting ischemia have been developed. These parameters are referred to as quantitative EEG (qEEG) and are computed by mathematically processing digitally recorded EEG to identify patterns, quantify variations, and compare them to norms. Two types of qEEG parameters exist: those based on the frequency and those based on the amplitude of EEG signals. Frequency-based qEEGs are typically derived from the power spectrum obtained by applying fast Fourier transform (FFT) to the EEG signals. The power of a clinically used EEG band (e.g., the alpha band) is computed by aggregating the power over the specified frequency range (e.g., 8 – 12 Hz). Additionally, ratios of power in a higher frequency band to power in a lower frequency band have been found to be useful. Power ratios include the alpha-to-delta ratio (ADR), the beta-to-delta ratio (BDR), and the alpha-beta to delta-theta ratio (ABDTR)7. Another parameter is the spectral edge frequency (SEF) which is the frequency below which a specified proportion (often 90%) of the power in the EEG signal is contained8. Since ischemia and stroke typically affect one-half of the brain, parameters that measure the degree of asymmetry in brain activity have been developed, and one such qEEG is the pairwise-derived brain symmetry index (pd-BSI). One commonly used amplitude-based parameter is the amplitude-integrated EEG (aEEG), the amplitude of filtered and smoothed EEG signals9. Table 1 summarizes the qEEG parameters that are useful in ischemia.

Table 1.

Selected qEEG parameters with descriptions that are used in ischemia detection.

Type of qEEG parameter qEEG parameter Description
Power Delta power
Theta power
Alpha power
Beta power
Gamma power
The power or amount of activity in the specified frequency band in an EEG segment.
Power ratio Alpha-to-delta ratio (ADR)
Beta-to-delta ratio (BDR)
Alpha-beta to delta-theta ratio (ABDTR)
The ratio of powers in two specified frequency bands in an EEG segment; often, the numerator is the power of a higher frequency band, and the denominator is the power of a lower frequency band.
Spectral edge frequency Spectral edge frequency 90 (SEF90) Spectral edge frequency is the highest frequency below which a specified amount of power is present in an EEG segment. SEF90 is the frequency below which 90% of the power is present.
Pairwise-derived brain symmetry index (pd-BSI) The difference in power between matching electrode pairs on the left and right hemispheres, summed across frequencies.
Amplitude-integrated EEG (aEEG) The range of the amplitude (difference between highest and lowest voltages) in an EEG segment.

EEG changes related to ischemia. Ischemic changes that occur during CEA have been documented in the literature. Visser et al. analyzed data from 92 CEA patients who, in addition to cEEG monitoring, underwent transcranial Doppler ultrasonography to measure blood flow velocity in intracranial arteries10. Following clamping, severe ischemia was associated with a reduction in alpha and beta band activity followed by an increase in delta and theta band activity, whereas mild ischemia was only associated with a reduction in alpha band activity. Some patients exhibited an increase in fast activity (alpha and beta) and a decrease in slow activity (delta and theta), which was attributed to arousal brought on by pain and hemodynamic stress caused by clamping. Kamitaki et al. analyzed cEEG recordings of 118 CEA patients and found that decreases in alpha, beta, and theta power of 52.1%, 41.6%, and 36.4%, respectively, were the strongest predictors of ischemia following clamping11. Pedapati et al. investigated the utility of 10 QEEG parameters in detecting cerebral ischemia during CEA using a database of 1,551 patients and found a statistically significant decrease in the trough values in all 10 qEEG parameters (alpha, beta, theta, delta, and gamma powers, ADR, BDR, ABDTR, SEF90, and aEEG) when there were visual changes in the EEG12.

Machine learning in EEG. Automatic EEG analyses have extensively used ML for tasks such as epileptic seizure detection and prediction, sleep staging, and the diagnosis of Alzheimer’s disease, depression, and traumatic brain injury. While ML has been utilized for detecting stroke on the EEG, few studies have examined the detection of ischemia on the EEG, and none have examined the detection of ischemia in the operating room. In one study, ML was used to predict stroke by analyzing 30-second EEG segments from 80 patients, of whom half had suffered an ischemic stroke. The results of the study showed that tree-based ML methods were more effective than a multi-layer perceptron (MLP), with the area under the receiver operating curve (AUROC) values of 1.00 and 0.85 respectively. However, the results are likely over-optimistic due to overfitting, as the stratification was done on an interval level rather than at the patient level13. Another study utilized logistic regression on EEG features to predict stroke, achieving an AUROC value of 0.78, which improved to 0.8 when clinical features were incorporated14. This study found an AUROC of 0.88 when deep learning was applied to a combination of clinical and EEG features, but three-based methods were not compared. As far as we know, no studies have investigated ischemia detection using intraoperative EEG.

Methods

In this section, we describe the datasets used for the study, details of preprocessing, the ML methods, the experimental design, and evaluation.

Datasets. We used a large dataset of patients who underwent CEA while being monitored by cEEG in a large academic health system. All cEEG data were collected at 500 Hz and comprised four channels F3-P3, P3-O1, F3-T3, and T3-O1 on the left side and the four channels F4-P4, P4-O2, F4-T4, and T4-O2 on the right side. The training dataset included cEEG recordings from 802 patients who underwent CEA between 2009 and 2017. The recordings were reviewed by a single IONM-trained neurophysiologist, who labeled the time periods in each recording that indicated ischemia based on the monitoring neurophysiologist’s documented comments in the operating room. To expediently label such a large dataset, we employed a single neurophysiologist who relied on the documented comments to make determinations of when ischemia occurred. These labels are referred to as intraoperative labels. Of the 802 patients, 51 were determined to have experienced ischemic changes during one or more time periods within 10 minutes of clamping on the cEEG. Data were collected retrospectively from various sites affiliated with the University of Pittsburgh Medical Center, where IONM employing cEEG was performed. Data compilation, anonymization, and subsequent analyses received approval from the local Institutional Review Board.

The evaluation dataset comprised an independent set of 30 patients who underwent CEA between 2009 and 2017, half of whom exhibited ischemic changes on cEEG. Five IONM-trained neurophysiologists independently reviewed the recordings in this dataset. The five reviewers included one board-certified neurologist with fellowship training in IONM and four neurophysiology technologists with certification in neurophysiologic intraoperative monitoring; all reviewers had a minimum of three years of experience with cEEG monitoring during vascular surgeries. The reviewers were provided with electronic files of cEEG recordings, which they viewed using the same software they used in the operating room. However, patient identifying information, such as demographics and monitoring neurophysiologist’s comments, was not provided. Reviewers were given the time at which the carotid clamp was placed and instructed to carefully examine a 30-minute period of the cEEG beginning at clamp time. They could freely scroll forward and backward through the cEEG and provide the precise time intervals at which cerebral ischemia-related changes occurred. These labels are referred to as refined labels. We concentrated on obtaining labels for only 30 minutes post-clamp, as this is when nearly all ischemic changes occur during CEA. This expedited labeling for each patient’s cEEG recording, which lasted an average of several hours.

Preprocessing. A 10-minute segment of the cEEG recording beginning at clamp time was extracted for each patient in the training dataset. The EEG was filtered with standard filters, including a high-pass filter at 0.1 Hz, a low-pass filter at 70 Hz, and a notch filter at 60 Hz. Each 10-minute section was divided into 20-second non-overlapping intervals, and from each interval, 111 qEEG-based features were computed for ML. The frequency-based features were derived from the power spectrogram computed by applying FFT to a sliding interval to determine the power of each frequency. The spectrogram’s power values were converted to decibel units by taking 10 times the natural logarithm of the original power values. For each of the eight EEG channels, we computed five band powers (delta, theta, alpha, beta, and gamma), three power ratios (ADR, BDR, and ABDTR), SEF90, and aEEG (see Table 2). Except for the aEEG, all features were derived from the power spectrum. In addition to the single-channel features, we computed 10 averaged features based on four channels on the left side of the head, four on the right side of the head, and all eight channels respectively (see Table 2). The final feature was pd-BSI, which is computed from the power of all channels across all frequency bands.

Table 2.

Summary of 111 ML features computed from each 20-second interval.

Type of feature Number of features
Features derived from a single channel 10 features x 8 channels = 80 features
Features derived by averaging 4 channels from one side of the head 10 features x 2 sides = 20 features
Features derived by averaging all 8 channels 10 features
Pd-BSI 1 feature

We normalized all features at the patient level to a 120-second pre-clamp EEG baseline segment. To identify a 120-second pre-clamp baseline EEG with minimal noise and variance for each patient, we searched all possible 120-second intervals that ended just before clamp time. We then estimated the baseline distribution parameters from this 120-second interval. Using the baseline distribution, we computed each feature’s mean and standard deviation and then used these statistics to transform each feature value into a z-score.

For each 20-second interval, we derived a positive (i.e., ischemic) or negative (i.e., non-ischemic) label. We identified positive intervals by superimposing their time frames with the neurophysiologist-provided periods of ischemia. An interval was labeled positive if more than half of its duration coincided with a period of ischemia. We preprocessed the evaluation dataset similarly to the training dataset to obtain 111 features for each 20-second interval. In contrast to the training dataset, which contained only one intraoperative label per interval, we created five additional labels per interval for the evaluation dataset. Thus, each interval in the evaluation dataset had one intraoperative label and five refined labels.

Machine learning methods. We applied several supervised ML methods to derive learning classification models, including naïve Bayes (NB), elastic-net logistic regression (LR), support vector machine classifier (SVC) with radial basis function kernel, random forest (RF), light gradient-boosting machine (LGBM), and eXtreme Gradient Boosting with random forest (XGBoost RF). We focused on tree-based ML methods since they have been shown to outperform other methods, including deep learning for tabular data15. Common tree-based methods are RF and gradient boosting methods such as LGBM16 and XGBoost17. Few studies compared tree-based and deep learning models for EEG data. Nevertheless, it appears that tree-based models perform better in the context of EEG data, such as when modeling drowsiness18.

Experimental protocols. The ML models were trained and evaluated at a 20-second interval level. We used 10-fold cross-validation to derive the models and optimize the hyperparameters. The training dataset was randomly partitioned into ten folds such that all 20-second intervals derived from the same patient were assigned to the same fold to prevent overfitting. Further, the folds were constructed such that the proportion of intervals was approximately the same. For each ML method, ten base models, one from each fold, were trained and combined to form a soft voting ensemble classifier. When applied to an evaluation interval, the ensemble classifier produces a single probability by averaging the probabilities generated by the ten base models. The base models were calibrated using isotonic scaling. We implemented the preprocessing pipelines in Python 3.7.12 and the ML methods with scikit-learn 1.2.0.

Evaluation methods. We report the performance of the models on the validation set using the five sets of neurophysiologist-refined labels. The performance metrics included threshold-based sensitivity and specificity values and the threshold-free AUROC and area under the precision-recall curve (AUPRC) values. We used a threshold of 0.5 for computing sensitivity and specificity values. The AUROC is the most popular threshold-free metric for evaluating ML models19. Nonetheless, the AUPRC is increasingly utilized, particularly for imbalanced datasets such as ours. AUROC measures a model’s ability to discriminate between positive and negative samples across different probability thresholds and is insensitive to the distribution of labels. AUPRC, on the other hand, measures the trade-off between precision and recall across different probability thresholds and is sensitive to the distribution of labels, making it useful for imbalanced datasets20. Specifically, it has been demonstrated that AUPRC is a more informative metric than AUROC in rare disease settings with a small proportion of positive labels. The precision-recall (PR) curve has been shown to overcome the optimism of the receiver operating characteristic (ROC) curve in such situations and provide a more realistic evaluation of model performance21.

The interrater agreement on the evaluation dataset was calculated using pairwise crude percent agreement and Cohen’s kappa. We computed the agreement of each neurophysiologist’s refined labels with those of the remaining neurophysiologists (n=4). The mean and standard deviation were computed from the pairwise agreement comparison containing that reviewer in the pair. Similarly, for each model, the mean and standard deviation were calculated from the pairwise agreement of the model predictions with the refined labels of each neurophysiologist (n=5). We also computed the agreement of the intraoperative labels with each set of refined labels and model predictions. In contrast to agreement, the pairs used to compute the statistics are order dependent, as one neurophysiologist in a pair is designated as the reference with the “ground truth” and the other is assessed against the reference neurophysiologist. For each neurophysiologist, the mean and standard deviation of the evaluation metrics were computed using the remaining neurophysiologists as references (n=4), and for a model, the mean and standard deviation were computed using the neurophysiologists as references (n=5). From the probabilities obtained by the application of a model on the evaluation dataset, that model’s receiver operating characteristic (ROC) curve and precision-recall (PR) curve were calculated using the respective average metrics (i.e., mean sensitivity and mean specificity for the ROC curve and mean precision and mean sensitivity (or recall) for the PR curve) at all possible thresholds applied to the probabilities. Given the small sample sizes (n=4 and n=5), we calculated 95% confidence intervals for the metrics using a t-distribution, which accounts for the increased variability and wider tails more appropriately than the normal distribution. Instead of using a z-score from the normal distribution, we used a t-value corresponding to the 95% confidence level and appropriate degrees of freedom.

Results

In this section, we describe the agreement and performance results between neurophysiologists and models. The training dataset was comprised of 23,880 intervals derived from 802 patients, and 3.6% of intervals derived from 51 patients were labeled as positive ischemia. The validation dataset consisted of 30 patients, 15 with ischemic changes on cEEG (mean age 71.1 years, 47% female, 33% left CEA) and 15 patients without ischemic changes (mean age 65.2 years, 47% female, 53% left CEA). From these 30 patients, we extracted 900 intervals, of which an average of 26.8% were labeled as positive for ischemia by the five neurophysiologists. In Figure 2, we show the variability in the number of neurophysiologists agreeing on each interval as ischemic. The neurophysiologists unanimously agreed on 532 intervals as non-ischemic and 116 intervals as ischemic. However, the remaining 252 intervals showed a variable degree of agreement, ranging from one to four neurophysiologists labeling them as ischemic.

Figure 2.

Figure 2.

Histogram depicting the number of EEG intervals from the validation set labeled as positive for ischemia by varying number of neurophysiologists who agreed on an interval being ischemic.

Agreement. The average agreements among neurophysiologists and models are reported in Table 2. The neurophysiologists’ mean Cohen’s kappa values ranged from 0.59 to 0.74, indicating moderate to substantial agreement. Except for NB and LR, mean Cohen’s kappa values for the models ranged from 0.61 to 0.66, which falls within the range of neurophysiologist opinion. RF had the highest mean Cohen’s Kappa value among the models, at 0.66. In the case of NB, all predicted probabilities were smaller than 0.5, leading to all intervals being predicted as non-ischemic. The Cohen’s kappa coefficient adjusted for this by equating the expected and actual probabilities, resulting in a value of 0. Cohen’s kappa values assessing the agreement between intraoperative and refined labels ranged from 0.35 to 0.46, while those between the intraoperative labels and the model predictions (excluding NB and LR) ranged from 0.32 to 0.39.

Predictive performance. Figure 3 shows the ROC curves and PR curves for the models and a single operating point for each of the neurophysiologists since they did not provide probabilities. The sensitivity and specificity values for neurophysiologists and models and the AUROC and AUPRC values for the models are shown in Table 3. The neurophysiologists’ mean sensitivity and specificity ranged from 58% to 93% and from 83% to 96%, respectively. Except for NB and LR, the models’ mean sensitivity and specificity ranged from 63% to 89% and from 85% to 96%, respectively. Again, with NB, all intervals were predicted as non-ischemic, resulting in a sensitivity of 0% and a specificity of 100%.

Figure 3.

Figure 3.

(A) ROC curves for the six models, as well as the mean sensitivity and specificity values for the five neurophysiologists (denoted by x). (B) PR curves depicting the mean precision and recall values for the six models, as well as mean precision and recall values for the five neurophysiologists.

Table 3A.

Mean sensitivity and specificity values with 95% confidence intervals for the five neurophysiologists.

Neurophysiologist Sensitivity Specificity
1 0.58 (0.36, 0.80) 0.96 (0.93, 0.99)
2 0.66 (0.45, 0.86) 0.96 (0.91, 1.00)
3 0.90 (0.71, 1.00) 0.91 (0.77, 1.00)
4 0.93 (0.87, 0.99) 0.83 (0.71, 0.94)
5 0.81 (0.66, 0.96) 0.92 (0.76, 1.00)

Discussion

Using a large training dataset of 802 cEEG recordings from CEA procedures, we developed multiple ML models for predicting intraoperative cerebral ischemia. The prevalence of ischemia in this dataset is based on the actual prevalence in our institution’s clinical setting, which informs the models of the real-world prevalence of positives. The tree-based models including RF, LGBM, and XGBoost RF performed well on an independent validation dataset with AUROC values between 0.92 and 0.93 and AUPRC values between 0.79 and 0.83. The validation dataset has a higher prevalence of ischemia than the real-world; this dataset has a small number of patients, and using the same proportion of positive intervals as the real-world would have resulted in insufficient positive intervals for statistical analysis. The size of our dataset obtained from a single surgical procedure, namely CEA, which provides a clearly defined timeframe during which cerebral ischemia can occur, is a major strength of our study. Previous research has not looked at ML models for intraoperative cerebral ischemia, though a previous study examined the univariate correlations of qEEG features in CEA for detecting ischemia, but with a smaller sample of 118 patients11.

Another strength of our study was the use of an independent validation dataset in which each cEEG recording was carefully reviewed by five IONM neurophysiologists. This allowed us to characterize expert variability in identifying time periods of EEG changes indicative of ischemia. Part of the variation is due to minor differences in the start and end times of the neurophysiologist labels, even though most of them agreed that an ischemic change occurred during roughly the same time period. Furthermore, our analysis revealed that a neurophysiologist’s review uncovered EEG changes that were not recorded intraoperatively, either because they were missed due to time constraints or because they were observed but not documented. We chose pairwise comparison for evaluation over creating consensus gold standard labels due to the variability of the refined labels at the interval level. A similar approach has been used to evaluate other EEG-related tasks, such as seizure detection22.

In terms of sensitivity and specificity, the predictive performance of the tree-based models was comparable to the performance achieved by the neurophysiologists when not under time constraints. Given the suboptimal performance of the neurophysiologists during intraoperative procedures compared to their performance when not under time constraints, this supports the clinical use of ML-based models to alert the neurophysiologist performing monitoring.

Limitations. Our study has several limitations. First, the cEEG recordings that we employed contained residual artifacts. Although we used band-pass and notch filtering to identify and remove some artifacts, others remained because no automated methods exist to identify them. Second, as described in the Methods section, for expediency, we used intraoperative documentation to derive labels for the training dataset, which we now know are suboptimal. Third, for modeling purposes, we ignored the time-series nature of the cEEG and treated each 20-second interval as statistically independent from the intervals that came before and after it. By incorporating temporal correlations, time series analysis and forecasting techniques such as autoregressive integrated moving average (ARIMA) may perform better. In addition, we did not evaluate deep learning machine learning (ML) techniques capable of handling time series data, such as recurrent neural networks and long short-term memory networks. Fourth, we employed standard atemporal evaluation metrics such as AUROC and AUPRC, whereas time-series aware metrics may provide a more precise evaluation of the model’s performance.

Future work. We intend to address many of the limitations described in the previous paragraph in future work. We are developing automated methods to identify EEG artifacts such as electrical artifacts that are common in the operating room and burst suppression artifacts that are common when general anesthesia is administered. In the future, we intend to conduct feature importance analysis, which entails evaluating the contribution of various features to model predictions. We will use the feature importance result to determine how important features align with existing clinical knowledge and practices. We have begun obtaining refined labels for the training dataset, in which each cEEG recording is carefully reviewed by a single IONM neurophysiologist with no time constraints. Separately, we are investigating time-aware deep learning methods and adapting existing time-series aware metrics for model evaluation23.

Conclusions

We derived several ML models for detecting cerebral ischemia from intraoperative cEEG and evaluated them on a validation set with labels refined by several neurophysiologists. Though they were trained on cEEG recordings with artifacts and suboptimal labels, tree-based models such as RF, LGBM, and XGBoost RF performed well. Our results support that ML can be sufficiently accurate in monitoring cEEG in real time for intraoperative cerebral ischemia. Such an automated system can reduce intraoperative ischemia-related complications, improve patient safety, and reduce healthcare costs.

Acknowledgments

Research reported in this publication was supported by the National Institutes of Health under award number T32 GM008208 from the National Institute of General Medical Sciences, T15 LM007059 from the National Library of Medicine, and UL1 TR001857 from the National Center for Advancing Translational Sciences.

Figures & Table

Table 2A.

Pairwise percent agreement and Cohen’s kappa for refined labels and percent agreement and Cohen’s kappa for intraoperative labels of the neurophysiologists. Mean and SD refer to the mean and the standard deviation respectively.

Refined Labels Intraoperative Labels
Neurophysiologist % Agreement (Mean ± SD) Cohen’s kappa (Mean ± SD) % Agreement Cohen’s kappa
1 0.84 ± 0.05 0.59 ± 0.09 0.76 0.35
2 0.87 ± 0.03 0.65 ± 0.04 0.76 0.37
3 0.90 ± 0.05 0.74 ± 0.13 0.75 0.39
4 0.85 ± 0.05 0.65 ± 0.13 0.76 0.46
5 0.89 ± 0.06 0.71 ± 0.16 0.74 0.36

Table 2B.

Percent agreement and Cohen’s kappa for refined labels of the models and percent agreement and Cohen’s kappa for intraoperative labels of the models.

Refined Labels Intraoperative Labels
Model % Agreement (Mean ± SD) Cohen’s kappa (Mean ± SD) % Agreement Cohen’s kappa
Naïve Bayes (NB) 0.73 ± 0.07 0.00 ± 0.00 0.71 0.00
Elastic-net logistic regression (LR) 0.84 ± 0.04 0.54 ± 0.05 0.72 0.24
Support vector machine classifier (SVC) 0.86 ± 0.02 0.63 ± 0.04 0.76 0.39
Random forest (RF) 0.86 ± 0.03 0.66 ± 0.08 0.72 0.36
Light gradient-boosting machine (LGBM) 0.86 ± 0.03 0.61 ± 0.04 0.75 0.32
eXtreme Gradient Boosting with RF (XGBoost RF) 0.86 ± 0.02 0.65 ± 0.04 0.72 0.33

Table 3B.

Mean sensitivity, specificity, AUROC, and AUPRC values with 95% confidence values for the six models.

Model Sensitivity Specificity AUROC AUPRC
NB 0.00 (0.00, 0.00) 1.00 (1.00, 1.00) 0.91 (0.85, 0.96) 0.73 (0.58, 0.88)
LR 0.51 (0.41, 0.61) 0.96 (0.92, 1.00) 0.89 (0.85, 0.94) 0.77 (0.62, 0.93)
SVC 0.73 (0.58, 0.87) 0.91 (0.87, 0.96) 0.92 (0.88, 0.96) 0.79 (0.66, 0.91)
RF 0.89 (0.76, 1.00) 0.85 (0.78, 0.92) 0.93 (0.88, 0.99) 0.81 (0.69, 0.93)
LGBM 0.63 (0.50, 0.77) 0.96 (0.92, 0.99) 0.92 (0.87, 0.98) 0.81 (0.71, 0.91)
XGBoost RF 0.80 (0.65, 0.94) 0.89 (0.84, 0.93) 0.93 (0.88, 0.98) 0.81 (0.71, 0.91)

References

  • 1.Smilowitz NR, Gupta N, Ramakrishna H, Guo Y, Berger JS, Bangalore S. Perioperative major adverse cardiovascular and cerebrovascular events associated with noncardiac surgery. JAMA Cardiol. 2017;2:181–187. doi: 10.1001/jamacardio.2016.4792. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Al-Hader R, Al-Robaidi K, Jovin T, Jadhav A, Wechsler LR, Thirumala PD. The incidence of perioperative stroke: estimate using state and national databases and systematic review. J Stroke. 2019;21:290–301. doi: 10.5853/jos.2019.00304. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Sacco RL, Kasner SE, Broderick JP, Caplan LR, Connors JJB, Culebras A, et al. An updated definition of stroke for the 21st century: a statement for healthcare professionals from the American Heart Association/American Stroke Association. Stroke. 2013;44:2064–2089. doi: 10.1161/STR.0b013e318296aeca. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Sharbrough FW, Messick JM, Sundt TM. Correlation of continuous electroencephalograms with cerebral blood flow measurements during carotid endarterectomy. Stroke. 1973;4:674–683. doi: 10.1161/01.str.4.4.674. [DOI] [PubMed] [Google Scholar]
  • 5.Hossmann KA. Viability thresholds and the penumbra of focal ischemia. Ann Neurol. 1994;36:557–565. doi: 10.1002/ana.410360404. [DOI] [PubMed] [Google Scholar]
  • 6.Chiappa KH, Burke SR, Young RR. Results of electroencephalographic monitoring during 367 carotid endarterectomies. Use of a dedicated minicomputer. Stroke. 1979;10:381–388. doi: 10.1161/01.str.10.4.381. [DOI] [PubMed] [Google Scholar]
  • 7.Rots ML, van Putten MJAM, Hoedemaekers CWE, Horn J. Continuous EEG monitoring for early detection of delayed cerebral ischemia in subarachnoid hemorrhage: A pilot study. Neurocrit Care. 2016;24:207–216. doi: 10.1007/s12028-015-0205-y. [DOI] [PubMed] [Google Scholar]
  • 8.McKeever S, Johnston L, Davidson AJ. An observational study exploring amplitude-integrated electroencephalogram and spectral edge frequency during paediatric anaesthesia. Anaesth Intensive Care. 2012;40:275–284. doi: 10.1177/0310057X1204000210. [DOI] [PubMed] [Google Scholar]
  • 9.Maynard D, Prior PF, Scott DF. A continuous monitoring device for cerebral activity. Electroencephalogr Clin Neurophysiol. 1969;27:672–673. doi: 10.1016/0013-4694(69)91265-6. [DOI] [PubMed] [Google Scholar]
  • 10.Visser GH, Wieneke GH, van Huffelen AC. Carotid endarterectomy monitoring: patterns of spectral EEG changes due to carotid artery clamping. Clin Neurophysiol. 1999;110:286–294. doi: 10.1016/s1388-2457(98)00006-6. [DOI] [PubMed] [Google Scholar]
  • 11.Kamitaki BK, Tu B, Wong S, Mendiratta A, Choi H. Quantitative EEG changes correlate with post-clamp ischemia during carotid endarterectomy. J Clin Neurophysiol. 2021;38:213–220. doi: 10.1097/WNP.0000000000000686. [DOI] [PubMed] [Google Scholar]
  • 12.Pedapati V, Du K, Mina A, Bradley A, Espino J, Batmanghelich K, et al. Quantitative EEG changes in carotid endarterectomy correlated with ischemia. IEEE. 2022:pp 1–5. [Google Scholar]
  • 13.Qureshi AA, Zhang C, Zheng R, Elmeligi A. Ischemic stroke detection using EEG signals. 2018.
  • 14.Erani F, Zolotova N, Vanderschelden B, Khoshab N, Sarian H, Nazarzai L, et al. Electroencephalography might improve diagnosis of acute stroke and large vessel occlusion. Stroke. 2020;51:3361–3365. doi: 10.1161/STROKEAHA.120.030150. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Grinsztajn L, Oyallon E, Varoquaux G. Why do tree-based models still outperform deep learning on tabular data? arXiv. 2022 doi:10.48550/arxiv.2207.08815. [Google Scholar]
  • 16.Ke G, Meng Q, Finley T, Wang T, Chen W, Ma W, et al. Lightgbm: A highly efficient gradient boosting decision tree. Advances in Neural Information Processing Systems. 2017;30 [Google Scholar]
  • 17.Chen T, Guestrin C. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD’ 16) New York, New York, USA: ACM Press; 2016. XGBoost: a scalable tree boosting system; pp. pp 785–794. [Google Scholar]
  • 18.Farhangi F. Investigating the role of data preprocessing, hyperparameters tuning, and type of machine learning algorithm in the improvement of drowsy EEG signal modeling. Intelligent Systems with Applications. 2022;15:200100. [Google Scholar]
  • 19.Bradley AP. The use of the area under the ROC curve in the evaluation of machine learning algorithms. Pattern Recognit. 1997;30:1145–1159. [Google Scholar]
  • 20.Davis J, Goadrich M. In: Proceedings of the 23rd International Conference on Machine Learning (ICML’ 06) New York, New York, USA: ACM Press; 2006. The relationship between Precision-Recall and ROC curves; pp. pp 233–240. [Google Scholar]
  • 21.Ozenne B, Subtil F, Maucort-Boulch D. The precision-recall curve overcame the optimism of the receiver operating characteristic curve in rare diseases. J Clin Epidemiol. 2015;68:855–859. doi: 10.1016/j.jclinepi.2015.02.010. [DOI] [PubMed] [Google Scholar]
  • 22.Scheuer ML, Wilson SB, Antony A, Ghearing G, Urban A, Bagić AI. Seizure detection: interreader agreement and detection algorithm assessments using a large dataset. J Clin Neurophysiol. 2021;38:439–447. doi: 10.1097/WNP.0000000000000709. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Mina AI, Espino JU, Bradley AM, Thirumala P, Batmanghelich K, Visweswaran S. In: MEDINFO 2023: The future is digital – healthcare beyond borders. IOS Press; 2023. Time-series aware metrics for the evaluation of intraoperative electroencephalography-based ischemia detection. [DOI] [PubMed] [Google Scholar]

Articles from AMIA Summits on Translational Science Proceedings are provided here courtesy of American Medical Informatics Association

RESOURCES