Epilepsy detection method combining double variational graph auto-encoder and adversarial learning

By combining dual variational graph autoencoders with adversarial learning, the problem of insufficient feature capture in EEG signal diagnosis by traditional methods is solved, achieving more efficient epilepsy detection and improving the accuracy and robustness of the model.

CN121075686AActive Publication Date: 2025-12-05QUFU NORMAL UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511237535.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-12-05
Estimated Expiration
2045-09-01

AI Technical Summary

Technical Problem

Traditional methods struggle to effectively capture the complex spatiotemporal features of EEG signals, and supervised learning algorithms that rely on large amounts of labeled data have limited generalization ability in EEG signal diagnosis, leading to inaccurate diagnostic results.

Method used

We employ a bidirectional variational graph autoencoder structure and combine it with adversarial learning. Through optimization using the bidirectional variational graph autoencoder and adversarial learning, we generate features that are consistent with the distribution of real data. We also utilize an attention feature fusion mechanism to improve model performance.

Benefits of technology

It improves the accuracy and robustness of epilepsy detection, reduces sensitivity to noise, dynamically adjusts feature contribution weights, and achieves more efficient feature learning and data generation tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121075686A_ABST
    Figure CN121075686A_ABST
Patent Text Reader

Abstract

The invention discloses an epilepsy detection method combining a double variational graph auto-encoder and adversarial learning, and relates to the technical field of epilepsy detection, which comprises the following steps: constructing an electroencephalogram characteristic matrix and an adjacent matrix; the node features and the adjacency relation are mapped to a low-dimensional potential space through a double-variational graph auto-encoder, corresponding potential representation is generated, and feature reconstruction is achieved through a corresponding decoder; an attention feature fusion mechanism is introduced, weighted combination is carried out on potential vector attention weights, and a fusion feature vector is obtained; an adversarial learning mechanism is utilized, a double variational graph auto-encoder is used as a generator, a multi-layer perceptron is used as a discriminator, and the generator and the discriminator are jointly trained to optimize feature representation quality; and outputting a classification result by using a Softmax function. Therefore, by adopting the epilepsy detection method combining the double variational graph auto-encoder and adversarial learning, the workload of doctors can be effectively reduced, and the efficiency and accuracy of epilepsy detection are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of epilepsy detection, in particular to an epilepsy detection method combining a double variational graph autoencoder and adversarial learning. BACKGROUND

[0002] Epilepsy is a chronic neurological disease caused by abnormal discharge of neurons in the brain, and seizures usually occur suddenly and uncontrollably. There are more than 50 million epilepsy patients worldwide, and epilepsy is one of the most common neurological diseases in the world. Electroencephalogram (EEG) carries rich physiological and pathological information and has been proven to be an effective tool for diagnosing epilepsy. However, visual inspection of long-term EEG recordings is very tedious and extremely time-consuming, and over-reliance on personal experience and subjective judgment of experts can lead to different diagnosis results for the same EEG segment. Traditional supervised learning algorithms highly depend on a large amount of labeled data to train the model, however, the limited labeled data in the EEG signal cannot meet the training requirements, which limits the generalization ability of the model and cannot accurately capture the complex features and patterns of the EEG signal, thereby affecting the accuracy of classification tasks. Therefore, it is necessary to develop a semi-supervised detection algorithm for automatic seizures. It can not only alleviate the burden of experts to a certain extent, but also improve the reliability of the detection results of seizures.

[0003] Traditional convolutional neural networks (CNN) can only process Euclidean data and cannot model the topological connection characteristics of multi-channel EEG signals. Graph representation learning can fully represent non-Euclidean EEG data, and when the data labels are missing, the graph autoencoder structure performs well in the seizure detection task. However, when dealing with non-Euclidean EEG data, traditional methods often only reconstruct the node features or adjacency matrix in a single mode, which is difficult to capture the complex spatiotemporal features of EEG signals.

[0004] Therefore, there is an urgent need for a bidirectional variational autoencoder structure that can fully learn the node characteristics of EEG signals and the topological rules of EEG functional connections, breaking through the problem of single potential representation of traditional autoencoders and providing a reference for clinical diagnosis and other practical scenarios. SUMMARY

[0005] The purpose of the present application is to provide an epilepsy detection method combining a double variational graph autoencoder and adversarial learning, which adopts a bidirectional variational autoencoder structure to overcome the problem of single potential representation of traditional autoencoders, and optimizes through adversarial learning to ensure the consistency of the generated features and the real data distribution.

[0006] To achieve the above purpose, the present application provides an epilepsy detection method combining a double variational graph autoencoder and adversarial learning, comprising the following steps: S1. Acquire raw EEG data and preprocess it. Treat each electrode as a graph node and construct the node features and adjacency matrix of the EEG. The adjacency matrix is ​​used to characterize the topological structure and functional connections between EEG signals. S2. The node features and adjacency matrix of the EEG are mapped to a low-dimensional latent space by a dual variational graph autoencoder to generate the corresponding latent vectors, and the features are reconstructed by the corresponding decoder. S3. Based on the attention feature fusion mechanism, the latent vector is processed by the attention calculation module to obtain the corresponding attention weight, quantify the contribution of different latent vectors in the epilepsy detection task, and obtain the fused feature vector through weighted fusion. S4. Based on the adversarial learning mechanism, the dual variational graph autoencoder is used as the generator and the multilayer perceptron is used as the discriminator to optimize the fusion feature vector. The goal of the generator is to minimize the difference between the original data and the decoder output; The goal of the discriminator is to maximize the difference between the samples generated by the generator and the real samples; S5. Utilize optimized fusion feature vectors and combine them with the softmax function to complete the classification task, thereby distinguishing between epileptic and non-epilepsy data.

[0007] Furthermore, S1 includes constructing an adjacency matrix of functional connections using Pearson correlation coefficients.

[0008] Furthermore, in S2, the dual variational graph autoencoder includes a node feature encoder and a graph structure encoder; wherein, the node feature encoder is used to extract deep node features of EEG signals, and the graph structure encoder is used to capture the topological regularity of EEG functional connections.

[0009] Furthermore, in S2, the total loss of the dual variational graph autoencoder includes two aspects: the loss of the node decoder and the loss of the graph structure decoder. The loss of the node decoder is used to measure the difference between the reconstructed node features and the original node features, while the loss of the graph structure decoder is used to measure the difference between the reconstructed adjacency matrix and the original adjacency matrix.

[0010] Furthermore, the node feature encoder includes processing the node features of the EEG through a three-layer perceptron to obtain the first latent vector and reconstructing the node features. In the unsupervised training phase, the difference between the reconstructed node features and the original node features is constrained by the mean squared error loss, thereby training the node feature encoder. The graph structure encoder consists of two layers of graph convolutional networks that process node features and the adjacency matrix simultaneously to obtain a second latent vector and reconstruct the adjacency matrix. During the unsupervised training phase, the difference between the reconstructed adjacency matrix and the original adjacency matrix is ​​obtained by combining binary cross-entropy loss with KL divergence constraints, thereby training the graph structure encoder.

[0011] Further, S3 comprises a linear layer with an input dimension consistent with the latent vector dimension and an output dimension of 1, used to calculate the attention weight of the latent vector, as follows:

[0012] wherein, represents the attention weight of the first latent vector, represents the attention weight of the second latent vector, and represents the linear layer weight, and represents the linear layer bias, represents the first latent vector, represents the second latent vector, represents the softmax function, represents the fusion feature vector.

[0013] Further, the loss of the generator is represented as: ; wherein, represents the loss of the generator, represents the sample generated by the generator, represents the probability value output by the discriminator, represents the expectation of the latent variable subject to normal distribution, represents the fusion feature vector; The loss of the discriminator is represented as: ; wherein, represents the loss of the discriminator, represents the expectation of the discrimination result for the real sample, represents the expectation of the discrimination result for the generated sample.

[0014] Therefore, the epilepsy detection method combining the double variational graph autoencoder and the adversarial learning has the following technical effects: (1) The double variational graph autoencoder is used to perform deep feature extraction on the node feature matrix and the adjacency matrix of the electroencephalogram, synchronously capture the time-frequency domain features and functional connection topological rules of the electroencephalogram signal, and introduce an attention feature fusion mechanism to dynamically adjust the contribution weight of the node feature and the structural feature, thereby improving the performance and accuracy of the model. (2) This invention utilizes an adversarial learning mechanism, in which the generator continuously optimizes the quality of the generated samples, thereby achieving more efficient feature learning and data generation tasks. This enables the dual variational autoencoder to learn more robust feature representations during adversarial training, reducing its sensitivity to noise and improving the robustness of the model.

[0015] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the overall architecture of an epilepsy detection method that combines a bivariate graph autoencoder with adversarial learning; Figure 2 This is a visualization of t-SNE classification results with a window size of 8s in an embodiment of an epilepsy detection method that combines bivariate graph autoencoder and adversarial learning. (a) is the original test sample; (b) is the feature extraction result of the bivariate graph autoencoder; and (c) is the final classification result. Figure 3 This is a schematic diagram of the ablation experiment evaluation results in an embodiment of an epilepsy detection method that combines bivariate graph autoencoders and adversarial learning. Detailed Implementation

[0017] The present invention will be explained in more detail through the following embodiments. The purpose of disclosing the present invention is to protect all changes and modifications within the scope of the present invention. The present invention is not limited to the following embodiments.

[0018] Example 1

[0019] like Figure 1 As shown, this invention provides an epilepsy detection method combining a bivariate graph autoencoder and adversarial learning, as detailed below: S1. Construct the EEG feature matrix and adjacency matrix: First, the raw EEG data was preprocessed by using a high-pass filter with a cutoff frequency of 0.5 Hz to eliminate interference signals below that frequency. Then, MinMax normalization was used to scale the data to the range of 0-1. The preprocessed signal for each channel was divided into EEG data segments with window lengths of 1, 2, 4, 8, and 10 seconds, with each electrode considered as a graph node.

[0020] Adjacency matrices are used to characterize the topological structure and functional connectivity between EEG signals, which is of great significance for in-depth exploration of the information contained in EEG signals. In this embodiment, the Pearson correlation coefficient (PCC) is used to construct the functional connectivity adjacency matrix.

[0021] ; In the formula, , EEG data segments representing different electrode channels; X and Y covariance of , standard deviation of X , Y is used to measure the correlation between two channels. If two channels of EEG signals exhibit similar change patterns over time, the Pearson correlation coefficient between them will be higher, and the corresponding element value in the adjacency matrix will also be larger, indicating that there is a certain degree of connection between the two channels. Based on this, the adjacency matrix A is constructed, and the process is represented as: ; wherein represents a threshold value, and in the present embodiment, the average value plus the standard deviation of all PCC is used to represent the threshold value; indicates whether the nodes and are related.

[0022] S2, using a bi-variate graph autoencoder to map node features and adjacency relationships to a low-dimensional latent space respectively, to generate corresponding latent vectors, and to realize feature reconstruction through a corresponding decoder, including: a node feature encoder, which mainly processes the node data of electroencephalogram through three layers of perception machine, maps the node features to a low-dimensional latent space, so that the subsequent processing is more efficient, and the specific encoding process is: ; wherein is the k th mapped latent vector, is the input feature, is a shared weight matrix, is the offset of the entire mapping, represents a convolution operation, is an activation function.

[0023] In addition, the node feature encoder introduces a regularization strategy in each layer of the network to prevent overfitting, thereby ensuring the stability of the model output and the ability to extract important node information. Specifically, the dropout rate (Dropout) p=0.3 is set, and part of the neuron output is randomly shielded during training; the L2 weight decay λ=0.01 is set to constrain the parameter norm.

[0024] ​​The decoder structure corresponding to the node feature encoder is similar to the encoder, but it focuses on reconstructing the latent features. This process can be seen as the inverse operation of the encoder. Through the decoder, the structural information of the graph can be recovered from the latent space, thus completing the reconstruction of the graph data: ; where, represents the reconstructed node features of the output, represents the flipping of the weights, is the bias of each input channel, represents the latent mapping group. In this process, binary cross-entropy is used as the loss function to measure the reconstruction effect, which can effectively evaluate the difference between the predicted value and the true value, thus guiding the model to optimize the representation of the latent features.

[0025] The graph structure encoder adopts a two-layer graph convolution network (GCN) to encode the node features and structural information of the electroencephalogram. Unlike the node encoder, the graph structure encoder not only processes node features, but also processes the adjacency relationship of the graph, learning the latent features of the feature matrix X and the adjacency matrix A of the electroencephalogram data, thereby generating the latent features of the graph: ; ; ; ; where, represents the node feature matrix, represents the adjacency matrix, represents the scalar index, represents the mean of the latent vector of the th node, represents the variance of the latent vector of the th node, represents the mean of the learned latent feature distribution, represents the variance of the learned latent feature distribution, represents the latent feature of the th node, represents the latent feature probability distribution of the th node, represents that the latent vector obeys a Gaussian distribution, represents the global latent feature distribution of the entire network, represents the total number of nodes in the graph, represents the sum of the latent feature probability distributions of all nodes.

[0026] The decoder part of the graph structure encoder usually adopts an inner product operation to reconstruct the adjacency matrix. Specifically, the decoder calculates the probability of whether there is an edge between two nodes by the inner product of the latent vector Z of the node feature. This method can effectively capture the structural information of the graph and generate a reconstructed adjacency matrix similar to the original graph , Z is the final graph representation obtained by the graph structure encoder, is an activation function.

[0027] The total loss of the bi-variate graph autoencoder includes two aspects: the loss of the node decoder and the loss of the graph structure decoder. The loss of the node decoder is used to measure the difference between the reconstructed node feature and the original node feature, while the loss of the graph structure decoder is used to measure the difference between the reconstructed adjacency matrix and the original adjacency matrix. The total loss is expressed as follows: ; Ltotal represents the total loss of the bi-variate graph autoencoder, represents the approximate posterior distribution, represents the log probability of reconstructing the adjacency matrix using the latent vector , represents the reconstruction loss of the graph structure encoder, represents the prior distribution, represents the KL divergence.

[0028] The bi-variate graph autoencoder can effectively perform unsupervised learning and data generation on graph data. In this process, the model optimizes the loss function to minimize the difference between the output of the decoder and the original data, thereby achieving efficient reconstruction of the data.

[0029] During the learning process of the model, the Adam algorithm is used for optimization, the learning rate is set to 0.001, the epoch value is set to 200, and the activation function uses ReLU. After multiple training, when the total loss of the validation set does not decrease for five consecutive rounds, set the early stopping mechanism to terminate, the parameters of the model gradually converge, and the decoder can stably reconstruct the representation of the latent space.

[0030] S3, a attention feature fusion mechanism is introduced to weight and combine the attention weights of the latent vectors. Specifically, the attention calculation module initializes a linear layer with an input dimension consistent with the latent vector dimension and an output dimension of 1, which is used to calculate the attention weight of the latent vector. During the forward propagation process, the latent vectors of the node features and the latent vectors of the adjacency matrix are processed through the attention calculation module respectively to obtain the corresponding attention weights, which quantize the contribution of different latent vectors in the epilepsy detection task. The higher the weight, the stronger the discriminative ability of the corresponding feature, which can more effectively distinguish between seizures and normal states.

[0031] The feature fusion module multiplies the attention weight of the latent vector of the node feature and the intermediate latent vector of the node feature The attention weight of the latent vector of the adjacency matrix and the latent vector of the adjacency matrix are multiplied, and then the final fused feature vector is obtained by weighted summation. The fused vector not only retains the key information in the original feature, but also strengthens the task-related core mode, combining the node time-frequency domain details and the graph structure topology law, which is used for subsequent classification tasks, thereby improving the performance and accuracy of the model. The process is described as follows:

[0032] In the formula, represents the attention weight of the first latent vector, represents the attention weight of the second latent vector, and represents the linear layer weight, and represents the linear layer bias, represents the first latent vector, represents the second latent vector, represents the softmax function, represents the fused feature vector.

[0033] S4, in order to improve the quality of the fusion sample generated by the double variational autoencoder and enhance the reconstruction ability of the latent variable, an adversarial learning mechanism is introduced to improve the ability of the double variational autoencoder to learn to generate latent variables similar to the real data distribution, thereby achieving more efficient feature learning and data generation tasks. In addition, through the competition between the generator and the discriminator, the generator is constantly optimized, and the final generated quality is close to the real data.

[0034] Specifically, the dual variational graph autoencoder serves as the generator (G), mainly used to learn the features of the samples and generate fake samples to deceive the discriminator; the multi-layer perceptron serves as the discriminator (D), whose task is to distinguish whether the latent variable is from the prior distribution of the real samples or the distribution generated by the generator; then, the generator and the discriminator are jointly trained through the adversarial learning mechanism, so as to optimize the quality of the feature representation.

[0035] During the model training process, the goal of the generator is to minimize the difference between the original data and the decoder output, while requiring the latent features output by the dual variational autoencoder to best represent the features of the original data, which can be represented as: ; In the formula, represents the loss of the generator, represents the sample generated by the generator, represents the probability value output by the discriminator, represents the expectation of the latent variable subject to a normal distribution.

[0036] The goal of the discriminator is to maximize the difference between the sample generated by the generator and the real sample, while requiring it to be able to distinguish whether the latent variable is from the prior distribution (real sample) or the distribution generated by the generator (fake sample), which can be represented as: ; In the formula, represents the loss of the discriminator, represents the expectation of the discrimination result for the real sample, represents the expectation of the discrimination result for the generated sample.

[0037] Through the joint training of the generator and the discriminator, the adversarial learning of the model ultimately makes the discriminator unable to distinguish whether the input sample is real or fake. When the discriminator cannot distinguish the input sample, it means that the generator has successfully deceived the discriminator, which marks the completion of the adversarial learning. This method not only improves the quality of the samples generated by the generator, but also realizes more efficient feature learning and data generation tasks through the reconstruction ability of the latent variable.

[0038] By introducing adversarial learning, the generator continuously optimizes the quality of the generated samples, making the generated samples closer to the real data distribution. The dual variational autoencoder learns more robust feature representation in the adversarial training, reduces the sensitivity to noise, and improves the robustness of the model. At the same time, the adversarial learning combines the generation and discrimination tasks, so that the model reaches a balance between the two tasks, improving the overall performance of the model.

[0039] S5, learning the electroencephalogram signal features through the dual variational autoencoder, then further training the model by using the adversarial learning, and finally completing the classification task by using the trained encoder part combined with the softmax function, and the process is described as follows: ; The embodiment uses t-SNE for visual display, Figure 2 The process of feature learning and classification by the dual variational autoencoder is clearly shown. It can be seen that the encoder part after unsupervised training effectively learns the main features of the epilepsy data, and finally can distinguish epilepsy from non-epilepsy data.

[0040] Embodiment two

[0041] The application provides an epilepsy detection method combining a dual variational graph autoencoder and adversarial learning, constructs a dual variational autoencoder structure, a node feature encoder extracts the characteristics of the electroencephalogram node through a network composed of multiple perceptrons, and a graph structure encoder adopts a graph convolution network to capture the topological law of the electroencephalogram functional connection, and the two encoders learn two potential distributions respectively. In order to further improve the fusion efficiency of multi-source information, an attention weighting module is introduced, which dynamically adjusts the contribution weight of the node feature and the structure feature, effectively fuses the node potential feature and the structure potential feature of the electroencephalogram data, and finally generates a multi-dimensional representation vector with strong discriminability.

[0042] Meanwhile, in order to enhance the consistency of the latent space distribution of the dual variational graph autoencoder and the real data distribution, the embodiment uses the features obtained by further optimization by using the adversarial learning mechanism, so that different features can be effectively fused. The framework performs deep optimization on the feature space composed of the generator by constructing a dynamic game between the generator composed of the dual variational autoencoder and the discriminator composed of the adversarial learning.

[0043] The embodiment uses an 18-channel electroencephalogram data set recorded in the neonatal intensive care unit (NICU) of the Children's Hospital of the Central Hospital of Helsinki University in Finland, which contains electroencephalogram records from human newborns, and the visual interpretation of the electroencephalogram by three clinical experts, as well as supporting clinical data and codes for subsequent access and use. The data set contains EEG data of 79 full-term newborns, and during the recording process, 19 electrodes are placed according to the international 10-20 system, the average length of each recording is 85 minutes (range from 52 to 257 minutes), the sampling frequency is 256 Hz, and the total length is about 112 hours. The embodiment annotates the presence of seizures in the electroencephalogram by three clinical experts independently, and uses 40 patients agreed by three clinical experts to be consistently marked as having seizures (a total of 385 seizures are consistently annotated), and 22 electroencephalogram data that are consistently marked as not having seizures.

[0044] If the defined EEG data that are correctly judged by the algorithm as the interictal period of the seizure period and the non-seizure period are true positive and true negative, respectively, and the EEG data that are incorrectly detected as the seizure period and the interictal period of the non-seizure are false positive and false negative, respectively. This embodiment uses four evaluation indexes: accuracy = (number of true positives + number of true negatives) / total number of EEG segments used for testing; precision = number of true positives / (number of true positives + number of false positives); recall = number of true positives / (number of true positives + number of false negatives); F1-score = 2 precision recall / (precision + recall).

[0045] As shown in Table 1, the method of the embodiment achieves excellent performance on the Helsinki EEG dataset, and the accuracy, precision, recall and F1-score obtained when the window size is 8s are 98.06%, 96.47%, 98.21% and 97.33%, respectively.

[0046] Table 1 Experimental results obtained on the Helsinki EEG dataset

[0047] This embodiment also verifies the influence of each part of the model on the final classification result, as shown in Figure 3

[0048] GAAE-DL (graph adversarial autoencoder-double loss) adopts a single-branch graph adversarial encoding structure and introduces a double-loss constraint. The accuracy, precision and F1-score are relatively low, indicating that the method has limited ability to mine graph structure features and weak effect of improving classification performance, providing a basic comparison reference for subsequent dual-structure models.

[0049] dual-GAAE (dual graph adversarial autoencoder) adopts a dual-branch graph adversarial encoding structure and fuses the latent features of the dual paths. Compared with GAAE-DL, the accuracy, precision and F1-score are improved, indicating that the dual-structure design can effectively enhance the model's ability to capture graph structure information.

[0050] dual-GAE-DL (dual graph autoencoder-double loss) is based on the dual graph autoencoder framework and superimposes a double-loss constraint. The precision, recall and other indicators are better than those of GAAE-DL, indicating that the combination of dual graph structure and double loss can improve the classification performance to some extent. The classification result is slightly lower than that of dual-GAAE-DL, indicating that the role of the adversarial training module in complex graph feature coding is better than that of the traditional auto-encoding mechanism.

[0051] ​The dual-GAAE-DL (dual graph adversarial autoencoder-dual loss) integrates a dual structure design, an adversarial training and a dual loss constraint, and achieves the highest classification accuracy among all methods, verifying the synergistic effect of the core parts (dual branch structure, adversarial module and dual loss constraint) of the model and the effectiveness of the model architecture.

[0052] Therefore, the epilepsy detection method combining the dual variational graph autoencoder and the adversarial learning realizes the deep fusion of time-frequency domain features, fully captures more rich feature information of the electroencephalogram signal, and also achieves the classification ability comparable to the current outstanding method, which is conducive to the application in the actual scene such as clinical diagnosis.

[0053] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application but not to limit it, although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that: it can still modify or equivalently replace the technical solutions of the present application, and these modifications or equivalent replacements also cannot make the modified technical solutions deviate from the spirit and scope of the technical solutions of the present application.

Claims

1. A method for detecting epilepsy by combining a bi-variate graph auto-encoder with adversarial learning, characterized in that, The method comprises the following steps: S1, obtaining raw electroencephalogram data and preprocessing, regarding each electrode as a graph node, constructing the node features and adjacency matrix of electroencephalogram; The adjacency matrix is used to represent the topological structure and functional connection between the electroencephalogram signals; S2, mapping the node features and adjacency matrix of electroencephalogram to a low-dimensional latent space through a dual variational graph autoencoder, generating corresponding latent vectors, and reconstructing the features through a corresponding decoder; S3, based on the attention feature fusion mechanism, processing the latent vectors through an attention calculation module to obtain corresponding attention weights, quantifying the contribution of different latent vectors in the epilepsy detection task, and obtaining a fusion feature vector through weighted combination; S4, based on the adversarial learning mechanism, taking the dual variational graph autoencoder as a generator and a multilayer perceptron as a discriminator to optimize the fusion feature vector; The goal of the generator is to minimize the difference between the original data and the output of the decoder; The goal of the discriminator is to maximize the difference between the samples generated by the generator and the real samples; S5, using the optimized fusion feature vector to complete the classification task through a softmax function, and then distinguishing between epilepsy and non-epilepsy data.

2. The method of claim 1, wherein the method comprises: S1 includes using the Pearson correlation coefficient to construct the functional connection adjacency matrix. 3.The method of claim 1, wherein, In S2, the dual variational graph autoencoder includes a node feature encoder and a graph structure encoder; wherein the node feature encoder is used to extract the deep node features of the electroencephalogram signal, and the graph structure encoder is used to capture the topological rules of the electroencephalogram functional connection.

4. The method of claim 3, wherein the method further comprises: In S2, the total loss of the dual variational graph autoencoder includes two aspects: the loss of the node decoder and the loss of the graph structure decoder; the loss of the node decoder is used to measure the difference between the reconstructed node features and the original node features, and the loss of the graph structure decoder is used to measure the difference between the reconstructed adjacency matrix and the original adjacency matrix.

5. The method of claim 3, wherein the method further comprises: The node feature encoder includes processing the node features of the electroencephalogram through a three-layer perceptron to obtain a first latent vector, and reconstructing the node features; in the unsupervised training stage, the difference between the reconstructed node features and the original node features is constrained through the mean square error loss, so as to train the node feature encoder; The graph structure encoder includes a two-layer graph convolution network, which simultaneously processes the node features and the adjacency matrix to obtain a second latent vector and reconstruct the adjacency matrix; in the unsupervised training stage, the difference between the reconstructed adjacency matrix and the original adjacency matrix is constrained through the binary cross-entropy loss combined with the KL divergence, so as to train the graph structure encoder.

6. The method of claim 5, wherein the method further comprises: S3 includes defining a linear layer with an input dimension consistent with the latent vector dimension and an output dimension of 1, which is used to calculate the attention weight of the latent vector, as follows: wherein, denotes the attention weight for the first latent vector, denotes the attention weight for the second latent vector, and denotes the linear layer weight, and denotes the linear layer bias, denotes the first latent vector, denotes the second latent vector, denotes the softmax function, denotes the fused feature vector.

7. The method of claim 1, wherein the method further comprises: The loss of the generator is represented as: ; wherein, denotes the loss of the generator, denotes the sample generated by the generator, denotes the probability value output by the discriminator, denotes the expectation of the latent variable subject to a normal distribution, denotes the fused feature vector; The loss of the discriminator is represented as: ; In the formula, represents the loss of the discriminator, represents the expectation of the discrimination result on the real sample, represents the expectation of the discrimination result on the generated sample.

Citation Information

Patent Citations

  • Electroencephalogram feature optimization and epileptic seizure detection method based on deep self-coding

    CN111387974A

  • Epilepsy electroencephalogram signal recognition method, system and equipment and storage medium

    CN119279509A

  • Epilepsy electroencephalogram signal detection system and method based on distraction attention model

    CN119279521A

  • Small sample electroencephalogram signal classification method for epilepsy monitoring

    CN119441950A