Նոպաների հայտնաբերման նոր միջոց` հիմնված ԷՈւԳ-ի հատվածային տարրալուծման վրա

Նոպաների հայտնաբերման նոր միջոց` հիմնված ԷՈւԳ-ի հատվածային տարրալուծման վրա

Սարգսյան Ա., Մելքոնյան Դ.
Լ.Ա. Օրբելու անվ. ֆիզիոլոգիայի ինստիտուտ, Հայաստանի Հանրապետության Գիտությունների ազգային ակադեմիա, Երևան, ՀայաստանԿաոսկի, Սիդնեյ, Ավստրալիա
ABSTRACT

Էպիլեպտիկ հիվանդների մոտ նոպաների վաղ հայտնաբերումը և շտապ միջամտության համար խնամողներին զգուշացնելը կտրուկ կբարելավի էպիլեպսիայով տառապող հիվանդների կյանքի որակը և կնվազեցնի մահացությունը: Չնայած այս ոլորտում ուշագրավ զարգացումներին, որքան մեզ հայտնի է, չկան ալգորիթմներ, որոնք կարող են արժանահավատորեն և արագ հայտնաբերել նոպաները իրական ժամանակում էլեկտրաուղեղագրի (ԷՈւԳ) վերլուծության միջոցով:

Մենք առաջարկում ենք նոր մեթոդ իրական ժամանակում նոպաների էլեկտրագրական հայտնաբերման համար: Մեթոդի առանցքային մասն ԷՈւԳ ազդանշանի տարրալուծումն է տարրական բաղադրիչների (հատվածային տարրալուծում, ՀՏ)՝ օգտագործելով կարճաժամկետ Ֆուրիեի ձևափոխության օրիգինալ տեխնիկան: ՀՏ-ն ստեղծում է ազդանշանի ճշգրիտ բացահայտ մոդել և ընձեռում է սահմանված ազդանշանային բաղադրիչների տարբեր խմբերի համակարգչային վերակառուցման հնարավորություն: Այս մոտեցումն ապահովում է ազդանշանի վերլուծության ավելի մանրամասն ձև, որը բացահայտում է յուրաքանչյուր գագաթի յուրահա տուկ ձևը ոչ ստացիոնար ազդանշանի ժամանակի ընթացքում: Մոդելավորված ազդանշանի բաղադրիչներն այնուհետև մշակվում են օրիգինալ ժամանակային օրինաչափության ճանաչման ալգորիթմով, որը կարող է համապատասխանեցվել մոդելի բաղադրիչների որևէ կոնկրետ համակցության ճանաչման համար:

Մեթոդը հաջողությամբ փորձարկվել է մարդու ներգանգային և գլխամաշկային ԷՈւԳ-ի վրա: Շատ դեպքերում նոպաները հայտնաբերվում էին շատ ավելի վաղ, քան դրանք լիակատար ուժգնություն ձեռք կբերեն, հիմնականում մինչև սպայկերի փուլի մեկնարկը, և միշտ մինչև սպայկերի լայնույթները մեծ արժեքների հասնեն: Որոշ հիվանդների մոտ նոպաների առաջացմանը նախորդել են մի քանի վայրկյան տևող եզակի նախանշաններ: Այս դեպքերում նախանշանների հայտնաբերումն իրականում վերածվում է նոպաների ճշգրիտ կանխատեսման։

Առաջարկվող մեթոդը կարող է օգտագործվել ԷՈւԳ-ում իրական ժամանակում նոպաների արագ և հուսալի էլեկտրագրական հայտնաբերման համար: Կարճ էպիլեպտաձև իրադարձությունները և այլ հատուկ օրինաչափություններ (որոնք կարող են լինել փոքր լայնույթով) հայտնաբերելու կարողությունը մեթոդն օգտակար է դարձնում նոպաների կանխատեսմանն ուղղված հետազոտության և նոպաների հայտնաբերման սարքերի կիրառման մեջ:

Keywords: նոպաների հայտնաբերում, ԷՈւԳ-ի վերլուծություն իրական ժամանակում, էպիլեպսիա, հատվածային տարրալուծում

Timely detection of occurrence of seizures in epileptic patients and alarming caregivers for prompt intervention is extremely important in epilepsy care. It would drastically improve the quality of life of epileptic patients and reduce mortality.

Attempts to design methods for reliable seizure detection based on analysis of electroencephalogram (EEG) have started several decades ago. One of the earliest seizure event detectors (SED) was developed by Jean Gotman in 1982 [1]. Since then various methods have been developed in order to increase the power of SED in recognition of complex forms of epileptic EEGs [2-6]. The major difficulty all these methods are facing is the inherent high non-stationarity of the EEG signal: the analysis of such signals is not supported by general theoretical and computational frameworks. Accordingly, the non-stationary character of EEG data is usually ignored.

This kind of oversimplification naturally necessitates the averaging: the higher the irregularities of the EEG signal, the longer the EEG segment required for obtaining consistent spectral and statistical estimates. Existing methods in general require quite long EEG fragments, or epochs, to be processed – sometimes tens of seconds. This makes these methods hardly acceptable when the detection of seizure must be as quick as possible, like in seizure alarm systems.

We designed a digital signal processing method, Fragmentary decomposition (FD), supported by a novel chaos-based modelling (CBM) approach [7], which is capable to construct a precise model of EEG and perform modelbased analysis in order to find and classify epileptogenic elements of the EEG.

The methodology of CBM regards the EEG as a global scale non-stationary process which originates from multiple cellular sources acting at the microscopic scale. Due to the interference of deterministic and random factors the source activity from the microscopic scale is converted at the global scale to statistical measures which reflect probabilistic regularities rather than a physical nature of the elementary sources. Thus, a global scale physiological component develops as a cumulative statistical aggregate of multiple elementary sources. The interplay of deterministic and stochastic factors exhibits characteristic features of deterministic chaos.

A crucial aspect of the CBM is the introduction of original time-dependent distribution termed a quasi-Gaussian kernel (QGK). The QGK has a characteristic form of a causal transient produced by non-stationary physically realizable system. Numerous tests with EEGs recorded from different subjects under various conditions indicate remarkable accuracy of QGK as a universal model of a monolithic waveform.

FD creates remarkably accurate explicit model of EEG, which is at the same time very economical since QGK is defined by just three parameters. This opens a possibility for designing effective tools for real-time recognition of specific activity patterns in the time course of ongoing EEG, including epileptogenic activity.

There is a considerable diversity of shapes and patterns of electrographic seizures not only between different types of epilepsy, but also between different patients with similar types of epilepsy, and also between the same patient’s different EEG channels (locations where the EEG signal is recorded from).

We have developed a universal pattern recognition technique that may work with various template patterns. The particular pattern to be searched in the EEG for particular patient/channel and its limits of variability must be either provided by user, or determined automatically or interactively with the user from the sample EEG recordings of that patient/channel.

 

METHODS

The proposed seizure detection methodology consists of two major parts: 1) creating a model of the input EEG by applying the real-time fragmentary decomposition algorithm; 2) model-based real-time detection of specific epileptogenic activity patterns (Fig. 1).

Real-time fragmentary decomposition

Digital processing of input EEG uses adaptive segmentation with a window the length of which is tuned up to the characteristic points of the signal. Typical window contains just one segment, or half-wave.

As soon as the window containing at least one EEG half-wave is acquired, the FD algorithm [7] starts its processing (Fig. 2). First, the signal is de-trended by subtracting the baseline trend (which is calculated using moving average). Then the segmentation points (zero-crossings and local minima [for positive half-waves] or maxima [for negative half-waves]) of the smoothed de-trended signal (the guide function) are found that define the boundaries of EEG segments. Each segment then is transformed into frequency domain using original technique of time-frequency analysis – the Similar basis functions algorithm [8]. Identification of the corresponding QGK’s parameters is performed by the frequency domain template matching procedure.

The output of the FD is a sequence of QGKs fitted to the segments of the de-trended EEG – the components of the model EEG. The sum of these components is the model EEG.

Each time a new model component is added to the output sequence, the Event recognition algorithm is launched to check whether a seizure pattern may be recognized in the output component sequence or not.

 

Real-time Event recognition

The Event detector utilizes an original temporal pattern recognition algorithm that checks the EEG model for presence of specific epileptogenic activity patterns. These patterns are also defined by means of QGK.

The temporal pattern recognition algorithm works like an artificial neural network with short-term memory that has been already trained for recognition of specific temporal sequence. The short-term memory is realized by introducing specific delays in the connections between the network elements, or the elements of the recognizer.

The Event detector works in ‘real time’, in the course of model signal arrival to the input of the detector. As the model signal consists of discrete units – the quasi-Gaussian components – each step of detection process is triggered by the arrival of a new model signal’s component. When the new model component arrives, the Event Detector checks whether it is a part of the pattern we are looking for, and if so, whether the pattern is complete (i.e., detected). As soon as the pattern recognition is complete, a flag (‘Event Detected’ flag) is set to ‘true’ to notify the system that the event has been detected. If for certain amount of time (‘cessation time’) after the last detected pattern there are no patterns detected, the ‘Event Detected’ flag is set to ‘false’ to notify the system that the event has been ceased.

 

Preparatory phase: Defining the template pattern for seizure detection for particular patient (or animal)

The preparation of template pattern for particular subject/channel may be done in several ways.

 

Manual definition of the template pattern

Having in front the fragmentary decomposition of patient’s ictal EEG, the user may manually select those components that must form the template pattern, and provide parameter ranges or weights to each template component.

 

Automated definition of the template pattern using similarity analysis

Automatic determination of seizure pattern for particular patient/channel is a very complicated task. Significant variability in the seizures that exists even within particular patient/channel requires large amounts of EEG records containing seizures from the patient. Such opportunity is rarely available. Thus, we have developed a method that automatically estimates significant parameters of repetitive patterns from just one or two recorded seizures. Based on experience and knowledge, the user (possibly, a doctor) will adjust those estimates so that the resulting template pattern (the parameter limits) will take into account possible variability in patient’s seizures.

We developed an algorithm that finds periodically repeating components in the fragmentary decomposition of an ictal EEG, estimates their parameters and builds a template pattern from these components. The algorithm constructs a similarity matrix for all model EEG components, then selects and groups those components that consistently reappear with frequency close to the main frequency of the ictal EEG. The automatically defined template pattern can then be edited manually: some components may be removed, the parameter mean values and ranges may be modified, and different weights may be assigned to components.

 

RESULTS

The verification of the algorithm was performed on EEG dataset consisting of scalp and intracranial EEG recordings from patients with epilepsy. These recordings were downloaded from two free databases available on the Internet: the IEEG database for intracranial recordings (15 patients, records duration from 11 h to 5 days) and CHB-MIT (Children’s Hospital Boston) database for scalp recordings (16 patients, records duration from 20 h to 3 days). Unfortunately, the epilepsy type diagnosed was not specified in these databases.

The template patterns for each patient were constructed using automated definition of the template pattern based on similarity analysis, using only first few (3 or more, but less than one third of the total number of seizures) electrographic seizure episodes of that patient. Then this template was used in the Event Recognition algorithm during the real-time operation (Fig. 3).

The EEG recordings were ‘fed’ to the detection algorithm with the same sampling rate as that used during acquisition to simulate the real-time processing.

The seizure detection time – the time between the onset of the seizure and the moment when the algorithm recognizes the occurrence of the event – basically depended on the length of the template event, ceteris paribus.

One case from scalp dataset was identified by us as generalized absence epilepsy; in this case the algorithm showed excellent performance, detecting all seizures in less than 1 s after their onset (average detection time 0.46 s) without any false positive (Fig. 3).

In most of the other cases, both scalp and intracranial, the seizures manifest complicated dynamics, with large amplitude spikes arising tens of seconds after the seizure onset. However, it was possible to reveal very specific patterns just following the seizure onset that unequivocally characterized the seizures. These patterns significantly varied across patients and channels, both for scalp and intracranial recordings (Fig. 4). Meanwhile, the seizures of the same patient are pretty much alike, and, particularly, the initial parts of the seizures have distinctive common features (Fig. 5).

This fact allowed us to define for each patient a template characteristic pattern that was used by the “Event recognizer” module of the algorithm to detect the seizure onsets in that patient.

Fig. 6 shows the same seizure examples as in Fig. 4, with the detection results. It may be noticed that the detection times vary significantly for different patients - from fractions of a second to several seconds. But it is clear also that this time is mostly stipulated by the specific duration of the unique seizure onset pattern in a given patient.

Moreover, there were cases where it was possible to reveal unique precursor events that preceded the seizure onset for several seconds. We were able to detect these events and thus detect the seizure before it actually starts (Fig. 7).

An important factor is, in our opinion, that in the majority of processed cases the detection occurred a few seconds before the significant increase of spike amplitudes, as may be seen in the examples shown in Fig. 6. This might mean, that at the moment of detection and, correspondingly, producing an alarm signal, the patient may still be able, for few seconds, to properly react and perform necessary action to avoid potential danger (e.g., sit or lay down, stop the car, etc.).

In one intracranial case the seizures were becoming apparent in one particular channel much earlier (about 50s) than in other channels (focal epilepsy with secondary generalization, Fig. 8A). This particular channel was used for the detection. The detection time from the seizure onset in that channel was approximately 2 – 2.5 s, which is about 48 s prior to seizure generalization.

Another important feature of our algorithm is that it may pick up events that are small in amplitude and/or short in duration, even if they are smaller in amplitude than the background (interictal) EEG. In one patient (9 years old female) the interictal EEG exhibited practically permanent spike-waves, with some brief interruptions, while the seizures were very short (~ 5.5-14 s) and smaller in amplitude than the interictal activity (Fig. 8B). However, they had a distinctive feature – a relatively high frequency oscillation. The detector tuned for such brief oscillation effectively detected all the seizures (8) without false positives.

 

DISCUSSION

We present a novel method and algorithm for early seizure detection. The method is based on transforming the original EEG into a sequence of model components using fragmentary decomposition algorithm, with subsequent pattern matching performed on the model components. All the processing is done in near real-time, in parallel with ongoing EEG recording. To our knowledge, no similar method has been described in the literature.

Despite significant diversity of seizure morphology between different epilepsy types and between patients, the seizures of the same patient often are quite similar and contain distinctive common features, particularly and importantly at the early stages of the seizure onset. This allowed us to create a specific template pattern for recognition of the seizure onset for each patient and detect the seizures at the earliest stage. Since the template patterns are determined individually for each patient, the method can be attributed to precision, or personalized, medicine. The proposed usage of the method implies recording several seizures from a patient (or using previously recorded seizures) which will be used for template pattern definition. This template pattern will then be provided to the detection algorithm, making it personalized for the patient. If the algorithm misses a seizure during the performance, this missed seizure may be used to redefine the template pattern and improve further seizure detections.

Our preliminary verification results presented here show that this methodology may indeed provide an effective means for very early and reliable seizure detection.

The detection time is short (to our knowledge, the shortest among seizure detection methods), so the method is very appropriate for using both in seizure alarm systems and systems designed for counter-stimulation experiments.

In the majority of processed cases, the detection occurred a few seconds (5-50) before the significant increase of spike amplitudes or before the seizure generalization. This means that at the moment of detection the patient may still be able to properly react and perform necessary actions to avoid potential danger (e.g., sit or lie down, stop the car, etc.).

The method is based on the EEG, which is the preferred source for seizure detection because EEG always, in all types of epilepsy, exhibits the seizures and does so the earliest compared to other measures.

Our method needs only a single channel EEG signal, thus it may be used with a miniature, easily wearable wireless single-channel EEG recording device. It should be noted however that a single-channel EEG recorder may miss focal abnormal activity coming from a site distant to it. Thus, such approach would require an initial multi-channel EEG recording from a subject to determine the best placement of the single-channel recorder.

The flexibility of the algorithm allows effectively adjusting it for each individual patient to reach the optimal and fastest performance for that patient.

The method is actually a universal tool for EEG analysis. It may be used not only for seizure detection, but for recognition of any pattern in the EEG, including epileptiform events, event-related potentials, oscillations, K-complexes, eyeblinks, etc.

The ability to detect short epileptogenic events and other specific patterns (which may be small in amplitude) makes the method worthwhile for research directed to seizure prediction.

Fragmentary decomposition significantly reduces the volume of numbers needed to accurately reproduce the EEG signal: the signal is decomposed into separate components, each of which is fully described by just three parameters. Such data compression provides possibility for much faster transmission of the EEG over the Internet when required, allowing watching and processing the signal at the receiver’s end practically in real time. Accordingly, the proposed methodology may be effectively utilized in the systems of tele-monitoring.

The main limitation of the presented method in its current form is its sensitiveness to the signal amplitude. Even though the template pattern can be defined with a wide amplitude range for each component, such widening may lead to false detections as some non-epileptic EEG fragments may occasionally fit the template pattern. Thus, care should be taken for providing stable recording and avoiding signal amplitude changes due to non-physiological causes, such as, e.g., electrode impedance changes.

 

CONCLUSION

The proposed method may be used for real-time fast and reliable detection of electrographic seizures in the EEG. Its ability to detect short epileptogenic events and other specific patterns (which may be small in amplitude) makes the method useful in research directed to seizure prediction and in seizure detection device applications.

Conflicts of interest

All authors declare that they have no conflicts of interest.

 

Fig. 1. The main steps and modules of the algorithm.

Fig 1

 

Fig. 2. The Fragmentary decomposition.

Fig 2

 

Fig. 3. Example of seizure detection. Upper (black) trace is a fragment of human EEG containing initial part of an electrographic seizure (spike-wave discharge, SWD). Middle (blue) trace is the same EEG fragment with baseline trend removed. Bottom (red) trace is the reconstructed model EEG. The particular template event pattern constructed for this case at Preparatory phase is shown at bottom left (orange). The rectangular window at bottom trace shows the fragment of the model EEG that was recognized as the first event in the seizure. Vertical dashed lines indicate the visually estimated start time of the electrographic seizure and the time when the first event is detected by the algorithm.

Fig 3

 

Fig. 4. Examples of seizure onset patterns in different patients. Note different time scales..

Fig 4

Fig. 5. The initial parts of different seizures from one scalp patient and one intracranial patient. It may be seen that the initial parts of seizures from the same patient have distinctive common features.

Fig 5

 

Fig. 6. The same seizures as in Fig. 4 are shown, together with the model-based template patterns that were used for seizure detection in each case. The orange vertical lines indicate the time when the algorithm detected the seizure. The times between the seizure onset and the detection, as well as between the detection and occurrence of large amplitude spikes, are also indicated.

Fig 6

 

Fig. 7. In this patient/channel the seizure is preceded by a large deflection which seems to be unique for the seizures. This precursor deflection precedes any noticeable changes in the EEG that may be considered as a seizure start. This precedence ranged from 2.5 s to 26.3 s in different seizures. A. A 120 s long fragment of EEG containing one of the seizures. The red vertical line indicates the seizure onset. The orange vertical line indicates the detection following the precursor event shown in more detail in inset in B. B. Expanded initial part (30 s long) of the EEG fragment in A containing the precursor event and the seizure onset. C. A 120 s long fragment of the EEG of the same patient containing the beginning of another seizure and four preceding strong events. This particular seizure was extremely long – about 12.5 min. The preceding events occur at approximately similar intervals (~4.5 s).

Fig 7

 

Fig.8. A. An example of secondarily generalized seizure. The same seizure in two different channels of the EEG is shown in the same time scale. It may be seen that the seizure becomes apparent in channel RMG_02 (upper trace) much earlier (about 50 s) than in channel RAT_5 (lower trace) (and in other channels as well, not shown). The detection was performed in channel RMG_02. The detection time (thick orange vertical line) from the conjectural seizure onset (thin red vertical line) in channel RMG_02 is approximately 2.25 s. This is about 48 s prior to seizure generalization (when it becomes apparent in other channels).

B. An illustration that the algorithm may pick up events that are smaller in amplitude than the background (interictal) EEG. In this patient (9 years old female) the interictal EEG exhibits practically permanent spike-waves, with some brief interruptions. The seizures are short (~ 5.5 – 14 s) and are smaller in amplitude than the interictal activity. Their main distinctive feature is relatively high frequency oscillation. The detector tuned for such brief but strong oscillation effectively detected all the seizures (8) without false positives.

Fig 8

 

 

 

 

References

  1. Gotman J. Automatic recognition of epileptic seizures in the EEG. Electroencephalogr Clin Neurophysiol. 1982;54(5):530-40.
  2. Tzallas A, Tsipouras M, Tsalikakis D et al. Automated epileptic seizure detection methods: a review study. Epilepsy – Histological, Electroencephalographic and Psychological Aspects. 2012:75-98.
  3. Meier R, Dittrich H, Schulze-Bonhage A, Aertsen A. Detecting epileptic seizures in long-term human EEG: a new approach to automatic online and real-time detection and classification of polymorphic seizure patterns. J Clin Neurophysiol. 2008;25(3):119-31.
  4. Koren JP, Herta J, Fürbass F et al. Automated long-term EEG review: fast and precise analysis in critical care patients. Front Neurol. 2018;9:454.
  5. Ulate-Campos A, Coughlin F, Gaínza-Lein M et al. Automated seizure detection systems and their effectiveness for each type of seizure. Seizure. 2016;40:88-101.
  6. Baumgartner C, Koren J. Seizure detection using scalp-EEG. Epilepsia. 2018;59(S1):14-22.
  7. Melkonian D, Blumenthal T, Meares R. High-resolution fragmentary decomposition – a model-based method of non-stationary electrophysiological signal analysis. J Neurosci Methods. 2003;131(1-2):149-59.
  8. Melkonian D. Similar basis function algorithm for numerical estimation of Fourier integrals. Numerical Algorithms. 2010;54:73-100.