Epilepsy electroencephalogram signal identification method

By combining the one-dimensional convolution module and bidirectional fast self-attention with the simple recurrent unit module and the global attention mechanism, the problems of low computational efficiency and insufficient inter-channel dependency learning in traditional methods are solved, and the accuracy of epilepsy EEG signal recognition is improved. Accuracy and efficiency promote the automation and precision of epilepsy diagnosis.

CN118614873AInactive Publication Date: 2024-09-10SUZHOU R&D CENT OF NO 214 RES INST OF CHINA NORTH IND GRP

Patent Information

Application Number
CN202410719370.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional epilepsy EEG signal recognition methods have low computational efficiency and lack of learning of dependencies between different channels, resulting in insufficient recognition accuracy and efficiency.

Method used

The one-dimensional convolution module and bidirectional fast self-attention are combined with a simple recurrent unit module to improve the capture and feature extraction of signal dependencies between different channels through the global attention mechanism, and combine with linear layers for dimensionality reduction and classification.

Benefits of technology

It improves the accuracy and efficiency of epilepsy EEG signal recognition and promotes the automation and precision of epilepsy diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118614873A
    Figure CN118614873A
Patent Text Reader

Abstract

The invention discloses an epilepsy electroencephalogram signal identification method, which comprises the following steps of: preprocessing original electroencephalogram signal data, and segmenting according to the size of a sliding window; performing convolution operation on the preprocessed electroencephalogram signal data on each channel through a one-dimensional convolution module to obtain high-dimensional electroencephalogram signal features of each channel; inputting the high-dimensional electroencephalogram signal characteristics of each channel into BiFASRU for signal sequence modeling, and capturing signal dependence among different channels to obtain dependence characteristics among different channels of multiple channels; a global attention mechanism module is used for evaluating the weight of the influence of the state output by the BiFASRU at each time step on the epilepsy signal classification result, and after weighted summation is carried out on the weight, an overall attention output vector is output; and performing dimension reduction operation and normalization on the global attention layer output vector through a linear layer to obtain epilepsy signal type probability distribution, and outputting a tag corresponding to a probability maximum value as a final epilepsy signal type result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field related to epilepsy automatic analysis methods, and in particular to an epileptic electroencephalogram signal recognition method. Background Art

[0002] Traditional epilepsy diagnosis mainly relies on experienced physicians to interpret EEG with the naked eye. This method is cumbersome and has low accuracy, and is highly dependent on the examiner's subjective judgment. Therefore, the study of automatic analysis methods for epilepsy has important clinical significance.

[0003] There are two key points in the automatic analysis method of epilepsy: feature information extraction method and classification model design method. Common methods for extracting features of epileptic EEG signals include: extracting time domain features such as sequence waveform and sequence cross-correlation, extracting frequency domain features such as power spectrum density, extracting time-frequency domain features by time-frequency transformation, and extracting features by nonlinear analysis. After obtaining the feature matrix, it is then processed by classic methods such as singular value decomposition, principal component analysis, independent component analysis, and correlation analysis for dimensionality reduction. Classification methods are traditionally implemented based on statistical analysis, such as threshold classification, distribution test, correlation analysis, and other methods.

[0004] Machine learning models are now widely used in feature extraction and classification model construction. Some classic traditional machine learning methods and deep learning methods based on neural networks can be tried in epileptic EEG signal recognition, such as using convolutional networks for feature extraction. In the Transformer deep learning model architecture, a self-attention mechanism is introduced to process sequence data. The self-attention mechanism effectively solves the problem of long-distance dependency because it can reduce the distance between any positions in the sequence to a constant level. However, one disadvantage of this mechanism is that as the length of the input sequence increases, the demand for computing resources and memory increases quadratically, leading to efficiency problems. The fast self-attention method uses random features to decompose the attention matrix and adjusts the execution order of matrix multiplication to approximate the output of traditional self-attention, avoiding the direct construction of the complete attention matrix. Summary of the invention

[0005] In view of the problems existing in the current research on epileptic EEG signals, such as low computational efficiency of recurrent networks and lack of learning of dependencies between different channels, the present invention proposes an epileptic EEG signal recognition method based on fast self-attention combined with a simple recurrent unit module.

[0006] The technical solution of the present invention is:

[0007] The present invention discloses a method for identifying epileptic EEG signals, and the specific method comprises:

[0008] S1, preprocessing the original EEG signal data and segmenting it according to the sliding window size to obtain preprocessed EEG signal data;

[0009] S2. performing a convolution operation on the preprocessed EEG signal data in each channel dimension through a one-dimensional convolution module to obtain a high-dimensional EEG signal feature of each channel;

[0010] S3, inputting the high-dimensional EEG signal features of each channel into bidirectional fast self-attention combined with simple recurrent units to perform signal sequence modeling and capture the signal dependencies between different channels, so as to obtain dependency features between different channels of multiple channels;

[0011] S4. The global attention mechanism module is used to evaluate the weight of the influence of the state of the bidirectional fast self-attention combined with the simple recurrent unit output at each time step on the epileptic signal classification result, and the weighted sum is output after the overall attention output vector is output. Under the action of the overall attention output vector, the global attention layer output vector can be calculated;

[0012] S5. Perform dimensionality reduction operation on the output vector of the global attention layer through a linear layer and normalize it to obtain the probability distribution of the epilepsy signal type, and output the label corresponding to the maximum probability value as the final epilepsy signal type result.

[0013] Furthermore, the one-dimensional convolution module described in S2 includes a convolution operation, an activation function, and a maximum pooling layer. The convolution operation captures local features through a 1×5 convolution kernel on a single channel, and these convolution kernels slide in a step size of 2 on the signal dimension for feature extraction.

[0014] Furthermore, the bidirectional fast self-attention combined with simple recurrent unit described in S3 is constructed using forward fast self-attention combined with simple recurrent unit and backward fast self-attention combined with simple recurrent unit, and is used to obtain global high-dimensional sequence features from both the forward and backward directions.

[0015] Furthermore, the fast self-attention combined with simple recurrent unit module described in S3 incorporates the fast self-attention mechanism into the framework of the simple recurrent unit.

[0016] Furthermore, the global attention mechanism module described in S4 improves the attention to key features by calculating the influence weight of each hidden layer feature of the bidirectional fast self-attention combined with the simple recurrent unit output on the judgment of the EEG signal type, that is, calculating the influence of different time features on epilepsy prediction.

[0017] The beneficial effects of the present invention are:

[0018] The present invention proposes a method for identifying epileptic EEG signals. Through a series of modular designs including one-dimensional convolution module, bidirectional fast self-attention combined with simple recurrent unit module, global attention mechanism and linear layer, the accuracy and efficiency of epileptic EEG signal recognition are improved, which helps to promote the automation and precision of epilepsy diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 Flowchart of the overall architecture of Conv1-BiFASRU-SA;

[0020] Figure 2 It is a schematic diagram of the one-dimensional convolution module structure;

[0021] Figure 3 Schematic diagram of the fast self-attention mechanism structure;

[0022] Figure 4 Schematic diagram of the FASRU model structure. DETAILED DESCRIPTION

[0023] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0024] Example

[0025] Figure 1 The flowchart of the overall architecture of Conv1-BiFASRU-SA provided by the embodiment of the present invention specifically includes the following steps:

[0026] S1, preprocessing the original EEG signal data and segmenting it according to the sliding window size to obtain preprocessed EEG signal data;

[0027] S2. performing a convolution operation on the preprocessed EEG signal data in each channel dimension through a one-dimensional convolution module to obtain a high-dimensional EEG signal feature of each channel;

[0028] Further information Figure 2 The one-dimensional convolution module includes a convolution operation, an activation function and a maximum pooling layer. The convolution operation captures the high-dimensional EEG signal features through a 1×5 convolution kernel on a single channel. These convolution kernels slide on the signal dimension with a step size of 2. The specific calculation method is shown in formula (1).

[0029] f(x)=x*sigmoid(βx) (1)

[0030] Among them, β is a trainable hyperparameter. The maximum pooling strategy screens local features and retains key features as the input of the next convolution layer. After multiple convolutional layers perform feature learning, the average pooling layer finally outputs the high-dimensional feature representation V of each channel. The construction process is shown in formula (2).

[0031] V=[V1,V2,...,V m ] (2)

[0032] Among them, V i Represents the vector representation of the i-th channel, with a dimension size of w, m represents the number of channels, and V serves as the input of the fast self-attention combined with simple recurrent unit FASRU module.

[0033] S3, inputting the high-dimensional EEG signal features of each channel into bidirectional fast self-attention combined with simple recurrent units to perform signal sequence modeling and capture the signal dependencies between different channels, so as to obtain dependency features between different channels of multiple channels;

[0034] The model structure of the fast self-attention mechanism is shown in Figure 3 middle.

[0035] The model structure of fast self-attention combined with simple recurrent unit FASRU is shown in Figure 4 middle.

[0036] Furthermore, the bidirectional fast self-attention combined with simple recurrent unit BiFASRU is constructed using forward fast self-attention combined with simple recurrent unit and backward fast self-attention combined with simple recurrent unit, and is used to obtain global high-dimensional sequence features from both forward and backward directions to improve the accuracy of feature extraction.

[0037] Furthermore, the fast self-attention combined with simple recurrent unit module FASRU integrates the fast self-attention mechanism into the framework of the simple recurrent unit SRU. This structure can not only effectively learn the sequence characteristics of epileptic EEG signals, but also capture the dependencies between different dimensions and channels and the structural characteristics of the signal through the built-in attention mechanism.

[0038] Among them, element recursion refers to the operation process of the simple recurrent unit module SRU, and the fast self-attention mechanism can learn the correlation features between different channels to capture the similarity of sequence signal features in different channels. The relevant calculation steps are detailed in formulas (3) to (7).

[0039] Q=W q X T (3)

[0040] K=W k Q (4)

[0041] V=Wv Q (5)

[0042]

[0043] U T = W o (Q + a·A) (7)

[0044] Among them, Q, K, and V are all elements in the self-attention mechanism, corresponding to the query vector, key vector, and value vector after the linear transformation of the sequence elements respectively, and T represents matrix operation; X ∈ R L×d , representing the signal feature vector matrix, L is the signal data length, d is the signal vector dimension; W q ∈ R d′×d W k ∈ R d′×d′ W v ∈ R d′×d′ are all learnable parameter matrices, d' is the attention dimension, and d' < d, which can effectively reduce the number of parameters; A T ∈ R d′×L is the attention score matrix; a ∈ R is a trainable dynamic adjustment parameter, responsible for controlling the influence size of the self-attention mechanism on the calculation result. When the time period is 0, equation (7) is transformed into a linear connection operation, and W o ∈ R 3d ×d′ is the projection matrix used in the residual connection, and U T ∈ R L×3×d is the output tensor, that is, the dependency relationship between different dimensions and channels.

[0045] S4. Evaluate the weight size of the influence of the bidirectional fast self-attention combined with the simple recurrent unit on the epilepsy signal classification result at each time step through the global attention mechanism module, and output the overall attention output vector after weighted summation of the weights. Under the action of the overall attention output vector, the global attention layer output vector can be calculated;

[0046] Furthermore, the global attention mechanism module improves the attention degree to key features by calculating the influence weight of each hidden layer feature output by the bidirectional fast self-attention combined with the simple recurrent unit on the judgment of the electroencephalogram signal type, that is, calculates the influence degree of different time features on epilepsy prediction.

[0047] Specifically, by evaluating the weight size α t of the influence of the state H t, and the weighted summation is used to obtain the overall attention output A. This process helps to highlight the key signal features while reducing the interference of irrelevant information. The calculation process is shown in equations (8) to (10).

[0048] z t =tanh(WH t +b) (8)

[0049]

[0050] Among them, tanh() represents a nonlinear activation function, exp() is an exponential operation, W represents a weight parameter matrix, b is a bias term, and z t For each moment, H is the score t The state output for each time step, α t is the weight affecting the epileptic signal classification result, A is the overall attention output vector, and under the action of A, the global attention layer output vector V can be calculated.

[0051] S5. Perform dimensionality reduction operation on the output vector of the global attention layer through a linear layer and normalize it to obtain the probability distribution of the epilepsy signal type, and output the label corresponding to the maximum probability value as the final epilepsy signal type result.

[0052] Specifically, the global attention layer output vector V is input into the linear layer for dimensionality reduction, and the Softmax() function is used to normalize the linear layer output to obtain the probability distribution P of epileptic signal type. s , the label corresponding to the maximum probability value is taken by the top() function as the final epilepsy signal type result R. The calculation process is shown in formulas (11) and (12).

[0053] P s =Softmax(W s V+b s ) (11)

[0054] R = top(P s ) (12)

[0055] Among them, W s represents the weight parameter matrix, b s is the bias term.

[0056] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for identifying epileptic EEG signals, characterized in that: include: S1, preprocessing the original EEG signal data and segmenting it according to the sliding window size to obtain preprocessed EEG signal data; S2. performing a convolution operation on the preprocessed EEG signal data in each channel dimension through a one-dimensional convolution module to obtain a high-dimensional EEG signal feature of each channel; S3, inputting the high-dimensional EEG signal features of each channel into bidirectional fast self-attention combined with simple recurrent units to perform signal sequence modeling and capture the signal dependencies between different channels, so as to obtain dependency features between different channels of multiple channels; S4. Evaluate the weight of the influence of the state of the bidirectional fast self-attention combined with the simple recurrent unit output at each time step on the epileptic signal classification result through the global attention mechanism module, output the overall attention output vector after weighted summation, and calculate the global attention layer output vector under the action of the overall attention output vector; S5. Perform dimensionality reduction operation on the output vector of the global attention layer through a linear layer and normalize it to obtain the probability distribution of the epilepsy signal type, and output the label corresponding to the maximum probability value as the final epilepsy signal type result.

2. The method according to claim 1, characterized in that: The one-dimensional convolution module includes a convolution operation, an activation function and a maximum pooling layer. The convolution operation captures local features through 1×5 convolution kernels on a single channel. These convolution kernels slide in a step size of 2 on the signal dimension to extract features.

3. The method according to claim 1, characterized in that The bidirectional fast self-attention combined with simple recurrent unit is constructed using a forward fast self-attention combined with a simple recurrent unit and a backward fast self-attention combined with a simple recurrent unit, and is used to obtain global high-dimensional sequence features from both the forward and backward directions.

4. The method according to claim 3, characterized in that The fast self-attention combined with simple recurrent unit module integrates the fast self-attention mechanism into the framework of the simple recurrent unit.

5. The method according to claim 1, characterized in that The specific calculation steps of S3 are shown in formulas (3) to (7). Q=W q X T (3) K=W k Q (4) V=W v Q (5) U T =W o (Q+a·A) (7) Among them, Q, K, and V are all elements in the self-attention mechanism, corresponding to the query vector, key vector, and value vector after the linear transformation of the sequence elements respectively, and T represents matrix operation; X ∈ R L×d represents the signal feature vector matrix, L is the signal data length, d is the signal vector dimension; W q ∈ R d′×d , W k ∈ R d′×d′ , W v ∈ R d′×d′ are all learnable parameter matrices, d' is the attention dimension, and d' < d, which can effectively reduce the number of parameters; A T ∈ R d′×L is the attention score matrix; a ∈ R is a trainable dynamic adjustment parameter, responsible for controlling the influence of the self-attention mechanism on the calculation result. When it is 0, Equation (7) is transformed into a linear connection operation, W o ∈ R 3d×d′ is the projection matrix used in the residual connection, U T ∈ R L×3×d is the output tensor, that is, the dependency relationship between different dimensions and channels.

6. The method according to claim 1, characterized in that The specific calculation process of S4 is shown in equations (8) to (10). z t =tanh(WH t +b) (8) Among them, tanh() represents a nonlinear activation function, exp() is an exponential operation, W represents a weight parameter matrix, b is a bias term, and z t For each moment, H is the score t The state output for each time step, α t is the weight affecting the epileptic signal classification result, A is the output overall attention output vector, and under the action of A, the global attention layer output vector V can be calculated.

7. The method according to claim 1, characterized in that The linear layer in S5 inputs the global attention layer output vector V into the linear layer for dimensionality reduction, and uses the Softmax() function to normalize the linear layer output to obtain the epilepsy signal type probability distribution P s , the label corresponding to the maximum probability is taken by the top() function as the final epilepsy signal type result R. The specific calculation process is shown in formula (11) (12). P s =Softmax(W s V+b s ) (11) R=top(P s ) (12) Among them, W s represents the weight parameter matrix, b s is the bias term.

Citation Information

Patent Citations

  • Electroencephalogram signal emotion recognition method based on SRU and double attention

    CN115758267A

  • Epilepsy electroencephalogram signal monitoring system and method based on space-time converter

    CN115944307A

  • Real-time epileptic seizure detecting and monitoring system for video electroencephalogram examination of epilepsy

    WO2023098303A1

Cited By

  • Epilepsy detection method based on multi-scale space-time diagram attention fusion network

    CN119745399A