A method for predicting epileptic seizures that integrates multi-frequency coupling and multiple attention mechanisms
By integrating multi-frequency coupling and multiple attention mechanisms, multi-frequency coupling features are constructed and spatiotemporal features are extracted, solving the problems of accuracy and individual adaptability in epilepsy seizure prediction in existing technologies, and achieving high-precision epilepsy seizure prediction.
Patent Information
- Application Number
- CN202510921845.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-07-04
AI Technical Summary
Existing methods for predicting epileptic seizures do not fully exploit the multi-frequency and spatiotemporal dynamic characteristics of EEG signals, making it difficult to capture potential key patterns in the data, thus failing to make accurate predictions, and exhibiting poor adaptability to individual differences.
This study employs a method that integrates multi-frequency coupling and multiple attention mechanisms. By preprocessing EEG data, multi-frequency coupling features are constructed. Spatiotemporal features are extracted using graph attention and graph external attention mechanisms. Finally, a Transformer model is used to capture temporal dependencies and predict epileptic seizures.
It improves the accuracy and sensitivity of epileptic seizure prediction, enhances adaptability to individual differences, and improves the model's generalization performance.
Smart Images

Figure CN120678390B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of epilepsy seizure prediction technology, and in particular to an epilepsy seizure prediction method that integrates multi-frequency coupling and multiple attention mechanisms. Background Technology
[0002] Epilepsy is a common neurological disorder characterized by sudden and unpredictable seizures, severely impacting patients' quality of life and even their lives. Electroencephalography (EEG), as a crucial method for recording the electrical activity of neurons in the brain, is widely used in the diagnosis and seizure prediction research of epilepsy because it directly reflects the brain's functional state.
[0003] However, existing methods for predicting epileptic seizures do not fully explore the multi-frequency and spatiotemporal dynamic characteristics of EEG signals, making it difficult to capture potential key patterns in the data. They also have poor adaptability to individual differences and cannot make accurate predictions. Summary of the Invention
[0004] The purpose of this invention is to provide a method for predicting epileptic seizures that integrates multi-frequency coupling and multiple attention mechanisms, aiming to achieve high-precision prediction of epilepsy.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: The present invention provides a method for predicting epileptic seizures by integrating multi-frequency coupling and multiple attention mechanisms, comprising: S1: Preprocessing EEG data to obtain preprocessed EEG data. The EEG data includes electrical activity signals of brain neurons recorded by electrodes. S2: Based on the preprocessed EEG data, dividing the preictal and interictal periods of epilepsy, and constructing multi-frequency coupling features. The multi-frequency coupling features include the coupling relationship features of phase and amplitude between EEG signals of different frequency bands. S3: Extracting spatiotemporal features from the multi-frequency coupling features using a multiple attention mechanism to obtain spatiotemporal features. The multiple attention mechanism includes at least one of the mechanisms of integrating graph attention, graph external attention, and temporal attention, used to mine the spatial correlation and temporal dynamics in the multi-frequency coupling features. S4: Based on the extracted spatiotemporal features, distinguishing the patient's preictal and interictal periods, and predicting epileptic seizures.
[0006] The epilepsy seizure prediction method integrating multi-frequency coupling and multiple attention mechanisms provided in this application effectively purifies EEG signals through preprocessing, laying a reliable data foundation for subsequent analysis. When constructing multi-frequency coupling features, the phase and amplitude coupling relationships between EEG signals of different frequency bands are fully considered, which can more comprehensively reflect the state of brain activity compared to methods that only focus on a single frequency band. The employed multiple attention mechanism achieves deep fusion of spatial and temporal information of EEG signals, improving the discriminative ability of features. By classifying through comprehensive multi-frequency coupling features and spatiotemporal features, the preictal and interictal periods can be more accurately distinguished, effectively improving the accuracy and sensitivity of epilepsy seizure prediction. Simultaneously, the model is more adaptable to individual differences among patients, reducing prediction bias caused by individual differences in EEG signal characteristics, and exhibits good generalization performance in cross-patient experiments.
[0007] In some embodiments, preprocessing includes: removing data corresponding to electrodes from which no valid EEG signals were collected, bandpass filtering, notch filtering, removal of ICA artifacts, and normalization and standardization of brain neuronal electrical activity signals.
[0008] In some embodiments, the process of dividing the epileptic seizure period into a pre-ictal period and an interictal period includes: constructing a seizure prediction period and a seizure occurrence period. The seizure prediction period is used to predict the time window for seizures, while the seizure occurrence period indicates the time interval during which a seizure actually occurs. EEG data occurring before the seizure occurrence period but within the seizure prediction period are classified as pre-ictal data, and EEG data not occurring in either the pre-ictal or seizure occurrence period are classified as interictal data.
[0009] In some embodiments, constructing multi-frequency coupling features includes: dividing the EEG data into multiple frequency bands using a bandpass filter. The multiple frequency bands include the θ band, α band, β band, γ1 band, and γ2 band. Phase-amplitude coupling data between each pair of frequency bands are calculated to form a phase-amplitude coupling connection matrix. This phase-amplitude coupling connection matrix is a matrix representing the coupling strength between the phase and amplitude of EEG signals in different frequency bands.
[0010] In some embodiments, calculating phase-amplitude coupling data between each pair of frequency bands in multiple frequency bands to form a phase-amplitude coupling connection matrix includes: obtaining phase information and amplitude information of EEG signals in each frequency band through Hilbert transform. The phase information indicates the phase angle characteristics of the EEG signal oscillation, and the amplitude information indicates the amplitude characteristics of the EEG signal oscillation. Based on the phase and amplitude information, the coupling strength between phase and amplitude of different frequency bands is calculated to generate the phase-amplitude coupling connection matrix.
[0011] In some embodiments, a multi-attention mechanism is employed to extract spatiotemporal features from multi-frequency coupling features, resulting in spatiotemporal features. This includes inputting the phase-amplitude coupling connection matrix as graph node features into a graph attention network. Here, the graph node features are vectors representing the EEG signal features of each electrode channel. The graph attention network calculates the attention weights between nodes, learns the graph structure information within the connection matrix, and outputs spatial features.
[0012] In some embodiments, calculating the attention weights between nodes using a graph attention network includes: performing a linear transformation on the node features; calculating the degree of influence between nodes using a feedforward neural network; normalizing the degree of influence using a softmax function to obtain the attention weights between nodes; and optimizing the spatial feature extraction results by fusing multiple sets of attention weights through a multi-attention head.
[0013] In some embodiments, a multi-attention mechanism is used to extract spatiotemporal features from multi-frequency coupled features to obtain spatiotemporal features. The method further includes introducing an external graph attention structure. The external graph attention structure contains learnable external units independent of the input graph, used to store cross-graph shared information. The attention degree between the multi-frequency coupled features and the external units is calculated, and the attention degree is optimized through double normalization processing to mine hidden information between cross-frequency coupled networks, outputting optimized spatial features.
[0014] In some embodiments, a multi-attention mechanism is employed to extract spatiotemporal features from multi-frequency coupled features to obtain spatiotemporal features. This further includes inputting the spatial features output by the graph attention network and the graph external attention structure into a Transformer-based encoder. Temporal features are obtained by capturing the temporal dependencies of the features through multi-head attention sublayers in the encoder. The temporal dependencies indicate the associations between EEG features at different time points.
[0015] In some embodiments, the encoder of the Transformer model includes a fully connected feedforward network. After capturing the temporal dependencies of features through a multi-head attention sublayer in the encoder to obtain temporal features, the method further includes: performing two linear transformations on the temporal features through the feedforward network, and using a non-linear activation function to process the temporal features during the two linear transformations, thereby outputting spatiotemporal features. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating a method for predicting epileptic seizures that integrates multi-frequency coupling and multiple attention mechanisms, as provided in an embodiment of this application.
[0017] Figure 2 This is a schematic diagram of an experimental result provided in an embodiment of this application;
[0018] Figure 3 This is a schematic diagram of another experimental result provided in an embodiment of this application;
[0019] Figure 4 This is a schematic diagram of another experimental result provided in an embodiment of this application. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0021] In the description of the invention, it should be understood that the terms "upper," "lower," "left," "right," "front," "rear," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or relative positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Unless otherwise specified, the above-mentioned orientational descriptions can be flexibly set in practical applications, provided that the relative positional relationships shown in the accompanying drawings are satisfied.
[0022] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0023] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "communication" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection. They can refer to a direct connection or an indirect connection through an intermediate medium, or a communication between the internal components of two elements. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0024] In embodiments of the invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, article, or apparatus that includes that element.
[0025] In embodiments of the present invention, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in embodiments of the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0026] Electroencephalography (EEG) signals are nonlinear, multivariate, and complex signals that can record the electrical activity of the brain. As a commonly used clinical detection method, it is widely used in the diagnosis of epilepsy. However, as mentioned in the background section, traditional prediction methods suffer from limited cross-patient experimental models and low predictive performance due to significant individual variability among epilepsy patients.
[0027] In view of this, embodiments of this application provide a method for predicting epileptic seizures that integrates multi-frequency coupling and multiple attention mechanisms, exemplarily, such as... Figure 1 As shown. The method includes:
[0028] S1: Preprocess the EEG data to obtain preprocessed EEG data.
[0029] Among them, EEG data includes electrical activity signals of brain neurons recorded through electrodes.
[0030] As one possible implementation, preprocessing includes: removing data corresponding to electrodes that did not acquire valid EEG signals, bandpass filtering, notch filtering, removing ICA artifacts, and normalizing and standardizing the electrical activity signals of brain neurons.
[0031] Bandpass filtering refers to retaining EEG signals within a specific frequency range, while notch filtering refers to filtering out specific power frequency interference signals. EEG signals are susceptible to various interferences (such as electromyography, electrocardiography, and power frequency noise), resulting in a large number of artifacts in the raw data, increasing the difficulty of extracting effective information. Removing ICA artifact components means removing non-brain-derived interference components identified through independent component analysis. Normalization refers to scaling the amplitude of EEG signals according to a uniform standard, while standardization refers to adjusting the distribution characteristics of EEG signals to conform to preset statistical properties.
[0032] S2: Based on preprocessed EEG data, the preic seizure and interictal periods are divided, and multi-frequency coupling features are constructed.
[0033] Multi-frequency coupling characteristics include the coupling relationship between phase and amplitude between EEG signals of different frequency bands.
[0034] In some embodiments, the process of dividing the epileptic seizure period into a pre-ictal period and an interictal period includes: constructing a seizure prediction period and a seizure occurrence period. The seizure prediction period is used to predict the time window for seizures, while the seizure occurrence period indicates the time interval during which a seizure actually occurs. EEG data occurring before the seizure occurrence period but within the seizure prediction period are classified as pre-ictal data, and EEG data not occurring in either the pre-ictal or seizure occurrence period are classified as interictal data.
[0035] Electroencephalogram (EEG) signals are nonlinear, multivariate, and complex time-varying signals containing neural oscillation components in multiple frequency bands (such as θ, α, β, γ, etc.), and there are complex cross-coupling relationships between signals in different frequency bands. These coupling characteristics are closely related to different stages of epileptic seizures.
[0036] In some embodiments, constructing multi-frequency coupling features includes: dividing the EEG data into multiple frequency bands using a bandpass filter. The multiple frequency bands include the θ band, α band, β band, γ1 band, and γ2 band. Phase-amplitude coupling data between each pair of frequency bands are calculated to form a phase-amplitude coupling connection matrix. This phase-amplitude coupling connection matrix is a matrix representing the coupling strength between the phase and amplitude of EEG signals in different frequency bands.
[0037] In some embodiments, calculating phase-amplitude coupling data between each pair of frequency bands in multiple frequency bands to form a phase-amplitude coupling connection matrix includes: obtaining phase information and amplitude information of EEG signals in each frequency band through Hilbert transform. The phase information indicates the phase angle characteristics of the EEG signal oscillation, and the amplitude information indicates the amplitude characteristics of the EEG signal oscillation. Based on the phase and amplitude information, the coupling strength between phase and amplitude of different frequency bands is calculated to generate the phase-amplitude coupling connection matrix.
[0038] More specifically, using Hilbert transform to estimate , , , and Phase corresponding to the time series of several frequency bands and amplitude Information, calculate phase and amplitude The joint probability distribution is ,and and The marginal probability distribution is and Then the phase amplitude coupling situation is as follows:
[0039]
[0040] The single-layer phase amplitude coupling connection matrix is defined as follows:
[0041]
[0042] in, Indicates frequency band and frequency band Phase amplitude coupling between them ( and All taken from , , , and (frequency band), and It is from brain regions and The data are calculated from EEG signal data, which provide phase and amplitude information respectively.
[0043] S3: A multi-attention mechanism is used to extract spatiotemporal features from multi-frequency coupled features to obtain spatiotemporal features.
[0044] Multiple attention mechanisms include at least one of the following: fusion of graph attention, graph external attention, and temporal attention, used to mine spatial correlations and temporal dynamics in multi-frequency coupling features.
[0045] In some embodiments, a multi-attention mechanism is employed to extract spatiotemporal features from multi-frequency coupling features, resulting in spatiotemporal features. This includes inputting the phase-amplitude coupling connection matrix as graph node features into a graph attention network. Here, the graph node features are vectors representing the EEG signal features of each electrode channel. The graph attention network calculates the attention weights between nodes, learns the graph structure information within the connection matrix, and outputs spatial features.
[0046] More specifically, the computation method for graph attention networks is as follows:
[0047] graph node features ( ) and time The correlation matrix is set as the initial input information for the graph attention network. Wherein, An identifier representing the number of electrode channels. This represents the feature dimension of each node.
[0048] In some embodiments, calculating the attention weights between nodes using a graph attention network includes: performing a linear transformation on the node features; calculating the degree of influence between nodes using a feedforward neural network; normalizing the degree of influence using a softmax function to obtain the attention weights between nodes; and optimizing the spatial feature extraction results by fusing multiple sets of attention weights through a multi-attention head.
[0049] For input feature vectors and For a pair of nodes, nodes For nodes Impact Represented as:
[0050]
[0051] Among them, the weight matrix It is a weight matrix. The computation is limited to nodes. ,in Representative node The neighborhood, attention mechanism (with) (This is indicated here as a feedforward neural network.)
[0052] The softmax function is applied to normalize the weights of all neighboring nodes:
[0053]
[0054] Attention coefficient Represents a node and nodes Attention between, among which It is a node The nodes in the first-order neighbor set. Further, by introducing the LeakyReLU activation function and expanding the corresponding equations, the attention coefficients calculated by the attention mechanism are:
[0055]
[0056] in This indicates a join operation.
[0057] To improve the accuracy of feature learning, a multi-attention mechanism is employed here:
[0058]
[0059] in, Represents attention to the head, This represents the sigmoid activation function.
[0060] In some embodiments, a multi-attention mechanism is used to extract spatiotemporal features from multi-frequency coupled features to obtain spatiotemporal features. The method further includes introducing an external graph attention structure. The external graph attention structure contains learnable external units independent of the input graph, used to store cross-graph shared information. The attention degree between the multi-frequency coupled features and the external units is calculated, and the attention degree is optimized through double normalization processing to mine hidden information between cross-frequency coupled networks, outputting optimized spatial features.
[0061] An example method for computing graph extrinsic attention is as follows:
[0062] Calculate the nodal features X of the input graphic and the external units Attention level between them:
[0063]
[0064] in, , , . It is a learnable parameter independent of the input graph, and can be regarded as a parameter with... The external unit of each node is a shared memory unit for all input graphs.
[0065] In the external attention mechanism of graphs This represents the similarity between input graph nodes and external units. Considering the sensitivity of the attention matrix to the scale of input features, this is used here... A dual normalization technique was used, normalizing both rows and columns separately:
[0066]
[0067]
[0068]
[0069] In practical applications, to improve the network's capabilities, two different external units are used for the keys and values:
[0070]
[0071] in, It is a shared unit for storing connections between edges and nodes; It is the external key and value unit of a node.
[0072] Utilizing multi-head attention for computation:
[0073]
[0074]
[0075] in Indicates the first Size, It is the total number of heads. It is a linear transformation matrix. This represents a shared memory unit across different heads.
[0076] In some embodiments, a multi-attention mechanism is employed to extract spatiotemporal features from multi-frequency coupled features to obtain spatiotemporal features. This further includes inputting the spatial features output by the graph attention network and the graph external attention structure into a Transformer-based encoder. Temporal features are obtained by capturing the temporal dependencies of the features through multi-head attention sublayers in the encoder. The temporal dependencies indicate the associations between EEG features at different time points.
[0077] For example, in the operation mechanism of a multi-head attention layer, scaling dot product attention is a core component, involving the query matrix. Key matrix Sum matrix .
[0078]
[0079] Multi-head attention mechanisms enable the model to... , and The three matrices undergo different linear transformations and mappings, focusing on different representational subspaces in parallel at different locations.
[0080]
[0081] in, , , .
[0082] Use the Concat(⋅) function to aggregate attention scores from multiple heads:
[0083]
[0084] in, .
[0085] In addition to the multi-head attention sublayer, each encoder module is equipped with a fully connected feedforward network (FFN), which can perform independent and identical operations on each position or node in the sequence. The FFN consists of two linear transformation stages separated by a non-linear activation function.
[0086]
[0087] In some embodiments, the encoder of the Transformer model includes a fully connected feedforward network. After capturing the temporal dependencies of features through a multi-head attention sublayer in the encoder to obtain temporal features, the method further includes: performing two linear transformations on the temporal features through the feedforward network, and using a non-linear activation function to process the temporal features during the two linear transformations, thereby outputting spatiotemporal features.
[0088] S4: Based on the extracted spatiotemporal features, the pre-ictal and interictal periods of patients are distinguished to predict epileptic seizures.
[0089] The epilepsy seizure prediction method integrating multi-frequency coupling and multiple attention mechanisms provided in this application effectively purifies EEG signals through preprocessing, laying a reliable data foundation for subsequent analysis. Considering that cross-frequency coupling between different neural signal oscillation components can help distinguish different stages of epilepsy, the model uses cross-band phase-amplitude coupling to learn key information of multi-frequency coupling, capturing the interaction relationships between EEG signals of different frequencies. When constructing multi-frequency coupling features, the phase and amplitude coupling relationships between EEG signals of different frequency bands are fully considered, which, compared to methods focusing only on a single frequency band, can more comprehensively reflect the state of brain activity.
[0090] The employed multi-attention mechanism achieves deep fusion of spatial and temporal information from EEG signals, enhancing feature discrimination capabilities. To further optimize model performance, an external graph attention mechanism is introduced to perform in-depth learning on various constructed graph structures. By adaptively allocating attention weights, key information is highlighted, and latent patterns in the data are better mined, overcoming the limitations of self-attention mechanisms in multi-graph learning.
[0091] By classifying epileptic seizures using a combination of multi-frequency coupling features and spatiotemporal characteristics, the model can more accurately distinguish between the preic and interictal phases, effectively improving the accuracy and sensitivity of seizure prediction. Furthermore, the model is more adaptable to individual patient differences, reducing prediction bias caused by variations in individual EEG signal characteristics, and demonstrates good generalization performance in cross-patient experiments.
[0092] For example, such as Figure 2 As shown, this application obtained EEG data from 19 patients by using the publicly available scalp EEG dataset CHB-MIT, and used an epileptic seizure prediction method that integrates multi-frequency coupling and multiple attention mechanisms to distinguish between the pre-seizure and interictal periods of the patients.
[0093] ACC (Accuracy) reflects the overall accuracy of predictions. SEN (Sensitivity / Recall / True Positive Rate): This is the proportion of pre-ictal (positive) samples correctly predicted by the model, reflecting the model's ability to identify pre-ictal samples. SPE (Specificity / True Negative Rate): This is the proportion of interictal (negative) samples correctly predicted by the model, reflecting the model's ability to identify interictal samples. FPR (False Positive Rate): This is the proportion of interictal (negative) samples incorrectly predicted as pre-ictal, reflecting the false positive rate. F1-score: This is the harmonic mean of Precision and Sensitivity (SEN), comprehensively measuring the model's precision and recall. Figure 2 It can be seen that ACC, SEN, SPE, and F1-score are high, while FPR is low. Therefore, the method provided in this application embodiment has a high accuracy in predicting results.
[0094] To verify the generalization performance of the method, experiments were also conducted on the Siena dataset, and the results are as follows: Figure 3 As shown. Also according to Figure 3 It can be seen that ACC, SEN, SPE, and F1-score are high, while FPR is low. Therefore, the method provided in this application embodiment has a high accuracy in predicting results.
[0095] This application also conducted ablation experiments to verify the effectiveness of the method, for example, such as Figure 4 As shown, after the steps that lose temporal features or spatial features, ACC, SEN, SPE, and F1-score decrease, while FPR increases. This indicates that the use of a multiple attention mechanism to extract spatiotemporal features from multi-frequency coupled features plays an important role in the method provided in this application.
[0096] In the description of this specification, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.
[0097] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for predicting epileptic seizures that integrates multi-frequency coupling and multiple attention mechanisms, wherein the method is executed by a computer, characterized in that, include: S1: Preprocess the EEG data to obtain preprocessed EEG data; wherein, the EEG data includes electrical activity signals of brain neurons recorded by electrodes; S2: Based on the preprocessed EEG data, the pre-ictal and interictal periods of epilepsy are divided, and multi-frequency coupling features are constructed, including: dividing the EEG data into multiple frequency bands using a bandpass filter; calculating the phase amplitude coupling data between each pair of frequency bands to form a phase amplitude coupling connection matrix; wherein, the phase amplitude coupling connection matrix is a matrix of the coupling strength between the phase and amplitude of EEG signals in different frequency bands; S3: A multi-attention mechanism is used to extract spatiotemporal features from multi-frequency coupling features to obtain spatiotemporal features, including: inputting the phase amplitude coupling connection matrix as graph node features into the graph attention network; wherein, the graph node features are vectors representing the EEG signal features of each electrode channel; The attention weights between nodes are calculated using a graph attention network to learn the graph structure information within the connection matrix and output spatial features. An external graph attention structure is introduced, which contains learnable external units independent of the input graph for storing cross-graph shared information. The attention between multi-frequency coupling features and external units is calculated, and the attention is optimized through double normalization to mine hidden information between cross-frequency coupling networks and output the optimized spatial features. The spatial features output by the graph attention network and the graph external attention structure are input into the encoder based on the Transformer model. Temporal features are obtained by capturing the temporal dependencies of features through a multi-head attention sublayer in the encoder; wherein, the temporal dependencies indicate the association between EEG features at different time points; the multi-attention mechanism includes fusion of graph attention, graph external attention and temporal attention, used to mine the spatial association and temporal dynamics in multi-frequency coupled features; S4: Based on the extracted spatiotemporal features, the pre-ictal and interictal periods of patients are distinguished to predict epileptic seizures.
2. The method for predicting epileptic seizures by integrating multi-frequency coupling and multiple attention mechanisms according to claim 1, characterized in that, The preprocessing includes: removing data corresponding to electrodes that did not collect valid EEG signals, bandpass filtering, notch filtering, removing ICA artifacts, and normalizing and standardizing the electrical activity signals of the brain neurons.
3. The method for predicting epileptic seizures by integrating multi-frequency coupling and multiple attention mechanisms according to claim 1, characterized in that, The division of the pre-ictal and interictal periods in epilepsy includes: Construct a seizure prediction period and a seizure occurrence period; wherein the seizure prediction period is used to predict the time window of a seizure, and the seizure occurrence period indicates the time interval in which a seizure actually occurs. The EEG data prior to the onset of the epileptic seizure and within the predicted period of the epileptic seizure are classified as pre-seizure data, and the EEG data not in the pre-seizure period or the onset period of the epileptic seizure are classified as interictal data.
4. The method for predicting epileptic seizures by integrating multi-frequency coupling and multiple attention mechanisms according to claim 1, characterized in that, The construction of multi-frequency coupling features includes: The multiple frequency bands include the θ band, α band, β band, γ1 band, and γ2 band.
5. The method for predicting epileptic seizures by integrating multi-frequency coupling and multiple attention mechanisms according to claim 4, characterized in that, The calculation of phase amplitude coupling data between any two frequency bands in the plurality of frequency bands to form a phase amplitude coupling connection matrix includes: Phase and amplitude information of EEG signals in each frequency band are obtained by Hilbert transform; wherein, the phase information indicates the phase angle characteristics of EEG signal oscillation, and the amplitude information indicates the amplitude characteristics of EEG signal oscillation. Based on the phase and amplitude information, the coupling strength between phase and amplitude in different frequency bands is calculated, and a phase-amplitude coupling connection matrix is generated.
6. The method for predicting epileptic seizures by integrating multi-frequency coupling and multiple attention mechanisms according to claim 1, characterized in that, The calculation of attention weights between nodes using a graph attention network includes: The node features are linearly transformed, and the degree of influence between nodes is calculated through a feedforward neural network. The influence level is normalized using the softmax function to obtain the attention weights between nodes; By fusing multiple attention weights through a multi-attention head, the spatial feature extraction results are optimized.
7. The method for predicting epileptic seizures by integrating multi-frequency coupling and multiple attention mechanisms according to claim 1, characterized in that, The encoder of the Transformer model includes a fully connected feedforward network; After obtaining temporal features by capturing the temporal dependencies of features through the multi-head attention sublayer in the encoder, the method further includes: The time-series features are subjected to two linear transformations through the feedforward network. During the two linear transformations of the time-series features, a nonlinear activation function is used to process them, and the spatiotemporal features are output.
Citation Information
Patent Citations
Method for extracting cross frequency coupling characteristics of electrocorticogram signals
CN116473572A
Signal phase-amplitude coupling strength measurement method and device based on Omega complexity
CN117530700A