CN115590529A - Epilepsia electroencephalogram signal monitoring method and system based on space-time attention mechanism - Google Patents

Epilepsia electroencephalogram signal monitoring method and system based on space-time attention mechanism Download PDF

Info

Publication number
CN115590529A
CN115590529A CN202211337068.XA CN202211337068A CN115590529A CN 115590529 A CN115590529 A CN 115590529A CN 202211337068 A CN202211337068 A CN 202211337068A CN 115590529 A CN115590529 A CN 115590529A
Authority
CN
China
Prior art keywords
network
electroencephalogram
training
channel
signals
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211337068.XA
Other languages
Chinese (zh)
Inventor
赵艳娜
何佳桐
朱凤琳
尹义豪
吕宏彬
王帅
冯海玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Normal University
Original Assignee
Shandong Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Normal University filed Critical Shandong Normal University
Priority to CN202211337068.XA priority Critical patent/CN115590529A/en
Publication of CN115590529A publication Critical patent/CN115590529A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/372Analysis of electroencephalograms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/40Detecting, measuring or recording for evaluating the nervous system
    • A61B5/4076Diagnosing or monitoring particular conditions of the nervous system
    • A61B5/4094Diagnosing or monitoring seizure diseases, e.g. epilepsy
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7203Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The invention provides an epilepsia electroencephalogram signal monitoring method based on a space-time attention mechanism, and belongs to the field of signal processing. The method comprises the following steps: acquiring a multi-channel electroencephalogram signal and preprocessing the multi-channel electroencephalogram signal; constructing a graph attention network and a transformer network, taking the output of the graph attention network as the input of the transformer network, and constructing a fusion network; constructing a training set based on the preprocessed multi-channel electroencephalogram signals, and training the fusion network by using the training set to obtain a trained fusion network; inputting multi-channel electroencephalogram signals into a trained fusion network, extracting spatial features through a graph attention network, inputting the electroencephalogram signals with the aggregated spatial features into a transformer network, extracting time features, and obtaining classification results. The invention solves the problems of gradient disappearance and gradient explosion in the long sequence training process and information loss in the two-dimensional electroencephalogram processing process, selects the most key information from the electroencephalogram signals of the epilepsy, further selects the optimal characteristics and improves the accuracy of the epilepsy detection.

Description

Epilepsia electroencephalogram signal monitoring method and system based on space-time attention mechanism
Technical Field
The invention belongs to the field of electroencephalogram signal processing, and particularly relates to an epilepsia electroencephalogram signal monitoring method and system based on a space-time attention mechanism.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
Epilepsy is a serious chronic nervous system disease, usually caused by abnormal hypersynchronous discharge of a large number of nerve cell populations in the brain, and mainly shows symptoms such as cognitive impairment, tongue biting, white foam in mouth and even persistent involuntary convulsion of patients. Epilepsy impairs normal physiological functions of the brain, affecting the normal life of the person, and most patients can cause other unpredictable side effects, such as memory deterioration, depression and other psychological disorders. If the diagnosis and treatment are not performed in time, the normal life of the patient can be greatly influenced, and even serious patients can die.
The detection of epilepsy can be performed by analyzing brain signals produced by cerebral neurons. Neurons are interconnected in a complex manner, communicating with human organs and producing signals. These brain signals are typically monitored using electroencephalographic and electrocardiographic media. These signals are complex, noisy, non-linear, non-stationary, and produce large amounts of data. Therefore, detecting seizures and discovering brain related knowledge is a challenging task.
In current clinical treatment, doctors usually evaluate brain signals of patients in a certain period of time to determine the brain part of the disease and the disease expression. When there is an epileptic seizure, a specific brain waveform is produced in the electroencephalogram, which is distinguished from the normal brain electrical waveform. However, such conventional detection and diagnosis methods often require a professional physician to visually determine the long-range electroencephalogram based on experience, which is time-consuming, highly subjective, and noisy. Furthermore, involuntary convulsion is an important manifestation of epileptic seizure, but causes of the convulsion are various, such as: intravenous injection of a human body, external scaring, interference of electronic equipment, turning over during sleep and the like, so that misjudgment is easily caused by analyzing electroencephalograms only by naked eyes of doctors.
With the rise of machine learning, it has become a hot trend to classify EEG data by using a machine learning classifier to detect epileptic seizures. Different researchers in the prior art have developed some epilepsy electroencephalogram signal monitoring methods based on machine learning, but the methods based on machine learning need to manually select the optimal features, which is very time-consuming, and meanwhile, the selection of the optimal features has very large subjectivity, which seriously affects the accuracy of machine learning classification.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides an epilepsia electroencephalogram signal monitoring method and system based on a space-time attention mechanism, a multichannel original signal diagram structure is directly input into a network, characteristics are not required to be manually designed for classification, space characteristic aggregation is carried out through a graph attention network, then time information is extracted by using a transformer network, and finally classification is carried out, so that the problems of gradient loss and gradient explosion in a long sequence training process are solved, the problem of information loss in two-dimensional electroencephalogram processing is solved, the most key information is selected from epilepsia electroencephalogram signals, the optimal characteristics are further selected, and the aim of improving the accuracy of epilepsia detection is fulfilled.
In order to achieve the above object, one or more embodiments of the present invention provide the following technical solutions:
the invention provides an epilepsia electroencephalogram signal monitoring method based on a space-time attention mechanism.
An epilepsia electroencephalogram signal monitoring method based on a space-time attention mechanism comprises the following steps:
acquiring a multi-channel electroencephalogram signal, and preprocessing the multi-channel electroencephalogram signal;
constructing a graph attention network and a transformer network, taking the output of the graph attention network as the input of the transformer network, and constructing a fusion network;
constructing a training set based on the preprocessed multi-channel electroencephalogram signals, and training the fusion network by using the training set to obtain a trained fusion network;
inputting multi-channel electroencephalogram signals into a trained fusion network, extracting spatial features through a graph attention network, inputting the electroencephalogram signals with the aggregated spatial features into a transformer network, extracting time features, and obtaining classification results.
The invention provides an epilepsia electroencephalogram signal monitoring system based on a space-time attention mechanism.
Epilepsy electroencephalogram signal monitoring system based on space-time attention mechanism comprises:
a signal acquisition and pre-processing module configured to: acquiring a multi-channel electroencephalogram signal, and preprocessing the multi-channel electroencephalogram signal;
a converged network construction module configured to: constructing a graph attention network and a transformer network, taking the output of the graph attention network as the input of the transformer network, and constructing a fusion network;
a converged network training module configured to: constructing a training set based on the preprocessed multi-channel electroencephalogram signals, and training the fusion network by using the training set to obtain a trained fusion network;
a classification result acquisition module configured to: inputting the multichannel electroencephalogram signals into a trained fusion network, extracting spatial features through a graph attention network, inputting the electroencephalogram signals with the spatial features aggregated into a transformer network, extracting time features, and obtaining a classification result.
A third aspect of the present invention provides a computer readable storage medium, on which a program is stored, which program, when executed by a processor, implements the steps in the method for monitoring epileptic brain electrical signals based on a spatiotemporal attention mechanism according to the first aspect of the present invention.
A fourth aspect of the present invention provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, where the processor executes the program to implement the steps in the method for monitoring epileptic brain electrical signals based on a space-time attention mechanism according to the first aspect of the present invention.
The above one or more technical solutions have the following beneficial effects:
the method utilizes the deep learning network of the attention mechanism to detect the epilepsy, does not need to manually design features to classify, directly inputs a multichannel original signal diagram structure into the network, performs spatial feature aggregation through the diagram attention network, then extracts time information by using a transformer network, and finally classifies; the fusion network is established, so that the problems of gradient disappearance and gradient explosion in the long sequence training process are solved, and the problem of information loss in the two-dimensional electroencephalogram processing is solved; and selecting the most critical information from the epilepsia electroencephalogram signals by using a multi-head attention mechanism of the model, and further selecting the optimal characteristics to achieve the purpose of improving the accuracy of epilepsia detection.
Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, are included to provide a further understanding of the invention, and are included to illustrate an exemplary embodiment of the invention and not to limit the invention.
FIG. 1 is a flow chart of the method of the first embodiment.
Fig. 2 is a schematic diagram illustrating classification of electroencephalogram signals by preprocessing and fusion network of epilepsia electroencephalogram signals according to the first embodiment.
FIG. 3 is a schematic diagram illustrating the processing of electroencephalogram signals by the attention network according to the first embodiment.
Fig. 4 is a diagram showing the electroencephalogram signal of the seizure of the first embodiment.
Fig. 5 is a system configuration diagram of the second embodiment.
Detailed Description
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the invention. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the invention.
The embodiments and features of the embodiments of the present invention may be combined with each other without conflict.
Example one
The embodiment discloses an epilepsia electroencephalogram signal monitoring method based on a space-time attention mechanism.
As shown in fig. 1, the epilepsy electroencephalogram signal monitoring method based on the space-time attention mechanism comprises the following steps:
acquiring a multi-channel electroencephalogram signal, and preprocessing the multi-channel electroencephalogram signal;
constructing a graph attention network and a transformer network, taking the output of the graph attention network as the input of the transformer network, and constructing a fusion network;
constructing a training set based on the preprocessed multi-channel electroencephalogram signals, and training the fusion network by using the training set to obtain a trained fusion network;
inputting the multichannel electroencephalogram signals into a trained fusion network, extracting spatial features through a graph attention network, inputting the electroencephalogram signals with the spatial features aggregated into a transformer network, extracting time features, and obtaining a classification result.
Further, acquiring the multichannel electroencephalogram signals specifically comprises:
and acquiring electroencephalogram signals by adopting 16 electroencephalogram electrodes to obtain the electroencephalogram signals of 16 channels to be detected.
Further, the method for preprocessing the multichannel electroencephalogram signals specifically comprises the following steps: and denoising and filtering the multi-channel electroencephalogram signals, and dividing the electroencephalogram signals of each channel subjected to denoising into a plurality of time windows according to a set time length to obtain the preprocessed multi-channel electroencephalogram signals.
Further, based on the preprocessed multi-channel electroencephalogram signals, a training set is constructed, and the method specifically comprises the following steps:
carrying out epileptic seizure interval labeling and epileptic seizure period labeling on the preprocessed multichannel electroencephalogram signals;
and (3) forming a training set by the preprocessed multichannel electroencephalogram signals, epileptic seizure interval labels and epileptic seizure period labels.
Further, training the converged network by using a training set specifically includes:
dividing the acquired multi-channel electroencephalogram signals in proportion to construct a training set, a verification set and a test set;
calculating multi-channel electroencephalogram signals preprocessed in a training set by using Pearson correlation to obtain a correlation matrix, constructing a graph structure at the same time, and forming a feature matrix of the electroencephalogram signals by using the correlation matrix and the graph structure;
inputting the characteristic matrix, the epileptic seizure interval label and the epileptic seizure period label into an attention network of a graph, and training a fusion network by using the characteristic matrix;
and training the fusion network, stopping training when the loss function of the fusion network reaches the minimum value or the iteration times meet the set requirement to obtain the trained fusion network, and performing verification by using the verification set and testing the epilepsia electroencephalogram signals by using the test set.
In this embodiment, both the training set and the test set contain electroencephalographic signals with known epileptic or non-epileptic diagnostic results.
In the training process, preprocessing the electroencephalogram signals of the epilepsy, putting the preprocessed electroencephalogram signal fragments into a fusion network, extracting space-time correlation characteristics, and further improving the accuracy of the experiment by using a loss function; and finally carrying out epilepsy detection on the full connection layer. The invention provides a new idea for the computer-aided diagnosis of epilepsy detection.
Further, during training, a focus loss function is used to balance the positive and negative sample weights.
Further, the fusion network comprises a first GAT layer, a first Dropout layer, a regularization layer, a second GAT layer, a second Dropout layer, an activation function layer, a Transformer Encoder layer and a full connection layer which are connected in sequence.
In this embodiment, the first GAT layer and the second GAT layer are configured to aggregate a channel spatial relationship and extract key information; the first Dropout layer and the second Dropout layer are used for discarding part of neurons randomly to prevent the model from being over-fitted; the regularization layer is used for training a stable network; the activation function layer is used for helping network learning data to learn complex patterns; the Transformer Encoder layer is used for extracting time information; and the full connection layer is used for carrying out epilepsia binary detection at the end of the model.
Furthermore, the multichannel electroencephalogram signals are input into a trained fusion network for two-classification detection, and detection results of epileptic seizure periods or epileptic seizure intervals are output.
As shown in fig. 2, the method comprises four blocks, wherein the first block represents a process of acquiring multi-channel electroencephalogram signals, performing noise reduction and filtering processing on the multi-channel electroencephalogram signals, and dividing the electroencephalogram signals of each channel after the noise reduction processing into a plurality of time windows according to a set time length;
in the second square frame, the left side is a correlation matrix, the right side is a graph structure, and the correlation matrix and the graph structure form a characteristic matrix;
the third frame is a graph attention network, the feature matrix obtained in the second frame is input into the graph attention network to extract spatial features, and electroencephalogram signals with the aggregated spatial features are output to the fourth frame;
and the fourth block is a transformer network and a second classification process, wherein the output of the attention network is input into the transformer network after being processed, and then is input into the softmax full connection layer for second classification, and a classification result is finally output.
As shown in fig. 3, a schematic diagram illustrating processing of electroencephalogram signals by the attention network is shown, a feature matrix including a correlation matrix and a graph structure is arranged in a first box on the left side in fig. 3, the feature matrix is input into the attention network of the graph for processing, and finally, electroencephalogram signals with aggregated spatial features are output.
The graph structure comprises channel information, signal information and correlation information, and the specific process of constructing the graph structure is as follows:
the electroencephalogram channel is modeled into nodes of the graph, and the characteristics of the nodes are the characteristics of the electroencephalogram signal on the channel. And calculating the Pearson correlation among the channels to obtain a correlation matrix, setting a threshold value, setting a corresponding value in the correlation matrix to be 0 if the correlation among the channels is smaller than the threshold value, and keeping the correlation value if the correlation among the channels is larger than the threshold value. Finally, the edges of the graph are connected according to the correlation value which is not 0 in the matrix, and thus the graph structure is obtained.
The working principle of the converged network comprises the following steps:
according to the relationship among the channels, the graph attention network obtains the weight among the channels through a feedforward neural network, so that the information of other channels is aggregated, the graph attention network updates the graph attention network, and the mutual influence among different channels in space and time is fully considered; and (3) using a two-layer graph attention layer, and learning the characteristics with more expressive power after the characteristics of the nodes are expressed through one layer of graph attention layer and then one layer.
Inputting the output result of the graph attention network into a transformer network for position coding and linear mapping, sending the segmented 2D signal into an encoder, extracting spatial features, sending the output value into a full connection layer FC for epilepsy two-classification detection, wherein the detection result is classified into two categories, namely epileptic seizure period or epileptic seizure interval. The transformer network model breaks through the limitation that the RNN model cannot perform parallel computation. Compared to CNN, the number of operations required by the transformer network model to calculate the association between two locations does not increase with distance. Self-attention may produce a more interpretable model from which attention distributions may be examined and the individual heads may learn to perform different tasks.
In this embodiment, a graph attention network is used to perform spatial feature extraction on the input epilepsy data, and the specific operation rule of the graph attention network is:
e ij =a(Wk i ,Wk j ) (1)
Figure BDA0003915684820000081
Figure BDA0003915684820000082
Figure BDA0003915684820000083
the above equations (1) to (4) are calculation equations illustrating the force network.
Wherein, W represents a trainable weight matrix, e represents a correlation coefficient between two nodes, k represents a feature vector of a node, a represents a linear mapping, α represents an attention coefficient, V represents a neighbor node set, k' represents a feature vector of an output node, σ represents a sigmoid activation function, Q represents a certain head in a multi-head attention mechanism, Q represents a set of heads in the multi-head attention mechanism, and i, j, r represents subscripts of any node.
Meanwhile, a transformer network is introduced to extract time characteristics of input epileptic data, and the specific operation rule of the transformer network is as follows:
Figure BDA0003915684820000084
H l ′=MSA(LN(H l-1 ))+H l-1 ,l=1,2,...,L (6)
H l =MLP(LN(H l ′))+H l ′,l=1,2,...,L (7)
equations (5) - (7) are the calculation equations for the transformer network. Wherein H represents the final input of the transformer, k' class Represents a selected class token, E pos Represents the standard 1D position coding, E represents the position coding, μ represents the slice size, and l represents the number of encoders. LN for regularization, MSA for multiheaded attention, MLP for multi-layer perceptron, H l ' represents the output of the multi-head attention mechanism of the l-th encoder, H l Representing the final output of the ith encoder.
The initial input to the converged network is x, which represents the feature matrix. After the spatio-temporal feature extraction is carried out through the graph attention network and the transformer network, the epilepsy two-classification detection is finally completed through the softmax function, and therefore the model architecture in the embodiment is formed.
In this example, the data set used is shown in table 1. Firstly, obtaining an original electroencephalogram through hardware equipment and a 10-20 international electroencephalogram lead system environment, reading data formats which can be identified by a computer from original electroencephalogram data by utilizing MNE-python, and reading an attribute matrix x of electroencephalograms, wherein each row represents characteristic information of one channel, and columns represent the number of the channels. And dividing the data into training data and test data according to the proportion to obtain the characteristic vector of the signal segment.
Inputting x into a fusion network, firstly extracting spatial features through a graph attention network, inputting the signals aggregated with the spatial features into a transformer network to extract time features, and finally finishing classification through a softmax function.
Table 1: boston hospital children epilepsy data set
Number of Sex Age(s) Frequency HZ Number of lead Record Total duration (hours) Number of attacks Total duration of attack (minutes: seconds)
chb01 Female 11 256 23 40.55 7 7:10
chb02 For male 11 256 23 25.3 3 2:50
chb03 Woman 14 256 23 28 7 5:40
chb04 For male 22 256 23 155.9 4 9:00
chb05 Female 7 256 23 39 5 2:00
chb06 Female 1.5 256 23 66.7 9 5:10
chb07 Female 14.5 256 23 68.1 3 15:10
chb08 For male 3.5 256 23 20 5 4:00
chb09 Female 10 256 23 67.8 4 6:50
chb10 For male 3 256 23 50 7 13:20
chb11 Female 12 256 23 34.8 3 8:10
chb12 Female 2 256 23 23 39 25:15
chb13 Female 3 256 23 33 12 2:30
chb14 Female 9 256 23 26 8 27:20
chb15 For male 16 256 31 40 20 1:20
chb16 Female 7 256 28 19 10 4:40
chb17 Woman 12 256 28 21 3 4:50
chb18 Female 18 256 22 36 6 3:40
chb19 Female 19 256 28 30 3 3:30
chb20 Female 6 256 28 29 8 3:10
chb21 Female 13 256 28 33 4 3:10
chb22 Female 9 256 28 31 3 3:10
chb23 Female 6 256 23 28 7 6:40
chb24 Unknown Unknown 256 23 Last known of 16 8:47
The scalp electrode electroencephalogram is now routinely used with the international 10-20 system. The 10-20 system includes 19 recording electrodes and 2 reference electrodes. Firstly, two lines are determined on the surface of the scalp, wherein one line is 100 percent of the front-back connecting line from the nasion to the occipital tuberosity, and the other line is 100 percent of the left-right connecting line between the two ear front concavities. The intersection point of the two electrodes at the vertex is the position of the Cz electrode. The posterior 10% of the nasal root is FPz (frontal midline), and each 20% of the posterior from FPz is the position of one electrode, which is Fz (frontal midline), cz (central midline), pz (apical midline) and Oz (occipital midline) in sequence. The spacing between Oz and the occipital tuberosity is 10%. The position of the anterior fovea line 10% away from the left anterior fovea is the position of a T3 (left middle temporal) electrode, and one electrode is placed every 20% to the right from the back, namely C3 (left center), cz, C4 (right center) and T4 (right middle temporal) in sequence. The distance between T4 and the anterior concavity of the right ear is 10 percent. The line from FPz through T3 to Oz is the left temporal line, 10% left from FPz is FP1 (left frontal pole), one electrode is placed every 20% backward from FP1, in order F7 (left anterior temporal), T3 (left medial temporal), T5 (left posterior temporal) and O1 (left occipital), where T3 is the intersection of this line with the anterior fovea, and O1 is 10% from Oz. The right temporal connecting line corresponds to FP2 (right temporal pole), F8 (right anterior temporal), T4 (right middle temporal), T6 (right posterior temporal) and O2 (right occipital) in sequence from front to back. A line is respectively drawn from FP1 to O1 and from FP2 to O2, which are left and right sagittal sidelines, one electrode site is backward every 20% from FP1 and FP2, F3 (left forehead), C3 (left center), P3 (left top) and O1 (left pillow) are once on the left side, and F4 (right forehead), C4 (right center), P4 (right top) and O2 (right pillow) are sequentially on the right side. In a 10-20 system, FPz and Oz do not include within 19 recording points.
As shown in fig. 4, an example diagram of an electroencephalogram of a seizure measured by the equipment for epilepsy detection is shown.
In this example, an epilepsy detection experiment was performed on the CHB-MIT data set (international 10-20 system). The data set was collected by Boston's Hospital for children (Boston Chil-dren's Hospital) and consisted of a total of 5 males (3-22 years old) and 17 females (1.5-19 years old). The electroencephalogram signals are sampled at 256Hz, and the total time of each electroencephalogram record is about one hour. The data set collected 958 hours of signal total, with 198 hours being the seizure time. In the channel selection for electroencephalogram: 16 double-electrode channels are selected, wherein the 16 channels are universal parts selected from electrodes with different positions during acquisition of electroencephalogram data, and uniform program operation is facilitated.
In this example, EEG recordings obtained from each subject in the CHB-MIT dataset were used to evaluate the performance of the proposed model, and electroencephalographic recordings were collected using the international 10-20 electroencephalographic electrode system. Dividing the de-noised long-term 16-channel electroencephalogram signal into 256 points as one frame, wherein the size of input data is N × 256 × 16, and N represents a total N frame data samples; 256 denotes a single channel data size of 256 points per frame; 16 indicates a total of 16 channels.
A sliding window of 1 second was chosen to analyze EEG recordings for 16 channels. These settings are obtained empirically and experimentally, and ensure good kinetics for obtaining results. During training, samples were randomly divided into 8 based on the sample library: and 2, wherein 80% of the training samples are training samples, the rest 20% of the training samples are test samples, and the sample values are feature vectors of the obtained signal segments.
By the method, the epileptic brain electrical signal detection and identification result is obtained, and the result obtained by the method is compared with the detection result obtained by the traditional method, as shown in table 2.
TABLE 2
Figure BDA0003915684820000121
As can be seen from the table 2, the detection and identification accuracy, the sensitivity and the specificity of the epilepsia electroencephalogram signal can be comparable to other advanced methods.
Example two
The embodiment discloses an epilepsia electroencephalogram signal monitoring system based on a space-time attention mechanism.
As shown in fig. 5, the epilepsy electroencephalogram signal monitoring system based on the space-time attention mechanism includes:
a signal acquisition and pre-processing module configured to: acquiring a multi-channel electroencephalogram signal, and preprocessing the multi-channel electroencephalogram signal;
a converged network construction module configured to: constructing a graph attention network and a transformer network, taking the output of the graph attention network as the input of the transformer network, and constructing a fusion network;
a converged network training module configured to: constructing a training set based on the preprocessed multi-channel electroencephalogram signals, and training the fusion network by using the training set to obtain a trained fusion network;
a classification result acquisition module configured to: inputting multi-channel electroencephalogram signals into a trained fusion network, extracting spatial features through a graph attention network, inputting the electroencephalogram signals with the aggregated spatial features into a transformer network, extracting time features, and obtaining classification results.
EXAMPLE III
An object of the present embodiment is to provide a computer-readable storage medium.
A computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps in the epilepsy electroencephalogram signal monitoring method based on the spatiotemporal attention mechanism according to embodiment 1 of the present disclosure.
Example four
An object of the present embodiment is to provide an electronic apparatus.
An electronic device comprising a memory, a processor and a program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for monitoring epileptic brain electrical signals based on a space-time attention mechanism according to embodiment 1 of the present disclosure when executing the program.
The steps involved in the apparatuses of the above second, third and fourth embodiments correspond to the first embodiment of the method, and the detailed description thereof can be found in the relevant description of the first embodiment. The term "computer-readable storage medium" should be taken to include a single medium or multiple media containing one or more sets of instructions; it should also be understood to include any medium that is capable of storing, encoding or carrying a set of instructions for execution by a processor and that cause the processor to perform any of the methods of the present invention.
Those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using general purpose computer means, or alternatively, they can be implemented using program code that is executable by computing means, such that they are stored in memory means for execution by the computing means, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps of them are fabricated into a single integrated circuit module. The present invention is not limited to any specific combination of hardware and software.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (10)

1. An epilepsia electroencephalogram signal monitoring method based on a space-time attention mechanism is characterized by comprising the following steps:
acquiring a multi-channel electroencephalogram signal, and preprocessing the multi-channel electroencephalogram signal;
constructing a graph attention network and a transformer network, taking the output of the graph attention network as the input of the transformer network, and constructing a fusion network;
constructing a training set based on the preprocessed multi-channel electroencephalogram signals, and training the fusion network by using the training set to obtain a trained fusion network;
inputting multi-channel electroencephalogram signals into a trained fusion network, extracting spatial features through a graph attention network, inputting the electroencephalogram signals with the aggregated spatial features into a transformer network, extracting time features, and obtaining classification results.
2. The epilepsy electroencephalogram signal monitoring method based on the space-time attention mechanism as claimed in claim 1, wherein the preprocessing is performed on the multichannel electroencephalogram signal, and specifically comprises the following steps: and denoising and filtering the multichannel electroencephalogram signals, and dividing the electroencephalogram signals of each channel subjected to denoising into a plurality of time windows according to a set time length to obtain the preprocessed multichannel electroencephalogram signals.
3. The epilepsy electroencephalogram signal monitoring method based on the space-time attention mechanism as claimed in claim 1, wherein a training set is constructed based on the preprocessed multi-channel electroencephalogram signals, and the method specifically comprises the following steps:
carrying out epileptic seizure interval labeling and epileptic seizure period labeling on the preprocessed multichannel electroencephalogram signals;
and (3) forming a training set by the preprocessed multichannel electroencephalogram signals, epileptic seizure interval labels and epileptic seizure period labels.
4. The epilepsy electroencephalogram signal monitoring method based on the space-time attention mechanism as claimed in claim 1, wherein training the fusion network by using a training set specifically comprises:
calculating the preprocessed multi-channel electroencephalogram signals by using Pearson correlation to obtain a correlation matrix, simultaneously constructing a graph structure, and forming a feature matrix of the electroencephalogram signals by using the correlation matrix and the graph structure;
inputting the characteristic matrix, the epileptic seizure interval label and the epileptic seizure period label into an attention network of a graph, and training a fusion network by using the characteristic matrix;
and when the loss function of the fusion network reaches the minimum value or the iteration times meet the set requirement, stopping training to obtain the trained fusion network.
5. The method for epilepsy electroencephalography signal monitoring based on the spatiotemporal attention mechanism of claim 4, wherein during training, positive and negative sample weights are balanced using a focus loss function.
6. The method for monitoring epileptic brain electrical signals based on a spatio-temporal attention mechanism as claimed in claim 1, wherein the fusion network comprises a first GAT layer, a first Dropout layer, a regularization layer, a second GAT layer, a second Dropout layer, an activation function layer, a Transformer Encoder layer and a full connection layer which are connected in sequence.
7. The epilepsy electroencephalogram signal monitoring method based on the space-time attention mechanism as claimed in claim 1, wherein the multichannel electroencephalogram signal is input into a trained fusion network, two-classification detection is carried out, and the detection result of the epileptic seizure period or the epileptic seizure interval is output.
8. Epilepsy electroencephalogram signal monitoring system based on space-time attention mechanism, which is characterized in that: the method comprises the following steps:
a signal acquisition and pre-processing module configured to: acquiring a multi-channel electroencephalogram signal, and preprocessing the multi-channel electroencephalogram signal;
a converged network construction module configured to: constructing a graph attention network and a transformer network, taking the output of the graph attention network as the input of the transformer network, and constructing a fusion network;
a converged network training module configured to: constructing a training set based on the preprocessed multi-channel electroencephalogram signals, and training the fusion network by using the training set to obtain a trained fusion network;
a classification result acquisition module configured to: inputting multi-channel electroencephalogram signals into a trained fusion network, extracting spatial features through a graph attention network, inputting the electroencephalogram signals with the aggregated spatial features into a transformer network, extracting time features, and obtaining classification results.
9. Computer readable storage medium, on which a program is stored, which program, when being executed by a processor, carries out the steps of the method for epilepsy electroencephalogram signal monitoring based on the spatiotemporal attention mechanism as claimed in any one of claims 1 to 7.
10. Electronic device comprising a memory, a processor and a program stored on the memory and executable on the processor, wherein the processor implements the steps of the method for monitoring epileptic brain electrical signals based on a space-time attention mechanism as claimed in any one of claims 1 to 7 when executing the program.
CN202211337068.XA 2022-10-28 2022-10-28 Epilepsia electroencephalogram signal monitoring method and system based on space-time attention mechanism Pending CN115590529A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211337068.XA CN115590529A (en) 2022-10-28 2022-10-28 Epilepsia electroencephalogram signal monitoring method and system based on space-time attention mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211337068.XA CN115590529A (en) 2022-10-28 2022-10-28 Epilepsia electroencephalogram signal monitoring method and system based on space-time attention mechanism

Publications (1)

Publication Number Publication Date
CN115590529A true CN115590529A (en) 2023-01-13

Family

ID=84850673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211337068.XA Pending CN115590529A (en) 2022-10-28 2022-10-28 Epilepsia electroencephalogram signal monitoring method and system based on space-time attention mechanism

Country Status (1)

Country Link
CN (1) CN115590529A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116350227A (en) * 2023-05-31 2023-06-30 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Individualized detection method, system and storage medium for magnetoencephalography spike
CN116712089A (en) * 2023-07-26 2023-09-08 华南师范大学 Epileptiform discharge enriching epileptiform interval and method for predicting focus
CN117257242A (en) * 2023-11-22 2023-12-22 北京大学 Epilepsy classification method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116350227A (en) * 2023-05-31 2023-06-30 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Individualized detection method, system and storage medium for magnetoencephalography spike
CN116350227B (en) * 2023-05-31 2023-09-22 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Individualized detection method, system and storage medium for magnetoencephalography spike
CN116712089A (en) * 2023-07-26 2023-09-08 华南师范大学 Epileptiform discharge enriching epileptiform interval and method for predicting focus
CN116712089B (en) * 2023-07-26 2024-03-22 华南师范大学 Epileptiform discharge enriching epileptiform interval and method for predicting focus
CN117257242A (en) * 2023-11-22 2023-12-22 北京大学 Epilepsy classification method and system
CN117257242B (en) * 2023-11-22 2024-02-02 北京大学 Epilepsy classification method and system

Similar Documents

Publication Publication Date Title
Zhang et al. Adversarial representation learning for robust patient-independent epileptic seizure detection
Khare et al. PDCNNet: An automatic framework for the detection of Parkinson’s disease using EEG signals
KR102221264B1 (en) Method for estimating human emotions using deep psychological affect network and system therefor
Lawhern et al. Detection and classification of subject-generated artifacts in EEG signals using autoregressive models
CN115590529A (en) Epilepsia electroencephalogram signal monitoring method and system based on space-time attention mechanism
Li et al. A hybrid network for ERP detection and analysis based on restricted Boltzmann machine
AlSharabi et al. EEG signal processing for Alzheimer’s disorders using discrete wavelet transform and machine learning approaches
Li et al. Multi-modal bioelectrical signal fusion analysis based on different acquisition devices and scene settings: Overview, challenges, and novel orientation
US20050277813A1 (en) Brain state recognition system
Oosugi et al. A new method for quantifying the performance of EEG blind source separation algorithms by referencing a simultaneously recorded ECoG signal
Alotaibi et al. Ensemble Machine Learning Based Identification of Pediatric Epilepsy.
Li et al. Spatial–temporal discriminative restricted Boltzmann machine for event-related potential detection and analysis
US10929753B1 (en) System and method for generating a probability value for an event
CN113288172A (en) Epilepsia electroencephalogram signal identification method and system
Krauledat Analysis of nonstationarities in EEG signals for improving brain-computer interface performance
Zhang et al. DWT-Net: Seizure detection system with structured EEG montage and multiple feature extractor in convolution neural network
Saini et al. Light-weight 1-D convolutional neural network architecture for mental task identification and classification based on single-channel EEG
CN114129129A (en) Epilepsy detection system based on CNN and Transformer
Sidik et al. EEG-Based Classification of Schizophrenia and Bipolar Disorder with the Fuzzy Method
Farooq et al. Motor Imagery based multivariate EEG Signal classification for brain controlled interface applications
Ma et al. Automatic detection of high frequency oscillations (80-500Hz) based on convolutional neural network in human intracerebral electroencephalogram
Asha et al. Automated seizure detection from multichannel EEG signals using support vector machine and artificial neural networks
Shekokar et al. Epileptic seizure classification using LSTM
Buscema et al. The implicit function as squashing time model: a novel parallel nonlinear EEG analysis technique distinguishing mild cognitive impairment and Alzheimer's disease subjects with high degree of accuracy
Sabeti et al. Using genetic programming to select the informative EEG-based features to distinguish schizophrenic patients

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination