=Paper=
{{Paper
|id=Vol-2525/paper4
|storemode=property
|title=A structural approach to computer analysis of brain signals and its implementation in the decision support system
|pdfUrl=https://ceur-ws.org/Vol-2525/ITTCS-19_paper_10.pdf
|volume=Vol-2525
|authors=Yakov Furman,Viktor Sevastyanov,Konstantin Ivanov,Nataliya Glazunova
|dblpUrl=https://dblp.org/rec/conf/ittcs/FurmanSIG19
}}
==A structural approach to computer analysis of brain signals and its implementation in the decision support system==
A Structural Approach to Computer Analysis of Brain Signals and Its Implementation in the Decision Support System Yakov A. Furman Viktor V. Sevastyanov Konstantin O. Ivanov Volga State University of Volga State University of Technology Volga State University of Technology Yoshkar-Ola, Russia Technology Yoshkar-Ola, Russia SevastyanovVV@volgatech.net Yoshkar-Ola, Russia FurmanYA@volgatech.net konstantin4002000@gmail.com Nataliya U. Glazunova Volga State University of Technology Yoshkar-Ola, Russia GlazunovaNU@volgatech.net Abstract The paper considers a number of issues related to modern quantitative electroencephalography (EEG): the non-stationarity of the processed signal, which reduces the accuracy of results due to the averaging effect of spectral analysis methods used in computer EEG, and the unfeasibility of pattern detection in the EEG composition without involving a clinician in the analysis. The authors propose a structural (syntactic) approach to mitigate the negative effects of these problems, as well as a mathematical apparatus for its implementation. The paper discusses the results of using the proposed approach for analyzing real EEG data. 1 Introduction EEG signals serve as an objective and common source of information about a patient’s cerebral functioning in normal and pathological conditions. An EEG test can show if there are such disorders as diffuse brain damage, traumatic brain injuries, tumors, epilepsy, vascular diseases and mental, etc [1]. Despite the long-standing experience in the clinical use of EEG, the problem of its correct interpretation remains highly relevant. At present, the main method of EEG interpretation is its visual analysis, which is rather time-consuming and subjective as its results depend largely on the professional expertise of the clinician reading the EEG. The use of quantitative methods for EEG analysis allows a greater degree of objectivity in the work of a neurophysiologist. Currently, these methods are based on the spectral and correlation analyses [2]. Due to their frequency resolution, the methods allow us to find out how detailed the signal spectrum is. However, weighted averaging of all signal counts causes loss of data on heterogeneous patterns in the signal composition thus making their automatic classification impossible. Frequency and time characteristics of the EEG signal can be obtained using the wavelet transform. One of the areas of contemporary research into computer electroencephalography focuses on interpreting the wavelet transform coefficients in terms of the functional state of the human central nervous system [3]. To date, studies in this area have been confined to Copyright © 2019 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). either a verbal description of the EEG wavelet spectrum, or a description of a limited number of EEG patterns, such as epiphenomena and sleep spindles, which is insufficient for making an informed decision on the nature of the entire EEG record as a whole. Studies on the automatic classification of abnormal EEGs featuring non-epileptic kinds of deviation from the norm are, in fact, unavailable. Another feasible approach to EEG classification is the use of deep learning methods, in particular, the application of convolutional neural networks to the entire EEG record without preliminary processing. The use of such approaches requires the availability of extensive EEG databases, which would take into account all possible combinations of patterns, at least for a specific pathology, as well as the access to significant computational resources [4]. For the moment, these preconditions significantly hinder a comprehensive analysis of EEG using the methods of deep learning. Therefore, irrespective of the widespread use of the EEG for monitoring the brain functional activity, there are still major challenges associated with increasing its effectiveness. One of these problems is automatic classification (recognition) of the EEG [5]. 2 A structural approach to the analysis of the EEG The problem of the automatic EEG classification may be addressed on the basis of a structural approach suggesting that a recognizable pattern (EEG) is made up by linking together simple sub-patterns [6]. The brain’s bioelectrical activity is the generation of oscillations in the frequency domain of 0.3÷50 Hz, which are divided into frequency bands of particular activity types: delta, theta, alpha, beta, and gamma. In visual analysis, each frequency domain component is estimated by determining the frequency and the amplitude of an individual oscillation [7]. Therefore, it is expedient that an individual wave represented as a signal fragment between two consecutive global minima, should be taken as a primitive element. To implement the structural approach, we have developed an EEG segmentation algorithm [8] which allows us to represent the signal as an ordered sequence of segments, as well as algorithms for classifying EEG segments [9]. Classification of EEG segments is performed by calculating the informative features of their shapes used in visual analysis. To obtain the quantitative characteristics of the segment shapes, a new contour model of EEG has been developed [10]. Thus, the approach proposed in this study is the computer-assisted equivalent of the visual analysis of EEG. Classification of the entire EEG can be accomplished relying on the positioning of the previously classified EEG waves in relation to each other. The software implementation of the proposed approaches to the EEG analysis is offered as a decision support system (DSS) which forms a draft medical report containing results of the EEG segment classification. The study revealed that the use of the DSS information on the signal by a neurologist increases the reliability of his clinical conclusions. 2.1 Contour model of the EEG The theory of contour analysis has been developed over the past decade and is successfully applied for signal processing. Based on the theory, it is possible to quantify the shapes of various images, determine the degree of their similarity (difference) with regard to the images of two objects regardless of their scale and angular orientation [11]. Interpreting EEG, in line with this area of mathematics, as a boundary of a particular image, we developed a novel mathematical model of EEG, called the contour model of the electroencephalogram (Figure 1). To obtain the model, the consecutive digital counts of the signal are connected by complex vectors ( n ) , n = 0, 1,..., K − 1, set in unitary space Ck : ( n ) = ts + iu ( n ) = ( n ) exp i ( n ) , n = 0, 1,..., k − 1, (1) where t s - EEG sampling period, Δu(n) = u(n + 1) - u(n) is the first order difference of the digital samples U from the output of the electroencephalograph, |γ(n)| and ψ(n) are, respectively, the module and argument of the elementary vector (EV) γ(n). By analyzing the resulting contour model, it is possible to get information about the shape of each pulse of the EEG fine structure [12]. Compared with the EEG model applied in practice as a sequence of real samples, the model (1) is more informative since it takes into account the sampling interval of the signal, as well as due to the greater informativeness of the scalar product (SP) operation in the space Ck . The greater SP informativeness in the space Ck in comparison with the real space Rk is expressed in the presence of the imaginary component in the SP result, which allows us to find the degree of similarity between two fragments of the EEG signal irrespective of their relative angular orientation. U, μV u(2) u(9) U, μV γ(2) u(3) 60 60 γ(1) γ(8) u(1) γ(0) γ(3) 40 u(8) 40 u(4) 20 ts 20 ts γ(7) 7 0 0 1 2 3 4 5 6 8 -2 1 2 3 4 5 6 8 t×10-2, sec -20 u(7) t×10 , sec -20 u(6) γ(4) γ(6) -40 u(5) -40 γ(5) a) b) Figure 1: Towards the discrete contour model of EEG. a) continuous signal u = f (t), t = 0, 1, ..., 9; b) vector sequence Г={γ(n)}𝑘0 approximating the EEG 2.2 Segmentation of the EEG An algorithm has been developed for the EEG contour model decomposition into fragments limited by the points of global minima. The segmentation algorithm can be represented as a sequence of the following steps: Step 1: suppression of high-frequency signal components (up to 10 Hz) and the search for the boundaries between the pulses in the form of local minima (Figure 2b) Step 2: gradual expansion of the filter passband and search for the points of local minima in the vicinity of the boundaries between the pulses found in the previous iteration. Step 2 of the algorithm is performed until the filter passband reaches the value of 75 Hz (Figure 2d). Almost all the energy of the EEG signal is concentrated in this frequency band; therefore, the shapes of the segments virtually do not differ from their shapes in the original signal. The filter bandwidth is increased by 1 Hz at each iteration of the algorithm. Figure 2: Changes in the oscillation pulse shapes occurring with variations of the bandpass f of the bandpass filter. a) original oscillation; b) f = ( 0 8) Hz; c) f = ( 0 32) Hz; d) f = ( 0 75) Hz To test the algorithm reliability, we obtained the probability estimates of correct segmentation of EEG waves in the main frequency bands. For this, 42 EEG epochs with predominant activity in the delta range and 43 EEG epochs containing oscillations in the theta range were selected from the open EEG database available at https://physionet.org/pn4/sleep-edfx/. 51 epochs containing oscillations in the alpha range and 28 epochs with activity in the beta range were acquired from the database of the Republican Clinical Hospital (Yoshkar-Ola). The selected epochs were segmented; the segmentation accuracy was tested by three neurological specialists. The segmented EEG epochs contained 650 delta waves, 554 theta waves, 740 alpha waves, and 588 beta waves, of which 592, 520, 722 and 576 waves, respectively, had been segmented correctly. Thus, the estimates of the correct EEG wave segmentation were 0.91, 0.94, 0.98, and 0.98 for electroencephalograms in the δ, θ, α and β frequency bands, respectively [13]. 2.3 Informative features for EEG segment classification that were obtained using the contour model Based on the visual methodology of the EEG analysis, the following set of informative features is proposed for conducting classification of each segment of the EEG (wave): 1) features of the segment shape: parameters of the segment extreme points, the degree of pulse symmetry and angle values at each vertex of the pulse; 2) features of a segment envelope: dimensionality of the segment contour, the signal amplitude, its minimum and maximum values; 3) time features: pulse duration at the level of 0.707 of the range, at the level of the zero line, and at the base level; 4) frequency features - the distribution of the signal energy across the EEG frequency bands (δ, θ, α, β1, β2, γ) (Figure 3) [9]. Figure 3: Informative features of the shape of a segmented EEG pulse To evaluate the frequency properties of the EEG segment specified by the contour model, we obtained the analytical relationships establishing the relation between the result of the Discrete Fourier transform (DFT) of the real samples and the DFT of the contour model. In particular, the spectrum of a real signal can be obtained from the contour model spectrum by using the expression: Г ( m ) U ( 0 ) = 0, U ( m ) = , m = 1, 2,..., k − 1, i ( 1 ( m ) − 0 ( m ) ) (2) where Г ( m ) is the Discrete Fourier transform (DFT) of the EEG contour model, 0 ( m ) and 1 ( m ) are the elementary contours of the zero and first order, which are determined by the expression: k −1 2 m ( m )0 k −1 = exp i mn , m = 0, 1,..., k − 1. k 0 Using the expression (2) for each segment, energy fractions of its spectrum are found in the main EEG frequency bands: δ, θ, α, β1, β2, and γ. Before calculating the remaining features, each segment undergoes the equalization procedure, which consists in approximating the EEG curve by vectors of the same length; this helps to eliminate the influence of the vector length variations on the results of computing the informative features of shapes. As a rule, the shape of an EEG signal is distorted by random fluctuations, which does not allow us to estimate the positions of the extreme points by reversing the sign of the EV imaginary components. To determine the positions of the peaks (troughs) of an EEG segment, the use of a cross-correlation device (CCD) is proposed, the operation of which is described by the expression: m = (E( m, r ) , V ) / (|| E( m, r ) || || V ||) , m = 0, 1,..., k − r − 1, (3) where E( = ( n )n = m is the filtered fragment of the contour E, V = v ( n )0 = il , 02 , − il is the reference pulse. m, r ) m + r −1 r The position of vertices is determined with s = max (m | m thold ) + r 2 − 1, m = 0, 1,..., k − r − 1, m where r is the dimensionality of the reference pulse V, ηthold = 0.5 is the threshold value, which allows excluding the influence of random fluctuations on the determination of the positions of vertices. The expression (3) determines the degree of similarity between the shapes of the signal sections with the reference pulse V. Representation of the signals E and V in the unitary space Ck allows one to find a higher value of the degree of similarity compared to the real space, since ηm is invariant to the mutual rotation angle of E and V. The shape of the reference pulse V provides the maximum CCD response when the position of its window coincides with the peak of the pulse due to the sign change of the imaginary component of the vectors of one of the pulse segments edges (Figure 4). The calculation of the degree of similarity is performed several times, and at each iteration, the dimension of the filter window (value l) increases until η decreases, which provides a more accurate determination of the maxima positions due to the summation of a larger number of EVs. The application of CCD allows a reliable determination of the positions of vertices (troughs) of the EEG segments without changing their shape, in contrast to approaches based on preliminary filtering of the signal and search for its derivative. CCD can produce false values of the positions of extrema due to the difference in the values of lengths of the EVs of the leading and trailing edges of the pulse, as is shown in Figure 4. To eliminate this effect, an equalization procedure is preliminarily applied to each pulse, while keeping the number of its EVs unchanged. γ( 10) γ(11) γ(21) γ(22) γ(9) γ(12) γ(20) γ(23) U, μV true position of U, μV false pulse peak position of 8 γ(7) 8 pulse peak Г Е 6 γ(6) 6 4 4 2 2 0 0 0 0.02 0.04 0.06 0.08 t, sec 0 0.02 0.04 0.06 0.08 t, sec 9 12 V={i , i , -i , -i} Г1={γ(n) }6 Г2={γ(n )}9 16 E1= {ε (n) }13 η1 = (Г1,V) = (γ(6), i) + ( γ(7), i) + (γ(10), i) ( γ(11), -i ) η3 = ( E1,V) = ( ε(20), i) + ( ε(21), i) + + (γ(8), -i) + ( γ(9), -i ) + (ε(22), -i ) + (ε( 23), -i ) ( γ(9), i) (γ(12), -i ) ( ε(23), -i ) (γ(9), -i ) (ε (20), i) (γ(6), i) ( γ(7), i) η2 = (Г2,V) = (γ(9), i) + (γ(10), i ) + (γ(8), -i ) + (γ(11), i) + ( γ(12), i) (ε( 21), i ) (ε(22), -i ) Re(η1) > Re(η2) Figure 4: Illustration of the effect of a variation in changing the potential and erroneous determining of positions of vertices by the CCD The inevitable fluctuations of the EEG potentials in the region of the edges and the roof of the segment pulse are represented as additional random vertices. Therefore, it becomes necessary to give a quantitative characterization of the significance of each local extreme point of the EEG segment contour. For this purpose, the concept of the vertex status has been introduced. Suppose a = {an} is a set of vertices of the EEG pulse, and b = {bn} is a set of points of global minima. The status λ(an) quantitatively characterizes the position of an relative to the point bn (absolute status λ(an | bn) or relative to the neighboring vertex an (relative status λ(an | an+1), n = 0, 1,…): h ( an ) − h ( bn ) h ( an ) − h ( bn ) ( an | bn ) = ; ( an | an +1 ) = , n = 1, 2,..., (4) h ( an ) h ( an +1 ) where h(an) = Imβ(n), h(bl) = Imβ(l). If at least one of the statuses of the vertex an is lower than the threshold value of 0.15, it is considered to be a slight fluctuation and is not taken into account in the classification of the entire segment. In significant vertices of the pulse, the angles are determined: s −1 t an = − arccos ( n − l ), (n + r ), (5) l = 0 n = 1 where s and t are the numbers of EVs to the left and to the right of the vertex an, respectively. To assess the sinusoidality of the segment shape, it is necessary to determine the value of its normalized SP with a contour of the same dimensionality that envelopes one period of a sinusoid with a phase shift of 3π/2. To calculate the magnitude of the potential and the pulse duration values at given levels, a transition is made towards the integral representation (IR) of the segment contour: ( n) = ( m −1) + ( m) , m = 0, 1,..., k −1, u (m) = Im (m). m ( m) = n =0 The pulse amplitude is calculated as the difference between the maximum and minimum values of the imaginary components of its IR. The duration τ of an EEG pulse means the length of the horizontal segment, which is expressed in time units and connects two points, one of which is located on the line of the leading edge of the pulse, and the other on the line of its trailing edge. To estimate the pulse duration at a given level un, a search is performed in the contour IR to identify the vectors β(l) and β(m), located on the left and right edges of the pulses, whose the imaginary parts are at a smaller distance from the value un. In accordance with the value notations introduced, the pulse duration at the level un is um = Im ( m ) = Re ( l ) − Re ( m ) , u 0, Im ( l ) − Im ( m) 0. n (6) 2.4 Classification of EEG segments based on quantitative features of shapes obtained using the contour model The block diagram of the EEG segment classification algorithm is presented in Figure 5. In compliance with the recommendations for the visual analysis methodology, each EEG segment is automatically classified according to the degree of pathology significance as “normal”, “element of borderline EEG”, or “element of the pathology EEG”. The segments are also classified according to the type of the EEG phenomena: a delta wave, a theta wave, an alpha wave, a beta wave, a gamma wave, a spike, a sharp wave, a helmet-like wave, peak. EEG segments are classified by calculating their informative feature and by comparing the features with the ranges of values for the classes considered [14]. The value ranges for the substantiated informative features were found for carrying out classification of the EEG segments. The value ranges of the informative features intended for the phenomenological classification have been found out using a sample containing 50 segments of delta waves, theta waves, alpha waves, beta waves, gamma waves, spikes, sharp waves, helmet-like waves, and peaks. To classify the EEG segments according to the degree of their pathology significance, the value ranges of their informative features were determined on a sample consisting of about 150 previously classified EEG segments, in particular, for the normal EEG: 170 waves with predominant activity in the alpha range, 156 waves with activity in beta range, 149 delta waves, 151 theta waves; for the borderline EEG: 175 alpha waves, 186 waves with activity in the beta1- and beta2-frequency band; for the pathology EEG: 146 theta waves, 166 delta waves, 175 spikes, 116 peaks, 191 sharp waves and 75 helmet-like waves. In both cases, we used EEG records obtained from the State budgetary institution of the Republic of Mari El "Medical and Sanitary Unit №1". Three neurologists were engaged in the classification of the EEG segments [13]. Calculation of shape Database of EEG Pre-processing of features of the element parametres the EEG segment Wr Calculation of time Classification of the features of the segment Wr according segment Wr Selection of EEG to its phenomenological epoch description and degree Calculation of features of pathology of the segment Wr significance kэп - 1 Гэп = {γ(n)}0 envelope Calculation of Formation of the Segmentation frequency features of R-1 medical report project W = {Wr}0 the segment Wr Figure 5: Block diagram of the EEG preprocessing algorithm for classification of EEG elements 3 Decision support system for EEG tests The classification algorithms for EEG elements have been implemented in the decision support system (DSS) based on the results of EEG tests. DSS was developed in C ++ using the Qt, OpenCV, and OpenGL libraries. The DSS interface is shown in Figure 6. Figure 6: Appearance of DSS based on EEG test results The results of the analysis are presented to the doctor as a draft medical report containing information on the types of the EEG phenomena occurring in the epoch, as well as on the degree of the pathology significance of the EEG elements, with the parameters outside the norm being indicated. Based on the totality of classes of the EEG elements, the doctor makes a decision on the class of the entire recording as a whole. A comparative assessment of the results of EEG epoch classification was performed by a clinician with and without using the proposed DSS. To this end, two samples of records of the EEG epochs were formed using the regulatory EEG record databases placed in the public domain of the Internet at: www.isip.piconepress.com/projects/tuh_eeg/downloads/tuh_eeg_abnormal/v1.1.2/, www.physionet.org/physiobank/data- base/chbmit. Each of the two samples contained 147, 140, and 160 epochs of the normal, borderline, and pathology EEGs, respectively. Three clinicians participated in the assessment. Each of the doctors worked with the first sample without using the DSS, and dealt with the second using the DSS. The comparative probability estimates of correct EEG classification for both cases are presented in Figure 7. Figure 7: Probability estimates for correct classification of EEG using and without using the proposed DSS by three neurologists The tests showed that the use of the EEG processing algorithms for providing the doctor with the information on the types of EEG patterns can lead to an average increase in the accuracy of diagnosis from 0.86 to 0.92 for normal EEGs, from 0.81 to 0.88 for borderline EEGs, and from 0.9 to 0.98 for EEGs indicating some pathology [13]. 4 Conclusion Algorithms for the classification of human EEG elements have been proposed on the basis of the quantitative characteristics of the element shapes. In contrast to the spectral and correlation methods applied in practice, the proposed approach allows the determination of the location of the EEG elements in time while keeping the information on the heterogeneous elements of the EEG signal. Due to the use of the quantitative characteristics of the shapes of EEG elements, the proposed approach simplifies the interpretation of the quantitative data obtained, and serves as a direct equivalent to the visual technique of EEG analysis. The studies have shown that the proposed approach can increase the reliability of the clinical report made by a neurologist. Further research will aim to develop structural methods for EEG analysis, which perform EEG classification based on the relative positioning of the classified patterns in different EEG channels. References 1. J. D. Kropotov. Quantitative EEG, Event-Related Potentials and Neurotherapy { Academic Press, New York, London, 2009. 2. A. P. Kulaichev. Computer electrophysiology { Moscow: University Press, 2002. - 640 p. (in Russian). 3. H. Adeli, Z. Zhou, N. Dadmehr. Analysis of EEG records in an epileptic patient using wavelet transform { Journal of neuroscience methods, Vol. 123, No. 1, pp. 69-87, 2003. 4. U. R. Acharya et al. Deep convolutional neural network for the automated detection and diagnosis of seizure using EEG signals { Computers in biology and medicine, vol. 100, pp. 270-278, 2018. 5. Ya. A. Furman, V. V. Sevastyanov, K. O. Ivanov. Modern problems of brain-signal analysis and approaches to their solution { Pattern Recogn. Image Anal. 29 (1), 99–119 (2019). 6. Ya. A. Furman, V. V. Sevastyanov, K. O. Ivanov. Current proplems of the EEG signal analysis and approaches to their solution from the standpoint of the structural approach { XIV International Conference ‘Optical-electronic instruments and apparatus for pattern recognition systems, image processing and character information. Recognition – 2018’, pp. 274-277, 2018. (in Russian). 7. V. N. Tsygan, M. M. Bogoslovskii, and A. V. Mirolyubov. Electroencephalography { Nauka, St. Petersburg, 2008. (in Russian). 8. Ya. A. Furman, V. V. Sevastyanov, K. O. Ivanov. Segmentation of the fine structure of the electroencefalogram { Bulletin of Ryazan State University of Radio Engineering, No. 54, Vol. 2, pp. 56-67, 2015. (in Russian). 9. Ya. A. Furman, V. V. Sevastyanov, K. O. Ivanov. The formation of EEG informative features for automatic classification of an electroencephalogram { Vestnik of Volga State University of Technology, seies "Radio Engeering and Infocommunication Systems", No. 1, Vol. 33, pp. 38-50, 2017. (in Russian). 10. Ya. A. Furman, V. V. Sevastyanov, K. O. Ivanov. Contour analysis of a fine structure in an electroencephalogram { Pattern Recogn. Image Anal. 26 (4), 758–772 (2016). 11. Ya. A. Furman, A. V. Krevetskii, A. K. Peredreev, A. A. Rozhentsov, R. G. Khafizov, I. L. Egoshina, and A. N. Leukhin. Introduction into Contour Analysis and Its Application for Processing Images and Signals { Fizmatlit, Moscow, 2002. (in Russian). 12. V. V. Sevastyanov, Ya. A. Furman. K. O. Ivanov Quantitative analysis of decomposed EEG represented as a new contour mathematical model { P13 th Conference on Quantification of Brain Functions with PET. – Berlin (Germany), 2017. URL: https://journals.sagepub.com/doi/10.1177/0271678X17695982. 13. K. O. Ivanov. Algorithms for local analysis of electroencephalograms based on contour models { PhD dissertation, Ryazan state radio engineering university, Ryazan, 2008. (in Russian). 14. Ya. A. Furman, V. V. Sevastyanov, K. O. Ivanov. Automatic classification of EEG elements on the basis of quantitative characteristics of their forms { III international conference ‘Brain computer interface. Science and practice. Samara, 2017’. pp. 54-57. (in Russian).