An epilepsy electroencephalogram classification method based on an iterative graph convolutional neural network
By optimizing the graph structure and parameters through iterative graph convolutional neural networks, the problem of graph topology relying on manual definition in existing technologies is solved, thereby improving the accuracy and stability of epilepsy EEG classification.
Patent Information
- Application Number
- CN202310623456.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-30
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-05-30
AI Technical Summary
Existing graph convolutional neural networks rely on manually defined graph topologies for epilepsy EEG classification, which cannot reflect the true topological structure of the data. Furthermore, the graph topology remains unchanged during training, affecting classification performance.
An iterative graph convolutional neural network is employed. By calculating the node similarity and distance similarity of epilepsy EEG data, a multi-head graph attention mechanism is introduced to learn the node similarity metric. The graph structure and the parameters of the graph convolutional neural network are iteratively optimized to find the optimal graph structure to improve classification performance.
It achieves more accurate EEG classification for epilepsy, improves classification accuracy and stability, and optimizes the representation capability of graph structures.
Smart Images

Figure CN116831594B_ABST
Abstract
Description
Technical fields:
[0001] This invention belongs to the field of electroencephalogram (EEG) processing technology, specifically relating to an epilepsy EEG classification method based on iterative graph convolutional neural networks. Background technology:
[0002] Neurons in the brain communicate with each other via electrical signals. When neurons discharge excessively or inappropriately, exceeding the brain's control, it can lead to symptoms that harm physical health, including limb convulsions, foaming at the mouth, upward rolling of the eyes, brief periods of confusion, or loss of consciousness—a condition known as epilepsy. Epilepsy is one of the oldest known diseases in human history. According to statistics from the World Health Organization (data as of February 9, 2022), approximately 65 million people worldwide are affected by epilepsy, with nearly 80% of patients living in low- and middle-income developing countries. Approximately 4 to 10 out of every 1,000 people suffer from active epilepsy. Currently, the diagnosis of epilepsy is usually performed by collecting and analyzing spontaneous brain electrical activity signals. This involves using a data acquisition device to record the frequency and amplitude of brain cell discharges over a period of time at specific locations on the scalp (electrode channels) in the absence of external stimuli, creating a time-varying electroencephalogram (EEG). Feature analysis and modeling of EEG data can effectively extract EEG data features and identify epileptic EEG signals, which can assist doctors in making a faster and more accurate diagnosis and has significant clinical application value.
[0003] There are temporal and spatial correlations between EEG data from different channels. Existing studies typically abstract electrode channels as nodes and the correlations between channels as edges, representing EEG data in the form of a graph. Studies have shown that the graph topology of EEG data from epilepsy patients is significantly different from that of healthy individuals, providing important evidence for graph-based EEG classification of epilepsy signals. Graph Convolutional Networks (GCNs) are deep learning models for processing graph structures. They perform message passing between nodes and their neighbors, then aggregate the passed information. GCN models improve performance by stacking multiple convolutional layers and can be used for both node and graph classification, demonstrating excellent performance in many practical applications. Currently, researchers have applied GCNs to the classification of epilepsy EEG disorders. Chen et al. proposed an automatic epilepsy EEG detection model based on graph convolutional networks (E-GCN), which has a 5-layer graph convolutional structure. Experiments on the public datasets Boon and CHB-MIT show that E-GCN significantly improves classification accuracy. Zeng et al. proposed using Hierarchical Graph Convolution Networks (HGCN) to process raw EEG signals, using multiple time-domain and frequency-domain features extracted from them as network input. HGCN utilizes the topological relationships between each single electrode, improving accuracy by 5.77% on the CHBMIT dataset and sensitivity and specificity by 2.43% on the TUH dataset. Yang et al. proposed a spatiotemporal-spectral hierarchical graph convolutional network and an active pre-spike interval learning scheme for patient-specific EEG seizure prediction. Yanna et al. proposed a seizure detection model based on linear graph convolutional networks (LGCN), enhancing the feature embedding of raw EEG signals during both epileptic and non-epileptic seizures, achieving good results on the CHB-MIT dataset.
[0004] While Generative Graph Networks (GCNs) perform well in epilepsy EEG classification tasks, this is contingent on the high accuracy of the graph topology used for training. The graph topology input to GCNs is typically manually defined and calculated based on expert experience. Since the graph topology is constructed from the original feature space of the data, this construction method does not reflect the true topological structure of the data, inevitably impacting GCN performance. Furthermore, during training, GCNs usually rely on a fixed graph topology and cannot optimize the graph topology according to the classification task to better support it. Iterative Deep Graph Learning (IDGL) is a novel graph neural network model that iteratively updates the graph during training to find the optimal graph structure for classification. This model uses cosine similarity to measure graph similarity in order to learn the graph structure, but its classification performance has certain limitations. Summary of the Invention:
[0005] To address the aforementioned problems, this invention aims to propose an epilepsy EEG classification method based on iterative graph convolutional neural networks. The method uses node similarity and distance similarity of epilepsy EEG data as the original graph structure, introduces a multi-head graph attention mechanism for node similarity metric learning, and iteratively optimizes the graph structure and the parameters of the graph convolutional neural network to find the optimal graph structure and achieve the best epilepsy EEG classification performance. Experiments on the TUEP bipolar and unipolar montage datasets, as well as the TUAB and MPI LEMON joint dataset, validate the effectiveness of the proposed method.
[0006] To achieve the above objectives, the present invention relates to an epilepsy EEG classification method based on iterative graph convolutional neural networks, which specifically includes the following steps:
[0007] (1) Collect EEG data, calculate the multi-feature matrix of the multi-channel epilepsy EEG as the original EEG channel node feature init_node, calculate the epilepsy EEG node similarity based on the original EEG node feature as the original graph structure init_adj, and the two parts together form the graph data usable by GCN, which is used as the input of E-IGCN;
[0008] Specifically, in step (1), the power spectral density and other features of the original EEG are extracted as original EEG channel node features by performing analysis methods such as frequency domain analysis, time-frequency analysis and nonlinear dynamic analysis.
[0009] Specifically, in step (1), the original graph structure init_adj can be calculated from the relative positions of the electrode channels and the original feature space, which are the spatial distance relationships between channel i and channel j, respectively. Spectral correlation between channel i and channel j Specifically, the similarity of all nodes is calculated using formulas (4)-(6), forming a similarity matrix D, which is init_adj.
[0010]
[0011]
[0012]
[0013] Among them, (x i ,y i ,z i ) and (x j ,y j ,z j (x) represents the points on a sphere of radius r located in Cartesian coordinate space for channels i and j, respectively. i (f) and x j (f) are the time series of channels i and j, respectively. and Fourier transform, For x j The complex conjugate of (f).
[0014] (2) Input init_node and init_adj into the similarity measurement learning module and update the graph structure to the first layer new_adj, or input the (t-1)th layer new_node and new_adj into the similarity measurement learning module and update the graph structure to the tth layer new_adj, where t is the iteration layer number and is a positive integer greater than or equal to 2;
[0015] Step (2) specifically includes:
[0016] (201) EEG channel i and EEG channel j are two adjacent nodes in the input graph. For the embedding vectors of these two EEG channels... and and The attention value e is calculated from the original node features init_node or the node embeddings new_node trained from the previous GCN layer. ij The calculation method is shown in formula (7).
[0017]
[0018] Here, W is a learnable weight vector, which is used to adjust the channel features. and The data is augmented by concatenating the features of the high-dimensional embedding vector. Finally, α() is used to map the concatenated high-dimensional vector into a scalar to obtain the attention score of channel i for channel j.
[0019] (202) The attention value e of each neighbor of the EEG channel i ij A normalization operation is performed by dividing the sum of the attention scores of each neighbor by the sum of the attention scores of all neighbors. The normalized attention weight is used as the final channel similarity score. The specific method is shown in formula (8).
[0020]
[0021] Where, N i Represents all neighboring nodes of channel i, e io This represents the attention values of brainwave channel i and brainwave channel o;
[0022] (203) According to formula (9), the similarity measurement function is modified to a multi-head attention mechanism, and the multi-head results are integrated by averaging to obtain the similarity A between nodes i and j. ij The similarity of all nodes forms a non-negative edge weight matrix A;
[0023] (204) Set a non-negative threshold ε, and set all elements in A that are less than ε to 0, to obtain an asymmetric sparse non-negative adjacency matrix A. * Let A (t) =A * This achieves sparsification of the graph topology, where ε is set to 0.1;
[0024] (205) According to formula (10), A (1) Weighted by init_adj, we get the first-level new_adj, or we take A (t) Weighted sum of new_adj from the first level is used to obtain new_adj from the t-th level.
[0025] A *(t) =λL (0) +(1-λ){ηf(A (t) )+(1-η)f(A (1) )} (10)
[0026] Among them, A *(t) This represents the new graph structure obtained at each level. Let A represent the normalized adjacency matrix of the initial graph. (0) That is, init_adj; A (t) and A (1) These are the two adjacency matrices calculated in the t-th and 1-th iterations, A. (1) It is calculated based on the original node features, and A (t) It is based on the node embedding Z updated in t-1 iterations. t-1(i.e., the new_node of the previous layer) is calculated. f() is the normalization method, which normalizes the calculated adjacency matrix. The calculation method is shown in formula (11), where N i This represents all neighboring nodes of node i.
[0027]
[0028] (3) Then, init_node and the first layer new_adj are used as inputs to the graph convolutional neural network GCN. According to formula (12), the neighbor node information is aggregated with the help of the new graph structure, and the node features are updated to the first layer new_node.
[0029] Alternatively, the (t-1)th layer new_node and the tth layer new_adj can be used as inputs to the graph convolutional neural network GCN. According to formula (12), the neighbor node information is aggregated with the help of the new graph structure, and the node features are updated to the tth layer new_node. This process is iterated until the best epilepsy EEG classification effect is achieved.
[0030]
[0031] Where H (t) Let I represent the feature vector matrix of layer t (i.e., init_node or corresponding new_node), where I is the identity matrix. D is A (t) The degree matrix, σ is a non-linear activation function, W (l) This represents the trainable parameter matrix of the l-layer convolutional transformation.
[0032] Compared with the prior art, the present invention has the following beneficial effects: it has better epilepsy EEG classification effect and obtains more accurate EEG structure. Attached image description:
[0033] Figure 1 This is a diagram of the overall architecture of IDGL.
[0034] Figure 2 This is a diagram of the overall framework of the E-IGCN method.
[0035] Figure 3 This is a flowchart of the E-IGCN method workflow.
[0036] Figure 4 This is a schematic diagram of the E-IGCN iteration process.
[0037] Figure 5 These are the edge weight heatmaps before and after training, where (a) is the edge weight heatmap before training and (b) is the edge weight heatmap after training.
[0038] Figure 6 The diagrams show the network topology before and after training, where (a) is the network topology before training and (b) is the network topology after training.
[0039] Figure 7 The diagrams show the network topology before and after training for the selected 8 channels, where (a) is the network topology before training for the selected 8 channels, and (b) is the network topology after training for the selected 8 channels.
[0040] Figure 8 This is a graph showing the effect of parameter λ on model performance.
[0041] Figure 9 The graph shows the effect of parameter η on the model performance.
[0042] Figure 10 These are the edge weight heatmaps before and after training, where (a) is the edge weight heatmap before training and (b) is the edge weight heatmap after training.
[0043] Figure 11 The diagrams show the network topology before and after training, where (a) is the network topology before training and (b) is the network topology after training. Detailed implementation method:
[0044] The present invention will be further described below through embodiments.
[0045] Example 1:
[0046] I. Iterative Deep Graph Learning Model
[0047] IDGL is an end-to-end iterative deep graph learning model for iteratively learning graph structures and graph embeddings. IDGL provides an iterative learning approach based on graph neural networks to optimize network graph topology. It learns better graph structures based on better node embeddings, and conversely, learns better node embeddings based on better graph structures. The iterative method dynamically stops when the learned graph structure approaches the graph optimized for the downstream prediction task.
[0048] Figure 1 This section demonstrates the overall idea of the IDGL model. IDGL uses similarity learning to learn a new graph structure based on the original node features. IDGL believes that although the initial graph may be noisy, it usually still carries rich and useful information about the real graph topology. The learned graph structure is used as a supplement to the original graph topology, and the two are weighted to obtain an optimized graph for the downstream task's GCN. The GNN uses the node embeddings generated by convolving the optimized graph as input features and feeds them back into the similarity learning, forming an iterative loop. After all iterations, IDGL predicts the loss L through the joint task. pred Graph regularization loss L GThe mixed loss L is obtained and backpropagated to update the model parameters, as shown in Equation (1).
[0049] L = L pred +L G (1)
[0050] IDGL uses multi-head weighted cosine similarity as the graph similarity metric, as shown in formula (2). ⊙ represents the Hadamard product, W p It is a learnable similarity weight vector, v i and v j This represents input vectors with the same shape. Multiple weight vectors are used to calculate different similarity coefficient matrices for weighting, as shown in formula (3).
[0051]
[0052]
[0053] II. Epilepsy EEG Signal Classification Model Based on Improved IDGL
[0054] To address a common problem in GCN studies of epileptic EEG, namely the training input graph structure being perfectly configured and unchanged during training, this paper proposes an improved version of IDGL to overcome the limited representational power of cosine similarity for graphs. A new multi-head graph attention mechanism is designed as a new graph similarity metric, leading to the development of an epileptic EEG classification method based on iterative graph convolutional neural network (E-IGCN). E-IGCN aims to search for an optimal epileptic EEG structure to enhance the graph representation capability and final disease classification performance of epileptic EEG.
[0055] like Figure 2 As shown, the model input is divided into two parts, represented by the graphs init_node and init_adj. The former calculates the multi-feature matrix of the epileptic EEG multi-channel as the original EEG channel node features, and the latter calculates the epileptic EEG node similarity based on the original EEG node features as the original graph structure. The two parts together constitute the graph data usable by GCN, which serves as the input to E-IGCN. The iterative learning part of E-IGCN consists of two aspects: graph similarity metric learning GLearn and graph convolutional neural network GCN.
[0056] Figure 3This paper demonstrates the overall workflow of E-IGCN, which involves acquiring EEG data, extracting graph data, and feeding it into an iterative learning model. After multiple rounds of iteration with GLearn and GCN, high-quality feature representations and graph topology are obtained. Finally, the entire graph is used for classification of epileptic EEG data. Specifically, this includes the following aspects:
[0057] (1) Image processing of EEG data
[0058] Brain M-channel EEG data is collected for a duration (typically ten minutes or more). The subject's EEG data is divided into N slices, each lasting 10 seconds. Each subject's EEG data is divided into several 10-second segments of M-channel EEG data. An undirected fully connected graph G is defined. n =(V,E) n ), representing the interaction relationships between channels in slice n. Where V represents the set of M (M = |V|) channels. The set of undirected edges between node sets V is represented by a weighted adjacency matrix. Let A represent the self-connected edges A of each node. ii =1,i=1,2,...,M.
[0059] For any slice, the original image structure can be calculated from the relative positions of the electrode channels and the original feature space, which are the spatial distance relationships between channel i and channel j, respectively. Spectral correlation between channel i and channel j Based on the position information of each channel in the 10-20 international standard lead system, the specific coordinate values of the channels in the Cartesian coordinate system are obtained. Channels i and j are located at points (x, y, y) on a sphere of radius r in the Cartesian coordinate space. i ,y i ,z i ) and (x j ,y j ,z j Geodesic distance between ) Defined as:
[0060]
[0061] Let x i (f) and x j (f) are the time series of channels i and j, respectively. and The Fourier transform of . The cross spectrum is defined as For x j The complex conjugate of (f). The spectral correlation between channel i and channel j is defined as the absolute value of the normalized cross spectrum, as shown in Equation (5).
[0062]
[0063] The similarity D between nodes i and j ij It is obtained by weighting spatial distance relationship and spectral correlation, and the calculation formula is as follows:
[0064]
[0065] The similarity of all nodes (channels) forms a similarity matrix D, which is init_adj.
[0066] (2) Similarity metric learning
[0067] Using a graph attention mechanism as a similarity metric, combined with the topological structure of the input graph, the relationship between each node and its neighboring nodes is learned, thereby assigning different attention weights to each node in order to better capture the relationships between nodes and the features of the graph structure.
[0068] First, EEG channel i and EEG channel j are two adjacent nodes in the input graph. For the embedding vectors of these two EEG channels... and (These two vectors can be the original node features or the node embeddings after GCN training), calculate their attention value e. ij The calculation method is shown in formula (7).
[0069]
[0070] Here, W is a learnable weight vector, which is used to adjust the channel features. and Data dimensionality enhancement is performed by concatenating features from the high-dimensional embedding vector. Finally, α() is used to map the concatenated high-dimensional vector into a scalar, yielding the attention score of channel i for channel j. The attention scores of all neighboring nodes of channel i are calculated, and the attention score of channel j for channel i needs to be recalculated. It's important to note that the concatenation operation causes e to... ij ≠e ji That is, the attention matrix of the entire image is asymmetric. Finally, the attention of each neighbor of the EEG channel is normalized. The attention score of each neighbor is divided by the sum of the attention scores of all neighbors. The normalized attention weight is used as the final channel similarity score. The specific method is shown in formula (8). i Represents all neighboring nodes of channel i, e io This represents the attention values of brainwave channels i and o.
[0071]
[0072] To stabilize the learning process and enhance the model's expressive power, as shown in formula (9), the similarity metric function is modified to a multi-head attention mechanism, and the averaging method is used to integrate the multi-head results. Specifically, for the K-head image attention mechanism, each head has its own independent weight parameter vector W. k K independent similarity matrices are calculated using formula (8), and their average value is used as the final attention score to form a non-negative edge weight matrix A.
[0073]
[0074] Among them, A ij Let A represent the similarity between nodes i and j obtained during the similarity measurement learning process. The similarity of all nodes obtained during the similarity measurement learning process forms a non-negative edge weight matrix A.
[0075] In many networks, the underlying graph structure is often much sparser than a fully connected graph. Since fully connected graphs are computationally expensive, unimportant edges may be introduced as noise into the data, affecting the final classification accuracy. Therefore, the idea of graph topological sparsity is introduced into graph similarity metric learning. Specifically, a non-negative threshold ε is set, and elements in A less than ε are set to 0, resulting in an asymmetric sparse non-negative adjacency matrix A. * This achieves sparsification of the graph topology, where ε is set to 0.1.
[0076] (3) Iterative optimization of parameters
[0077] Iterative learning is a method of gradually optimizing a model by repeatedly training and adjusting the model parameters to minimize the loss function and improve model performance. Figure 4 The iterative process of E-IGCN is demonstrated.
[0078] (301) After data preprocessing and feature engineering, the raw EEG data is used to obtain the raw node data init_node and the raw graph structure init_adj.
[0079] (302) Input init_node and init_adj into the similarity metric learning module (GLearn) to obtain the graph structure generated by the first iteration of GLearn, which corresponds to the asymmetric sparse non-negative adjacency matrix A. * Let A (1) =A * According to formula (10), the graph structure (A) generated by the first layer iteration GLearn is... (1) ) and init_adj(A (0) The weighted graph is then updated to new_adj (level 1), i.e., A. *(1) Let A(1) =A *(1) ;
[0080] A *(t) =λL (0) +(1-λ){ηf(A (t) )+(1-η)f(A (1) )} (10)
[0081] Among them, A *(t) L represents the new graph structure obtained at each layer. (0) =D (0)-1 / 2 A (0) D (0)-1 / 2 Let A represent the normalized adjacency matrix of the initial graph. (0) That is, init_adj; A (t) and A (1) These are the two adjacency matrices calculated in the t-th and 1-th iterations, A. (1) It is calculated based on the original node features, and A (t) It is based on the node embedding Z updated in t-1 iterations. t-1 (i.e., the new_node of the previous layer) is calculated. f() is the normalization method, which normalizes the calculated adjacency matrix. The calculation method is shown in formula (11), where N i This represents all neighboring nodes of node i.
[0082]
[0083] (303) Then, init_node(H) will be initialized simultaneously. (0) ) and new_adj (layer 1), as inputs to the graph convolutional neural network GCN, according to formula (12), aggregate neighbor node information with the help of the new graph structure, and update the node features to new_node (layer 1), i.e. H (1) ;
[0084]
[0085] Where H (t) Let I represent the feature vector matrix of layer t (i.e., init_node or corresponding new_node), where I is the identity matrix. D is A (t) The degree matrix, σ is a non-linear activation function, W (l) This represents the trainable parameter matrix of the l-layer convolutional transformation.
[0086] (304) Input the new_node (layer 1) and new_adj (layer 1) generated by the first iteration into the similarity metric learning module (GLearn) to obtain the graph structure generated by the second iteration of GLearn, which corresponds to the asymmetric sparse non-negative adjacency matrix A. * Let A (2) =A * According to formula (10), the graph structure (A) generated by the second layer iteration GLearn is... (2) ) and new_adj(1st layer)(A (1) The weighted graph structure is then updated to new_adj (2 levels), i.e., A. *(2) Let A (2) =A *(2) ;
[0087] (305) Then, new_node (layer 1) and new_adj (layer 2) are used as inputs to the graph convolutional neural network. The neighbor node information is aggregated with the help of the new graph structure. According to formula (12), the node features are updated to new_node (layer 2).
[0088] (306) Input the new_node (2nd layer) and new_adj (2nd layer) generated by the first layer iteration into the similarity measurement learning module (GLearn) and update the graph structure to new_adj (3rd layer);
[0089] (307) Then, new_node (layer 2) and new_adj (layer 3) are used as inputs to the graph convolutional neural network. The neighbor node information is aggregated with the help of the new graph structure, and the node features are updated to new_node (layer 3).
[0090] (308) Iterate sequentially until the best epilepsy EEG classification effect is achieved.
[0091] Only in the first iteration will `init_node` and `init_adj` be used directly, such as... Figure 4 As shown by the dashed lines 1-3, subsequent iterations only need to utilize the updated node features and graph structure, as shown by the solid lines 4-9 in the figure.
[0092] Considering that the original graph structure `init_adj` still carries rich and useful information about the real graph topology, the graph structure generated by the first-level iteration `GLearn` needs to be weighted with `init_adj` to retain some information from the original graph structure. The weights are balanced using the parameter λ to obtain the final `new_adj` usable by the first-level iteration GCN. Subsequent iterations follow this method. The difference from the first iteration is that in the weighting process of subsequent iterations, the graph structure generated by `GLearn` in the current iteration is first weighted with the `new_adj` saved in the first iteration, balanced using the parameter η, and then weighted with the original graph structure `init_adj`.
[0093] Network setup and parameter settings
[0094] The E-IGCN model was built using the PyTorch framework. After multiple experiments and debugging, the optimal set of hyperparameters was selected, with Adam as the optimizer, a learning rate of 0.001, and a batch size of 32. The specific settings for other important hyperparameters are shown in Table 1, where `hidden_size` is the number of neurons in the hidden layer of the GCN, `max_iter` is the maximum number of iterations (if the validation set performance no longer improves during iteration, the iteration can be terminated early), `node_num` is the number of EEG nodes, `epoch` is the number of training epochs, `gl_dropout` is the dropout rate for node similarity learning, and `graph_skip_conn` and `update_adj_ratio` are the weighting parameters λ and η for the original graph structure and the first-layer optimized graph structure, respectively.
[0095] Table 1 Hyperparameter Value Settings
[0096]
[0097] Validity verification
[0098] To verify the ability of the graph structure generated by E-IGCN to improve the original graph and the accuracy of the model in classifying epilepsy EEG, a graph convolutional neural network with two graph convolutional layers was used as a control group for the standard GCN, denoted as E-GCNN. The input to the model with the two graph convolutional layers was consistent with E-IGCN, and the E-IGCN model was validated using the TUEP bipolar montage channel dataset. To verify the performance of the multi-head graph attention mechanism used by E-IGCN in calculating node similarity using cosine similarity, the iterative deep graph learning model IDGL was selected as a control group for comparing its performance with E-IGCN.
[0099] To avoid the randomness of the E-IGCN model on a single dataset and further ensure its generalization ability and reliability, other datasets were used for validation, including the TUEP unipolar montage channel dataset and the TUAB and MPILEMON joint dataset. By testing and validating on different datasets, the performance and application value of the E-IGCN method can be more comprehensively evaluated, and its applicability across different datasets can be determined, providing a more accurate and reliable tool for epilepsy detection and diagnosis.
[0100] Both E-IGCN and the control group models E-GCNN and IDGL were evaluated using metrics such as accuracy, precision, recall, F1 score, and AUC (Area Under Curve).
[0101] TUEP Bipolar Montage Channel Dataset
[0102] The TUH EEG dataset (https: / / isip.piconepress.com / projects / tuh_eeg / html / downloads.shtml) consists of 16,986 sessions from 10,874 individual subjects. Each session contains at least one EDF file (more EDF files are included in long-term monitoring sessions) and a physician report. To facilitate downloading the dataset for researchers, the website stores all data from each patient as separate gzip files, with an average file size of 4.1 MB and a total file size of 330 GB (Obeid I, Picone J. The temple university hospital EEG data corpus[J]. Frontiers in neuroscience, 2016, 10:196). 51% of the subjects were female, ranging in age from under 1 year old to over 90 years old, and the average number of treatments per patient was 1.56. The most common number of channels in the recorded files in the dataset was 31 (53%), while some cases had only 28 (30%) or 23 (17%) channels. This data is up to version v0.6 and has been fully updated to version v3.0 as of December 17, 2022 (Obeid I, Picone J. The temple universityhospital EEG data corpus[J]. Frontiers in neuroscience,2016,10:196).
[0103] TUEP (The TUH EEG Epilepsy Corpus) is a subset of the TUH EEG database, downloadable at https: / / isip.piconepress.com / projects / tuh_eeg / downloads / tuh_eeg_epilepsy / . This dataset contains EEG information from 237 subjects, including 1360 EEG signal recordings from 133 epilepsy patients during seizures and 288 EEG signal recordings from 104 subjects (some of whom were non-epilepsy individuals to balance the corpus), totaling 1648 EEG signal files (Veloso L, McHugh J, von Weltin E, et al. Big data resources for EEGs: Enabling deep learning research[C] / / 2017IEEE Signal Processing in Medicine and Biology Symposium(SPMB).IEEE,2017:1-3). Three types of monopole electrode records were used for reference during data acquisition: 01_tcp_AR, 02_tcp_LE, and 03_tcp_AR_a. All samples in this dataset are stored in EDF format, and the TUEP dataset version used is v1.3.0.
[0104] For the TUEP dataset, a bipolar channel set ["O1-T5","T5-T3","T3-F7","F7-FP1","O1-P3","P3-C3","C3-F3","F3-FP1","O2-P4","P4-C4","C4-F3","F4-FP2","O2-T6","T6-T4","T4-F8","F8-Fp2"] was selected. Power spectral density, wavelet energy sum, wavelet energy ratio, wavelet energy entropy, approximate entropy, and Shannon entropy features were extracted and combined as node features. The distance correlation and spectral correlation between channels were calculated as the original graph structure.
[0105] Table 2 shows the performance of E-IGCN and the control model at the subject level. E-IGCN achieved accuracy, precision, recall, F1 score, and AUC of 0.947, 0.967, 0.926, 0.946, and 0.948 at the subject level, comprehensively outperforming the other two models. Specifically, compared to E-GCNN (the control group for ordinary GCN), E-IGCN improved all evaluation metrics by 4%-11%, with the largest improvement in recall (10.8%). E-IGCN also showed a significant improvement over the IDGL model using cosine similarity, with improvements ranging from 1% to 3%.
[0106] Table 2. Effects of E-IGCN compared to the control group at the subject level.
[0107]
[0108] To observe the changes in the graph adjacency matrix before and after training Figure 5 The selected image displays a heatmap of edge weight relationships for a specific subject slice before and after training. The number 1 on the diagonal indicates that a node has a 100% similarity to itself. Figure 5 As can be seen, the edge weights changed significantly before and after training, and the right figure can be considered as the optimized graph structure.
[0109] To more intuitively view the optimization effect of the network topology before and after training, slice 1 of subject "10590" is used as an example. Figure 6 This shows the network topology before and after training for this slice. Nodes represent EEG channels, and the thickness of the edges is positively correlated with their weights; thicker lines have larger weights. Figure 6 The network topology graph of this slice was optimized from a fully connected graph before training to an asymmetric sparse graph.
[0110] because Figure 7 The complete channel topology is shown. For ease of explanation, eight bipolar channels from slice 1 of subject "10590"—"O1-T5", "T5-T3", "T3-F7", "F7-FP1", "O1-P3", "P3-C3", "C3-F3", and "F3-FP1"—are selected to illustrate the local topology of the network. The network topology before and after training for these eight channels is plotted as follows. Figure 7 As shown, more than 10 edges, including "O1-T5"-"C3-F3", "T3-F7"-"O1-P3" and "O1-P3"-"F3-FP", were canceled because the similarity weights between some nodes were less than the set threshold ε after training.
[0111] In the iterative process of the E-IGCN method, parameters η and λ are two crucial parameters. To investigate the impact of these two parameters on the performance of the E-IGCN method, we first set parameter λ to 0.5, then adjusted the value of parameter η to find the optimal value. Next, we set parameter η to 0.5 and adjusted the value of parameter λ to find the optimal value of λ. Figure 8 and Figure 9 As shown, the E-IGCN method performs best when the parameter λ equals 0.3 and the parameter η equals 0.4.
[0112] TUEP Single-Pole Montage Channel Dataset
[0113] Instead of selecting channels or combining bipolar channels for the TUEP dataset, we directly use the potential difference between the original electrode signal and the reference electrode signal to perform preprocessing and feature extraction on the data, in order to eliminate any data randomness caused by the combination of bipolar channels. A set of all single-pole montage channels ["FP1-REF","FP2-REF","F3-REF","F4-REF","C3-REF","C4-REF","P3-REF","P4-REF","O1-REF","O2-REF","F7-REF","F8-REF","T3-REF","T4-REF","T5-REF","T6-REF","A1-REF","A2-REF","FZ-REF","CZ-REF","PZ-REF"] was selected. Power spectral density, wavelet energy sum, wavelet energy ratio, wavelet energy entropy, approximate entropy, and Shannon entropy features were extracted as node features. The spectral similarity of the nodes was calculated as the edge features. After slicing the data, the original dataset was shuffled, and 70% of the samples were randomly selected as the training set, with the remaining 30% used as the test set.
[0114] Using the TUEP single-pole montage channel dataset, E-GCNN, IDGL, and E-IGCN were trained respectively, and the test set results are shown in Table 3. E-IGCN achieved subject-level accuracy, precision, recall, F1-Score, and AUC of 0.974, 0.979, 0.968, 0.973, and 0.976, respectively, comprehensively outperforming E-GCNN and IDGL, with improvements ranging from 2% to 10%. Specifically, compared to E-GCNN, E-IGCN improved each metric by 9.8%, 5.5%, 12.3%, 9.0%, and 6.4%, respectively, and compared to IDGL, it improved by 1.2%, 0.1%, 2.2%, 1.1%, and 0.8%, respectively.
[0115] Table 3. Effects of E-IGCN compared to the control group at the subject level.
[0116]
[0117] TUAB and MPI LEMON joint dataset
[0118] TUAB is another subset from the TUH EEG database, known as the TUH EEG Abnormality Corpus, released as a derived dataset. The download link is https: / / isip.piconepress.com / projects / tuh_eeg / downloads / tuh_eeg_abnormal / . MPI LEMON is a dataset of EEG samples from 227 healthy subjects in Leipzig, Germany, and can be downloaded from http: / / fcon_1000.projects.nitrc.org / indi / retro / MPI_LEMON / . The dataset was acquired using a 10-10 international standard lead system with 62 electrodes and a sampling rate of 2500 Hz. The data acquisition window for each subject consisted of 16 trials, each lasting 60 seconds (Babayan A, Erbey M, Kumral D, et al. A mind-brain-body dataset of MRI, EEG, cognition, emotion, and peripheral physiology in young and old adults[J]. Scientific data, 2019, 6(1): 1-21). Table 4 shows the sample distribution of the TUAB dataset.
[0119] Table 4 shows the sample distribution of the TUAB dataset.
[0120]
[0121] In the validation experiment, following the method of Wagh et al. (Wagh N, Varatharajah Y. Eeg-gcnn: Augmenting electroencephalogram-based neurological disease diagnosis using a domain-guided graph convolutional neural network[C] / / Machine Learning for Health.PMLR,2020:367-378), a set of useful healthy EEGs were obtained from subjects in the MPI LEMON dataset. Some subjects' original data were corrupted and were excluded. The obtained MPI LEMON dataset was used as the positive sample, and the negative samples were from the TUAB dataset. Only EEG recordings labeled as normal were used, ignoring those labeled as abnormal. A total of 1385 EEGs from 1385 different patients were obtained. Negative sample data were collected using the 10-20 international standard lead system, and 14 original channels were selected: ["F7-REF","F3-REF","F8-REF","F4-REF","T7-REF","C3-REF","T8-REF","C4-REF","P7-REF","P3-REF","P8-REF","P4-REF","O1-REF","O2-REF"]. Since the positive samples from MPI LEMON were acquired using the 10-10 international standard lead system, a subset of channels matching the electrode positions of the 10-20 system was selected based on their relative positions on the scalp. Each subject's EEG data comprised eight bipolar channels (four bipolar electrodes per hemisphere): F7-F3, F8-F4, T7-C3, T8-C4, P7-P3, P8-P4, O1-P3, and O2-P4. All recordings were segmented in 10-second increments, with a positive-to-negative sample ratio of 1:9. To mitigate the impact of positive-to-negative sample imbalance on model training, a subset of negative samples was randomly selected (to avoid human interference with the model) and combined with the positive samples to form the final dataset. Node features in the dataset were derived from the power spectral density extracted from each EEG slice, and edge features between nodes were the spectral correlations between channels; together, they formed a graph structure as input data.
[0122] Table 5 shows the performance of E-GCNN, E-IGCN, and IDGL on the test set of the TUAB and MPI LEMON joint datasets. As can be seen from Table 5, the graph-learnable IDGL and E-IGCN significantly outperform the graph convolutional neural network E-GCNN, which uses a non-updateable graph structure, on the TUAB and MPI LEMON joint datasets. E-IGCN achieves excellent classification accuracy at the subject level with scores of 0.979, 0.995, 0.965, 0.980, and 0.996, slightly higher than IDGL by about 1%.
[0123] Table 5. Effects of E-IGCN compared to the control group at the subject level.
[0124]
[0125] The 13th slide of subject number "000009017" was randomly selected as a sample. Figure 10 and Figure 11 The image shows the edge weight heatmap and network topology graph of the slice before and after training. Figure 10 (a) and Figure 11 (a) It can be seen that the initial graph of the EEG network before training is a fully connected graph with a symmetric edge weight matrix and a weight of 1 for the self-connected edges of nodes. Figure 10 (b) and Figure 11 (b) shows the network structure after training with E-IGCN. It can be seen that the network structure has changed from a fully connected graph to an asymmetric sparse graph. Figure 11 (b) As can be seen, the initial graph channel "F8-F4" of the slice has 7 neighbor nodes. After optimization, only one neighbor node remains besides itself. The edges "F8-F4"-"T7-C3", "F8-F4"-"P7-P3", "F8-F4"-"P8-P4", "F8-F4"-"O1-P3", "F8-F4"-"O2-P4" and "F8-F4"-"F7-F3" are deleted because they are below the threshold.
Claims
1. A method for classifying epilepsy EEG based on iterative graph convolutional neural networks, characterized in that, Specifically, the following steps are included: (1) Collect EEG data, calculate the multi-feature matrix of the multi-channel epilepsy EEG as the original EEG channel node feature init_node, and calculate the epilepsy EEG node similarity based on the original EEG node feature as the original graph structure init_adj. (2) Input init_node and init_adj into the similarity measurement learning module and update the graph structure to the first layer new_adj, or input the (t-1)th layer new_node and new_adj into the similarity measurement learning module and update the graph structure to the tth layer new_adj, where t is the iteration layer number and is a positive integer greater than or equal to 2; Step (2) includes: (201) EEG channel i and EEG channel j are two adjacent nodes in the input graph. For the embedding vectors of these two EEG channels... and and The attention value e is calculated from the original node features init_node or the node embeddings new_node trained from the previous GCN layer. ij The calculation method is shown in formula (7); Here, W is a learnable weight vector, which is used to adjust the channel features. and The data is augmented by concatenating the features of the high-dimensional embedding vector. Finally, α(·) is used to map the concatenated high-dimensional vector into a scalar to obtain the attention score of channel i for channel j. (202) The attention value e of each neighbor of the EEG channel i ij A normalization operation is performed by dividing the sum of the attention scores of each neighbor by the sum of the attention scores of all neighbors. The normalized attention weight is used as the final channel similarity score. The specific method is shown in formula (8). Where, N i Represents all neighboring nodes of channel i, e io This represents the attention values of brainwave channel i and brainwave channel o; (203) According to formula (9), the similarity measurement function is modified to a multi-head attention mechanism, and the multi-head results are integrated by averaging to obtain the similarity A between nodes i and j. ij The similarity of all nodes forms a non-negative edge weight matrix A; in, α represents the k-th head independent ij ; (204) Set a non-negative threshold ε, and set all elements in A that are less than ε to 0, to obtain an asymmetric sparse non-negative adjacency matrix A. * Let A (t) =A * This achieves sparsification of the graph topology, where ε is set to 0.1; (205) According to formula (10), A (1) Weighted by init_adj, we get the first-level new_adj, or we take A (t) Weighted sum of new_adj from the first level is used to obtain new_adj from the t-th level. A *(t) =λL (0) +(1-λ){ηf(A (t) )+(1-η)f(A (1) )} (10) Among them, A *( t ) L represents the new graph structure obtained at each layer. (0) =D (0)-1 / 2 A (0) D (0)-1 / 2 Let A represent the normalized adjacency matrix of the initial graph. (0) That is, init_adj; A (t) and A (1) These are the two adjacency matrices calculated in the t-th and 1-th iterations, A. (1) It is calculated based on the original node features, and A (t) It is based on the node embedding Z updated in t-1 iterations. t-1 Z was calculated. t-1 For the new_node of the previous layer, f() is the normalization method, which normalizes the calculated adjacency matrix. The calculation method is shown in formula (11), where N i Represents all neighboring nodes of node i; (3) Then, init_node and the first layer new_adj are used as inputs to the graph convolutional neural network GCN. According to formula (12), the neighbor node information is aggregated with the help of the new graph structure, and the node features are updated to the first layer new_node. Alternatively, the (t-1)th layer new_node and the tth layer new_adj can be used as inputs to the graph convolutional neural network GCN. According to formula (12), the neighbor node information is aggregated with the help of the new graph structure, and the node features are updated to the tth layer new_node. This process is iterated until epilepsy EEG classification is achieved. Where H (t) This represents the eigenvector matrix of layer t, where init_node or the corresponding new_node, and I is the identity matrix. D is A (t) The degree matrix, σ is a non-linear activation function, W (l) This represents the trainable parameter matrix of the l-layer convolutional transformation.
2. The epilepsy EEG classification method based on iterative graph convolutional neural networks according to claim 1, characterized in that, In step (1), the original graph structure init_adj can be calculated from the relative positions of the electrode channels and the original feature space, which are the spatial distance relationships between channel i and channel j. Spectral correlation between channel i and channel j Specifically, the similarity of all nodes is calculated using formulas (4)-(6), forming a similarity matrix D, which is init_adj. Among them, (x i ,y i ,z i ) and (x j ,y j ,z j (x) represents the points on a sphere of radius r located in Cartesian coordinate space for channels i and j, respectively. i (f) and x j (f) are the time series of channels i and j, respectively. and Fourier transform, For x j The complex conjugate of (f).
Citation Information
Patent Citations
Epilepsy detection system based on graph attention residual network and focus loss
CN113197545A
Method for extracting electroencephalogram core network
CN115631371A