Original Research

Out-of-hospital multimodal seizure detection: a pilot study

Abstract

Background Out-of-hospital seizure detection aims to provide clinicians and patients with objective seizure documentation in efforts to improve the clinical management of epilepsy. In-patient studies have found that combining different modalities helps improve the seizure detection accuracy. In this study, the objective was to evaluate the viability of out-of-hospital seizure detection using wearable ECG, accelerometry and behind-the-ear electroencephalography (EEG). Furthermore, we examined the signal quality of out-of-hospital EEG recordings.

Methods Seventeen patients were monitored for up to 5 days. A support vector machine based seizure detection algorithm was applied using both in-patient seizures and out-of-hospital electrographic seizures in one patient. To assess the content of noise in the EEG signal, we compared the root-mean-square (RMS) of the recordings to a reference threshold derived from manually categorised segments of EEG recordings.

Results In total 1427 hours of continuous EEG was recorded. In one patient, we identified 15 electrographic focal impaired awareness seizures with a motor component. After training our algorithm on in-patient data, we found a sensitivity of 91% and a false alarm rate (FAR) of 18/24 hours for the detection of out-of-hospital seizures using a combination of EEG and ECG recordings. We estimated that 30.1% of the recorded EEG signal was physiological EEG, with an RMS value within the reference threshold.

Conclusion We found that detection of out-of-hospital focal impaired awareness seizures with a motor component is possible and that applying multiple modalities improves the diagnostic accuracy compared with unimodal EEG. However, significant challenges remain regarding a high FAR and that only 30.1% of the EEG data represented usable signal.

What is already known on this topic

  • Multimodal seizure detection is feasible in an in-patient population.

What this study adds

  • Wearable electroencephalography (EEG), ECG and accelerometry can detect correlates of seizure activity in an out-of-hospital environment. Furthermore, a support vector machine trained on in-patient data, out-of-hospital data or both can detect out-of-hospital focal impaired awareness seizures with a motor component.

How this study might affect research, practice or policy

  • This study helps inform future research on seizure detection in epilepsy by highlighting the advantages of different modalities and informing on the challenges regarding EEG signal quality in an out-of-hospital setting.

Introduction

Out-of-hospital seizure detection is a rapidly emerging field aiming to provide patients and clinicians with objective seizure documentation.1 2

Out-of-hospital monitoring implies that the patients use the wearables in a home environment, including during everyday activities. As opposed to the sedentary setting in an epilepsy monitoring unit (EMU), out-of-hospital monitoring provides multiple sources of signal noise, degrading of the electrode connection to the skin and external electrical noise.3–5 Furthermore, psychological factors such as reluctance from the patients to use visible wearables, particularly around other people, have previously been described and could affect the outcome.4 6

Selecting the right combination of biosignals for out-of-hospital long-term seizure detection is an important area of research.1 2 7 A recent study investigated the feasibility of behind-the-ear electroencephalography (EEG) based detection of focal impaired awareness seizures (FIAS) in an out-of-hospital population and found a sensitivity of 23%. However, the study reported that patients are willing to use the device for months of recording, but 64% of the out-of-hospital EEG signal were excluded due to low signal quality.5

Using a multimodal approach may improve the detection accuracy and provide seizure correlates from alternative biomarkers, which we could detect during periods of poor EEG signal quality.8 9

We conducted an exploratory trial on long-term out-of-hospital multimodal seizure detection using a combination of accelerometry (ACM), ECG and behind-the-ear EEG.

In a preparatory in-patient study for out-of-hospital testing, we found that our device combination could detect seizure correlates, including rhythmic ictal 3–4 Hz EEG activity and ictal heart rate (HR) changes.9

We now present results on out-of-hospital seizure detection. Furthermore, we quantify the noise contamination in the EEG signal.

Methods

Study population

Patients admitted to the EMU or visiting the outpatient epilepsy clinic at Zealand University Hospital between March 2020 and August 2021 were screened for eligibility. Furthermore, we invited patients from the in-patient study to participate.9 We recruited adult patients with an estimated high seizure frequency to promote the chance of seizure events during the 5-day monitoring period.

Study devices

Behind-the-ear EEG was recorded with a TrackIT T4a (Lifelines, UK) with a sampling rate of 500 Hz and using patch-electrodes (Neuroline, Ambu, Denmark). A photograph of the study setup can be found in online supplemental figure 1. The ECG and sternum ACM were recorded with a Faros 180 (Bittium, Finland) using a self-adhesive patch electrode (FastFix, Bittium, Finland) and a sampling rate of 500 Hz for the ECG and 25 Hz for the ACM.

Data collection

The patients were asked to use the devices for five consecutive days, with an option to prolong after 5 days or retry at another time. The patients were instructed on the use of the devices, including correctly changing electrodes multiple times during the day or when otherwise deemed necessary. They were asked to follow their regular daily routines during the recording period. Furthermore, they were reminded that the devices could be removed if they did not want to wear them in any given setting (eg, during work) or during physical exercise and showering. All patients were asked to keep a seizure diary. Patients with exclusively nocturnal seizures used the devices during the night only.

Data review

All recordings were reviewed for electroencephalographic seizure patterns in the time domain by one of the authors (JMN) using the EDFbrowser V.1.91, blinded to the entries of the seizure diary.

Secondarily, the data segments corresponding to all entries in the seizure diaries were reviewed in the time domain. All potential seizure events were compared with previously validated seizures when available from either the preparatory in-patient study or from clinical EEG recordings.9

Data preprocessing and analysis

Data synchronisation

The EEG and ECG recordings were manually synchronised by identifying R-peak artefacts in the EEG and aligning them with the corresponding R-peaks in the ECG. We then adjusted the alignment using a cross-correlation-based method, in which the EEG epochs with visible R-peak artefacts were aligned with the ECG signal using the MATLAB version 2021a (MathWorks, USA) xcorr function. We determined and adjusted the temporal alignment by maximising the cross-correlation value. This process was repeated in multiple segments throughout the recording to adjust for temporal drift. However, the process was limited by the number of EEG segments with contaminant ECG.

EEG preprocessing

We performed all preprocessing and visualisations using MATLAB version 2021a (MathWorks, USA). We imported the recordings using the EEGLAB toolbox and custom scripts.10 We filtered the EEG using a 0.5–70 Hz band-pass filter and a 48.5–51.5 Hz notch filter. Followingly, we segmented the EEG into 2 s epochs with 50% overlap and then EEG features were extracted as described in our preparatory in-patient study.9 We extracted the following features: Skewness, kurtosis, root-mean square (RMS), zero crossings, sample entropy and power in the alpha, beta, delta, theta and gamma bands. However, we added further subdivisions of the frequency bands as the alpha, theta and gamma-band were split into low alpha (7–10 Hz) and high alpha (10–12 Hz), low theta (3–5 Hz) and high theta (5–7 Hz), and low gamma (30–48 Hz) and high gamma (52–80 Hz).11

ECG and ACM preprocessing

R-peaks were detected using an algorithm derived from the Pan-Tompkins algorithm.12 The HR variability measures Modified Cardiac Sympathetic Index (ModCSI) and ModCSI with the magnitude of the slope were calculated using R V.4.2 and using a moving window of 100 R-peaks as described by Jeppesen et al.13 14 Measures of mean and SD were calculated from the ACM signal.

Automatic seizure detection

A support-vector machine based classifier was trained for cross-modal seizure detection. It was implemented as described in a previous study with two minor changes.9 To account for class imbalance, we applied undersampling of the majority class (epochs without seizure activity) in combination with synthetic minority oversampling technique.15 All features were standardised by subtracting the mean and dividing by the SD, resampled to 1 Hz and the data were split into folds. One fold for each seizure with fold limits set as the middle point between consecutive seizures, so each fold contained temporally continuous seizure and non-seizure data.

A minimum seizure duration (MSD) threshold was applied, defining the minimum duration in seconds for a positive prediction to be classified as a seizure. The classifier was run using MSD values of 5–60 s with increments of 5 s and on the whole dataset from the individual patient.

First, in order to assess whether out-of-hospital data can be used to train the classifier, we used a leave-one-out cross-validation method, meaning that the training data consisted of all except one of the out-of-hospital folds and the remaining fold was used as the test data (figure 1). We repeated this process in iterations so all folds, hence all seizures, were used in the training and test data. The results from each iteration were then aggregated.

Figure 1
Figure 1

Flow chart of the methods used to obtain and preprocess the data and for training and testing the seizure detection algorithm. The two approaches used for training and testing the algorithm is shown in the sections labelled 1 and 2. The in-patient data used in section 2 was obtained during epilepsy monitoring unit (EMU) recordings from the same individual which were recorded in a previous study.9 The recordings from the EMU study were preprocessed the same way as the out-patient recordings. ACM, combination of accelerometry; EEG, electroencephalography.

Second, we trained the classifier on all the in-patient recordings from a previous study in the same patient and tested on out-of-hospital recordings, thereby evaluating whether the seizure detection algorithm can be trained on in-patient data to detect out-of-hospital seizures (figure 1).9 Using the same algorithm, we then transferred one out-of-hospital fold from the test data to the training data (figure 1). The algorithm was then tested on the remaining out-of-hospital data and evaluated using metrics of sensitivity and false alarm rate (FAR) per 24 hours. Subsequently, F1-scores were calculated, allowing us to compare different combinations of modalities using a single metric.

This process was rerun in iterations with one unique out-of-hospital fold transferred each time to ensure that all out-of-hospital folds were both applied in the training data and in the test data. The length of each fold varied and to account for this variation, the results from each iteration were aggregated using the weighted mean so that results on FAR from a longer fold weighted more than those from a shorter fold. We then re-ran this process with the transfer of first three and then five out-of-hospital folds, to evaluate the added effect of transferring more than one fold to the training set.

During the whole process, the classifier was trained and evaluated using different combinations of modalities.

EEG noise assessment

We expected significant noise to interfere with the EEG signal, particularly from movement, muscle artefacts, and poor electrode adhesion (loss of signal). It was expected that the amplitude exhibited by physiological EEG activity would be predominantly within a specific range.

We visually identified 60 two-second segments of physiological EEG, loss of signal and high-amplitude noise and calculated the RMS value of those segments. The RMS range of each category was used to determine two reference thresholds: a lower and an upper threshold. The range within these thresholds should encompass the EEG group while having a minimum overlap with the low and high amplitude groups. We then calculated the RMS for all out-of-hospital recordings in 2 s windows and compared it to the reference thresholds. Each 2 s window was categorised as smaller than the lower threshold limit, within the threshold range or larger than the upper threshold limit, which can be interpreted as either probable no signal, EEG or high amplitude artefacts, respectively.

Results

Seventeen patients (nine female; median age: 29 years; range 18–59 years) were monitored, and three of the patients were monitored twice, yielding 1427 hours of recorded data. Additional demographic data are available in table 1. Two patients, who had exclusively nocturnal seizures (P3 and P17), asked to use the devices during the night only. Furthermore, two patients later reported to have only used the devices intermittently (P7 recorded 31% and P14 recorded 53% of the intended monitoring period). We did not systematically gather information on the reasons for intermittent usage of the devices. However, one patient reported that the devices were cumbersome during sleep while another patient reported that the electrodes were uncomfortable due to the summer heat.

Table 1
|
An overview of seizure localisation, semiology and self-reported events. reported per patient

Data review

Fifteen electrographic seizures, without corresponding seizure diary entries, were identified in one patient. These electrographic seizures were compared with the patient’s previously video-EEG recorded seizures and found to be similar in evolution, duration and magnitude (figure 2).

Figure 2
Figure 2

Time-domain comparison of an in-patient video-EEG validated seizure with an out-of-hospital electrographic seizure. Top panel shows an in-patient seizure as recorded with bteEEG. Middle panel shows the same seizure as recorded with EMU EEG. The start and stop times refer to the onset and end of the seizure, as reported by the clinical neurophysiologist based on both the ictal electrographic and behavioural changes seen in the in-patient EMU video-EEG recordings. Bottom panel shows an out-of-hospital electrographic seizure as recorded with the bteEEG. EEG, electroencephalography; EMU, epilepsy monitoring unit.

Furthermore, 6 patients had a total of 13 entries in their seizure diaries but without corresponding seizure correlates identified in the recordings.

Seizure detection algorithm results

The algorithm was evaluated to accommodate two different scenarios, first a scenario where only out-of-hospital data were available, and second a scenario where both in-patient and out-of-hospital data were available.

First, the seizure detection algorithm was trained and tested using only data from the out-of-hospital recordings (figure 3). Using a combination of all modalities yielded a sensitivity of 100%, an FAR of 10 per 24 hours and an F1-score of 0.75.

Figure 3
Figure 3

Receiver operating characteristic curves of the automatic seizure detection of the electrographic seizures identified in one patient. The classifier was trained and tested using only out-of-hospital recordings. ACM, combination of accelerometry; EEG, electroencephalography; FAR, false alarm rate (per 24 hours); MSD, minimum seizure duration.

Second, the algorithm was trained on the in-patient data and tested on the out-patient data (figure 4 and table 2).

Figure 4
Figure 4

Receiver operating characteristic curves of the automatic seizure detection of the electrographic seizures identified in one patient. In the left column, the classifier was trained on in-patient data from.9 In the middle column, the classifier was trained on in-patient data with the addition of one out-of-hospital fold. In the right column 5 out-of-hospital folds were added. *Number of out-of-hospital folds in the training set out of the total number of out-of-hospital folds. ACM, combination of accelerometry; EEG, electroencephalography; FAR, false alarm rate (per 24 hours); MSD, minimum seizure duration.

Table 2
|
Selected results from the automatic detection of electrographic seizures in one patient

When using the combination of ECG and EEG we found a sensitivity of 91%, FAR of 18 per 24 hours and F1-score of 0.58, demonstrating that training the algorithm on in-patient data only slightly reduces the performance when compared with out-of-hospital training and testing. Furthermore, we found that including five out-of-hospital folds to the training set, improved the sensitivity to 100%, the FAR to 12 per 24 hours and the F1-score to 0.71 (figure 4—second row and table 2—fourth row).

Considering unimodal ECG, we found an improvement in sensitivity from 96% to 100%, the FAR from 47 to 28 per 24 hours and the F1-score from 0.37 to 0.51 when adding one out-of-hospital fold. Furthermore, we found that adding five out-of-hospital folds to the training set, further reduced the FAR to 21 per 24 hours (figure 4—fourth row and table 2).

EEG noise assessment results

On manual review of the EEG, a large number of artefacts mixed with the EEG and recurring periods of no signal (low amplitude) or high amplitude artefacts without recognisable physiological EEG were evident.

The upper and lower RMS threshold limits of physiological EEG in our recordings were determined as 8.15 µV and 45.35 µV, respectively.

Figure 5 shows all recordings, and the colouring indicates the categorisation of each 2 s window according to the thresholds. Examples of signals representing each of the categories are presented in figure 6. A total of 30.8% of the recordings had an RMS value within the threshold range (green) with a range of 1%–72% in the individual recordings, and thus representing useable EEG segments. Furthermore, 42.2% had an RMS value smaller than the lower threshold (blue) which indicates loss of signal (figure 6—example 2). While 27% of the recordings had an RMS value larger than the upper threshold (red), which is seen in recordings with a predominance of movement or muscle artefacts (figure 6—example 3).

Figure 5
Figure 5

Visualisation of one channel from all the recordings. An RMS threshold range of physiological EEG was established from manually reviewed EEG epochs. Then RMS was calculated for all the EEG recordings in 2 s windows and each window was categorised and coloured according to the threshold. EEG, electroencephalography; RMS, electroencephalography.

Figure 6
Figure 6

A 20 s examples of EEG categorised according to the EEG thresholds. Note the different scale of the y-axis in example 3. Example 1: EEG signal with an RMS within the threshold range. visually subtle R-peak artefacts. Example 2: EEG signal with an RMS below the lower threshold limit, perhaps indicating loss of electrode skin contact. Example 3: EEG signal with an RMS above the upper threshold limit. perhaps movement artefacts at 1, 7 and 12 s. EEG, electroencephalography; RMS, electroencephalography.

The RMS of the recorded dataset fluctuated greatly with different interpatient patterns (figure 5). Most notably, seven recordings (ID number 1–1, 2–1, 3–1, 6–1, 14–1, 16–1 and 17–1) had less than 15% EEG with an RMS within the threshold range.

In the nocturnal recordings (22:00–7:00 hours) 30.5% was within the threshold range, which is comparable to the 30.8% in the entire recording. However, 52.9% was below the lower threshold compared with 42.2% in the entire recordings, and 16.6% was above the upper threshold compared with 27% in the entire recordings.

Discussion

In this pilot study, we examined out-of-hospital seizure detection using a wearable combination of ECG, ACM and behind-the-ear EEG.

Manual review of long-term recordings is a time-consuming task, emphasising the need for automatic assistance.16 17 We demonstrate that we can train a detection algorithm separately on both out-of-hospital and in-patient recordings and apply it in an out-of-hospital setting.

Applying only out-of-hospital recordings for the training and testing, we found a sensitivity of 100% and FAR of 10 per 24 hours using all modalities. This is comparable to our preparatory in-patient study, in which the algorithm yielded a sensitivity of 91% and FAR of 20 per 24 hours for the same patient.9 A recent study investigated the feasibility of out-of-hospital detection of FIAS using behind-the-ear EEG in 16 patients and found a sensitivity of 23%.5 However, FIASs have more subtle ictal correlates making them more difficult to detect and they used self-reported seizures as the seizure reference standard which, given the known imprecision of seizure diaries, could have negatively affected the results.5 18

For unimodal ECG, adding one out-of-hospital fold to the training set improved the sensitivity from 96% to 100%, the FAR from 47 to 28 per 24 hours and the F1-score from 0.37 to 0.51. In comparison, a previous in-patient study on ECG-based seizure detection yielded a sensitivity of 87% and an FAR of 0.9 per 24 hours for the detection of mainly focal seizures in a population with known ictal autonomic changes (ictal HR increase or decrease of >50 beats per minute).19 Considering a multimodal setup, unimodal ECG could conceivably provide a reliable signal for seizure detection during periods of poor EEG signal quality.

Signal quality is an important aspect when considering the feasibility of long-term out-of-hospital behind-the-ear EEG recordings. We estimated the proportion of physiological EEG in all the EEG recordings, thus assessing the viability of out-of-hospital EEG recording using our setup. An RMS threshold is a commonly applied pre-processing step to exclude artefacts in EEG analysis.20

We found that 69.2% of the EEG recordings had an RMS value outside of our reference threshold range. We interpreted this finding as giving a low likelihood, that the signal is physiological EEG. This could be caused by insufficient electrode care, physical activity or that the EEG electrodes were disconnected. During nocturnal recordings, we saw a switch from high amplitude artefacts to no detectable signal (low amplitude), which could be due to fewer movement artefacts but a higher number of loose unchecked electrodes. A previous study investigated the signal quality of a wireless single-channel EEG electrode using a threshold-based signal-to-noise ratio method.4 21 They found that of 405 days of recordings, 21.4% were classified as good, 33.3% as acceptable and 45.3% as marginal.4 We experimented with a similar maximum bandwidth-based method.21 However, through qualitative review of a portion of the results we found that the method was insensitive to high amplitude low frequency artefacts commonly observed during distortion of our electrode wires. Although we used a different method and device, we found that 30.1% of the recordings had an RMS value within our threshold. Furthermore, a behind-the-ear another recent EEG-based study on out-of-hospital detection of FIAS found that 64% of the recordings had to be excluded from the review process due to low signal quality.5 In conclusion, three consecutive studies, including this study, found considerable challenges regarding out-of-hospital EEG signal quality, which conceivably compromises the seizure detection capabilities. However, different electrode configurations such as EEG electrodes in the ear canal or novel adhesives may provide reliable out-of-hospital EEG recordings.22 23

Patient acceptance of wearable devices is important for compliance and a step towards clinical feasibility. In our previous study, patients were interviewed regarding their experiences from using the devices out-of-hospital. A general finding was that the devices put their epilepsy condition in a spotlight, meaning that they were more attentive to their symptoms, but also to the fact that the devices made their condition visible to their surroundings.24 However, we find that only two patients reported to use the devices intermittently despite planning to use them continuously. This finding is in line with a previous study which established feasibility of months of out-of-hospital EEG recordings using behind-the-ear EEG.5

Limitations

Out-of-hospital monitoring can only document electrographic seizures but not whether these represent clinical seizures as that would require documentation of the ictal symptoms. We relied on within-patient seizure similarity of ictal EEG patterns (ie, seizure signature) (figure 2) as a method for acknowledgement of electrographic seizures without video documentation.16 22 25 However, this method may miss clinically relevant seizures that diverge from the stereotyped in-patient seizures or misidentify subclinical electrographic seizures as clinical seizures. Furthermore, comparing in-patient seizures with out-of-hospital electrographic seizures could introduce confirmation bias to the review process.

We recorded electrographic seizures in one patient with 15 FIAS with a motor component. We applied these seizures to examine the validity of our seizure detection algorithm, however the results cannot be generalised to other patients or seizure types. Future research could advantageously be done in a population with refractory epilepsy, for example, during presurgery workup to record more seizures, allowing for a more precise description of seizure characteristics in each individual patient. The RMS method for assessment of the EEG signal is sensitive to high amplitude artefacts, for example, movement or muscle artefacts, however, it will not detect artefacts with an amplitude in the range of normal EEG. The results should be interpreted as a crude estimation of the noise saturation in the EEG recordings. Future research should explore the impact of real-world artefacts and signal quality deterioration on the performance of the seizure detection algorithm.

We only identified FIAS with a motor component which provided an ictal high amplitude EMG pattern which, applying the RMS method, would probably be labelled as high amplitude artefacts. Consequently, applying this method during preprocessing should be carefully considered. Additionally, considering the ictal EMG pattern, the seizures could arguably have been detected using simpler devices such as an EMG-armband.26

Conclusion

In this pilot study, we found that our seizure detection algorithm can detect out-of-hospital FIAS with a motor component, both when trained on out-of-hospital and in-patient recordings. However, the detected seizures had pronounced EEG correlates, and we were unable to identify more subtle seizures. Furthermore, an FAR of 10 per 24 hours or more may be unsuitable for clinical implementation without tools for manual review of all detections and reversal of false detections. We encountered significant challenges when considering the data quality of wearable EEG, which could hinder the scalability of our proposed setup to larger sample sizes or longer monitoring durations. This poses a major practical barrier to implementing long-term out-of-hospital seizure detection using our approach. The inefficiency in scaling due to data quality concerns is a significant hurdle that needs to be addressed in order to make our proposed setup feasible for out-of-hospital application.

Significance

Automatic out-of-hospital seizure detection using multimodal measurements is possible in practice and may prove useful for long-term monitoring, although significant challenges remain.