Research Article| Volume 59, P48-53, July 2018

Ok
• PDF [786 KB]PDF [786 KB]
• Top

# Adaptive nocturnal seizure detection using heart rate and low-complexity novelty detection

Open ArchivePublished:April 25, 2018

## Highlights

• Personalized heart rate based seizure detection is required for good performance.
• A personalized seizure detection algorithm is proposed using only heart rate data.
• Algorithm automatically adapts to patients without requiring seizure annotations.
• Adaptation to patient heart rate characteristics after a couple of hours.
• Good performance for nocturnal monitoring of partial and convulsive seizures.

## Abstract

### Purpose

Automated seizure detection at home is mostly done using either patient-independent algorithms or manually personalized algorithms. Patient-independent algorithms, however, lead to too many false alarms, whereas the manually personalized algorithms typically require manual input from an experienced clinician for each patient, which is a costly and unscalable procedure and it can only be applied when the patient had a sufficient amount of seizures. We therefore propose a nocturnal heart rate based seizure detection algorithm that automatically adapts to the patient without requiring seizure labels.

### Methods

The proposed method initially starts with a patient-independent algorithm. After a very short initialization period, the algorithm already adapts to the patients’ characteristics by using a low-complex novelty detection classifier. The algorithm is evaluated on 28 pediatric patients with 107 convulsive and clinical subtle seizures during 695 h of nocturnal multicenter data in a retrospective study that mimics a real-time analysis.

### Results

By using the adaptive seizure detection algorithm, the overall performance was 77.6% sensitivity with on average 2.56 false alarms per night. This is 57% less false alarms than a patient-independent algorithm with a similar sensitivity. Patients with tonic–clonic seizures showed a 96% sensitivity with on average 1.84 false alarms per night.

### Conclusion

The proposed method shows a strongly improved detection performance over patient-independent performance, without requiring manual adaptation by a clinician. Due to the low-complexity of the algorithm, it can be easily implemented on wearables as part of a (multimodal) seizure alarm system.

## 1. Introduction

An important question in epilepsy is how the quality of life of refractory patients can be improved. One of the most proposed solutions is the use of real-time warning systems, which automatically detect ongoing seizures and warns the patients’ caregivers when such an event occurs [
• Van de Vel A.
• Cuppens K.
• Bonroy B.
• Milosevic M.
• Jansen K.
• Van Huffel S.
• et al.
Non-EEG seizure detection systems and potential SUDEP prevention: state of the art: review and update.
]. Such a system is of great demand for pediatric patients and their parents, certainly for nocturnal monitoring. It allows the caregivers to give proper treatment to the patient whenever a seizure alarm is generated, leading to an improved quality of life at home. In order to be used properly in practice, the system should detect most seizures sufficiently fast without generating too many false alarms.
Most proposed modalities for automated seizure detection at home are accelerometers (ACM), electromyogram (EMG), heart rate and electrodermal activity (EDA) [
• Milosevic M.
• Van de Vel A.
• Bonroy B.
• Ceulemans B.
• Lagae L.
• Vanrumste B.
• et al.
Automated detection of tonic–clonic seizures using 3-d accelerometry and surface electromyography in pediatric patients.
,
• Beniczky S.
• Henning O.
• Fabricius M.
• Wolf P.
Automated real-time detection of tonic–clonic seizures using a wearable EMG device.
,
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
,
• Poh M.-Z.
• Loddenkemper T.
• Reinsberger C.
• Swenson N.C.
• Goyal S.
• Sabtala M.C.
• et al.
Convulsive seizure detection using a wrist-worn electrodermal activity and accelerometry biosensor.
]. The major benefit of the heart rate over the other modalities is that it allows to detect not only convulsive seizures, but also non-motoric focal seizures (seizures with relative limited clinical manifestations such as chewing, etc.) [
• Van de Vel A.
• Cuppens K.
• Bonroy B.
• Milosevic M.
• Jansen K.
• Van Huffel S.
• et al.
Non-EEG seizure detection systems and potential SUDEP prevention: state of the art: review and update.
,
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
,
• Osorio I.
Automated seizure detection using EKG.
]. Another benefit is that heart rate often allows for a faster seizure detection compared to ACM and EDA due to a faster activation of the autonomic nervous system, which is preferred in real-time usage [
• Zijlmans M.
• Flanagan D.
• Gotman J.
Heart rate changes and ECG abnormalities during epileptic seizures: prevalence and definition of an objective clinical sign.
].
The majority of seizures show ictal heart rate changes which can most often be seen as strong heart rate increases leading to tachycardia, but rarely also ictal bradycardia can be found [
• Zijlmans M.
• Flanagan D.
• Gotman J.
Heart rate changes and ECG abnormalities during epileptic seizures: prevalence and definition of an objective clinical sign.
,
• Jansen K.
• Lagae L.
Cardiac changes in epilepsy.
,
• Leutmezer F.
• Schernthaner C.
• Lurger S.
• Pötzelberger K.
• Baumgartner C.
Electrocardiographic changes at the onset of epileptic seizures.
]. These changes are caused by changes in the autonomic nervous system and can be triggered by activation of the insula and amygdala [
• Osorio I.
Automated seizure detection using EKG.
,
• Jansen K.
• Lagae L.
Cardiac changes in epilepsy.
,
• Oppenheimer S.M.
• Gelb A.
• Girvin J.P.
• Hachinski V.C.
Cardiovascular effects of human insular cortex stimulation.
]. Previous studies discussed that ictal heart rate changes could thus be used for epileptic seizure detection [
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
,
• Novak V.
• Reeves A.L.
• Novak P.
• Low P.A.
• Sharbrough F.W.
Time–frequency mapping of R–R interval during complex partial seizures of temporal lobe origin.
].
Most heart rate based detection algorithms work with a patient-independent approach [
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
,
• Osorio I.
Automated seizure detection using EKG.
,
• Varon C.
• Jansen K.
• Lagae L.
• Van Huffel S.
Can ECG monitoring identify seizures?.
,
• van Elmpt W.
• Wouter J.
• Nijsen T.
• Griep P.
• Arends J.
A model of heart rate changes to detect seizures in severe epilepsy.
,
• Andel J.
• Ungureanu C.
• Arends J.
• Tan F.
• Dijk J.V.
• Petkov G.
• et al.
Multimodal, automated detection of nocturnal motor seizures at home: is a reliable seizure detector feasible?.
]. They do not use any patient-specific data, making them directly usable in practice as a one-fits-all approach. They however result in a too low performance due to the high patient-dependency of the heart rate features [
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
]. Patient-specific algorithms include prior data/information from the specific tested patient to construct an algorithm specifically for this patient. State-of-the-art patient-specific algorithms require the availability of annotated patient-specific data, which is not always available, certainly if also patient-specific seizure data is required for adaptation [
• Jeppesen J.
• Beniczky S.
• Fuglsang-Frederiksen A.
• Sidenius P.
• Jasemian Y.
Detection of epileptic-seizures by means of power spectrum analysis of heart rate variability: a pilot study.
,
• Sabesan S.
• Sankar R.
Improving long-term management of epilepsy using a wearable multimodal seizure detection system.
].
Therefore, we propose a fully automated adaptive seizure detection algorithm. Initially, only a patient-independent classifier is used. After a short initialization phase, the algorithm is already adapted to the patient's heart rate characteristics. It continues to adapt further to the patient while being worn. By using a low-complexity novelty detection approach, the newly gathered data does not have to be annotated by either a clinician or the patients themselves, improving the usability of this algorithm. The approach characterizes normal behavior by assuming that the majority of data corresponds to non-epileptic behavior, so that abnormal behavior is then associated with epileptic activity.
The aim of this paper is to evaluate whether a heart rate based seizure detector can be personalized fast in a fully automated way in order to make it more usable in practice. The evaluation is done in retrospective study, in which the data is analysed in an environment that mimics a real-time setting. To the best of our knowledge, it is the first time a heart rate based seizure detection algorithm is developed that automatically personalizes without requiring seizure annotations. A precursor of this work, discussing a nocturnal adaptive algorithm using seizure annotations, is described in [
• De Cooman T.
• Van de Vel A.
• Ceulemans B.
• Lagae L.
• Vanrumste B.
• Van Huffel S.
Online detection of tonic–clonic seizures in pediatric patients using ECG and low-complexity incremental novelty detection.
].

## 2. Methodology

### 2.1 Data acquisition

The data used to evaluate the proposed algorithm were recorded in two clinical centers. A first part of the dataset contains nocturnal data from the Pulderbos Revalidation Center for Children and Youth. 14 pediatric patients with 69 seizures were monitored from bed time until the morning (±7–8 a.m.). In the second dataset, data from another 14 pediatric patients with 38 seizures were obtained from the University Hospital of Leuven. Only the night time parts of these recordings (22 h–8 h) were used here. Both datasets contain electrocardiogram (ECG) signals with 250 Hz sampling frequency. In total 694.6 h of data was recorded, and both convulsive and subtle seizures are analyzed, both with focal (temporal and frontal lobe) and generalized onsets. Seizures were annotated by experts using video-EEG as gold standard. Only seizures with a duration of at least 20 s were evaluated here as detection of shorter seizures is very difficult with heart rate based seizure detection [
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
,
• Hampel K.G.
• Jahanbekam A.
• Elger C.E.
• Surges R.
Seizure-related modulation of systemic arterial blood pressure in focal epilepsy.
]. 68 additional seizures shorter than 20 s from both databases are not taken into account in this study, of which 40 seizures were shorter than 10 s. The study was performed in accordance with the 1964 Declaration of Helsinki and approved by the Medical Ethical Commission of the Antwerp University Hospital, Belgium and Leuven University Hospital, Belgium. Signed informed consent forms from all parents were obtained prior to inclusion in the study. Schwarzer head box sets were used for data recording in both datasets. The obtained data was analyzed in a retrospective study using Matlab®, in which a real-time setting was mimicked. An overview of the used datasets is added to the Supplementary material.

### 2.2 Preprocessing

The proposed adaptive seizure detection algorithm uses as input the real-time tachogram. The preprocessing procedure is similar as in [
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
] according to the following steps. The heart rate is obtained in real-time from the ECG by using an R peak detection algorithm based on dynamic thresholding on the derivative signal. A second preprocessing step extracts strong sympathetic heart rate increases (HRIs). A HRI is detected if the heart rate gradient rises above 1 bpm/s. The start and end of the HRI are found by evaluating when the gradient becomes negative again. This HRI is then said to be a strong HRI if the increase in heart rate (both absolute and percentual) exceeds predefined threshold values and if the HRI lasts longer than 8 s. These preprocessing steps are called HRI-EXTRACT from now on.
Different features are extracted from these HRIs or 1 min before these HRIs. In [
• De Cooman T.
• Van de Vel A.
• Ceulemans B.
• Lagae L.
• Vanrumste B.
• Van Huffel S.
Online detection of tonic–clonic seizures in pediatric patients using ECG and low-complexity incremental novelty detection.
], it was shown that the maximal peak heart rate and the maximal heart rate gradient already result in a good patient-specific performance for nocturnal heart rate based seizure detection. In order to keep the complexity of the algorithm sufficiently low for usage with wearable devices, we restrict ourselves here using only these two features.

Based on these two features we wish to decide whether a HRI is caused by a seizure or not. Although it is possible to update machine learning classifiers in real-time [
• Poggio T.
• Cauwenberghs G.
Incremental and decremental support vector machine learning.
], it is computationally too expensive to do it in real-time with limited hardware specifications. It also requires the availability of seizure annotations, which are typically not available or possibly inaccurate in a home environment [
• Blachut B.
• Hoppe C.
• Surges R.
• Elger C.
• Helmstaedter C.
Subjective seizure counts by epilepsy clinical drug trial participants are not reliable.
].
Therefore, we propose a heuristic adaptive classifier here. Normally, classifiers are characterized by a boundary line, splitting up the data points from the different classes. In our case, this boundary is heuristically constructed by using a very limited set of data points. We try to characterize normal HRI behavior by fitting a two-dimensional ellipse around the majority of patient-specific data.
Whenever a patient-specific data point (coming from a HRI) is detected, it is stored in a pool of noisefree patient data points PDpool. A HRI is assumed to be noisefree if less than 25% of the absolute differences between consecutive heart rate values during this HRI is higher than 10%. When 5 such HRIs are detected, the adaptive classifier can be initialized. HRIs assumed to be caused by noise do not lead to an update of the classifier.
By assuming that the majority of data is caused by non-epileptic behavior, we try to characterize normal behavior into an ellipse. Data points inside the ellipse can then be seen as normal heart rate behavior, and data points outside the ellipse can be seen as potential seizure activity.
This ellipse is defined by 3 variables (see Fig. 1):
• The center of the ellipse c(cx, cy): Defined as the mean value of the data points collected in PDpool.
• Main directions of the ellipse $(u,v)$: The main directions of the ellipse are found by the principal components from PDpool (with the center c(cx, cy) subtracted) by means of principal component analysis [
• De Cooman T.
• Van de Vel A.
• Ceulemans B.
• Lagae L.
• Vanrumste B.
• Van Huffel S.
Online detection of tonic–clonic seizures in pediatric patients using ECG and low-complexity incremental novelty detection.
].
• The widths of the ellipse $wu$ and $wv$ along both main axes u and $v$ with origin c(cx, cy): These are defined as
$wu=stdu*sfandwv=stdv*sf,$
(1)

with stdu the standard deviation of PDpool along the u axes and sf a fixed scale factor (set to 2.5 according to [
• De Cooman T.
• Van de Vel A.
• Ceulemans B.
• Lagae L.
• Vanrumste B.
• Van Huffel S.
Online detection of tonic–clonic seizures in pediatric patients using ECG and low-complexity incremental novelty detection.
]) and similar for $stdv$. In order to limit the impact of potential seizure data on the computation of $stdu,v$, the widths $wu$ and $wv$ are limited so they cannot exceed a heuristically defined value of 15. This allows most non-seizure data to be inside the ellipse, but seizure data outside of it without requiring seizure annotations.
The equation of the formed ellipse along axes $(u,v)$ then becomes
$f(u,v):uwu2+vwv2=1$
(2)

Once the classifier is initialized, the classification becomes straight forward. For each new data point d(dx, dy), first subtract the center c(cx, cy) of this data point and adjust d(dx, dy) to the appropriate axes u and $v$ (called $d(du,dv)$). Next, evaluate $d(du,dv)$ with the equation of the constructed ellipse
$y(d)=duwu2+dvwv2$
(3)

if d would fall inside the ellipse or not. If it falls inside the ellipse (y(d) ≤ 1), it can be seen as normal behavior. If it falls outside the ellipse (y(d) > 1) and the peak heart rate of xt is higher than the average peak heart rate in PDpool (cy), it is classified as a seizure HRI. This extra rule is added in order to avoid HRIs with a peak heart rate below the ellipse to cause an alarm, as ictal peak heart rates are assumed to be on average higher than non-ictal peak heart rates [
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
].
The ellipse is readjusted every time a new noisefree data point is detected in real-time. In order to keep the complexity of the algorithm sufficiently low, only the last 20 data points are used to construct the ellipse.

### 2.4 Initial patient-independent classification

The adaptive classifier mentioned above can only be used if 5 patient-specific noisefree data points are collected. Before these 5 data points are collected, the algorithm should also result in a decent performance. Therefore we classify the data points during this initialization phase with a patient-independent classifier. In this case a support vector machine (SVM) classifier is used with the same two features. The classifier is trained using a leave-one-patient-out approach: the classifier is trained on data from all patients except the one used for testing. An overview of the entire procedure for adaptive seizure detection is illustrated in Fig. 2.

### 2.5 Performance evaluation

The performance of the proposed seizure detection algorithm is evaluated on the data discussed in Section 2.1. The metrics used for evaluation are the sensitivity (percentage of detected seizures), false alarm rate (expressed as the number of false positives per night, FP/night, with night defined as 8 h of recording [
• van Andel J.
• Ungureanu C.
• Aarts R.
• Leijten F.
• Arends J.
Using photoplethysmography in heart rate monitoring of patients with epilepsy.
]) and positive predictive value (PPV, percentage of correct alarms). The detection delay is defined as the time difference between seizure onset and the moment of detection. A seizure is said to be detected if an alarm is caused between 30 s prior and 90 s after the seizure onset. The detection of seizures shorter than 20 s is counted nor as a true positive, nor as a false positive. Overall seizure-based performance metrics are used in this paper, similarly as in [
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
]. Very similar results are found if a patient-averaged overall performance is used, so only the seizure-based overall performance is mentioned in this paper.
Mann–Whitney U tests were used to evaluate whether the found results differed significantly, calling the results significantly different when p < 0.05 with Bonferroni correction. The mentioned 95% confidence intervals (CI) for the median estimates are calculated using the rank orders. Values are selected from the ranks closest related to a significance level of 5%. We also investigate whether the seizure and epilepsy type has an effect on the results found by the proposed adaptive seizure detection algorithm. A first distinction here is made between the seizure onset, either generalized or focal (both temporal and frontal lobe are investigated here). A second distinction is made on the clinical manifestation of the seizure (independent of the seizure onset), making a distinction between tonic, clonic, tonic–clonic, hyperkinetic and non-motor focal (called ‘subtle’ from now on) seizures.

## 3. Results

An overall sensitivity of 77.6% is found on average on all patients, with on average 2.56 FP/night and 30.7% PPV over the entire recordings including the initialization phase of the adaptive algorithm. The average detection delay is 19.1 s. Variability is however found for these values depending on the clinical nature of the seizures and the seizure onset. Table 1 shows the impact of the seizure onset on the performance. Primary generalized and temporal lobe (TL) seizures are detected with around 83% sensitivity, whereas this is only 71.4% for the frontal lobe (FL) seizures. Overall, 17/28 patients (60.7%) show a 100% sensitivity, of which 3/6 patients with generalized seizures, 7/9 with TL onset and 7/13 with FL onset. Patients with generalized (1.92 FP/night) and FL seizures (2.48 FP/night) also have lower false alarm rates (FAR) compared to patients with TL seizures (5.36 FP/night). Despite the overall found differences, none of the sensitivity and FAR results led to significant different results between different seizure onsets for the proposed adaptive algorithm. TL seizures (27 s) are however detected significantly later than FL (17 s, p < 10−2) and generalized seizures (15 s, p < 10−3).
Table 1Overview of the results of the proposed adaptive approach for different presumed seizure onsets.
Seizure onsetSensitivity (%) (detected/total)Mean delay(s)False alarm rate (FP/night)
Generalized83.3 (25/30)15.01.92
Frontal lobe71.4 (35/49)16.92.48
Temporal lobe82.1 (23/28)26.95.36
Total77.6 (83/107)19.12.56
If only the patient-independent algorithm is used on all data (including the initialization phases of the adaptive approach), an overall sensitivity of 81.3% and a FAR of 6 FP/night is found. The adaptive algorithm thus lowers the number of false alarms with 57% over the entire recordings compared to the patient-independent algorithm with a similar sensitivity. The Mann–Whitney U tests show this adaptive algorithm is indeed significantly better compared to the patient-independent algorithm in FAR (p < 10−3, median difference: 4.78 FP/night, CI: [2.77,7.20]), but with no significant difference in sensitivity (p > 0.05, median difference:0%, CI:[0,0]). The average detection delay of the patient-independent approach is 15.6 s, which is around 3.5 s faster than the adaptive approach. The adaptive algorithm however reduces the FAR drastically by waiting longer to be more sure on the distinction between epileptic and non-epileptic HRIs. Similar findings on the effect of the onset can be found in the results of the patient-independent algorithm due to the large overlap in sensitivity results.
Fig. 3a shows the boxplots for the sensitivity based on ictal clinical manifestations. 96% (24/25) of tonic–clonic (TC) seizures and 72.5% (29/40) of hyperkinetic (HK) seizures are detected successfully with the proposed seizure detector. Only 46.2% (6/13) of the tonic (T) and clonic (C) seizures are detected, whereas 82.8% (24/29) of the subtle seizures are detected. 5/6 patients had 100% sensitivity for the tonic–clonic seizures, whereas this holds for 6/9 patients with HK seizures and 7/9 patients with subtle seizures. The inter-patient variability for subtle seizures is however lower compared to the HK and T/C seizures. However, again no statistical significant differences between the sensitivity of different seizure types were found for the proposed adaptive algorithm.
Also a difference is found in the detection delays of the clinical more severe seizures (TC and HK) compared to the clinical more subtle seizure (see Fig. 3b). The TC and HK seizures (±14 s) are detected faster than the more subtle seizures and the tonic and clonic seizures (±28 s). The inter-patient variability for the detection delay is also higher for the subtle seizures compared to the other seizure types. Significant differences were found in detection delays between TC and subtle seizures (p < 10−3) and between HK and subtle seizures (p < 10−3).
The median duration of the initialization phase is 2.7 h (CI: [2.27,4.67]). During the initialization phase, the average FAR is 3.52 FP/night for both algorithms. After initialization, the false alarm for the adaptive algorithm is 2.32 FP/night compared to on average 6.40 FP/night for the patient-independent algorithm (63% reduction in false alarms). Fig. 4 shows the boxplots for the FARs after initialization for both algorithms for the groups with different seizure onsets. For all groups both the median and variance in FAR drop strongly with the adaptive algorithm compared to the patient-independent algorithm. The differences are the largest for the TL patients (on average 4.24 FP/night for the adaptive algorithm) and are the smallest for the FL patients (2.32 FP/night). On average 1.60 FP/night are found in patients with mainly generalized seizures.
The majority of false alarms from the adaptive algorithm are found in the early morning after 6 a.m., and around 25% of false alarms are caused when the patient was already fully awake. Another 25% of false alarms are caused by strong motion artifacts in the ECG, leading to errors in the R peak detection algorithm. Other typical reasons for false alarms were arousals, long periods of nocturnal awake time and non-epileptic spasms.

## 4. Discussion

### 4.1 Sensivity and detection delay

Table 1 and Fig. 3 show that the seizure type and onset have a tendency to have an impact on the sensitivity and FAR of the proposed seizure detection algorithm, but none of these results showed to be significantly different. This is assumed to be caused by the limited amount of data points in each group. Almost all generalized seizures are detected, and for these patients the FAR shows to be relatively low compared to the patients with FL or TL seizures. This means this approach works well for these patients, which are the most important patients to monitor at home.
The detection delay results showed significant differences, showing that TC and HK seizures are detected significantly faster than focal subtle seizures. This illustrates that the clinically more important seizures are detected faster than seizures that typically require less care.
Less than half of the tonic or clonic seizures are detected with the adaptive algorithm. This is due to the fact that most of these seizures occurred in patients with also TC seizures. The TC seizures (and post-ictal activity) result in stronger HRIs, causing the less strong T or C seizures to be seen as more normal behavior. These T and C seizures are indeed detected with the patient-independent algorithm, but not with the adaptive version. Compared to the patient-independent algorithm, only 4 T and C seizures are missed extra (and no seizures of an other type), of which 3 C seizures in patients with TC seizures.
The (most often subtle) TL seizures are detected with a sensitivity of ±80%, similarly as reported in [
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
]. The detection of these seizures is however on average slower than for convulsive seizures. This is in line with the findings of [
• Son W.H.
• Hwang W.S.
• Koo D.L.
• Hwang K.J.
• Kim D.Y.
• Seo J.-H.
• et al.
The difference in heart rate change between temporal and frontal lobe seizures during peri-ictal period.
], which stated that ictal HRIs from patients with TL epilepsy have a longer duration than for example the ictal HRIs from FL patients, thus leading to a slower detection delay. Another reason might be that the late detections of the TL seizures are caused by a limited spread of the temporal lobe compared to extratemporal origins. The detection of the T and C seizures is on average also slower due to the fact that most of them are secondary generalized, leading to a slower detection compared to the primary generalized TC seizures.

### 4.2 False alarm rate

Fig. 4 shows that the FAR drops strongly after the initialization phase with 63% compared to the patient-independent algorithm. Not only the overall FAR drops, but also the inter-patient FAR variability drops strongly. This can especially be seen for the patients with GS and TL patients. This way, the algorithm is more usable for a wider range of patients. Despite the decreased FAR variability, the FAR variability for the TL patients remains larger compared to that of the GS and FL patients.
The patients were already fully awake during 25% of the false alarms. In practice, a device for nocturnal monitoring can be turned off then to avoid these false alarms. Another quarter of false alarms is caused by strong motion artifacts, which lead to heart beat detection errors. Better noise removal techniques and the usage of more robust sensors could reduce the impact of noise removal on seizure detection performance. Also the addition of other modalities such as ACM and EMG can lead to increased performance for certain types of seizures [
• Milosevic M.
• Van de Vel A.
• Bonroy B.
• Ceulemans B.
• Lagae L.
• Vanrumste B.
• et al.
Automated detection of tonic–clonic seizures using 3-d accelerometry and surface electromyography in pediatric patients.
].

### 4.3 General discussion and future work

The proposed adaptive seizure detection algorithm is designed to be low-complex. The adaptive classifier is computationally of little extra effort compared to HRI-EXTRACT and the feature extraction procedure, which was already discussed to be sufficiently low-complex in [
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
]. This way, the algorithm can be implemented directly on a wearable device rather than be connected to a smartphone/server for computations. Photoplethysmography could also be used instead of ECG for extraction of the heart rate in order to increase the wearability of the system [
• van Andel J.
• Ungureanu C.
• Aarts R.
• Leijten F.
• Arends J.
Using photoplethysmography in heart rate monitoring of patients with epilepsy.
], but might have a negative impact on the accuracy of the heart rate data [
• Vandecasteele K.
• De Cooman T.
• Gu Y.
• Cleeren E.
• Claes K.
• Paesschen W.V.
• et al.
Automated epileptic seizure detection based on wearable ECG and PPG in a hospital environment.
]. As the algorithm continuously changes over time, it will also adjust to the patient's heart rate characteristics while they grow up, without requiring manual adaptations of the algorithm.
The adaptive algorithm was already initialized after on average 2.7 h. At this point, the adaptive algorithm already did most of the adaptation to the patient characteristics. Manual setting of patient parameters is typically done offline after multiple days or even weeks depending on the amount of recorded seizures. Therefore, the proposed algorithm leads much faster to personalization of the detection system compared to the manual alternative.
The proposed methodology does not require the availability of annotated patient data. That way, no clinicians need to annotate previously recorded data for each patient. An alternative would be to incorporate user feedback [
• De Cooman T.
• Kjær T.W.
• Van Huffel S.
• Sørensen H.B.D.
Adaptive heart rate-based epileptic seizure detection using real-time user feedback.
], but patients and relatives might not always be aware whether an alarm was correct or not, and missed seizures will remain missed in most cases. Therefore, this approach is advised, certainly for nocturnal monitoring of pediatric patients. It works with the assumption that most HRIs are caused by non-epileptic behavior (e.g. arousals). In most cases, this assumption holds well. Only in long series of seizures, the majority of data in PDpool might be epileptic, in which case some seizures might be missed after the correct detection of 5–10 seizures. However, due to the fact that this collection of data always changes in time, this effect goes away again quickly after the series of seizures is stopped.
The proposed algorithm results in a strong decrease in false alarms compared to the patient-independent algorithm. In practice, no extra effort from the patient, clinician or system owner is required with this adaptive algorithm compared to when using a patient-independent algorithm, and should therefore be preferred in real-life usage. However, still too many false alarms are generated in order to be used in practice. Unimodal patient-independent ACM and EMG based algorithms can lead to a better performance compared to the proposed algorithm for the detection of tonic–clonic seizures [
• Beniczky S.
• Henning O.
• Fabricius M.
• Wolf P.
Automated real-time detection of tonic–clonic seizures using a wearable EMG device.
,
• Beniczky S.
• Polster T.
• Kjaer T.W.
• Hjalgrim H.
Detection of generalized tonic–clonic seizures by a wireless wrist accelerometer: a prospective, multicenter study.
]. These modalities are however not usable for the detection of (more subtle) focal seizures, for which only EEG, ECG and EDA can be used. It is thus mainly for these seizure types that the proposed adaptive algorithm is of added value in unimodal setting for home monitoring applications. It can also be of added value as part of a multimodal setting, leading to an increased multimodal performance in combination with an additional EMG or ACM sensor for the detection of convulsive seizures.
The unimodal heart rate based seizure detection can be further improved by going into more complex offline or online adaptive seizure detection algorithms. One option would be to also add sleep stage information to the algorithm in order to further fine-tune it [
• Herman S.
• Walczak T.
• Bazil C.
Distribution of partial seizures during the sleep–wake cycle.
].

## 5. Conclusion

The proposed seizure detection algorithm allows to quickly adapt to patient-specific heart rate characteristics, leading to 57% less false alarms compared to a state-of-the-art patient-independent algorithm. The adaptation not only leads to an overall decreased false alarm rate, but also to less inter-patient false alarm rate variability. Automated seizure detection algorithms are therefore advised to be used in practice due to the increased performance and ease-of-use.

## Conflict of interest

The authors have no conflict of interest regarding this manuscript.

## Acknowledgements

Bijzonder Onderzoeksfonds KU Leuven (BOF): SPARKLE – Sensor-based Platform for the Accurate and Remote monitoring of Kinematics Linked to E-health #: IDO-13-0358; The effect of perinatal stress on the later outcome in preterm babies #: C24/15/036; TARGID – Development of a novel diagnostic medical device to assess gastric motility #: C32-16-00364. Fonds voor Wetenschappelijk Onderzoek-Vlaanderen (FWO): Hercules Foundation (AKUL 043) ‘Flanders BCI Lab - High-End, Modular EEG Equipment for Brain Computer Interfacing’. Agentschap Innoveren en Ondernemen (VLAIO): 150466: OSA+. Agentschap voor Innovatie door Wetenschap en Technologie (IWT): O&O HBC 2016 0184 eWatch. imec funds 2017. imec ICON projects: ICON HBC.2016.0167, ‘SeizeIT’. Belgian Foreign Affairs-Development Cooperation: VLIR UOS programs (2013–2019). EU: European Union's Seventh Framework Programme (FP7/2007-2013): The HIP Trial: #260777. ERASMUS +: INGDIVS 2016-1-SE01-KA203-022114. European Research Council: The research leading to these results has received funding from the European Research Council under the European Union's Seventh Framework Programme (FP7/2007-2013)/ERC Advanced Grant: BIOTENSORS (n 339804). This paper reflects only the authors’ views and the Union is not liable for any use that may be made of the contained information. EU H2020-FETOPEN ‘AMPHORA’ #766456. Thomas De Cooman is supported by FWO SBO PhD grant. Carolina Varon is a postdoctoral fellow of the Research Foundation-Flanders (FWO).

## References

• Van de Vel A.
• Cuppens K.
• Bonroy B.
• Milosevic M.
• Jansen K.
• Van Huffel S.
• et al.
Non-EEG seizure detection systems and potential SUDEP prevention: state of the art: review and update.
Seizure. 2016; 41: 141-153
• Milosevic M.
• Van de Vel A.
• Bonroy B.
• Ceulemans B.
• Lagae L.
• Vanrumste B.
• et al.
Automated detection of tonic–clonic seizures using 3-d accelerometry and surface electromyography in pediatric patients.
IEEE J Biomed Health Inform. 2016; 20: 1333-1341
• Beniczky S.
• Henning O.
• Fabricius M.
• Wolf P.
Automated real-time detection of tonic–clonic seizures using a wearable EMG device.
Neurology. 2018; 90: e428-e434
• De Cooman T.
• Varon C.
• Van Paesschen W.
• Lagae L.
• Van Huffel S.
Online automated seizure detection in temporal lobe epilepsy patients using single-lead ECG.
Int J Neural Syst. 2017; : 1750022
• Poh M.-Z.
• Loddenkemper T.
• Reinsberger C.
• Swenson N.C.
• Goyal S.
• Sabtala M.C.
• et al.
Convulsive seizure detection using a wrist-worn electrodermal activity and accelerometry biosensor.
Epilepsia. 2012; 53: e93-e97
• Osorio I.
Automated seizure detection using EKG.
Int J Neural Syst. 2014; 24: 1450001
• Zijlmans M.
• Flanagan D.
• Gotman J.
Heart rate changes and ECG abnormalities during epileptic seizures: prevalence and definition of an objective clinical sign.
Epilepsia. 2002; 43: 847-854
• Jansen K.
• Lagae L.
Cardiac changes in epilepsy.
Seizure. 2010; 19: 455-460
• Leutmezer F.
• Schernthaner C.
• Lurger S.
• Pötzelberger K.
• Baumgartner C.
Electrocardiographic changes at the onset of epileptic seizures.
Epilepsia. 2003; 44: 348-354
• Oppenheimer S.M.
• Gelb A.
• Girvin J.P.
• Hachinski V.C.
Cardiovascular effects of human insular cortex stimulation.
Neurology. 1992; 42 (1727–1727)
• Novak V.
• Reeves A.L.
• Novak P.
• Low P.A.
• Sharbrough F.W.
Time–frequency mapping of R–R interval during complex partial seizures of temporal lobe origin.
J Autonom Nerv Syst. 1999; 77: 195-202
• Varon C.
• Jansen K.
• Lagae L.
• Van Huffel S.
Can ECG monitoring identify seizures?.
J Electrocardiol. 2015; 48: 1069-1074
• van Elmpt W.
• Wouter J.
• Nijsen T.
• Griep P.
• Arends J.
A model of heart rate changes to detect seizures in severe epilepsy.
Seizure. 2006; 15: 366-375
• Andel J.
• Ungureanu C.
• Arends J.
• Tan F.
• Dijk J.V.
• Petkov G.
• et al.
Multimodal, automated detection of nocturnal motor seizures at home: is a reliable seizure detector feasible?.
Epilepsia Open. 2017; 2: 424-431https://doi.org/10.1002/epi4.12076
• Jeppesen J.
• Beniczky S.
• Fuglsang-Frederiksen A.
• Sidenius P.
• Jasemian Y.
Detection of epileptic-seizures by means of power spectrum analysis of heart rate variability: a pilot study.
Technol Health Care. 2010; 18: 417-426
• Sabesan S.
• Sankar R.
Improving long-term management of epilepsy using a wearable multimodal seizure detection system.
Epilepsy Behav. 2015; 46: 56-57
• De Cooman T.
• Van de Vel A.
• Ceulemans B.
• Lagae L.
• Vanrumste B.
• Van Huffel S.
Online detection of tonic–clonic seizures in pediatric patients using ECG and low-complexity incremental novelty detection.
Proc of the 37th annual international conference of the IEEE engineering in medicine and biology society (EMBC2015). 2015; : 5597-5600
• Hampel K.G.
• Jahanbekam A.
• Elger C.E.
• Surges R.
Seizure-related modulation of systemic arterial blood pressure in focal epilepsy.
Epilepsia. 2016; 57: 1709-1718https://doi.org/10.1111/epi.13504
• Poggio T.
• Cauwenberghs G.
Incremental and decremental support vector machine learning.
Adv Neural Inf Process Syst. 2001; 13: 409
• Blachut B.
• Hoppe C.
• Surges R.
• Elger C.
• Helmstaedter C.
Subjective seizure counts by epilepsy clinical drug trial participants are not reliable.
Epilepsy Behav. 2017; 67: 122-127
• van Andel J.
• Ungureanu C.
• Aarts R.
• Leijten F.
• Arends J.
Using photoplethysmography in heart rate monitoring of patients with epilepsy.
Epilepsy Behav. 2015; 45: 142-145
• Son W.H.
• Hwang W.S.
• Koo D.L.
• Hwang K.J.
• Kim D.Y.
• Seo J.-H.
• et al.
The difference in heart rate change between temporal and frontal lobe seizures during peri-ictal period.
J Epilepsy Res. 2016; 6: 16
• Vandecasteele K.
• De Cooman T.
• Gu Y.
• Cleeren E.
• Claes K.
• Paesschen W.V.
• et al.
Automated epileptic seizure detection based on wearable ECG and PPG in a hospital environment.
Sensors. 2017; 17: 2338
• De Cooman T.
• Kjær T.W.
• Van Huffel S.
• Sørensen H.B.D.
Adaptive heart rate-based epileptic seizure detection using real-time user feedback.
Physiol Meas. 2017; 39: 014005
• Beniczky S.
• Polster T.
• Kjaer T.W.
• Hjalgrim H.
Detection of generalized tonic–clonic seizures by a wireless wrist accelerometer: a prospective, multicenter study.
Epilepsia. 2013; 54: e48-e51
• Herman S.
• Walczak T.
• Bazil C.
Distribution of partial seizures during the sleep–wake cycle.
Neurology. 2001; 56: 1453-1459