A cross-individual epilepsy prediction domain generalization method based on feature decoupling

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

CN120280158BActive Publication Date: 2025-11-14ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing epilepsy prediction methods have poor generalization ability when applied across individuals, especially when there is a lack of data for new subjects, and domain-adaptive methods depend on the amount of data and require retraining.

Method used

The feature decoupling method is used to extract domain-invariant features. Adversarial training is used to improve the model’s generalization ability on unseen subjects. Multi-scale features are extracted from EEG signals using feature fusion and decoupling modules, and the model is trained using an adversarial loss function.

Benefits of technology

It significantly improves the cross-subject generalization performance of epilepsy prediction, requires no large amount of new subject data for training, and improves the model's predictive accuracy on unseen subjects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120280158B_ABST
    Figure CN120280158B_ABST
Patent Text Reader

Abstract

This invention discloses a cross-individual epilepsy prediction domain generalization method based on feature decoupling. This method extracts various time-frequency features commonly used in epilepsy prediction and effectively fuses them using a spatiotemporal multi-scale convolutional neural network, fully capturing short-term and long-term dependencies and local and global spatial structures in EEG signals. Furthermore, a feature decoupling strategy divides the fused features into domain-invariant features and domain-related features, and adversarial training is used to suppress individual information contained in the domain-invariant features, thereby improving the model's generalization ability on data from unknown subjects. This invention significantly improves the accuracy of cross-subject epilepsy prediction, reduces reliance on long-term data collection from new subjects, and provides a practical technical path for the real-world application of epilepsy prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of EEG epilepsy prediction technology, specifically involving a cross-individual epilepsy prediction domain generalization method based on feature decoupling. Background Technology

[0002] Epilepsy is conceptually defined as a neurological disorder characterized by a persistent predisposition to seizures, affecting approximately 1% of the global population. One of the most troubling aspects of epilepsy is its unpredictability. Developing reliable methods for predicting seizures would significantly improve treatment options and thus enhance the quality of life for patients. EEG (electroencephalography) is a technique that records electrical signals generated by neuronal activity using electrodes placed on the scalp. This technique is widely used clinically for the diagnosis of various neurological disorders, including epilepsy, and numerous studies have confirmed the feasibility of using EEG signals for seizure prediction. Most seizure prediction methods divide continuous EEG signals into four states: interictal (the period between two seizures), preictal (the period before a seizure), ictal (during a seizure), and postictal (the period after a seizure). The epilepsy prediction problem is typically modeled as a binary classification problem, 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 methods, including decision trees and support vector machines, are fast to train and require low training resources, but they rely more on prior knowledge and are weak in handling complex tasks, making it difficult to fully learn epilepsy-related patterns in EEG signals. Deep learning methods, on the other hand, are mostly trained end-to-end, have stronger expressive power, and can autonomously extract epilepsy-related features from EEG signals. They have already been widely used in the field of epilepsy prediction. For example, in the 2022 paper "Transformer-based prediction of epileptic seizures from scalp EEG," author Yan proposed a Transformer-based epileptic seizure prediction model. This model uses the Transformer architecture to fuse and classify the extracted features, and effectively overcomes the sequence length limitation problem common in deep learning models by utilizing the attention mechanism.

[0004] Due to the high individual variability of EEG signals, most existing epilepsy prediction methods adopt a patient-specific approach, meaning that a model is trained individually using each subject's own data. This leads to a significant performance drop when applied to other subjects, and when performing epilepsy prediction tasks on new subjects, it is difficult to train the model due to a lack of data. To address this issue, some researchers have attempted to apply domain adaptation methods to epilepsy prediction tasks. For example, in the 2023 paper "Utilizing Domain Adversarial Learning to Extract Invariant Representations for Cross-Subject Childhood Epilepsy Seizure Prediction," author Zhang proposed a domain adaptation method. This method first uses a pre-trained neural network to extract shared features from the EEG signals of existing subjects, and then uses a distillation module and a domain discriminant module to perform domain adaptation training on a small amount of labeled data from new subjects, thereby learning a universal epilepsy-related feature space across individuals.

[0005] However, while domain adaptation improves a model's generalization ability to some extent, it still relies on a certain amount of training data in the target domain. If target domain data is unavailable or too scarce, the effectiveness of domain adaptation may drop significantly. Furthermore, domain adaptation methods typically require retraining or fine-tuning 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. The method uses feature decoupling to extract domain-invariant features that are independent of the subject's identity information. By applying adversarial training during the training process, the generalization ability of the model on unseen subjects is improved.

[0007] A cross-individual epilepsy prediction domain generalization method based on feature decoupling includes the following steps:

[0008] (1) Obtain the EEG dataset of epilepsy patients, preprocess the dataset and divide it into training set and test set;

[0009] (2) Construct a cross-individual epilepsy prediction domain generalization model, which includes:

[0010] The feature fusion module is used to extract multiple features from the EEG signal, and further perform multi-resolution feature extraction on these features in the time and space dimensions to obtain fused features.

[0011] The feature decoupling module is used to decouple the fused features into domain-invariant features and domain-related features, and use the domain-invariant features to perform classification mapping to obtain the epilepsy classification result;

[0012] (3) The above model is trained using the training set, and the signal samples in the test set are input into the trained model for prediction to obtain the corresponding epilepsy classification results.

[0013] Furthermore, the EEG dataset obtained in step (1) includes EEG signals from 22 different subjects and their corresponding epileptic seizure annotations, wherein most of the EEG signals are 23-channel, and the signal data of different subjects are considered to be different domains. The epileptic seizure annotations include markers of the start and end time points of the epileptic seizure period.

[0014] Further, the specific implementation of the preprocessing of the dataset in step (1) is as follows: For the EEG signals in the dataset, firstly remove the frequency components in the range of 57~63Hz and 117~123Hz and the DC component of 0Hz, then rearrange the EEG records according to the electrode order, and select the 18 channels in the subject's EEG signals; then divide the continuous EEG signals, taking the 30 minutes before the epileptic seizure as the pre-seizure period, and the signal period beyond 4 hours before and after the epileptic seizure as the interictal period, and label the signal data of these two periods accordingly; use a 5s sliding window to slice the EEG signals to obtain a large number of signal samples, with non-overlapping slices in the interictal period and semi-overlapping slices in the pre-seizure period; finally, only select subjects with 2~10 seizures per day for the experiment, divide the signal samples of these subjects into multiple different domains, and use a 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, to ensure that the signal samples of the same subject do not appear in the training set and the test set at the same time.

[0015] Furthermore, the feature fusion module includes:

[0016] The feature alignment module extracts three corresponding features from the EEG signal through STFT (Short Time Fourier Transform), DWT (Discrete Wavelet Transform), and WPT (Wavelet Packet Transform). Then, the three features are mapped to the same dimension through a fully connected layer and added together to obtain a feature map.

[0017] The multi-scale temporal convolution module inputs the feature map into three one-dimensional convolutional layers with different kernel sizes, performs convolution in the time dimension, and then concatenates them to learn the short-term and long-term dependencies in the EEG signal, thereby improving the richness of temporal feature representation.

[0018] The multi-scale spatial convolution module inputs the output of the multi-scale temporal convolution module back into three one-dimensional convolutional layers with different kernel sizes. After convolution in the channel dimension, the layers are concatenated to learn local and global spatial information and finally obtain fused features.

[0019] Furthermore, the feature decoupling module includes:

[0020] A feature decoupler is used to map fused features from high-dimensional to low-dimensional to obtain domain-invariant features and domain-related features.

[0021] A classifier is used to classify and map domain-invariant features to obtain epilepsy classification results;

[0022] A domain discriminator is used to classify and map domain-related features to obtain subject IDs;

[0023] The reconstructor is used to reconstruct domain-invariant and domain-dependent features to restore the features before decoupling.

[0024] Furthermore, in step (3), the model is trained using the training set, and the following loss function L is used during the training process:

[0025]

[0026]

[0027]

[0028]

[0029]

[0030] Where: L ce For classification loss, L dis For domain discrimination loss, L adv To combat losses, L recon The reconstruction loss is given by λ1~λ4 as the weight coefficients. N This indicates the number of domains in the training set. K n This indicates the number of samples in the current input domain. and They represent the first and second training sets, respectively. n The first domain i Domain-invariant and domain-correlation features of a signal sample Indicates the first training set n The first domain i The label of each signal sample; C ( ) represents a classifier. D ( ) represents the domain discriminator. GRL ( ) indicates a gradient inversion layer. Indicates the first training set n The first domain i Fusion features of individual signal samples Indicates the first training set n The first domain i Features of a signal sample before decoupling.

[0031] Furthermore, in step (3), if 12 consecutive signal samples in the same EEG signal are predicted by the trained model to be in the pre-onset stage, an alarm is triggered. The alarm cannot be triggered again within 30 minutes after it is triggered.

[0032] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the above-described feature-decoupled cross-individual epilepsy prediction domain generalization method.

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

[0034] Based on the above technical solution, this invention extracts various features commonly used in epilepsy prediction and applies a spatiotemporal multi-scale convolutional neural network for feature fusion. This effectively learns the short-term and long-term dependencies and local and global spatial relationships in EEG signals, extracting more expressive and robust fused features. Furthermore, it utilizes feature decoupling, a domain generalization method, to decouple the fused features into domain-invariant features and domain-related features. Adversarial training ensures that the domain-invariant features do not contain subject-related information, and classifying the domain-invariant features improves the model's performance on unseen subject data. Therefore, this invention significantly improves the cross-subject generalization performance of epilepsy prediction without requiring long-term data collection from new subjects, providing a feasible solution for the practical application of epilepsy prediction. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of the cross-individual epilepsy prediction domain generalization method based on feature decoupling according to the present invention.

[0036] Figure 2 This is a schematic diagram of the feature fusion module in the model of the present invention.

[0037] Figure 3 This is a schematic diagram of the feature decoupling module in the model of this invention. Detailed Implementation

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

[0039] like Figure 1 As shown, the specific steps of the cross-individual epilepsy prediction domain generalization method based on feature decoupling of the present invention are as follows:

[0040] (1) The epilepsy EEG dataset CHB-MIT was selected for the experiment. This dataset was jointly collected and created by Boston Children’s Hospital (CHB) and Massachusetts Institute of Technology (MIT). It contains EEG records of pediatric subjects with refractory epilepsy. Subjects were monitored for several days after discontinuing antiepileptic drugs to describe the characteristics of their epileptic seizures and assess their suitability for surgical intervention.

[0041] This dataset contains 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 from 23 channels (a few contain 24 or 26 channels), which were recorded using the international 10-20 EEG electrode location and naming system. A few files also recorded additional signals, and the start and end of each seizure were annotated in the accompanying annotation files.

[0042] (2) Standardize and preprocess the original EEG signals in the dataset, and generate labels according to the stages of the mainstream epilepsy prediction paradigm.

[0043] For the CHB-MIT dataset, frequency components in the 57–63 Hz and 117–123 Hz ranges, as well as the 0 Hz DC component, were first removed. Then, 18 channels common to most subjects were selected. Continuous EEG data were then segmented: data from the 30 minutes preceding a seizure was classified as preictal, and data from at least 4 hours prior to a seizure were classified as interictal. Corresponding labels were assigned to these two periods. If multiple seizures occurred within a short period, with an interval of less than 30 minutes between seizures, the previous seizure was considered the primary seizure, and its corresponding preictal data was extracted, ignoring the subsequent seizure. Finally, 12 subjects with 2–10 seizures per day were selected for the experiment. Continuous EEG signals were divided into 5-second slices using a sliding window. Since interictal data was significantly more abundant than preictal data, non-overlapping sampling was used for interictal data, while semi-overlapping sampling was used for preictal data.

[0044] Next, training and test sets were divided, and a leave-one-out cross-validation strategy was adopted. The 12 subjects were treated as 12 different domains. In each experiment, one domain was selected as the target domain (test set), and the remaining 11 domains were used as the source domain (training set). To verify the generalization performance of the method, EEG data from the same subject were not simultaneously present in both the training and test sets. During the training phase, interictal data, which had a larger sample size, were randomly discarded to ensure a balance between the two sample types.

[0045] (3) Construct a cross-individual epilepsy prediction domain generalization model, including a feature fusion module and a feature decoupling module, wherein the structure of the feature fusion module is as follows: Figure 2 As shown, it includes:

[0046] The feature alignment module extracts three features—STFT, DWT, and WPT—from the original EEG signal, maps them to the same dimension through a fully connected layer, and then adds them together to obtain the feature map. F 1.

[0047] The multi-scale temporal convolution module converts feature maps F 1. Input three one-dimensional convolutional layers Conv1~Conv3 with different kernel sizes, convolve them in the time dimension, and then concatenate them to learn the short-term and long-term dependencies in the EEG signal, thereby improving the richness of temporal feature representation. The specific expression is as follows:

[0048]

[0049] in: The multi-scale temporal convolution module represents the first... i A convolutional network, BN Representatives criticized normalization. RELU This represents the activation function. Avgpool Represents average pooling Concat This indicates parallel splicing.

[0050] The multi-scale spatial convolution module takes the output of the multi-scale temporal convolution module and feeds it back into three one-dimensional convolutional layers Conv4~Conv6 with different kernel sizes. After convolution along the channel dimension, the layers are concatenated (represented by C in the figure) to learn local and global spatial information, ultimately obtaining fused features. The specific expression is as follows:

[0051]

[0052] in: The first multi-scale spatial convolution module represents the... i A convolutional network.

[0053] Then, the domain-invariant features are extracted through the feature decoupling module to obtain the classification result, such as... Figure 3 As shown, the feature decoupling module includes a classifier, a domain discriminator, a decoupler, and a reconstructor.

[0054] (4) Train the above model using source domain data. The specific process is as follows:

[0055] First, the obtained fused features are flattened to obtain the feature vector f. F , the feature vector f F The domain-invariant feature f is obtained by inputting the decoupler D. di Domain-related features f dsThe decoupler D consists of a Dropout layer and a fully connected layer, used to map features from high dimensions to low dimensions.

[0056] To align domain-invariant and domain-related features with their corresponding semantics, the domain-invariant features are input into a classifier. This classifier, based on a feedforward neural network, maps the domain-invariant features to a two-dimensional output for classification, yielding the epilepsy prediction result. Its loss function is:

[0057]

[0058] in: This represents the domain-invariant feature corresponding to the sample. C Represents a classifier, while Represents the corresponding real label, N K represents the number of subjects, or the number of domains. n This represents the current number of subject samples.

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

[0060]

[0061] in: This represents the domain-related features corresponding to the sample. D Representative domain discriminator.

[0062] To suppress subject-identity-related information in domain-invariant features, we pass these features through a gradient reversal layer before inputting them into the domain discriminator. During forward propagation, the gradient reversal layer does not alter the features; during backward propagation, the gradient reversal layer multiplies the gradient by a negative value and feeds it back to the decoupler. This allows the decoupler to learn features that cannot be distinguished by the domain discriminator. This mechanism achieves adversarial training, and its loss function is:

[0063]

[0064] in: This represents the domain-invariant feature corresponding to the sample. GRL This represents a gradient inversion layer.

[0065] In addition, to reduce information loss during feature decoupling, domain-invariant features and domain-correlated features are concatenated and then input into the reconstructor R. The reconstructor R is implemented based on a feedforward neural network, which maps the concatenated features to f. R To restore the features f before decoupling F Its loss function is:

[0066]

[0067] in: This represents the fusion characteristics, i.e., the characteristics before decoupling. This represents the features restored by the reconstructor.

[0068] (5) The epilepsy prediction model trained on the source domain data is used to predict the epileptic seizures on the target domain data corresponding to each fold. The area under the curve (AUC) of the prediction is calculated, and post-processing is performed on the samples, i.e. the prediction results. If every 12 consecutive samples, i.e. 1 minute, are predicted to be in the pre-seizure stage, an alarm is triggered. The alarm must not be triggered again within 30 minutes after it is issued. Based on this, the event-level indicators sensitivity and false alarm rate (FPR) are obtained. The average value of all fold results is 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 epilepsy prediction methods.

[0069] Table 1

[0070]

[0071] Other existing epilepsy prediction methods listed 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).

[0072] The above description of the embodiments is provided to enable those skilled in the art to understand and apply the present invention. Those skilled in the art can readily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without creative effort. Therefore, the present invention is not limited to the above embodiments, and any improvements and modifications made to the present invention by those skilled in the art based on the disclosure thereof should be within the scope of protection 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 EEG dataset of epilepsy patients, preprocess the dataset and divide it into training set and test set. The specific implementation method is as follows: For the EEG signal in the dataset, firstly remove the frequency components in the range of 57-63Hz and 117-123Hz and the DC component of 0Hz. Then rearrange the EEG recording according to the electrode order and select the 18 channels in the subject's EEG signal. Then divide the continuous EEG signal, take the 30 minutes before the epileptic seizure as the pre-seizure period, and take the signal period more than 4 hours before and after the epileptic seizure as the interictal period, and label the signal data of these two periods accordingly. Use a 5-second sliding window to slice the EEG signal to obtain a large number of signal samples. Do not overlap the slices in the interictal period and semi-overlap the slices in the pre-seizure period. Finally, only subjects with 2 to 10 seizures per day were selected for the experiment. The signal samples of these subjects were divided into multiple different domains. The leave-one-out cross-validation strategy was used to select only one domain as the test set each time, and the remaining domains as the training set, to ensure that the signal samples of the same subject would not appear in both the training set and the test set at the same time. (2) Construct a cross-individual epilepsy prediction domain generalization model, which includes: The feature fusion module is used to extract multiple features from the EEG signal, and further perform multi-resolution feature extraction on these features in the time and space dimensions to obtain fused features. The feature decoupling module is used to decouple the fused features into domain-invariant features and domain-related features, and use the domain-invariant features to perform classification mapping to obtain the epilepsy classification result; The feature fusion module includes: The feature alignment module extracts three corresponding features from the EEG signal through STFT, DWT and WPT respectively, and then maps these three features to the same dimension through a fully connected layer and adds them together to obtain a feature map. The multi-scale temporal convolution module inputs the feature map into three one-dimensional convolutional layers with different kernel sizes, performs convolution in the time dimension, and then concatenates them to learn the short-term and long-term dependencies in the EEG signal, thereby improving the richness of temporal feature representation. The multi-scale spatial convolution module inputs the output of the multi-scale temporal convolution module back into three one-dimensional convolutional layers with different kernel sizes. After convolution in the channel dimension, the layers are concatenated to learn local and global spatial information and finally obtain fused features. The feature decoupling module includes: A feature decoupler is used to map fused features from high-dimensional to low-dimensional to obtain domain-invariant features and domain-related features. A classifier is used to classify and map domain-invariant features to obtain epilepsy classification results; A domain discriminator is used to classify and map domain-related features to obtain subject IDs; The reconstructor is used to reconstruct domain-invariant and domain-correlated features to restore the features before decoupling. (3) The above model is trained using the training set, and the signal samples in the test set are input into the trained model for prediction to obtain the corresponding epilepsy classification results; the following loss function L is used during the training process: L=λ1L ce +λ2L dis +λ3L adv +λ4L recon Where: L ce For classification loss, L dis For domain discrimination loss, L adv To combat losses, L recon For reconstruction loss, λ1~λ4 are given weight coefficients, N represents the number of domains in the training set, and K n This indicates the number of samples in the current input domain. and Let these represent the domain-invariant features and domain-correlation features of the i-th signal sample in the n-th domain of the training set, respectively. Let C represent the label of the i-th signal sample in the n-th domain of the training set; C() represents the classifier, D() represents the domain discriminator, and GRL() represents the gradient inversion layer. This represents the fusion feature of the i-th signal sample in the n-th domain of the training set. This represents the undecoupled features of the i-th signal sample in the n-th domain of the training set.

2. The method for cross-individual epilepsy prediction domain generalization based on feature decoupling according to claim 1, characterized in that: The EEG dataset obtained in step (1) contains EEG signals from 22 different subjects and their corresponding epileptic seizure annotations. Most of the EEG signals are 23-channel, and the signal data from different subjects are considered to be in different domains. The epileptic seizure annotations include markers for the start and end times of the epileptic seizure.

3. The method for cross-individual epilepsy prediction domain generalization 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-onset stage, an alarm is triggered. The alarm cannot be triggered again within 30 minutes after it is triggered.

4. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: The processor is used to execute the computer program to implement a feature-decoupled cross-individual epilepsy prediction domain generalization method as described in any one of claims 1 to 3.

5. 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 3.

Citation Information

Patent Citations

  • Training method for electroencephalogram signal classification model of epileptic

    CN117493955A

  • Epilepsy electroencephalogram signal classification method based on time-space-frequency attention

    CN118319247A