Cross-individual epilepsy prediction domain generalization method based on feature decoupling

Through feature decoupling and adversarial training methods, domain-invariant features are extracted from EEG signals, solving the problem of insufficient generalization ability of epilepsy prediction methods in cross-individual applications, and achieving efficient prediction on unseen subjects.

CN120280158AActive Publication Date: 2025-07-08ZHEJIANG UNIV
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202510751789.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-07-08
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

Existing epilepsy prediction methods are insufficient in generalization when applied across individuals, especially in the absence of data in new subjects, and the domain adaptive methods rely on the amount of data and need to be retrained.

Method used

The domain-invariant features are extracted by feature decoupling method, and the generalization ability of the model on unseen subjects is improved through adversarial training. Multi-scale features are extracted from EEG signals using feature fusion modules and decoupling modules, and the model is trained through adversarial loss function.

Benefits of technology

It significantly improves the cross-subject generalization performance of epilepsy prediction without the need for a large amount of new subject data training, and improves the accuracy and reliability of predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120280158A_ABST
    Figure CN120280158A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-individual epilepsy prediction domain generalization method based on feature decoupling, and the method comprises the steps: extracting a plurality of common time-frequency features in epilepsy prediction, carrying out the effective fusion through employing a space-time multi-scale convolutional neural network, and fully capturing the short-term and long-term dependence relation and local and global space structures in EEG signals; and the fusion features are divided into domain-invariant features and domain-related features through a feature decoupling strategy, and individual information contained in the domain-invariant features is suppressed by adopting adversarial training, so that the generalization ability of the model on unknown subject data is improved. According to the method, the accuracy of cross-test epilepsy prediction is remarkably improved, the dependence on long-term data acquisition of new subjects is reduced, and a feasible technical path is provided for practical application of epilepsy prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of EEG epilepsy prediction, and particularly relates to a cross-individual epilepsy prediction domain generalization method based on feature decoupling. Background Art

[0002] Epilepsy is conceptually defined as a neurological disorder characterized by a persistent tendency to have seizures, and approximately 1% of the global population is affected by epilepsy. One of the most troublesome aspects of epilepsy is the unpredictability of its seizures. If a reliable epilepsy seizure prediction method can be achieved, it will greatly improve the treatment means and thus improve the quality of life of epilepsy patients. EEG (electroencephalogram) is a technique that records electrical signals generated by neuronal activities by placing electrodes on the scalp. This technique has been widely used clinically in the diagnosis of various neurological disorders including epilepsy. A large number of studies have confirmed the feasibility of using electroencephalogram signals for epilepsy seizure prediction. Most epilepsy seizure prediction methods divide continuous EEG signals into four states: interictal (the period between two seizures), preictal (a period before a seizure), ictal (during a seizure), and postictal (the period after a seizure); the epilepsy prediction problem is usually modeled as a binary classification problem, that is, distinguishing between the interictal and preictal periods.

[0003] Current EEG epilepsy prediction methods are mainly divided into two categories: machine learning and deep learning. Machine learning includes methods such as decision trees and support vector machines. These methods have a fast training speed and low requirements for training resources, but they rely more on prior knowledge and have weak capabilities in dealing with complex tasks, making it difficult to fully learn the epilepsy-related patterns in EEG signals. Deep learning methods mostly adopt an end-to-end training method, which has stronger expression capabilities and can autonomously extract epilepsy-related features from EEG signals. Currently, they have been widely used in the field of epilepsy prediction. For example, the author Yan proposed a seizure prediction model based on Transformer in the 2022 literature "Scalp Electroencephalogram Seizure Prediction Based on Transformer". This model uses the Transformer architecture to fuse and classify the extracted features, and effectively overcomes the common sequence length limitation problem in deep learning models by using the attention mechanism.

[0004] Due to the high individual variability of EEG signals, most existing epilepsy prediction methods adopt a patient-specific approach, that is, using the data of each subject to train a model separately. This will lead to a significant decline in the performance of the model when applied to other subjects. When performing epilepsy prediction tasks on new subjects, it is difficult to train the model due to the lack of data. To solve this problem, some researchers have tried to apply domain adaptation methods to epilepsy prediction tasks. For example, the author Zhang proposed a domain adaptation method in the 2023 literature "Cross-subject seizure prediction using domain adversarial learning to extract invariant representations". This method first uses a pre-trained neural network to extract shared features from the EEG signals of existing subjects, and then through a distillation module and a domain discriminator module, performs domain adaptation training on a small amount of labeled data of new subjects, so as to learn a general epilepsy-related feature space across individuals.

[0005] However, although domain adaptation has improved the generalization ability of the model to a certain extent, it still depends on a certain amount of training data in the target domain; if the target domain data is unavailable or too little, the effect of domain adaptation may drop significantly. In addition, domain adaptation methods usually require re-training or fine-tuning of the model. Summary of the Invention

[0006] In view of the above, the present invention provides a cross-individual epilepsy prediction domain generalization method based on feature decoupling, which uses the feature decoupling method to extract domain-invariant features independent of the subject identity information, and improves the generalization ability of the model on unseen subjects by applying adversarial training during the training process.

[0007] A cross-individual epilepsy prediction domain generalization method based on feature decoupling, comprising the following steps: (1) Obtain the EEG dataset of epilepsy patients, preprocess the dataset and divide it into a training set and a test set; (2) Construct a cross-individual epilepsy prediction domain generalization model, which includes: A feature fusion module for extracting multiple features from EEG signals, further performing multi-resolution feature extraction on these features in the time and space dimensions to obtain fused features; A feature decoupling module for decoupling the fused features into domain-invariant features and domain-related features, and using the domain-invariant features for classification mapping to obtain epilepsy classification results; (3) Use the training set to train the above model, input the signal samples in the test set into the trained model for prediction, and obtain the corresponding epilepsy classification results.

[0008] Further, the EEG dataset obtained in step (1) contains EEG signals from 22 different subjects and their corresponding seizure annotations. Most of the EEG signals are 23-channel, and the signal data of different subjects are regarded as different domains. The seizure annotation contains markers of the start and end time points of the seizure period.

[0009] Further, the specific implementation of preprocessing the dataset in step (1) is as follows: for the EEG signals in the dataset, first remove the frequency components in the ranges of 57 - 63 Hz and 117 - 123 Hz, as well as the DC component of 0 Hz. Subsequently, rearrange the electroencephalogram records according to the electrode order, and select 18 channels common to the EEG signals of the subjects. Then, divide the continuous EEG signals. Take 30 minutes before the seizure as the pre-seizure period, and take the signal period outside 4 hours before and after the seizure as the inter-seizure period, and label the signal data of these two periods with corresponding labels. Slice the EEG signals with a sliding window of 5s length to obtain a large number of signal samples. The slices do not overlap during the inter-seizure period and are semi-overlapped during the pre-seizure period. Finally, only select the subjects with 2 - 10 seizure times per day for the experiment. Divide the signal samples of these subjects into multiple different domains, and adopt the leave-one-out cross-validation strategy to select only one domain as the test set each time, and the remaining domains as the training set, ensuring that the signal samples of the same subject will not appear in the training set and the test set at the same time.

[0010] Further, the feature fusion module includes: A feature alignment module that extracts three corresponding features from the EEG signal through STFT (Short-Time Fourier Transform), DWT (Discrete Wavelet Transform), and WPT (Wavelet Packet Transform) respectively, and then maps these three features to the same dimension through a fully connected layer and adds them to obtain a feature map; A multi-scale temporal convolutional module that inputs the feature map into one-dimensional convolutional layers with three different kernel sizes, performs convolution in the time dimension and then concatenates them, so as to learn the short-term and long-term dependencies in the EEG signal and enhance the richness of the temporal feature expression; A multi-scale spatial convolutional module that inputs the output of the multi-scale temporal convolutional module into one-dimensional convolutional layers with three different kernel sizes again, performs convolution in the channel dimension and then concatenates them, so as to learn the local and global spatial information, and finally obtains the fused feature.

[0011] Further, the feature decoupling module includes: A feature decoupler for mapping the fused feature from high dimension to low dimension to obtain domain-invariant features and domain-related features; A classifier for classifying and mapping the domain-invariant features to obtain the epilepsy classification result; A domain discriminator, which is used to classify and map domain-related features to obtain the subject ID; A reconstructor, which is used to reconstruct the domain-invariant features and domain-related features to restore the features before decoupling.

[0012] Further, in the step (3), the model is trained using a training set, and the following loss function L is adopted during the training process:

[0013]

[0014]

[0015]

[0016]

[0017] Where: L ce is the classification loss, L dis is the domain discrimination loss, L adv is the adversarial loss, L recon is the reconstruction loss, and λ1~λ4 are given weight coefficients. N represents the number of domains in the training set. K n represents the number of samples in the current input domain. and respectively represent the domain-invariant features and domain-related features of the n th signal sample in the i th domain in the training set. represents the label of the n th signal sample in the i th domain in the training set. C () represents the classifier. D () represents the domain discriminator. GRL () represents the gradient reversal layer. represents the fused features of the n th signal sample in the i th domain in the training set. represents the features before decoupling of the n th signal sample in the i th domain in the training set.

[0018] Further, in the step (3), if 12 consecutive signal samples in the same EEG signal are predicted by the trained model to be in the pre-ictal period, an alarm is triggered, and the alarm cannot be triggered again within 30 minutes after the alarm is triggered.

[0019] A computer device includes a memory and a processor. A computer program is stored in the memory, and the processor is configured to execute the computer program to implement the above-mentioned cross-individual epilepsy prediction domain generalization method based on feature decoupling.

[0020] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned cross-individual epilepsy prediction domain generalization method based on feature decoupling.

[0021] Based on the above technical solutions, the present invention extracts various features commonly used in the field of epilepsy prediction and applies a spatio-temporal multi-scale convolutional neural network for feature fusion, effectively learning the short-term and long-term dependencies and local and global spatial relationships in EEG signals, extracting more expressive and robust fusion features, and further using the domain generalization method of feature decoupling to decouple the fusion features into domain-invariant features and domain-related features. Through adversarial training, it is ensured that the domain-invariant features do not contain subject-related information, and the performance of the model on unseen subject data is improved by classifying the domain-invariant features. Thus, the present invention significantly improves the cross-subject generalization performance of epilepsy prediction and does not require long-term data collection for new subjects, providing a feasible solution for the practical application of epilepsy prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic flowchart of the cross-individual epilepsy prediction domain generalization method based on feature decoupling of the present invention.

[0023] Figure 2 It is a schematic structural diagram of the feature fusion module in the model of the present invention.

[0024] Figure 3 It is a schematic structural diagram of the feature decoupling module in the model of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0025] To describe the present invention more specifically, the technical solutions of the present invention will be described in detail below with reference to the drawings and specific embodiments.

[0026] As Figure 1 shown, the specific steps of the cross-individual epilepsy prediction domain generalization method based on feature decoupling of the present invention are as follows: (1) Select the epilepsy EEG dataset CHB-MIT for experiments. This dataset was jointly collected and created by Boston Children's Hospital (CHB) and the Massachusetts Institute of Technology (MIT), and contains EEG recordings of pediatric subjects with refractory epilepsy seizures. The subjects were monitored for several days after discontinuing anti-epileptic drugs to characterize their seizures and evaluate their suitability for surgical intervention.

[0027] The dataset consists of 22 subjects (5 males, aged 3 - 22 years; 17 females, aged 1.5 - 19 years). All signals were sampled at a rate of 256 samples per second with a resolution of 16 bits. Most files contain EEG signals of 23 channels (in a few cases, 24 or 26 channels), and these signals adopt the international 10 - 20 EEG electrode position and naming system; a few files also record other signals, and the start and end of each seizure are annotated in the attached annotation file.

[0028] (2)Perform standardized preprocessing on the original EEG signals in the dataset, and generate labels by dividing the stages according to the mainstream paradigm of seizure prediction.

[0029] For the CHB - MIT dataset, first remove the frequency components in the ranges of 57 - 63 Hz and 117 - 123 Hz, as well as the DC component of 0 Hz. Subsequently, select 18 channels common to most of the subjects' data. Then, divide the continuous EEG data. The data 30 minutes before a seizure is divided into the pre - seizure period, and the data at least 4 hours before and after a seizure is divided into the inter - seizure period. Assign corresponding labels to the data in these two periods. If there are multiple seizures in a short period and the interval between two seizures is less than 30 minutes, consider the previous seizure as the main seizure and extract the corresponding pre - seizure period data, without considering the latter seizure. Finally, select 12 subjects with 2 - 10 seizures per day for the experiment. Divide the continuous EEG signals into 5 - s slices using a sliding window. Since the inter - seizure period data is much more than the pre - seizure period data, perform non - overlapping sampling on the inter - seizure period and semi - overlapping sampling on the pre - seizure period.

[0030] Next, divide the training set and the test set. Adopt the leave - one - subject cross - validation strategy. Consider the 12 subjects as 12 different domains. Each time an experiment is conducted, select 1 domain as the target domain (i.e., the test set), and the remaining 11 domains as the source domains (i.e., the training set). To verify the generalization performance of the method, the EEG data of the same subject will not appear in both the training set and the test set at the same time. During the training phase, randomly discard the inter - seizure period data with a larger number of samples to ensure the balance of the two types of samples.

[0031] (3)Construct a cross - individual seizure prediction domain generalization model, including a feature fusion module and a feature decoupling module. The structure of the feature fusion module is as Figure 2 shown, including: A feature alignment module that extracts three types of features, namely STFT, DWT, and WPT, from the original EEG signals, maps them to the same dimension through a fully - connected layer and then adds them together to obtain a feature map F 1.

[0032] A multi - scale temporal convolutional module that processes the feature map F1 Input three 1D convolutional layers Conv1 to Conv3 with different kernel sizes. After convolution in the time dimension and concatenation, short-term and long-term dependencies in the EEG signal are learned, enhancing the richness of temporal feature representation. The specific expression is as follows:

[0033] Where: represents the i th convolutional network of the multi-scale temporal convolutional module, BN represents batch normalization, RELU represents the activation function, Avgpool represents average pooling , Concat represents parallel concatenation.

[0034] For the multi-scale spatial convolutional module, the output of the multi-scale temporal convolutional module is input into three 1D convolutional layers Conv4 to Conv6 with different kernel sizes. After convolution in the channel dimension and concatenation (denoted by C in the figure), local and global spatial information is learned, and finally fused features are obtained. The specific expression is as follows:

[0035] Where: represents the i th convolutional network of the multi-scale spatial convolutional module.

[0036] Then, domain-invariant features are extracted through the feature decoupling module and classification results are obtained. As shown in Figure 3 , the feature decoupling module includes a classifier, a domain discriminator, a decoupler, and a reconstructor.

[0037] (4) Train the above model using source domain data. The specific process is as follows: First, flatten the obtained fused features to get the feature vector f F , and input the feature vector f F into the decoupler D to obtain the domain-invariant feature f di and the domain-related feature f ds ; The decoupler D consists of a Dropout (random inactivation) layer and a fully connected layer, which is used to map the features from high dimension to low dimension.

[0038] To align the domain-invariant feature and the domain-related feature with their corresponding semantics respectively, input the domain-invariant feature into the classifier. The classifier is implemented based on a feedforward neural network, maps the domain-invariant feature to a two-dimensional output for classification to obtain the epilepsy prediction result, and its loss function is:

[0039] Where: represents the domain-invariant feature corresponding to the sample,C represents a classifier, and represents the corresponding true label, N represents the number of subjects, i.e., the number of domains, K n represents the number of samples of the current subject.

[0040] Similarly, the domain-related features are input into the domain discriminator, which is implemented based on a feed-forward neural network. The domain-related features are mapped to an N-dimensional output for classification to obtain the subject ID. Its loss function is:

[0041] where: represents the domain-related features corresponding to the sample, D represents the domain discriminator.

[0042] To suppress the information related to the subject identity in the domain-invariant features, we pass the domain-invariant features through a gradient reversal layer and then input them into the domain discriminator. During forward propagation, the gradient reversal layer does not change the features; during backpropagation, the gradient reversal layer multiplies the gradient by a negative value and passes it back to the decoupler, so that the decoupler learns features that cannot be distinguished by the domain discriminator. This mechanism realizes adversarial training. Its loss function is:

[0043] where: represents the domain-invariant features corresponding to the sample, GRL represents the gradient reversal layer.

[0044] In addition, to reduce the information loss during the feature decoupling process, the domain-invariant features and the domain-related features are concatenated and then input into the reconstructor R. The reconstructor R is implemented based on a feed-forward neural network and maps the concatenated features to f R to restore the features f before decoupling F , and its loss function is:

[0045] where: represents the fused features, i.e., the features before decoupling, represents the features restored by the reconstructor.

[0046] (5) Predict the epileptic seizures of the cross-subject epileptic prediction model trained on the source domain data on the corresponding target domain data for each fold, calculate the area under the curve (AUC) of the prediction, and perform post-processing based on the samples, that is, the prediction results. If 12 consecutive samples, that is, within 1 minute, are all predicted to be in the pre-ictal period, an alarm is triggered, and no alarm can be triggered again within 30 minutes after the alarm is issued. Based on this, the event-level indicators sensitivity (Sensitivity) and false positive rate (FPR) are obtained, and the average value of the results of all folds is statistically calculated and compared with other existing methods. The comparison results are shown in Table 1. It can be seen from the table that the method of the present invention has a significant improvement in the early warning effect compared with other existing epileptic prediction methods.

[0047] Table 1

[0048] Other existing epileptic prediction methods in the table include CORAL (Correlation Alignment), Sagnet (Style-Agnostic Network), CDANN (Conditional Domain Adversarial Neural Network), Vrex (Variance Risk Extrapolation), and IRM (Invariant Risk Minimization).

[0049] The above description of the embodiments is for the convenience of those of ordinary skill in the art to understand and apply the present invention. Obviously, those skilled in the art can easily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without creative labor. Therefore, the present invention is not limited to the above embodiments, and all improvements and modifications made by those skilled in the art to the present invention should be within the protection scope of the present invention.

Claims

1. A cross - individual epilepsy prediction domain generalization method based on feature decoupling, comprising the following steps: (1) Obtain the electroencephalogram (EEG) dataset of epilepsy patients, preprocess the dataset and divide it into a training set and a test set; (2) Construct a cross - individual epilepsy prediction domain generalization model, which includes: A feature fusion module for extracting multiple features from EEG signals, further performing multi - resolution feature extraction on these features in the time and space dimensions to obtain fused features; A feature decoupling module for decoupling the fused features into domain - invariant features and domain - related features, and using the domain - invariant features for classification mapping to obtain epilepsy classification results; (3) Use the training set to train the above - mentioned model, input the signal samples in the test set into the trained model for prediction, and obtain the corresponding epilepsy classification results.

2. The cross-individual epilepsy prediction domain generalization method based on feature decoupling according to claim 1, wherein: The EEG dataset obtained in step (1) contains EEG signals from 22 different subjects and their corresponding epilepsy seizure annotations. Most of the EEG signals are 23 - channel. The signal data of different subjects are regarded as different domains. The epilepsy seizure annotations contain markers of the start and end time points of the seizure period.

3. A cross - individual epilepsy prediction domain generalization method based on feature decoupling according to claim 2, characterized in that: The specific implementation method of preprocessing the dataset in step (1) is as follows: For the EEG signals in the dataset, first remove the frequency components in the ranges of 57 - 63 Hz and 117 - 123 Hz and the DC component of 0 Hz. Subsequently, rearrange the electroencephalogram records according to the electrode order, and select 18 channels common to the EEG signals of the subjects; then divide the continuous EEG signals. Take 30 minutes before the epilepsy seizure as the pre - seizure period, and take the signal period outside 4 hours before and after the epilepsy seizure as the inter - seizure period, and label the signal data of these two periods correspondingly; slice the EEG signals with a 5 - s - long sliding window to obtain a large number of signal samples, without overlapping slices in the inter - seizure period and semi - overlapping slices in the pre - seizure period; Finally, only select the subjects with 2 - 10 epilepsy seizures per day for the experiment. Divide the signal samples of these subjects into multiple different domains, and adopt the leave - one - out cross - validation strategy to select only one domain as the test set each time, and the remaining domains as the training set, ensuring that the signal samples of the same subject will not appear in the training set and the test set at the same time.

4. A cross - individual epilepsy prediction domain generalization method based on feature decoupling according to claim 1, characterized in that: The feature fusion module includes: A feature alignment module that extracts the corresponding three kinds of features from the EEG signals through STFT, DWT, and WPT respectively, and then adds them after mapping these three kinds of features to the same dimension through a fully - connected layer to obtain a feature map; A multi - scale temporal convolutional module that inputs the feature map into one - dimensional convolutional layers with three different kernel sizes, performs convolution in the time dimension and then concatenates them, so as to learn the short - term and long - term dependencies in the EEG signals and enhance the richness of the temporal feature expression; A multi - scale spatial convolutional module that inputs the output of the multi - scale temporal convolutional module into one - dimensional convolutional layers with three different kernel sizes again, performs convolution in the channel dimension and then concatenates them, so as to learn the local and global spatial information, and finally obtain the fused features.

5. A cross-individual epilepsy prediction domain generalization method based on feature decoupling according to claim 3, characterized in that: The feature decoupling module includes: A feature decoupler, configured to map the fused features from a high dimension to a low dimension to obtain domain-invariant features and domain-related features; A classifier, configured to perform a classification mapping on the domain-invariant features to obtain an epilepsy classification result; A domain discriminator, configured to perform a classification mapping on the domain-related features to obtain the subject ID; A reconstructor, configured to reconstruct the domain-invariant features and the domain-related features to restore the features before decoupling.

6. A cross-individual epilepsy prediction domain generalization method based on feature decoupling according to claim 5, characterized in that: In step (3), the model is trained using a training set, and the following loss function L is adopted during the training process: ; ; ; ; ; Where: L ce is the classification loss, L dis is the domain discrimination loss, L adv is the adversarial loss, L recon is the reconstruction loss, and λ1 to λ4 are given weight coefficients. N represents the number of domains in the training set. K n represents the number of samples in the current input domain. and respectively represent the domain-invariant feature and the domain-related feature of the n th i signal sample in the th domain in the training set. n th i signal sample in the training set. C ( ) represents the classifier. D ( ) represents the domain discriminator. GRL ( ) represents the gradient reversal layer. represents the fused feature of the n th i signal sample in the th domain in the training set. n th i signal sample in the training set before decoupling.

7. A cross-individual epilepsy prediction domain generalization method based on feature decoupling according to claim 1, characterized in that: In step (3), if 12 consecutive signal samples in the same EEG signal are predicted by the trained model to be in the pre-ictal period, an alarm is triggered, and the alarm cannot be triggered again within 30 minutes after the alarm is triggered.

8. A computer device, comprising a memory and a processor, wherein a computer program is stored in the memory, and characterized in that: The processor is configured to execute the computer program to implement a cross-individual epilepsy prediction domain generalization method based on feature decoupling as described in any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, it implements a cross-individual epilepsy prediction domain generalization method based on feature decoupling as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Device for warning of an epileptic fit

    CH647141A5

  • Electroencephalogram monitoring device and method with epileptic seizure predicting function

    CN107616793A

  • Cross-patient epilepsy electroencephalogram signal classification method based on data enhancement and adversarial optimization

    CN117435993A

  • Training method for electroencephalogram signal classification model of epileptic

    CN117493955A

  • Normal form self-adaptive decoupling cross-time-period brain grain recognition method and normal form self-adaptive decoupling cross-time-period brain grain recognition system

    CN117992729A