Surgical adverse events remain the leading cause of avoidable injury and death in healthcare [1,2,3]. Critically, there has been an increase in intraoperative adverse events (iAEs) [4, 5], which can only partially be attributed to improved tracking [3], with about half considered preventable [6,7,8,9,10]. Much of learning about technical errors and how to avoid them in surgery is based on retrospective analyses of performance, such as self-assessment through video analysis or receiving in-the-moment feedback from a mentor about errors. Although these methods can help improve surgical performance [11, 12], retrospective analyses require learning from errors that have already potentially harmed the patient and can be vulnerable to recall bias. If preventative mechanisms are not developed for learning to avoid technical errors in surgery, iAEs may continue to rise.

Early warning systems (EWSs) are used to predict patient deterioration and have been shown to save lives [13, 14], such as the use of abnormal electrocardiography alerts for reducing cardiac arrests [15]. However, few studies have used EWSs to monitor surgical performance and flag possible upcoming technical errors [16]. In non-surgical settings, electroencephalography (EEG) has been used to predict imminent motor errors 20 s before they occur [17]. At present, it is unknown whether neural signatures could predict technical errors in surgery. If they could, neural activity could be used to provide advanced warning for surgeons to modify their upcoming actions. Our objective was to determine whether EEG could be used to predict technical errors in surgery.

Cognitive processes that precede motor responses

Error monitoring

EEG has provided important evidence about the neurocognitive systems associated with performance monitoring (i.e. the ability to self-evaluate behavioural outcomes). “Action slips”—typically fast and impulsive technical errors, based on insufficient processing of relevant information [18]—elicit an EEG pattern of oscillatory brain activity known as frontocentral theta [19]. An increase in frontocentral theta power represents a cognitive control function of performance [20] and error monitoring [21] (i.e. a heightened awareness of potential performance error), aspects which are critical in surgery for information selection [22] and the prioritization of subsequent operative motor actions [23]. For instance, using simulated technical surgical tasks in dentistry, Balkhoyor et al. [24] recently showed that expert surgeons who made fewer technical errors than novices elicited a larger frontocentral theta power than their novice counterparts, suggesting that experts monitor their performance to avoid errors to a greater degree than novices.

Motor movement uncertainty

While operating, it is critical to prepare an accurate motor response even before knowing precisely what the required action will be. For instance, skilled tennis players prepare their response before their opponents hit the ball by anticipating the most likely shot [25]. However, the level of advanced motor preparation depends on several factors, including contextual information about what responses are likely required [26]. In reaching tasks, the duration of a motor response decreases as the degree of uncertainty about the direction of an upcoming target decreases [27,28,29,30] (i.e. the amount of motor preparation changes with target uncertainty). Although expert surgeons performing laparoscopic surgery experience uncertainty at times (e.g. during complicated procedures), surgical trainees operating laparoscopically may experience a higher degree of motor uncertainty during difficult operative steps, such as during grasping and dissection [31, 32], as they contemplate the next manoeuvre.

Brain oscillatory activity changes with motor preparation [33]. Motor movement processing is reflected by a decrease in power (“desynchronization”) of beta oscillations in the brain (12–30 Hz) [34,35,36,37]. Tzagarakis et al. [26, 38] showed that beta oscillations during movement preparation in the sensorimotor region (contralateral to the responding hand) were modulated by the amount of uncertainty about the direction of a target to be reached—the greater the directional uncertainty, the less the beta-band power decreased during motor preparation. To date, no research has investigated how motor uncertainty relates to surgical error.

Predicting motor errors

There is a growing literature investigating the cognitive processes that underlies surgical performance, with reports on how neural activity modulates as a function of skill acquisition [39,40,41,42,43,44], time pressure [45], stress [46,47,48], fatigue [49], cognitive load [50, 51], attention level [52, 53], and visual-spatial ability [54]. However, no research has investigated whether surgical errors can be predicted by neural signatures well before they occur. Previous (non-surgical) research examining the neural activity that precedes motor error has helped to reveal the source of error. For instance, O’Connell et al. [17] showed that specific neural signatures representing lapses in attention were observed up to 20 s before a motor error occurred in a continuous monitoring expectancy task. Tracing the EEG activity that precedes error should reveal the cognitive mechanisms (e.g. error monitoring and motor uncertainty) that underlie intraoperative technical error and may help to determine the interventions that could be used to avoid predictable iAEs.

The current study

The objective of the present study was to prospectively examine the error monitoring and motor planning cognitive processes that preceded technical errors in laparoscopic surgery, using EEG. Specifically, we investigated EEG data during the 40 s before and 10 s after surgical events, so that activity related to technical errors could be compared with activity related to “good performance” (i.e. performance in line with the surgeon’s intended goal). Compared with the EEG signals preceding good performance, our a priori hypotheses were that the EEG signals preceding technical errors would exhibit (1) greater frontocentral theta-band power at Cz and Fz electrode sites, reflecting greater error monitoring prior to errors committed; and (2) less beta-band power desynchronization over the sensorimotor region (contralateral to the dominant hand) at CP1 and CP5 electrode sites, reflecting greater uncertainty in motor planning prior to errors committed. No differences were expected for centroparietal electrodes lateral to the dominant hand (i.e. CP2 and CP6) across errors and good events.

Materials and methods

Design

This prospective, proof-of-concept, cohort study was conducted from July to November 2021, with a pilot period from February to March 2020 used to optimize the technique of data capture at a large academic medical centre in Toronto, Canada. Data included audiovisual recording of laparoscopic general surgery procedures, and EEG recording of the primary surgeons’ neural activity. All experimental procedures were approved by the Institutional Research Ethics Board. Both the surgeon and the patient provided free and informed consent to participate.

Participants

Five fellows and 2 staff surgeons in general surgery were recruited to participate. Due to unplanned shutdowns of recording operations, 4 surgeon participants were excluded from analysis. Findings were thus reported from 3 surgical fellows in general surgery (all male, right-handed, average age: 35.3 [range: 33–39] years).

Data collection

The recordings encompassed bariatric surgeries, including Roux-en-y gastric bypass (n = 6) and sleeve gastrectomy (n = 2); gastric surgeries including Toupet fundoplication (n = 1); Nissen fundoplication (n = 1); laparoscopic cholecystectomy (n = 1); ileocolic resection (n = 1). The mean (M) procedure duration was 94.8 min, with a standard deviation (SD) of 55.14 min. Thus, 3 surgical fellows (who were blinded from our hypotheses) collectively performed 12 elective general surgeries (Table 1), with a total of 45 error events and 27 good events during grasping and dissection (Table 2).

Table 1 Error events and good events for each surgeon and procedure during grasping and dissection
Table 2 Error events and good events for each procedural step

Data capture

Behavioural data

Questionnaires

Surgeons completed a demographic questionnaire inquiring about their age, gender, years of experience, and handedness. Upon procedure completion, participants completed the NASA Task Load Index (NASA-TLX)—a questionnaire measuring operative workload [55].

OR recording

The Operating Room Black Box® (ORBB; Surgical Safety Technologies Inc., Toronto, Canada) recorded audio data from microphones and video data from laparoscopic and panoramic wall-mounted cameras in the OR. All recordings were anonymized of all identifiers (e.g. hospital information, surgical team, and patient data). The ORBB audiovisual recordings were time-stamped, encrypted, stored on a secure server, and then permanently deleted after 30 days. Time-stamps for both Coordinated Universal Time (UTC) and Eastern Standard Time (EST) were provided to allow for synchronization with the EEG data.

Technical error coding

A board-certified surgeon with over 3 years of experience in analysing intraoperative data using the ORBB trained an observer with a surgical background to use the Generic Error Rating Tool (GERT)—a validated framework for categorizing technical errors in laparoscopic surgery [31]. Errors represented any deviations from the intended operative course (e.g. inadequate use of instrument force or distance) and were time-stamped and converted to UTC and EST at the start and end time of error occurrence. The certified surgeon and observer reviewed the same videos and used the GERT to identify technical errors independently. Across all videos the certified surgeon and observer produced an inter-rater reliability score of 79%. Events of good technical performance were evaluated from the ORBB video recordings and were defined as performance that aligned with the intended operative course. Errors and good events were recorded over all steps of the surgical procedures, but subsequent analysis focused only on the events during grasping and dissection, as previous research has shown that these are error-prone procedural steps [31, 32]. Both event types were kept on an encrypted, password-protected computer.

EEG Data

EEG signals were continuously recorded using a wireless, 31-channel BrainVision MOVE EEG recording system. For each electrode, we computed absolute band powers for the theta and beta bands. All EEG data were kept on an encrypted, password-protected computer, separate from the behavioural data.

Data analysis

To test hypotheses (1) and (2), EEG data were analysed in the a priori chosen frequency bands of theta and beta, in frontocentral electrodes (averaged Fz and Cz; for theta) and sensorimotor electrodes contralateral to the dominant hand (averaged CP1 and CP5; for beta) and lateral to the dominant hand (averaged CP2 and CP6; for beta), separately for errors and good events. Correlations between EEG frequency and questionnaire scores were computed with Spearman’s p. Consistent with previous literature [17], analysis was conducted from 20 s before an event occurred to 10 s after an event. The average EEG frequency band power across surgeon participants for errors and good events during the selected time interval was computed for the electrodes of interest. These data were entered into a hierarchical regression model that assessed the effect of event type independently of surgeon identity to avoid confounds related to individual differences among surgeons. Dynamic analysis was tested using multivariate pattern classification analysis (MVPA) [56].

Dynamic MVPA

A cross-validated SVM classifier was used for this analysis with error events and good events as inputs, performed for each time bin on the interval from 40 s before the event until 10 s after the event, using a sliding window of 4-s duration. To control for disparate sample sizes, both classes were resampled 500 times with 27 samples drawn each time. The significance was determined through a non-parametric test based on 1000 draws of 500 samples with the permuted labels and the alpha set at p = 0.05.

See supplemental material describing the procedure.

Results

Behavioural data

NASA-TLX

Average procedure difficulty reported by surgeons for the NASA-TLX was 40 (SD = 15.88) out of a possible 126 points, with effort, perceived performance success and mental demand contributing the most to the overall average score (Table 3). One-tailed Pearson correlations were run to examine whether the NASA-TLX overall scores positively associated with error frequency across all surgical phases. A significant positive correlation was observed between the NASA-TLX and error frequency (r = 0.50, p = 0.05), such that as reported task load increased, error frequency also increased. More specifically, mental (r = 0.50, p = 0.05), physical (r = 0.49, p = 0.05) and temporal demand of the procedure (r = 0.54, p = 0.03), perceived performance success (r = 0.54, p = 0.03), and performance effort (r = 0.50, p = 0.05) were items that significantly correlated with error frequency. Frustration did not correlate with error frequency (p = 0.37).

Table 3 Surgeon ratings of workload using the NASA task load index per procedure

EEG and behavioural data

Hierarchical regression analysis

Theta-band power

Frontocentral electrodes (i.e. averaged Cz and Fz) showed a significant difference in theta power between error and good events, (β = 0.31; p = 0.01), with a greater desynchronization observed for good events (M = − 116.97, SD = 4.95) than for errors (M = − 112.87, SD = 6.89; see Fig. 1).

Fig. 1
figure 1

Theta- and beta-band power for error events and good events. Theta-band power represents the average of Fz and Cz electrodes and beta-band power represents the average of CP1 and CP5 electrodes. Black bars represent technical error events and grey bars represent good surgical performance events

Beta-band power

Sensorimotor electrodes contralateral to the dominant hand (i.e. averaged CP1 and CP5) showed a significant difference in beta power between good and error events, (β = 0.24, p = 0.03), with a greater desynchronization observed for good events (M = − 120.88, SD = 5.83) than for errors (M = − 117.07, SD = 6.80; see Fig. 1). Sensorimotor electrodes lateral to the dominant hand (i.e. averaged CP2 and CP6) showed no difference between good events (M = − 120.46, SD = 5.81) and errors (M = − 118.95, SD = 6.68), (β = 0.15, p = 0.23).

Multivariate Analysis

Dynamic MVPA

Dynamic sliding window analysis and a permutation test were used to determine the temporal differences in the theta- and beta-band power for error events and good events from 40 s before event onset to 10 s post-event onset. Significant differences between errors and good performance were observed approximately 40 s and 28 s prior to event onset, each lasting a few seconds in duration. More importantly, a long period of significance was observed 17 s before event onset which held until several seconds after event onset, with no significant differences thereafter (see Fig. 2).

Fig. 2
figure 2

Dynamic multivariate pattern analysis (MVPA) discriminating error vs. good events across theta and beta bands. The black horizontal line represents the permutation test threshold and the grey horizontal line represents the magnitude of discrimination between errors and good events for beta and theta bands over time. Areas shaded in grey show time durations where significant performance differences are found. The thick black vertical line indicates event onset

Discussion

This is the first investigation into the neural signatures that predict technical error during elective laparoscopic surgery. As expected, most technical errors occurred during grasping and dissection [31, 32] and an association between surgical performance and NASA-TLX scores was observed [57], such that as perceived workload increased, error frequency increased. Further, oscillatory neural signatures reflecting error monitoring and motor uncertainty preceded the commission of technical errors, but not good surgical performance, by 17 s. Thus, if suitably sensitive detection methods can be developed with low false-alarm rates, neural signatures could provide advance warning so that surgeons can modify their actions before harming the patient.

Most studies that have examined the cognitive processes that underlie surgical performance have been conducted in simulated settings (see Modi et al. [58] for review). Only two studies using neuroimaging technology were conducted while the surgeon was operating, with one investigating the surgeon’s stress across risky versus less risky surgical phases using EEG during 2 laparoscopic simple nephrectomy procedures [46] and the other examining attention and motor processing using EEG during prostatectomy and cystectomy via robotic-assisted surgery, which was conducted by one surgeon over 51 procedures [52]. As previously described, only one study to date has examined the neural underpinnings of surgical error [24]. Using a simulated drilling task in which difficulty was manipulated, results showed that expert surgeons monitor their performance to avoid error to a greater degree than novices, reflected by a larger frontal theta power with expertise. Here, we took a novel approach and investigated neural activity that preceded errors to elucidate the cognitive source of technical error and to determine how far in advance errors can be predicted. Specifically, results showed evidence of error monitoring and motor uncertainty 17 s before technical errors occurred—providing the first evidence that accurate intuitions of performance “not going right” may occur well before actual surgical errors are committed. Although speculative, this interpretation was supported by our behavioural results showing an increase in perceived workload and procedure difficulty, as determined by the NASA-TLX, associating with an increase in technical errors.

Our findings may have direct implications for organizations committed to developing more rigorous surgical training. If certain avoidable technical errors can be predicted well ahead of their occurrence (e.g. ~ 20 s beforehand), it suggests that they can be prevented by early warning. Given reports of high variability in surgical skill [39] and its impact on patient morbidity and mortality [59], greater focus is being placed on individualized learning in the effort to help a larger proportion of trainees succeed [60]. To support more rigorous benchmarking of surgical skill during training, EEG could be used to estimate cognitive levels of error monitoring and motor uncertainty during at-risk periods of surgery, in addition to objective measurements of technical skill (e.g. Objective Structured Assessment of Technical Skills; OSATS) [61]—with greater confidence, certainty, and performance monitoring [24] of the next operative move observed as surgical skill is refined. This would provide trainees with a unique opportunity to understand their own tendencies and track their operating proficiency both externally (e.g. OSATS) and internally (e.g. through cognitive indicators of uncertainty, effort, or distraction). Compared with retrospective methods of self-evaluation (e.g. a video recording of performance), an EWS that provides cautionary alerts of imminent unsafe actions with neurofeedback generated back to the trainee in real time (e.g. through auditory warnings) might provide a more effective strategy in the teaching context, as the trainee could react to possible unsafe actions in advance.

Limitations

Some limitations of the present work merit discussion. Although our sample size was comparatively larger to previous research that has used EEG in the OR [46, 52], the number of surgeons and procedures recorded was low. Future research should collect larger sample sizes that have sufficient power to detect brain–behaviour relationships robustly in surgery, across varying specialties, procedures, levels of expertise, and genders. Surgeon participants were not told to refrain from consuming alcohol or caffeine 24 h before EEG recording, which has shown to effect brain activity [62]. However, examples of good and error events were drawn from each participant, reducing the possibility of systemic confounds.

Conclusion

Our findings showed that distinct neural signatures representing error monitoring and motor uncertainty predicted technical errors in laparoscopic surgery among surgical fellows at least 17 s before they occurred. Researchers are encouraged to utilize neuroimaging methods and enhance their sensitivity and specificity, to dive deeper into the investigation of how to predict surgical errors. Reliable hints of future technical error will direct the development of novel EWSs that could improve the efficiency of surgical education and reverse the trend of iAEs increasing in the OR.