Method and system for epileptic seizure detection and automatic labeling based on electroencephalogram data

By using parallel 2D convolution blocks and BiLSTM models in epileptic seizure detection, combined with self-correction and spatial channel reconstruction convolution blocks, the problems of information loss and model inflexibility in the existing technology are solved, and more accurate and efficient are achieved. Feature extraction and epilepsy detection from EEG data.

CN118557150AActive Publication Date: 2024-08-30SHANGHAI JIAOTONG UNIV

Patent Information

Application Number
CN202410646828.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-08-30
Estimated Expiration
2044-05-23

AI Technical Summary

Technical Problem

Existing epilepsy seizure detection methods suffer from information loss, inflexible model architecture, gradient explosion or disappearance, and the information provided by computer-aided detection tools is not detailed and complete enough, making it difficult to capture the global information and temporal characteristics of EEG signals.

Method used

The SC-LSTM model based on deep learning is used to extract the spatial and temporal features of EEG data through parallel 2D convolution blocks and BiLSTM, and the self-corrected convolution block and spatial channel are combined to reconstruct the convolution block to reduce information loss and enhance feature extraction. capabilities to form a more flexible model architecture.

Benefits of technology

It improves the feature capturing ability of EEG data, reduces information loss, enhances the flexibility and applicability of the model, and improves the accuracy and efficiency of epileptic seizure detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118557150A
    Figure CN118557150A
Patent Text Reader

Abstract

The invention provides a method and system for epileptic seizure detection and automatic labeling based on electroencephalogram data, and the method comprises the steps: 1, obtaining an electroencephalogram record with an epileptic seizure possibility, and carrying out the preprocessing; 2, an SC-LSTM model based on deep learning is built, and the SC-LSTM model comprises two parallel feature extraction modules and a classification module and is used for feature extraction, feature selection fusion and epilepsy detection classification of the epilepsy electroencephalogram. The deep learning technology adopted by the invention can automatically capture effective features from the EEG signals, end-to-end epileptic seizure detection is realized, and the deep learning technology is applied to epileptic seizure detection, so that the workload of neurology doctors can be relieved, the working efficiency can be improved, and the detection accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of mental illness informatics, neuroscience, medical image processing and artificial intelligence technology, and in particular to a method and system for detecting and automatically labeling epileptic seizures based on electroencephalogram data. Background Art

[0002] Epilepsy is a common chronic neurological disease caused by abnormal discharge responses of brain neurons. Usually, epilepsy patients lose consciousness due to transient brain dysfunction, local or systemic convulsions and fainting symptoms during an attack. There are about 65 million epilepsy patients worldwide, with about 2 million new cases each year. In addition, frequent attacks will cause irreversible damage to the patient's brain, seriously affecting the patient's physical function and causing psychological harm. Therefore, it is extremely important to diagnose epilepsy patients in a timely manner and give them anti-epileptic drug treatment.

[0003] Generally speaking, neurologists detect epilepsy and locate the affected area by analyzing the shape and amplitude of abnormal brain wave bands. However, relying on expert experience and expertise through visual observation has the following disadvantages. First, visual observation relies on expert experience and expertise. Second, the acquisition frequency of electroencephalogram (EEG) signals is high, the amount of data is large, and a long time is required for visual observation. In addition, long-term visual observation will affect the accuracy of neurologists' detection, leading to serious consequences such as misdiagnosis and missed diagnosis. In addition, EEG signals are easily affected by environmental noise, which increases the difficulty of visual observation detection. Therefore, it is necessary to develop a computer-aided system to help neurologists detect epilepsy.

[0004] Machine learning (ML) was once the most commonly used method for epileptic seizure detection. However, ML methods require manually designed feature extractors to capture epileptic seizure features, and it is difficult to extract discriminative features. In recent years, rapid advances in neural network theory and parallel computing technology have made significant breakthroughs in deep learning (DL). DL technology has been successfully applied to fields such as image recognition, speech recognition, and emotion recognition. In addition, its application in the medical field is gradually emerging. Deep learning technology is derived from machine learning methods, usually has a multi-layer structure, and is given stronger nonlinear characteristics through activation functions. DL technology can automatically capture effective features from EEG signals and realize end-to-end epileptic seizure detection. Applying DL technology to epileptic seizure detection can reduce the workload of neurologists, promote work efficiency, and improve detection accuracy. Therefore, this paper is interested in DL-based epileptic seizure detection methods. DL-based epileptic seizure detection models can be roughly divided into three categories: models based on convolutional neural networks (CNNs), models based on recurrent neural networks (RNNs), and hybrid models.

[0005] CNN-based models extract features from EEG signals through convolution and pooling operations. Various types of CNN networks, including multi-layer CNN, one-dimensional convolutional neural network (1DCNN), and three-dimensional convolutional neural network (3DCNN), have been used for epileptic seizure detection. Acharya et al. proposed a 13-layer CNN to distinguish normal EEG signals, epileptic intermittent signals, and epileptic seizure signals. Antoniades et al. designed a four-layer CNN to detect epileptic discharges in intracranial EEG. Elakkiya et al. developed an epileptic seizure detection model based on the 1DCNN model. Wei et al. introduced a 3DCNN for epileptic seizure detection using multi-channel EEG signals. Shoji et al. proposed a multi-channel CNN network to detect abnormal patterns in EEG signals. Many deeper network structures have been developed based on convolutional neural networks and used for epilepsy diagnosis, such as AlexNet, VGG, GoogleNet, and ResNet. Taqi et al. used the AlexNet network to diagnose focal epileptic seizures. Emami et al. explored the idea of ​​detecting epileptic seizures on sEEG signal maps. In the preprocessing step, the signal is segmented into different time windows and classified using VGG-16, which uses small (3×3) convolutional filters to effectively detect small EEG signal changes. Taqi et al. used this network in their preliminary study to diagnose epileptic seizures. Their model was used to extract features from the Bern-Barcelona dataset and achieved excellent results. Bizopoulos et al. introduced two ResNet and DenseNet architectures to diagnose epileptic seizures and achieved good results.

[0006] RNN-based models are usually used to process sequence data and are widely used in natural language processing and machine translation. Long short-term memory network (LSTM) is a variant of RNN. By introducing a gating mechanism, LSTM effectively solves the gradient vanishing problem of traditional RNN models and is suitable for processing long-term dependencies. Abbasi et al. established a two-layer LSTM for epileptic seizure detection. Manohar et al. used short-time Fourier transform to preprocess EEG signals and then used bidirectional LSTM for epileptic seizure detection.

[0007] In recent years, researchers have tried to take advantage of the advantages of CNN and RNN models. Many hybrid models have been developed. Xu et al. proposed a 1D CNN-LSTM model to identify epileptic seizures, which improved the F1-score by 5% over the CNN model. Liu et al. proposed an epilepsy detection method combining CNN and Bi-LSTM, which performed better than four CNN variants and one LSTM model.

[0008] Despite the progress made in automated epilepsy testing, existing solutions still have limitations. First, most existing methods require complex preprocessing of EEG data, such as removing useless electrodes, using a 40 Hz low-pass bandpass filter to remove burrs in the waveform, a 0.1 Hz high-pass filter to make the waveform smoother, segmentation and baseline correction, etc., which require a lot of signal processing work and cannot be automated and efficient; after that, a lot of feature engineering is required, such as Fourier transform to turn difficult-to-process signals into easy-to-analyze frequency domain signals, and then perform time domain feature extraction and frequency domain feature extraction on this basis. Common EEG time domain techniques include autoregressive modeling, fractal dimension based on Higuchi algorithm, statistical features, and detrended fluctuation analysis. Common EEG frequency domain techniques include Fourier transform (FT), power spectral density (PSD), band power (BP), Hilbert-Huang transform (HHT), and finally the extracted features are standardized before being used for prediction.

[0009] In fact, EEG signals are nonlinear time series. CNN-based methods are good at extracting local features. They have good feature extraction performance for non-stationary and noisy signals, but have some difficulties in capturing the global correlation of time series data. Long short-term memory (LSTM) is a variant of recurrent neural network, which is usually used to process nonlinear features of time series, such as EEG. It takes into account the long-term dependency of time series, but ignores local spatial information. The existing method of integrating CNN model and RNN model is basically serial processing, that is, the EEG features processed by CNN are input into the RNN network and finally used for prediction. The main problems of this method include: 1. Information loss: In the serial processing process, CNN first extracts spatial information and then inputs it into LSTM for time series processing. This processing method may lead to information loss, because CNN may not be able to capture some subtle changes related to time series information, and LSTM may not be able to utilize all spatial information, which may lead to insufficient information coupling between the two networks and inability to fully utilize each other's feature representation capabilities; at the same time, the serial structure makes the model architecture inflexible, and it is difficult to adjust the model structure to adapt to different data features or task requirements. At the same time, the mutual influence of the number of layers of CNN and LSTM may lead to problems such as gradient explosion or disappearance. For example, when the features extracted by CNN contain a lot of information, and the LSTM network is shallow, the problem of gradient disappearance may occur during back propagation. This will make it difficult for the model to converge or fail to learn effective time series feature representation.

[0010] First, traditional epilepsy diagnosis requires professional readers to spend a lot of time to annotate, and the reading process is relatively subjective and lacks a unified standard, so it is necessary to introduce computer methods for reading and diagnosing. However, for existing computer epilepsy detection tools, the authors usually do not provide enough detailed and complete information to reproduce the results, the data is not available, the code has not been shared, and the baseline model used to compare model performance either does not exist or is not available. Secondly, the three existing computing methods all have certain deficiencies and defects: the convolutional neural network (CNN) method cannot capture the global information of EEG signals as continuous time series data. At the same time, EEG data fragments are often long-range multi-channel, that is, they contain rich spatial and temporal information. Simple convolution blocks can only use fixed small-size kernels to fuse spatial and channel information at the same time, and the feature map does not have discrimination; the recurrent neural network (RNN) method cannot capture the spatial characteristics of EEG as a medical image; the CNN-LSTM hybrid method processes EEG data serially to capture spatial correlation and temporal dependence, which will cause information loss. At the same time, due to the serial structure, the architecture is not flexible enough. The feature dimension extracted by CNN is fixed, which means that the subsequent LSTM can only determine the hyperparameters according to the CNN output. It is difficult to flexibly adjust the structure of the model to adapt to different data characteristics or task requirements, which limits the performance and applicability of the model. Summary of the invention

[0011] In view of the defects in the prior art, the purpose of the present invention is to provide a method and system for detecting and automatically labeling epileptic seizures based on EEG data.

[0012] The method for detecting and automatically labeling epileptic seizures based on EEG data provided by the present invention includes:

[0013] Step 1: Obtain EEG records with the possibility of epileptic seizures and perform preprocessing;

[0014] The preprocessing includes: preliminary screening according to expert opinions; generating bipolar montage, rearranging the signals in different EDF files to the same order; downsampling the data; dividing the EEG into EEG segments according to different time window sizes and block numbers for evaluation, taking non-overlapping EEG segments as positive samples, and taking EEG segments of the same size and number from the EEG marked as non-seizure as negative samples;

[0015] Step 2: Build a deep learning-based SC-LSTM model, including two parallel feature extraction modules and one classification module, for feature extraction, feature selection fusion and epilepsy detection and classification of epileptic EEG;

[0016] The frequency-reduced EEG data is used as input. In the first feature extraction module, a three-layer 2D convolution block is used as the basic architecture, and two types of spatial and channel reconstruction convolutions SCConv are inserted to extract the spatial and channel features of the EEG data.

[0017] The bidirectional long short-term memory network BiLSTM is used in parallel to extract the temporal features of the original data. The Flatten layer is used to unify the extracted spatial and channel features of the EEG data and the temporal features of the original data into a one-dimensional feature vector, and a horizontal connection operation is performed as the final feature representation.

[0018] The classification module consists of three fully connected layers, and the sigmoid activation function is used to make the output between (0, 1).

[0019] Preferably, the EEG feature space information is extracted by using the SCConv neural network, specifically:

[0020] The spatial features of EEG data are extracted based on three two-dimensional convolution blocks. The two-dimensional convolution layer performs convolution operation on the input image by sliding a small matrix called convolution kernel or filter to extract the required feature information. In the two-dimensional convolution layer, the convolution kernel is a two-dimensional matrix, which is multiplied and summed element by element with the input image to obtain the output feature map. The calculation formula is as follows:

[0021]

[0022] Among them, out represents the output of the convolution operation, N represents the batch size, and N i represents the i-th batch, C represents the number of channels, represents the jth output channel, represents the output of the convolution calculation of the jth channel in the i-th batch, bias represents a learnable bias value, represents the offset of the jth channel, C in Represents the number of input channels, k is a counting symbol from 0 to C in-1 , weight represents the convolution kernel weight value, represents the convolution kernel weight of the feature map of the kth input channel using the jth convolution block, ★ represents the 2D cross-correlation operation, input represents the input feature map, input(N i ,k) represents the feature map of the kth channel of the i-th batch.

[0023] Preferably, a self-correction convolution block is introduced between the first two-dimensional convolution block and the second two-dimensional convolution block to expand the convolution receptive field through intrinsic feature communication, thereby enhancing the diversity of output features;

[0024] Given a set of shape (C, C, kh , k w ) of the convolution kernel K, where k h and k w are the spatial height and width respectively, C represents the number of channels; it is uniformly divided into four parts, each part is responsible for different functions, assuming that C can be divided by 2, and the convolution kernel set is divided into four parts of the convolution kernel, Indicates that the shape of each part of the convolution kernel is

[0025] The workflow of the self-correcting convolution block is as follows: first, the input X is evenly divided into two parts {X1, X2}, and then these two inputs are sent to a feature processing path to collect different types of context information. In the first path, X1 is self-calibrated using {K1, K2, K3} to obtain Y1; in the second path, the convolution operation is performed: This operation aims to preserve the original spatial context; the two intermediate outputs {Y1, Y2} are then concatenated together as the output Y;

[0026] For X1, the average pooling with a filter size of r×r and a step size of r is used to obtain the intermediate feature T1, which is expressed as:

[0027] T1=AvgPool r (X1)

[0028] Then, K2 is used to transform the features of T1 to obtain the intermediate feature X′1, which is expressed as:

[0029]

[0030] Among them, Up() is a bilinear interpolation operator that maps the intermediate reference from the small-scale space to the original feature space;

[0031] The calibration operation is described as follows:

[0032]

[0033] in, σ is the sigmoid function, and the symbol · represents element-by-element multiplication; X′1 is then used as the residual to form the weights for calibration, and the final output after calibration is:

[0034]

[0035] For X2, use K2 to perform feature transformation to obtain Y2, the expression is:

[0036]

[0037] in, It is a convolution operation. After obtaining Y1 and Y2, they are concatenated according to the channel to obtain the final output Y of the self-correction convolution block.

[0038] A spatial and channel reconstruction convolution block is introduced between the second 2D convolution block and the third 2D convolution block, which includes two core units, namely the spatial reconstruction unit SRU and the channel reconstruction unit CRU. The SRU reduces spatial redundancy by the separation-reconstruction method, and the CRU uses the segmentation-conversion-fusion method to reduce channel redundancy.

[0039] Separation operation: The purpose is to separate the feature maps with rich information from the feature maps with less information corresponding to the spatial content, and use the scaling factor in the group normalization layer GN to evaluate the information content of different feature maps. Specifically, given an intermediate feature map Among them, N is the batch axis, C is the channel axis, H and W are the spatial height and width axes; first, the input feature X is standardized by subtracting the mean μ and dividing by the standard deviation σ, the expression is:

[0040]

[0041] where μ and σ are the mean and standard deviation of X, ε is a small positive constant added for division stability, and γ and β are trainable affine transformations; using the trainable parameter γ∈R in the GN layer C As a measure of the spatial pixel variance for each batch and channel; normalize the correlation weight W γ ∈R C It is obtained from the following formula, which indicates the importance of different feature maps:

[0042]

[0043] Then W γ The weights of the re-weighted feature map are mapped to the range (0, 1) by the sigmoid function and gated by the threshold; the weights above the threshold are set to 1 to obtain the informative weight W1, and set to 0 to obtain the non-informative weight W2; the whole process of obtaining W is expressed as:

[0044] W=Gate(Sigmoid(W γ (GN(X))))

[0045] Finally, multiply the input feature X by W1 and W2 respectively to obtain two weighted features: and small amount of information Thus the input features are divided into two parts: Informative and expressive spatial content, Has little or no information and is considered redundant;

[0046] Reconstruction operation: Add features with rich information to features with less information to generate features with richer information, thereby saving space; this operation uses a cross-reconstruction operation to fully combine the two weighted different information features, strengthen the information flow between them, and then cross-reconstruct the features and Splice to get the spatial fine feature map X w ;

[0047] Segmentation operation: For the spatial fine feature X w First, X w The channels of the feature map are divided into αC channels and (1-α)C channels, where 0<α<1 is the segmentation ratio. Subsequently, 1×1 convolution is used to compress the channels of the feature map to improve the computational efficiency. A squeezing ratio r is introduced to control the feature channel. After the segmentation and squeezing operations, the spatial fine feature X w Divided into upper X up and lower X low ;

[0048] Conversion operation: X up is input to the upper transformation stage as a rich feature extractor; in the same X up A k×k grouped convolution operation and a 1×1 point-by-point convolution operation are performed on the , and then the outputs are aggregated to form a combined representative feature map Y1, which is expressed as:

[0049]

[0050] Among them, M G , is the learnable weight matrix for group convolution and point-by-point convolution; X up , Y1 are the upper input and output feature maps respectively;

[0051] X low is input to the lower transformation stage, applying 1×1 element-wise convolution operation to generate feature maps with shallow hidden details as a complement to the rich feature extractor; in addition, reuse X low features to obtain more feature mappings; finally, the generated and reused features are connected to form the output of the lower stage Y2, expressed as:

[0052]

[0053] in, is the learnable weight matrix of element-wise convolution, ∪ represents the connection operation, X low and Y2 are the input and output feature maps of the lower layer respectively;

[0054] Fusion operation: The simplified SKNet method is used to adaptively merge the output features Y1 and Y2 of the up-conversion and down-conversion stages. First, the global average pooling method Pooling is used to collect global spatial information and generate channel statistics S m , the expression is:

[0055]

[0056] The global channel descriptors S1 and S2 of the upper and lower layers are stacked together, and the channel attention operation is used to generate the feature importance vectors β1, β2, expressed as:

[0057]

[0058] Finally, under the guidance of the feature importance vectors β1, β2, the channel reconstruction feature Y is obtained by merging the upper-layer feature Y1 and the lower-layer feature Y2 by channel, and the expression is:

[0059] Y=β1Y1+β2Y2.

[0060] Preferably, the EEG feature time series information is extracted through a bidirectional long short-term memory network BiLSTM, specifically:

[0061] BiLSTM considers both the forward and reverse information of sequence data at the same time, thus more comprehensively understanding the context and semantic relationship in the sequence. It consists of two LSTMs, one responsible for transferring information from the start position to the end position of the sequence, and the other responsible for transferring information from the end position to the start position. The information from these two directions is then fused to obtain a more comprehensive and accurate sequence representation.

[0062] The key technology LSTM in BiLSTM includes the input word x at time t t , cell state C t , temporary cell state Hidden layer state h t , forget gate f t 、Memory Gate t , and the output gate o t ; The calculation process of LSTM at time t is: first, according to the hidden layer state h at time t-1 t-1 and the current input x t , using a sigmoid layer to process and decide what information to discard. This layer is called the forget gate layer. The next step is to determine the new information to be stored in the cell state. This is divided into two parts. First, the sigmoid layer, called the input gate layer, determines the value to be updated. Next, the tanh layer creates a vector of new candidate values. Add to the state; next, the old cell state C t-1Update to the new cell state C t ; Finally, based on the new cell state, output the hidden layer state h at the current time t t ; The expression is:

[0063] f t =σ(W f ·[h t-1 , x t ]+b f )

[0064] i t =σ(W i ·[h t-1 , x t ]+b i )

[0065]

[0066]

[0067] o t =σ(W o [h t-1 , x t ]+b o )

[0068] h t =o t *tanh(C t )

[0069] Among them, W f , W i , W C , W o Represents the feature transformation matrix. Different subscripts represent different feature processing layers. The features processed by BiLSTM are used as the temporal feature representation of EEG data.

[0070] Preferably, the EEG spatial information and temporal information extracted by the SCConv neural network and BiLSTM are horizontally spliced ​​as the final representation, and then three fully connected layers and sigmoid activation functions are used as classifiers. The number of neurons in the three fully connected layers is 256, 128, and 1 respectively; the Sigmoid activation function is used to limit the range of the output x to between (0, 1), and the expression is:

[0071]

[0072] The calculation formula of the fully connected layer is:

[0073] y=xA T +b

[0074] Among them, y is the output of the fully connected layer, x represents the input, and A T represents the transpose of the learnable weight A of the fully connected layer, and b represents the learnable bias value.

[0075] The system for detecting and automatically labeling epileptic seizures based on EEG data provided by the present invention comprises:

[0076] Module M1: Obtain EEG records with the possibility of epileptic seizures and perform preprocessing;

[0077] The preprocessing includes: preliminary screening according to expert opinions; generating bipolar montage, rearranging the signals in different EDF files to the same order; downsampling the data; dividing the EEG into EEG segments according to different time window sizes and block numbers for evaluation, taking non-overlapping EEG segments as positive samples, and taking EEG segments of the same size and number from the EEG marked as non-seizure as negative samples;

[0078] Module M2: Build a deep learning-based SC-LSTM model, including two parallel feature extraction modules and one classification module, for feature extraction, feature selection fusion and epilepsy detection and classification of epileptic EEG;

[0079] The frequency-reduced EEG data is used as input. In the first feature extraction module, a three-layer 2D convolution block is used as the basic architecture, and two types of spatial and channel reconstruction convolutions SCConv are inserted to extract the spatial and channel features of the EEG data.

[0080] The bidirectional long short-term memory network BiLSTM is used in parallel to extract the temporal features of the original data. The Flatten layer is used to unify the extracted spatial and channel features of the EEG data and the temporal features of the original data into a one-dimensional feature vector, and a horizontal connection operation is performed as the final feature representation.

[0081] The classification module consists of three fully connected layers, and the sigmoid activation function is used to make the output between (0, 1).

[0082] Preferably, the EEG feature space information is extracted by using the SCConv neural network, specifically:

[0083] The spatial features of EEG data are extracted based on three two-dimensional convolution blocks. The two-dimensional convolution layer performs convolution operation on the input image by sliding a small matrix called convolution kernel or filter to extract the required feature information. In the two-dimensional convolution layer, the convolution kernel is a two-dimensional matrix, which is multiplied and summed element by element with the input image to obtain the output feature map. The calculation formula is as follows:

[0084]

[0085] Among them, out represents the output of the convolution operation, N represents the batch size, and N i represents the i-th batch, C represents the number of channels, represents the jth output channel, represents the output of the convolution calculation of the jth channel in the i-th batch, bias represents a learnable bias value, represents the offset of the jth channel, C in Represents the number of input channels, k is a counting symbol from 0 to C in-1 , weight represents the convolution kernel weight value, represents the convolution kernel weight of the feature map of the kth input channel using the jth convolution block, ★ represents the 2D cross-correlation operation, input represents the input feature map, input(N j , k) represents the feature map of the kth channel of the ith batch.

[0086] Preferably, a self-correction convolution block is introduced between the first two-dimensional convolution block and the second two-dimensional convolution block to expand the convolution receptive field through intrinsic feature communication, thereby enhancing the diversity of output features;

[0087] Given a set of shape (C, C, k h , k w ) of the convolution kernel K, where k h and k w are the spatial height and width respectively, C represents the number of channels; it is uniformly divided into four parts, each part is responsible for different functions, assuming that C can be divided by 2, and the convolution kernel set is divided into four parts of the convolution kernel, Indicates that the shape of each part of the convolution kernel is

[0088] The workflow of the self-correcting convolution block is as follows: first, the input X is evenly divided into two parts {X1, X2}, and then these two inputs are sent to a feature processing path to collect different types of context information. In the first path, X1 is self-calibrated using {K1, K2, K3} to obtain Y1; in the second path, the convolution operation is performed: This operation aims to preserve the original spatial context; the two intermediate outputs {Y1, Y2} are then concatenated together as the output Y;

[0089] For X1, the average pooling with a filter size of r×r and a step size of r is used to obtain the intermediate feature T1, which is expressed as:

[0090] T1=AvgPool r (X1)

[0091] Then, K2 is used to transform the features of T1 to obtain the intermediate feature X′1, which is expressed as:

[0092]

[0093] Among them, Up() is a bilinear interpolation operator that maps the intermediate reference from the small-scale space to the original feature space;

[0094] The calibration operation is described as follows:

[0095]

[0096] in, σ is the sigmoid function, and the symbol · represents element-by-element multiplication; X′1 is then used as the residual to form the weights for calibration, and the final output after calibration is:

[0097]

[0098] For X2, use K2 to perform feature transformation to obtain Y2, the expression is:

[0099]

[0100] in, It is a convolution operation. After obtaining Y1 and Y2, they are concatenated according to the channel to obtain the final output Y of the self-correction convolution block.

[0101] A spatial and channel reconstruction convolution block is introduced between the second 2D convolution block and the third 2D convolution block, which includes two core units, namely the spatial reconstruction unit SRU and the channel reconstruction unit CRU. The SRU reduces spatial redundancy by the separation-reconstruction method, and the CRU uses the segmentation-conversion-fusion method to reduce channel redundancy.

[0102] Separation operation: The purpose is to separate the feature maps with rich information from the feature maps with less information corresponding to the spatial content, and use the scaling factor in the group normalization layer GN to evaluate the information content of different feature maps. Specifically, given an intermediate feature map Among them, N is the batch axis, C is the channel axis, H and W are the spatial height and width axes; first, the input feature X is standardized by subtracting the mean μ and dividing by the standard deviation σ, the expression is:

[0103]

[0104] where μ and σ are the mean and standard deviation of X, ε is a small positive constant added for division stability, and γ and β are trainable affine transformations; using the trainable parameter γ∈R in the GN layer C As a measure of the spatial pixel variance for each batch and channel; normalize the correlation weight W γ ∈R CIt is obtained from the following formula, which indicates the importance of different feature maps:

[0105]

[0106] Then W γ The weights of the re-weighted feature map are mapped to the range (0, 1) by the sigmoid function and gated by the threshold; the weights above the threshold are set to 1 to obtain the informative weight W1, and set to 0 to obtain the non-informative weight W2; the whole process of obtaining W is expressed as:

[0107] W=Gate(Sigmoid(W y (GN(X))))

[0108] Finally, multiply the input feature X by W1 and W2 respectively to obtain two weighted features: and small amount of information Thus the input features are divided into two parts: Informative and expressive spatial content, Has little or no information and is considered redundant;

[0109] Reconstruction operation: Add features with rich information to features with less information to generate features with richer information, thereby saving space; this operation uses a cross-reconstruction operation to fully combine the two weighted different information features, strengthen the information flow between them, and then cross-reconstruct the features and Splice to get the spatial fine feature map X w ;

[0110] Segmentation operation: For the spatial fine feature X w First, X w The channels of the feature map are divided into αC channels and (1-α)C channels, where 0<α<1 is the segmentation ratio. Subsequently, 1×1 convolution is used to compress the channels of the feature map to improve the computational efficiency. A squeezing ratio r is introduced to control the feature channel. After the segmentation and squeezing operations, the spatial fine feature X w Divided into upper X up and lower X low ;

[0111] Conversion operation: X up is input to the upper transformation stage as a rich feature extractor; in the same X up A k×k grouped convolution operation and a 1×1 point-by-point convolution operation are performed on the , and then the outputs are aggregated to form a combined representative feature map Y1, which is expressed as:

[0112]

[0113] Among them, M G , is the learnable weight matrix for group convolution and point-by-point convolution; X up , Y1 are the upper input and output feature maps respectively;

[0114] X low is input to the lower transformation stage, applying 1×1 element-wise convolution operation to generate feature maps with shallow hidden details as a complement to the rich feature extractor; in addition, reuse X low features to obtain more feature mappings; finally, the generated and reused features are connected to form the output of the lower stage Y2, expressed as:

[0115]

[0116] in, is the learnable weight matrix of element-wise convolution, ∪ represents the connection operation, X low and Y2 are the input and output feature maps of the lower layer respectively;

[0117] Fusion operation: The simplified SKNet method is used to adaptively merge the output features Y1 and Y2 of the up-conversion and down-conversion stages. First, the global average pooling method Pooling is used to collect global spatial information and generate channel statistics S m , the expression is:

[0118]

[0119] The global channel descriptors S1 and S2 of the upper and lower layers are stacked together, and the channel attention operation is used to generate the feature importance vectors β1, β2, expressed as:

[0120]

[0121] Finally, under the guidance of the feature importance vectors β1, β2, the channel reconstruction feature Y is obtained by merging the upper-layer feature Y1 and the lower-layer feature Y2 by channel, and the expression is:

[0122] Y=β1Y1+β2Y2.

[0123] Preferably, the EEG feature time series information is extracted through a bidirectional long short-term memory network BiLSTM, specifically:

[0124] BiLSTM considers both the forward and reverse information of sequence data at the same time, thus more comprehensively understanding the context and semantic relationship in the sequence. It consists of two LSTMs, one responsible for transferring information from the start position to the end position of the sequence, and the other responsible for transferring information from the end position to the start position. The information from these two directions is then fused to obtain a more comprehensive and accurate sequence representation.

[0125] The key technology LSTM in BiLSTM includes the input word x at time t t , cell state C t , temporary cell state Hidden layer state h t , forget gate f t 、Memory Gate t , and the output gate o t ; The calculation process of LSTM at time t is: first, according to the hidden layer state h at time t-1 t-1 and the current input x t , using a sigmoid layer to process and decide what information to discard. This layer is called the forget gate layer. The next step is to determine the new information to be stored in the cell state. This is divided into two parts. First, the sigmoid layer, called the input gate layer, determines the value to be updated. Next, the tanh layer creates a vector of new candidate values. Add to the state; next, the old cell state C t-1 Update to the new cell state C t ; Finally, based on the new cell state, output the hidden layer state h at the current time t t ; The expression is:

[0126] f t =σ(W f ·[h t-1 , x t ]+b f )

[0127] i t =σ(W i ·[h t-1 , x t ]+b i )

[0128]

[0129]

[0130] o t =σ(W o [h t-1 , x t ]+b o )

[0131] h t =o t *tanh(C t )

[0132] Among them, W f , W i , W C , W o Represents the feature transformation matrix. Different subscripts represent different feature processing layers. The features processed by BiLSTM are used as the temporal feature representation of EEG data.

[0133] Preferably, the EEG spatial information and temporal information extracted by the SCConv neural network and BiLSTM are horizontally spliced ​​as the final representation, and then three fully connected layers and sigmoid activation functions are used as classifiers. The number of neurons in the three fully connected layers is 256, 128, and 1 respectively; the Sigmoid activation function is used to limit the range of the output x to between (0, 1), and the expression is:

[0134]

[0135] The calculation formula of the fully connected layer is:

[0136] y=xA T +b

[0137] Among them, y is the output of the fully connected layer, x represents the input, and A T represents the transpose of the learnable weight A of the fully connected layer, and b represents the learnable bias value.

[0138] Compared with the prior art, the present invention has the following beneficial effects:

[0139] (1) The present invention develops an epileptic seizure detection framework SC-LSTM and tests its usability on a real neonatal EEG dataset; provides source code and output information, as well as detailed instructions on how to use the tool; the SC-LSTM hybrid model uses a parallel feature processing architecture of convolutional neural networks and their variants and recurrent neural networks and their variants, which not only improves the two methods' ability to capture spatial information and temporal information of EEG data, but also reduces information loss by parallel processing, fully integrates multi-dimensional information, forms a feature map that is easier to distinguish, and makes the architecture more flexible and applicable to different conditions and tasks;

[0140] (2) The BiLSTM used in the present invention can more comprehensively understand the context and semantic relationship in the sequence by simultaneously considering the forward and reverse information of the sequence data. This bidirectional information transmission mechanism enables BiLSTM to perform well in fields such as natural language processing, speech recognition, and time series prediction. In particular, when processing long texts, long speech, or long sequence data, it can better capture local and global information in the sequence, thereby improving the performance and effect of the model;

[0141] (3) The deep learning technology used in the present invention can automatically capture effective features from EEG signals and realize end-to-end epileptic seizure detection. Applying deep learning technology to epileptic seizure detection can reduce the workload of neurologists, promote work efficiency, and improve detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0142] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0143] Figure 1 Schematic diagram of electrode positions for the international 10-20 system for EEG recording;

[0144] Fig. 2 is a schematic diagram of downsampling;

[0145] Figure 3 Schematic diagram of EEG data division;

[0146] Figure 4 This is the SC-LSTM hybrid network architecture diagram;

[0147] Figure 5 This is the SCConv neural network architecture diagram;

[0148] Figure 6 This is the LSTM architecture diagram;

[0149] Figure 7 This is the experimental result graph when the expert is A, the window size is 5, and the block size is 5;

[0150] Figure 8 This is the experimental result graph when the expert is A, the window size is 5, and the block size is 5;

[0151] Fig. 9 The AUC results obtained under different window sizes and block numbers. DETAILED DESCRIPTION

[0152] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0153] Example

[0154] The present invention provides a method for detecting and automatically labeling epileptic seizures based on EEG data, comprising the following steps:

[0155] 1. Dataset (public dataset) and preprocessing

[0156] The EEG recordings in the cohort were obtained from the neonatal EEG archives of the Helsinki University Hospital and were performed on demand by the clinical team because there was suspicion of epileptic seizures. The recordings were performed between 2010 and 2014 and involved admission of most infants to the neonatal intensive care unit. Each EEG recording lasted approximately one hour, with a median recording duration of 74 minutes (IQR: 64 to 96 minutes). The recordings were made using a NicOne EEG amplifier from Natus, USA, with a sampling frequency of 256 Hz and equipped with an EEG cap and sintered Ag / AgCl electrodes from ANT-Neuro, Germany. Figure 1 The 19 electrodes on the cap were laid out according to the international 10-20 positioning standard, and bipolar montages were generated for annotation, including various recording references such as Fp2-F4, F4-C4, C4-P4, etc. The EEG files were de-identified and randomized, and then annotated for epileptic seizures by three experienced experts using Nicolet Reader software from Natus. The annotations included the onset and duration of each epileptic seizure and were exported to a text file with a resolution of one second.

[0157] Dataset preprocessing: By analyzing the data of each expert (A, B or C) separately, it was found that the EEG records of 40 newborns were annotated as epileptic seizures (EXP3) by all 3 experts, 22 newborns did not have epileptic seizures (EXP0), and the EEG records of 17 newborns were excluded from the analysis due to inconsistent expert opinions. Then, a bipolar montage was generated according to the instructions in the "Input Data" section, and the signals in different EDF files were rearranged to the same order. The third step is to downsample the data, reducing the sampling frequency of the EEG record from 256Hz to 64Hz, reducing the data volume and computational cost, and making the EEG waveform smoother, as shown in Figure 2.

[0158] Finally, in order to comprehensively evaluate the superiority of the model under various data conditions, the EEG is divided into EEG segments according to different time window sizes and numbers of blocks for evaluation, such as Figure 3 For example, the time window value is 2s and the number of blocks is 3, which means that 3 non-overlapping EEG segments with a size of 2s are taken from an epileptic seizure segment as positive samples, and the same size and number of EEG segments are taken from the EEG marked as no seizure as negative samples.

[0159] 2. SC-LSTM hybrid network (current actual implementation method)

[0160] In order to solve the problems of the existing computing methods mentioned above, we built a deep learning-based SC-LSTM framework for feature extraction, feature selection fusion and epilepsy detection and classification of epileptic EEG. Figure 4 As shown in the figure, the proposed model mainly consists of three parts: two parallel feature extraction modules and the final classification module. First, the EEG data that has been simply preprocessed (frequency reduction) is used as input. In the first feature extraction module, a 3-layer 2D convolution block is used as the basic architecture (2D-CNN), and two SCConvs are inserted to effectively extract the spatial and channel features of the EEG data. However, as nonlinear continuous time series data, EEG data contains rich specific pattern information that CNN cannot effectively learn. Therefore, we use a bidirectional long short-term memory network (BiLSTM) in parallel to extract the time series features of the original data. Since the feature dimensions extracted by the two modules do not match (4 dimensions after 2D convolution processing and 3 dimensions after BiLSTM processing), we use the Flatten layer to convert both into one-dimensional feature vectors and perform a lateral connection operation as the final feature representation. The classification module consists of 3 fully connected layers, and finally a sigmoid activation function is used to make the output between (0, 1).

[0161] A. SCConv neural network extracts EEG feature space information (current actual implementation method)

[0162] The spatial features of EEG data are extracted based on three two-dimensional convolution blocks (2D CNN). The two-dimensional convolution layer performs convolution operations on the input image by sliding a small matrix called a convolution kernel or filter to extract specific feature information. In the two-dimensional convolution layer, the convolution kernel is a two-dimensional matrix, which is multiplied and summed element by element with the input image to obtain the output feature map. The main calculation formula is as follows:

[0163]

[0164] Among them, out represents the output of the convolution operation, N represents the batch size, and N i represents the i-th batch, C represents the number of channels, represents the jth output channel, represents the output of the convolution calculation of the jth channel in the i-th batch, bias represents a learnable bias value, represents the offset of the jth channel, C in Represents the number of input channels, k is a counting symbol from 0 to C in-1 , weight represents the convolution kernel weight value, represents the convolution kernel weight of the feature map of the kth input channel using the jth convolution block, ★ represents the 2D cross-correlation operation, input represents the input feature map, input(N i , k) represents the feature map of the kth channel of the ith batch.

[0165] However, the output features of 2D convolutional neural networks are greatly restricted by the receptive field, and the learned feature patterns are similar, resulting in insufficient recognition information for EEG epilepsy features. Therefore, a self-calibrated convolution block (Self-Calibrated Convolutions) is introduced between the first and second 2D convolution blocks, aiming to expand the convolution receptive field through intrinsic feature communication, thereby enhancing the diversity of output features. Unlike standard convolutions, the self-calibrated convolution module can adaptively build long-range spatial and channel correlations instead of simply fusing the spatial and channel information of small-sized kernels. This feature of SCConv helps convolutional neural networks generate more discriminative EEG epilepsy feature representations because they carry richer information.

[0166] The workflow of the self-corrected convolutional block is as follows: given a set of shapes (C, C, k h , k w ) of the convolution kernel K, where k h and k w are the spatial height and width respectively, and C represents the number of channels. First, it is uniformly divided into four parts, each responsible for different functions. Without loss of generality, assuming that C is divisible by 2, the convolution kernel set is divided into four parts of the convolution kernel, using Indicates that the shape of each part of the convolution kernel is The workflow of the self-correction convolution block can be simply described as follows: First, the input X is evenly divided into two parts {X1, X2}, and then the two inputs are sent to a feature processing path to collect different types of context information. In the first path, X1 is self-calibrated using {K1, K2, K3} to obtain Y1. In the second path, we perform a simple convolution operation: This operation aims to preserve the original spatial context. The two intermediate outputs {Y1, Y2} are then concatenated together as the output Y. The specific calculation formula and process are as follows, and the symbols appearing in the formula are as described above:

[0167] Given an input X, split it into X1 and X2 according to the channel. For X1, an average pooling with a filter size of r×r and a step size of r is used to obtain the intermediate feature T1, as shown below:

[0168] T1=AvgPool r (X1)

[0169] Then use K2 to transform the features of T1 to obtain the intermediate feature X′1. The calculation process is as follows:

[0170]

[0171] Among them, Up() is a bilinear interpolation operator that maps the intermediate reference from the small-scale space to the original feature space. Now, the calibration operation can be expressed as follows:

[0172]

[0173] in σ is the sigmoid function, and the symbol · represents element-by-element multiplication. Then X′1 is used as the residual to form the weights for calibration, and the final output after calibration is:

[0174]

[0175] For X2, use K2 to perform feature transformation to obtain Y2, which is calculated as follows:

[0176]

[0177] in

[0178] After obtaining Y1 and Y2, they are concatenated according to the channel to obtain the final output Y of the self-correction convolution block.

[0179] In addition, since EEG data contains a lot of noise (such as EEG artifacts, electrode position differences, etc.), it is easy to cause the convolution layer to extract redundant features during model learning. Therefore, we introduced the spatial and channel reconstruction convolution block (Spatial and Channel reconstruction Convolution) between the second and third two-dimensional convolution blocks, which includes two core units SRU (Spatial Reconstruction Unit) and CRU (Channel Reconstruction Unit). SRU uses the separation-reconstruction method to reduce spatial redundancy, while CRU uses the segmentation-conversion-fusion method to reduce channel redundancy. These two units work together to reduce the redundant information of features in CNN and reduce computational costs.

[0180] The spatial reconstruction unit (SRU) utilizes separation and reconstruction operations. The separation operation aims to separate the feature maps with rich information from the feature maps with less information corresponding to the spatial content. The information content of different feature maps is evaluated using the scaling factor in the group normalization (GN) layer. Specifically, given an intermediate feature map Where N is the batch axis, C is the channel axis, and H and W are the spatial height and width axes. First, the input feature X is standardized by subtracting the mean μ and dividing by the standard deviation σ, as follows:

[0181]

[0182] Where μ and σ are the mean and standard deviation of X, e is a small positive constant added for division stability, and γ and β are trainable affine transformations. Using the trainable parameters γ∈R in the GN layer C As a method to measure the spatial pixel variance of each batch and channel. Richer spatial information reflects more changes in spatial pixels, and the γ value is therefore larger. The normalized correlation weight W γ ∈R C It is obtained from the following formula, which indicates the importance of different feature maps:

[0183]

[0184] Then W γ The weights of the reweighted feature map are mapped to the (0, 1) range through the sigmoid function and gated by the threshold. We set the weights above the threshold to 1 to obtain the informative weight W1, and set it to 0 to obtain the non-informative weight W2 (the threshold is set to 0.5 in the experiment). The whole process of obtaining W can be expressed as:

[0185] W=Gate(Sigmoid(W γ (GN(X))))

[0186] Finally, multiply the input feature X by W1 and W2 respectively to obtain two weighted features: and small amount of information Thus, the input features are successfully divided into two parts: Informative and expressive spatial content, while Has little or no information and is considered redundant.

[0187] In order to reduce spatial redundancy, a reconstruction operation is further used to add the information-rich features to the less informative features to generate more informative features, thereby saving space. This operation does not directly add the two parts, but uses a cross-reconstruction operation to fully combine the two weighted different information features and strengthen the information flow between them. Then the cross-reconstructed features are and Splice to get the spatial fine feature map X w The specific operation process is as follows:

[0188]

[0189] in, is element-wise multiplication, is the sum of element-wise multiplication, and ∪ is the concatenation. After applying SRU to the input feature X, not only the informative features are separated from the less informative features, but also they are reconstructed, the representative features are enhanced, and the redundant features in the spatial dimension are suppressed. However, the spatially refined feature map Xw is still redundant in the channel dimension.

[0190] In order to further exploit the channel redundancy of features, the channel reconstruction unit (CRU) is introduced, which adopts a split-convert-fusion strategy. Usually, multiple standard k×k convolutions are used to extract features, where k is the convolution kernel size, resulting in some relatively redundant feature maps along the channel dimension. represents a convolution kernel with c channels and size k×k, and Denote the input and convolution output features respectively. The standard convolution operation can be defined as Y = M k X. The method to reduce channel redundancy is to replace the above standard convolution with CRU, which is achieved through three operations - segmentation, conversion and fusion.

[0191] Segmentation operation: for a given spatial fine feature First, the channels of Xw are split into αC channels and (1-α)C channels, where 0<α<1 is the split ratio. Subsequently, 1×1 convolution is further used to compress the channels of the feature map to improve computational efficiency. Here, we introduce a squeezing ratio r to control the feature channels to balance the computational cost of CRU (r=2 is a typical setting in experiments). After the splitting and squeezing operations, we convert the spatial fine features X w Divided into upper X up and lower X low .

[0192] Conversion operation: X upis input to the upper transformation stage as a "rich feature extractor". Efficient convolution operations, grouped convolution and point-wise convolution, are used to replace standard k×k convolution to extract high-level representative information and reduce computational cost. Due to sparse convolutional connections, grouped convolution reduces parameters and computation, but cuts off the information flow between channel groups. Point-wise convolution makes up for the information loss and helps information flow between functional channels. Therefore, in the same X up A k×k group convolution operation (the group size g=2 is set in the experiment) and a 1×1 point-by-point convolution operation are performed on the network. The output is then aggregated to form a combined representative feature map Y1, which can be expressed as:

[0193]

[0194] in, is the learnable weight matrix for group convolution and point-wise convolution, are the upper input and output feature maps respectively. In short, the upper transformation stage performs up The above combines group convolution and point-by-point convolution to extract rich representative features Y1 with less computational cost.

[0195] X low is input to the lower transformation stage, where a 1×1 element-wise convolution operation is applied to generate a feature map with shallow hidden details as a complement to the rich feature extractor. In addition, X is reused low The features of Y2 are obtained at no extra cost. Finally, the generated and reused features are concatenated to form the output of the next stage Y2 as follows:

[0196]

[0197] in is the learnable weight matrix of element-wise convolution, ∪ represents the connection operation, and are the input and output feature maps of the lower layer respectively. In short, the lower layer conversion stage reuses the previous feature X low , and use cheap 1×1 point-by-point convolution to obtain feature Y2 with supplementary detail information.

[0198] Fusion operation: After the conversion is completed, instead of directly connecting or adding the two types of features, the simplified SKNet method is used to adaptively merge the output features Y1 and Y2 of the up and down conversion stages. First, the global average pooling method is used to collect global spatial information and generate channel statistics. The calculation formula is:

[0199]

[0200] Next, the global channel descriptors S1 and S2 of the upper and lower layers are stacked together and a channel attention operation is used to generate a feature importance vector The calculation formula is as follows:

[0201]

[0202] Finally, under the guidance of the feature importance vectors β1, β2, the channel reconstruction feature Y can be obtained by merging the upper-layer feature Y1 and the lower-layer feature Y2 by channel. The specific operations are as follows:

[0203] Y=β1Y1+β2Y2

[0204] In short, CRU is used to further reduce the spatial refinement feature map X along the channel dimension using a split-transform-fusion strategy. w In addition, CRU extracts rich representative features through lightweight convolution operations, while handling redundant features through cheap operations and feature reuse schemes. Overall, CRU can be used alone or in combination with SRU (Spatial Refinement Unit) operations. By arranging SRU and CRU in a sequential manner, the proposed SCConv (Sequential Combination Convolution) structure is established, which is efficient and can replace the standard convolution operation.

[0205] The complete SCConv neural network architecture is as follows Figure 5 As shown in the figure, it contains 3 two-dimensional convolution blocks interspersed with self-correction convolution blocks and spatial and channel reconstruction modules. The features processed by the SCConv neural network are used as the spatial features of the EEG data.

[0206] Modules that have the same EEG spatial feature extraction capabilities as the SCConv neural network include ResNet, AlexNet, GoogleNet, DenseNet, and VGG.

[0207] B. Bidirectional long short-term memory network (BiLSTM) extracts EEG feature temporal information

[0208] In order to extract rich temporal pattern information from EEG data, we use a two-layer bidirectional long short-term memory network to process the data. BiLSTM (bidirectional long short-term memory network) has obvious advantages over traditional RNN (recurrent neural network) and unidirectional LSTM (long short-term memory network) in processing sequence data, mainly because it can more effectively capture long-term dependencies and contextual information in sequence data. Traditional RNN is prone to gradient vanishing or gradient exploding problems when facing long sequences, making it difficult to capture long-distance dependencies; and unidirectional LSTM can only transmit information in one direction and cannot fully utilize the contextual information in the sequence data.

[0209] BiLSTM can more comprehensively understand the context and semantic relationship in the sequence by considering both the forward and reverse information of the sequence data. It consists of two directional LSTMs (see the schematic diagram). Figure 6 ), one is responsible for transferring information from the start position to the end position of the sequence, and the other is responsible for transferring information from the end position to the start position, and then the information in these two directions is fused to obtain a more comprehensive and accurate sequence representation. This bidirectional information transfer mechanism enables BiLSTM to perform well in fields such as natural language processing, speech recognition, and time series prediction, especially when processing long texts, long voices, or long sequence data, it can better capture local and global information in the sequence, thereby improving the performance and effect of the model.

[0210] The key technology LSTM in BiLSTM includes the input word x at time t t , cell state C t , temporary cell state Hidden layer state h t , forget gate f t 、Memory Gate t , and the output gate o t The calculation process of LSTM at time t can be summarized as follows: First, according to the hidden layer state h at time t-1 t-1 and the current input x t , processed using a sigmoid layer to decide what information to discard, this layer is called the "forget gate layer". The next step is to decide what new information to store in the cell state. This is divided into two parts. First, a sigmoid layer called the "input gate layer" determines which values ​​will be updated. Next, a tanh layer creates a vector of new candidate values. can be added to the state. Next, the old cell state C t-1 Update to the new cell state C t Finally, based on the new cell state, the hidden layer state h at the current time t is output t .

[0211] ft =σ(W f ·[h t-1 , x t ]+b f )

[0212] E t =σ(W i ·[h t-1 , x t ]+b i )

[0213]

[0214]

[0215] o t =σ(W o [h t-1 , x t ]+b o )

[0216] h t =o t *tanh(C t )

[0217] Where W represents the feature transformation matrix, and different subscripts represent different feature processing layers. The features processed by BiLSTM are used as the temporal feature representation of EEG data.

[0218] Modules with EEG time series feature extraction capabilities that have similar functions to BiLSTM include RNN, LSTM, and GRU.

[0219] C. Epileptic Seizure Detection Classifier

[0220] The EEG spatial information and temporal information extracted by the SCConv neural network and BiLSTM are horizontally spliced ​​as the final representation, and then three layers of fully connected layers and sigmoid activation functions are used as classifiers. The number of neurons in the three fully connected layers is 256, 128, and 1 respectively. The Sigmoid activation function is used to limit the output range to (0, 1). The Sigmoid activation function is used to limit the range of the output x to (0, 1). The formula is:

[0221]

[0222] The calculation formula of the fully connected layer is:

[0223] y=xA T +b

[0224] Among them, y is the output of the fully connected layer, x represents the input, and A Trepresents the transpose of the learnable weight A of the fully connected layer, and b represents the learnable bias value.

[0225] Alternative modules for classifiers include KNN, SVM, and RF.

[0226] In order to comprehensively evaluate the superior performance of the method of the present invention in various experimental environments and application scenarios (long-term EEG, short-term EEG, different numbers, different scales), the neonatal EEG dataset of the Helsinki University Hospital was divided according to the different window sizes and block numbers mentioned above, where the window size can be [1, 2, 5, 10, 20], and the window size can be [1, 2, 5, 10, 20, 10000]. The number of blocks of 10000 indicates that the largest continuous EEG block set is selected, because there are no continuous seizure segments exceeding 10000 seconds in the data, so even when the window size is the smallest value of 1 second, the seizure segment can be completely obtained (for example, a seizure segment is 2000 seconds, when the window size is set to 1 and the number of blocks is set to 10000, 2000 positive samples will be taken from the segment, and there is no overlap between samples). Using these setting values, we generated 30 data sets for the annotation results of the three experts A, B, and C, respectively, for a total of 90 data sets.

[0227] For each data set, we performed a five-fold cross validation, which can fully utilize each sample in the data set for training and testing, effectively reducing the accidental errors introduced by unreasonable sample division, and improving the stability and reliability of model evaluation; at the same time, by evaluating the average results of multiple random divisions, the generalization ability of the model can be better reflected, thereby more accurately evaluating the performance of the model. We compared the method of the present invention with three advanced deep learning methods, including CNN, ResNet50-CBAM, and CNN-LSTM, and the evaluation indicators include ACC (accuracy), AUC (area under the ROC curve), Precision (precision), and Recall (recall rate).

[0228] Comparison results with deep learning methods under expert A’s annotations

[0229]

[0230]

[0231]

[0232]

[0233] Comparison results with deep learning methods under expert B’s annotations

[0234]

[0235]

[0236]

[0237] Comparison results with deep learning methods under expert C’s annotations

[0238]

[0239]

[0240]

[0241]

[0242] Compared with the advanced deep learning method, except that some indicators under some parameter conditions are slightly lower than a certain comparison method, such as the precision value is slightly lower than CNN when the window size is 5 and the block size is 5, the experimental results of the method of the present invention under various evaluation indicators and different parameter conditions are the best, which shows the superior performance of the method of the present invention in epilepsy detection. The experimental results when the expert is A, the window size is 5, and the block size is 5 are as follows Figure 7 and Figure 8 .

[0243] In order to further illustrate the stability and robustness of the method under various experimental conditions, we calculated the variance of the AUC results obtained by each method under different window sizes and block numbers, and visualized them using violin plots. The smaller the variance, the better the robustness and stability of the method. The results are shown in Figure 2. Fig. 9 shown.

[0244] Those skilled in the art know that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing the method and structures within the hardware component.

[0245] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A method for detecting and automatically labeling epileptic seizures based on EEG data, characterized in that: include: Step 1: Obtain EEG records with the possibility of epileptic seizures and perform preprocessing; The preprocessing includes: preliminary screening according to expert opinions; generating bipolar montage, rearranging the signals in different EDF files to the same order; downsampling the data; dividing the EEG into EEG segments according to different time window sizes and block numbers for evaluation, taking non-overlapping EEG segments as positive samples, and taking EEG segments of the same size and number from the EEG marked as non-seizure as negative samples; Step 2: Build a deep learning-based SC-LSTM model, including two parallel feature extraction modules and one classification module, for feature extraction, feature selection fusion and epilepsy detection and classification of epileptic EEG; The frequency-reduced EEG data is used as input. In the first feature extraction module, a three-layer 2D convolution block is used as the basic architecture, and two types of spatial and channel reconstruction convolutions SCConv are inserted to extract the spatial and channel features of the EEG data. The bidirectional long short-term memory network BiLSTM is used in parallel to extract the temporal features of the original data. The Flatten layer is used to unify the extracted spatial and channel features of the EEG data and the temporal features of the original data into a one-dimensional feature vector, and a horizontal connection operation is performed as the final feature representation. The classification module consists of three fully connected layers, and the sigmoid activation function is used to make the output between (0, 1).

2. The method for detecting and automatically labeling epileptic seizures based on EEG data according to claim 1, characterized in that: The EEG feature space information is extracted through the SCConv neural network, specifically: The spatial features of EEG data are extracted based on three two-dimensional convolution blocks. The two-dimensional convolution layer performs convolution operation on the input image by sliding a small matrix called convolution kernel or filter to extract the required feature information. In the two-dimensional convolution layer, the convolution kernel is a two-dimensional matrix, which is multiplied and summed element by element with the input image to obtain the output feature map. The calculation formula is as follows: Among them, out represents the output of the convolution operation, N represents the batch size, and N i represents the i-th batch, C represents the number of channels, represents the jth output channel, represents the output of the convolution calculation of the jth channel in the i-th batch, bias represents a learnable bias value, represents the offset of the jth channel, C in Represents the number of input channels, k is a counting symbol from 0 to C in-1 , weight represents the convolution kernel weight value, represents the convolution kernel weight of the feature map of the kth input channel using the jth convolution block, ★ represents the 2D cross-correlation operation, input represents the input feature map, input(N i ,k) represents the feature map of the kth channel of the i-th batch.

3. The method for detecting and automatically labeling epileptic seizures based on EEG data according to claim 2, characterized in that: A self-correction convolution block is introduced between the first 2D convolution block and the second 2D convolution block to expand the convolution receptive field through intrinsic feature communication, thereby enhancing the diversity of output features; Given a set of shape (C,C,k h ,k w ) of the convolution kernel K, where k h and k w are the spatial height and width respectively, C represents the number of channels; it is uniformly divided into four parts, each part is responsible for different functions, assuming that C can be divided by 2, and the convolution kernel set is divided into four parts of the convolution kernel, Indicates that the shape of each part of the convolution kernel is The workflow of the self-correcting convolution block is as follows: first, the input X is evenly divided into two parts {X1, X2}, and then these two inputs are sent to a feature processing path to collect different types of context information. In the first path, X1 is self-calibrated using {K1, K2, K3} to obtain Y1; in the second path, the convolution operation is performed: This operation aims to preserve the original spatial context; the two intermediate outputs {Y1,Y2} are then concatenated together as the output Y; For X1, the average pooling with a filter size of r×r and a step size of r is used to obtain the intermediate feature T1, which is expressed as: T1=AvgPool r (X1) Then use K2 to change the features of T1 to obtain the intermediate feature X ′ 1. The expression is: Among them, Up() is a bilinear interpolation operator that maps the intermediate reference from the small-scale space to the original feature space; The calibration operation is described as follows: in, σ is the sigmoid function, and the symbol · represents element-wise multiplication; then use X ′ 1 is used as the residual to form the weight for calibration. The final output after calibration is: For X2, use K2 to perform feature transformation to obtain Y2, the expression is: in, It is a convolution operation. After obtaining Y1 and Y2, they are concatenated according to the channel to obtain the final output Y of the self-correction convolution block. A spatial and channel reconstruction convolution block is introduced between the second 2D convolution block and the third 2D convolution block, which includes two core units, namely the spatial reconstruction unit SRU and the channel reconstruction unit CRU. The SRU reduces spatial redundancy by the separation-reconstruction method, and the CRU uses the segmentation-conversion-fusion method to reduce channel redundancy. Separation operation: The purpose is to separate the feature maps with rich information from the feature maps with less information corresponding to the spatial content, and use the scaling factor in the group normalization layer GN to evaluate the information content of different feature maps. Specifically, given an intermediate feature map Among them, N is the batch axis, C is the channel axis, H and W are the spatial height and width axes; first, the input feature X is standardized by subtracting the mean μ and dividing by the standard deviation σ, the expression is: where μ and σ are the mean and standard deviation of X, ε is a small positive constant added for division stability, and γ and β are trainable affine transformations; using the trainable parameter γ∈R in the GN layer C As a measure of the spatial pixel variance for each batch and channel; normalize the correlation weight W γ ∈R C It is obtained from the following formula, which indicates the importance of different feature maps: Then W γ The weights of the re-weighted feature map are mapped to the range (0,1) by the sigmoid function and gated by the threshold; the weights above the threshold are set to 1 to obtain the informative weight W1, and set to 0 to obtain the non-informative weight W2; the whole process of obtaining W is expressed as: W=Gate(Sigmoid(W γ (GN(X)))) Finally, multiply the input feature X by W1 and W2 respectively to obtain two weighted features: and small amount of information Thus the input features are divided into two parts: Informative and expressive spatial content, Has little or no information and is considered redundant; Reconstruction operation: Add features with rich information to features with less information to generate features with richer information, thereby saving space; this operation uses a cross-reconstruction operation to fully combine the two weighted different information features, strengthen the information flow between them, and then cross-reconstruct the features and Splice to get the spatial fine feature map X w ; Segmentation operation: For the spatial fine feature X w First, X w The channels of the feature map are divided into αC channels and (1-α)C channels, where 0<α<1 is the segmentation ratio. Subsequently, 1×1 convolution is used to compress the channels of the feature map to improve the computational efficiency. A squeezing ratio r is introduced to control the feature channel. After the segmentation and squeezing operations, the spatial fine feature X w Divided into upper X up and lower X low ; Conversion operation: X up is input to the upper transformation stage as a rich feature extractor; in the same X up A k×k grouped convolution operation and a 1×1 point-by-point convolution operation are performed on the , and then the outputs are aggregated to form a combined representative feature map Y1, which is expressed as: Among them, M G , is the learnable weight matrix for group convolution and point-wise convolution; X up , Y1 are the upper input and output feature maps respectively; X low is input to the lower transformation stage, applying 1×1 element-wise convolution operation to generate feature maps with shallow hidden details as a complement to the rich feature extractor; in addition, reuse X low features to obtain more feature mappings; finally, the generated and reused features are connected to form the output of the lower stage Y2, expressed as: in, is the learnable weight matrix of element-wise convolution, ∪ represents the connection operation, X low and Y2 are the lower layer input and output feature maps respectively; Fusion operation: The simplified SKNet method is used to adaptively merge the output features Y1 and Y2 of the up-conversion and down-conversion stages. First, the global average pooling method Pooling is used to collect global spatial information and generate channel statistics S m , the expression is: The global channel descriptors S1 and S2 of the upper and lower layers are stacked together, and the channel attention operation is used to generate the feature importance vectors β1, β2, expressed as: Finally, under the guidance of the feature importance vectors β1, β2, the channel reconstruction feature Y is obtained by merging the upper-layer feature Y1 and the lower-layer feature Y2 by channel, and the expression is: Y=β1Y1+β2Y2.

4. The method for epileptic seizure detection and automatic labeling based on EEG data according to claim 3, characterized in that: The bidirectional long short-term memory network BiLSTM is used to extract the EEG feature time series information, specifically: BiLSTM considers both the forward and reverse information of sequence data at the same time, thus more comprehensively understanding the context and semantic relationship in the sequence. It consists of two LSTMs, one responsible for transferring information from the start position to the end position of the sequence, and the other responsible for transferring information from the end position to the start position. The information from these two directions is then fused to obtain a more comprehensive and accurate sequence representation. The key technology LSTM in BiLSTM includes the input word x at time t t , cell state C t , temporary cell state Hidden layer state h t , forget gate f t 、Memory Gate t , and the output gate o t ; The calculation process of LSTM at time t is: first, according to the hidden layer state h at time t-1 t-1 and the current input x t , using a sigmoid layer to process and decide what information to discard. This layer is called the forget gate layer. The next step is to determine the new information to be stored in the cell state. This is divided into two parts. First, the sigmoid layer, called the input gate layer, determines the value to be updated. Next, the tanh layer creates a vector of new candidate values. Add to the state; next, the old cell state C t-1 Update to the new cell state C t ; Finally, based on the new cell state, output the hidden layer state h at the current time t t ; The expression is: f t =σ(W f ·[h t-1 ,x t ]+b f ) i t =σ(W i ·[h t-1 ,x t ]+b i ) the t =σ(W o [h t-1 ,x t ]+b o ) h t =o t *tanh(C t ) Among them, W f , W i , W C , W o Represents the feature transformation matrix. Different subscripts represent different feature processing layers. The features processed by BiLSTM are used as the temporal feature representation of EEG data.

5. The method for epileptic seizure detection and automatic labeling based on EEG data according to claim 4, characterized in that: The EEG spatial information and temporal information extracted by the SCConv neural network and BiLSTM are horizontally spliced ​​as the final representation. Then three fully connected layers and sigmoid activation functions are used as classifiers. The number of neurons in the three fully connected layers are 256, 128, and 1 respectively; the sigmoid activation function is used to limit the range of the output x to (0, 1), and the expression is: The calculation formula of the fully connected layer is: y=xA T +b Among them, y is the output of the fully connected layer, x represents the input, and A T represents the transpose of the learnable weight A of the fully connected layer, and b represents the learnable bias value.

6. A system for detecting and automatically labeling epileptic seizures based on EEG data, characterized in that: include: Module M1: Obtain EEG records with the possibility of epileptic seizures and perform preprocessing; The preprocessing includes: preliminary screening according to expert opinions; generating bipolar montage, rearranging the signals in different EDF files to the same order; downsampling the data; dividing the EEG into EEG segments according to different time window sizes and block numbers for evaluation, taking non-overlapping EEG segments as positive samples, and taking EEG segments of the same size and number from the EEG marked as non-seizure as negative samples; Module M2: Build a deep learning-based SC-LSTM model, including two parallel feature extraction modules and one classification module, for feature extraction, feature selection fusion and epilepsy detection and classification of epileptic EEG; The frequency-reduced EEG data is used as input. In the first feature extraction module, a three-layer 2D convolution block is used as the basic architecture, and two types of spatial and channel reconstruction convolutions SCConv are inserted to extract the spatial and channel features of the EEG data. The bidirectional long short-term memory network BiLSTM is used in parallel to extract the temporal features of the original data. The Flatten layer is used to unify the extracted spatial and channel features of the EEG data and the temporal features of the original data into a one-dimensional feature vector, and a horizontal connection operation is performed as the final feature representation. The classification module consists of three fully connected layers, and the sigmoid activation function is used to make the output between (0, 1).

7. The system for detecting and automatically labeling epileptic seizures based on EEG data according to claim 6, characterized in that: The EEG feature space information is extracted through the SCConv neural network, specifically: The spatial features of EEG data are extracted based on three two-dimensional convolution blocks. The two-dimensional convolution layer performs convolution operation on the input image by sliding a small matrix called convolution kernel or filter to extract the required feature information. In the two-dimensional convolution layer, the convolution kernel is a two-dimensional matrix, which is multiplied and summed element by element with the input image to obtain the output feature map. The calculation formula is as follows: Among them, out represents the output of the convolution operation, N represents the batch size, and N i represents the i-th batch, C represents the number of channels, represents the jth output channel, represents the output of the convolution calculation of the jth channel in the i-th batch, bias represents a learnable bias value, represents the offset of the jth channel, C in Represents the number of input channels, k is a counting symbol from 0 to C in-1 , weight represents the convolution kernel weight value, represents the convolution kernel weight of the feature map of the kth input channel using the jth convolution block, ★ represents the 2D cross-correlation operation, input represents the input feature map, input(N i ,k) represents the feature map of the kth channel of the i-th batch.

8. The system for detecting and automatically labeling epileptic seizures based on EEG data according to claim 7, characterized in that: A self-correction convolution block is introduced between the first 2D convolution block and the second 2D convolution block to expand the convolution receptive field through intrinsic feature communication, thereby enhancing the diversity of output features; Given a set of shape (C,C,k h ,k w ) of the convolution kernel K, where k h and k w are the spatial height and width respectively, C represents the number of channels; it is uniformly divided into four parts, each part is responsible for different functions, assuming that C can be divided by 2, and the convolution kernel set is divided into four parts of the convolution kernel, Indicates that the shape of each part of the convolution kernel is The workflow of the self-correcting convolution block is as follows: first, the input X is evenly divided into two parts {X1, X2}, and then these two inputs are sent to a feature processing path to collect different types of context information. In the first path, X1 is self-calibrated using {K1, K2, K3} to obtain Y1; in the second path, the convolution operation is performed: This operation aims to preserve the original spatial context; the two intermediate outputs {Y1,Y2} are then concatenated together as the output Y; For X1, the average pooling with a filter size of r×r and a step size of r is used to obtain the intermediate feature T1, which is expressed as: T1=AvgPool r (X1) Then, K2 is used to transform the features of T1 to obtain the intermediate feature X′1, which is expressed as: Among them, Up() is a bilinear interpolation operator that maps the intermediate reference from the small-scale space to the original feature space; The calibration operation is described as follows: in, σ is the sigmoid function, and the symbol · represents element-wise multiplication; then use X ′ 1 is used as the residual to form the weight for calibration. The final output after calibration is: For X2, use K2 to perform feature transformation to obtain Y2, the expression is: in, It is a convolution operation. After obtaining Y1 and Y2, they are concatenated according to the channel to obtain the final output Y of the self-correction convolution block. A spatial and channel reconstruction convolution block is introduced between the second 2D convolution block and the third 2D convolution block, which includes two core units, namely the spatial reconstruction unit SRU and the channel reconstruction unit CRU. The SRU reduces spatial redundancy by the separation-reconstruction method, and the CRU uses the segmentation-conversion-fusion method to reduce channel redundancy. Separation operation: The purpose is to separate the feature maps with rich information from the feature maps with less information corresponding to the spatial content, and use the scaling factor in the group normalization layer GN to evaluate the information content of different feature maps. Specifically, given an intermediate feature map Among them, N is the batch axis, C is the channel axis, H and W are the spatial height and width axes; first, the input feature X is standardized by subtracting the mean μ and dividing by the standard deviation σ, the expression is: where μ and σ are the mean and standard deviation of X, ε is a small positive constant added for division stability, and γ and β are trainable affine transformations; using the trainable parameter γ∈R in the GN layer C As a measure of the spatial pixel variance for each batch and channel; normalize the correlation weight W γ ∈R C It is obtained from the following formula, which indicates the importance of different feature maps: Then W γ The weights of the re-weighted feature map are mapped to the range (0,1) by the sigmoid function and gated by the threshold; the weights above the threshold are set to 1 to obtain the informative weight W1, and set to 0 to obtain the non-informative weight W2; the whole process of obtaining W is expressed as: W=Gate(Sigmoid(W γ (GN(X)))) Finally, multiply the input feature X by W1 and W2 respectively to obtain two weighted features: and small amount of information Thus the input features are divided into two parts: Informative and expressive spatial content, Has little or no information and is considered redundant; Reconstruction operation: Add features with rich information to features with less information to generate features with richer information, thereby saving space; this operation uses a cross-reconstruction operation to fully combine the two weighted different information features, strengthen the information flow between them, and then cross-reconstruct the features and Splice to get the spatial fine feature map X w ; Segmentation operation: For the spatial fine feature X w First, X w The channels of the feature map are divided into αC channels and (1-α)C channels, where 0<α<1 is the segmentation ratio. Subsequently, 1×1 convolution is used to compress the channels of the feature map to improve the computational efficiency. A squeezing ratio r is introduced to control the feature channel. After the segmentation and squeezing operations, the spatial fine feature X w Divided into upper X up and lower X low ; Conversion operation: X up is input to the upper transformation stage as a rich feature extractor; in the same X up A k×k grouped convolution operation and a 1×1 point-by-point convolution operation are performed on the , and then the outputs are aggregated to form a combined representative feature map Y1, which is expressed as: in, is the learnable weight matrix for group convolution and point-wise convolution; X up , Y1 are the upper input and output feature maps respectively; X low is input to the lower transformation stage, applying 1×1 element-wise convolution operation to generate feature maps with shallow hidden details as a complement to the rich feature extractor; in addition, reuse X low features to obtain more feature mappings; finally, the generated and reused features are connected to form the output of the lower stage Y2, expressed as: in, is the learnable weight matrix of element-wise convolution, ∪ represents the connection operation, X low and Y2 are the lower layer input and output feature maps respectively; Fusion operation: The simplified SKNet method is used to adaptively merge the output features Y1 and Y2 of the up-conversion and down-conversion stages. First, the global average pooling method Pooling is used to collect global spatial information and generate channel statistics S m , the expression is: The global channel descriptors S1 and S2 of the upper and lower layers are stacked together, and the channel attention operation is used to generate the feature importance vectors β1, β2, expressed as: Finally, under the guidance of the feature importance vectors β1, β2, the channel reconstruction feature Y is obtained by merging the upper-layer feature Y1 and the lower-layer feature Y2 by channel, and the expression is: Y=β1Y1+β2Y2.

9. The system for detecting and automatically labeling epileptic seizures based on EEG data according to claim 8, characterized in that: The bidirectional long short-term memory network BiLSTM is used to extract the EEG feature time series information, specifically: BiLSTM considers both the forward and reverse information of sequence data at the same time, thus more comprehensively understanding the context and semantic relationship in the sequence. It consists of two LSTMs, one responsible for transferring information from the start position to the end position of the sequence, and the other responsible for transferring information from the end position to the start position. The information from these two directions is then fused to obtain a more comprehensive and accurate sequence representation. The key technology LSTM in BiLSTM includes the input word x at time t t , cell state C t , temporary cell state Hidden layer state h t , forget gate f t 、Memory Gate t , and the output gate o t ; The calculation process of LSTM at time t is: first, according to the hidden layer state h at time t-1 t-1 and the current input x t , using a sigmoid layer to process and decide what information to discard. This layer is called the forget gate layer. The next step is to determine the new information to be stored in the cell state. This is divided into two parts. First, the sigmoid layer, called the input gate layer, determines the value to be updated. Next, the tanh layer creates a vector of new candidate values. Add to the state; next, the old cell state C t-1 Update to the new cell state C t ; Finally, based on the new cell state, output the hidden layer state h at the current time t t ; The expression is: f t =σ(W f ·[h t-1 ,x t ]+b f ) i t =σ(W i ·[h t-1 ,x t ]+b i ) the t =σ(W o [h t-1 ,x t ]+b o ) h t =o t *tanh(C t ) Among them, W f , W i , W C , W o Represents the feature transformation matrix. Different subscripts represent different feature processing layers. The features processed by BiLSTM are used as the temporal feature representation of EEG data.

10. The system for detecting and automatically labeling epileptic seizures based on EEG data according to claim 9, characterized in that: The EEG spatial information and temporal information extracted by the SCConv neural network and BiLSTM are horizontally spliced ​​as the final representation. Then three fully connected layers and sigmoid activation functions are used as classifiers. The number of neurons in the three fully connected layers are 256, 128, and 1 respectively; the sigmoid activation function is used to limit the range of the output x to (0, 1), and the expression is: The calculation formula of the fully connected layer is: y=xA T +b Among them, y is the output of the fully connected layer, x represents the input, and A T represents the transpose of the learnable weight A of the fully connected layer, and b represents the learnable bias value.

Citation Information

Patent Citations

  • Motor imagery electroencephalogram signal classification method based on parallel DAMSCN-LSTM

    CN115238796A

  • Wearable bioelectricity equipment and bioelectricity action recognition and self-calibration method

    CN115291730A

  • Epileptic syndrome electroencephalogram analysis method based on multi-task deep network

    CN115633938A

  • Multi-channel feature fusion electroencephalogram emotion signal detection method and device based on attention mechanism and medium

    CN115804602A

  • Epilepsy electroencephalogram signal processing method and system and auxiliary diagnosis equipment

    CN117158993A

Cited By

  • Configuration method and device of syncope prediction model and processing equipment

    CN119626530A

  • Epilepsy detection hardware implementation method and system based on machine learning

    CN119650048A

  • Method for acquiring micro-state sequence and neurodegenerative disease detection system

    CN120690413A

  • Intelligent visual detection and identification method for river water surface target

    CN120707809A

  • River water surface target intelligent visual detection and identification method

    CN120707809B