Epileptic seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram

By fusing the characteristics within and between channels in the EEG channel in the epilepsy prediction model, the problem of insufficient information fusion in the prior art is solved, and higher prediction accuracy and model performance are achieved.

CN119302671BActive Publication Date: 2025-05-30PEKING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411192788.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-05-30
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

The existing EEG-based epileptic seizure prediction methods have the problem of insufficient information fusion, which leads to low prediction accuracy and limits the accuracy and robustness of the model.

Method used

Using a method based on the mixing of features within and between channels of EEG, the intra-channel feature extractor and inter-channel feature extractor are fused with the features of the time dimension and the spatial dimension to generate mixed features for prediction.

Benefits of technology

It improves the prediction accuracy of epilepsy, improves the performance and generalization capabilities of the model, and can capture key information in the EEG more comprehensively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119302671B_ABST
    Figure CN119302671B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of intelligent healthcare, and provides a method for predicting epileptic seizures based on the mixture of intra-channel and inter-channel features of electroencephalograms, including: acquiring the original electroencephalogram, filtering and segmenting the original electroencephalogram to generate a plurality of electroencephalogram window images; inputting the electroencephalogram window images into a plurality of feature mixture modules for feature extraction to obtain mixed features; each feature mixture module includes an intra-channel feature extractor and an inter-channel feature extractor; the intra-channel feature extractor is used to fuse the mixed time-dimensional features within each channel; the inter-channel feature extractor is used to fuse the mixed space-dimensional features between channels; inputting the mixed features into a prediction head for classification to determine the epileptic seizure prediction result. The present invention solves the defect of low accuracy of epileptic seizure prediction in the prior art, realizes efficient and accurate prediction of epileptic seizures, and improves the performance and generalization ability of the prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent medical technology, and particularly to a method, device and equipment for predicting epileptic seizures based on the mixture of intra-channel and inter-channel features of electroencephalogram (EEG). Background Art

[0002] Epilepsy is a serious neurological disease characterized by sudden abnormal discharges of brain neurons, leading to abnormalities in a patient's consciousness, sensation, emotion and behavior. Frequent epileptic seizures not only seriously affect the quality of life of patients, but also impose a heavy burden on families and society. Electroencephalogram (EEG), as an important auxiliary means for detecting epilepsy, provides key information for the diagnosis and treatment of epilepsy by recording the changes in brain electrical signals.

[0003] In recent years, with the development of deep learning technology, significant progress has been made in EEG-based epileptic seizure prediction. Most of the existing prediction models adopt neural network structures, such as convolutional neural network (CNN), long short-term memory network (LSTM), vision Transformer, etc. The EEG signals are filtered and subjected to time-frequency transformation through a pre-processor, then the signal features are extracted by a feature extractor, and finally the classification prediction is carried out by a prediction head.

[0004] Although the existing EEG-based epileptic seizure prediction methods have achieved certain results, they generally have the defect of insufficient information fusion, which limits the accuracy and robustness of the prediction models. Summary of the Invention

[0005] The present invention provides a method, device and equipment for predicting epileptic seizures based on the mixture of intra-channel and inter-channel features of electroencephalogram (EEG), so as to solve the defect of low accuracy of epileptic seizure prediction in the prior art, and achieve efficient and accurate prediction of epileptic seizures, and improve the performance and generalization ability of the prediction model.

[0006] The present invention provides a method for predicting epileptic seizures based on the mixture of intra-channel and inter-channel features of electroencephalogram (EEG), including the following steps:

[0007] Obtain the original electroencephalogram, filter and segment the original electroencephalogram to generate a plurality of electroencephalogram window images;

[0008] Input the electroencephalogram window images into a plurality of feature mixture modules for feature extraction to obtain mixture features; each of the feature mixture modules includes an intra-channel feature extractor and an inter-channel feature extractor; the intra-channel feature extractor is used to fuse the mixed time dimension features within each channel; the inter-channel feature extractor is used to fuse the mixed space dimension features between channels;

[0009] Input the mixture features into a prediction head for classification to determine the epileptic seizure prediction result.

[0010] A seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram according to the present invention, wherein the electroencephalogram window image is input into a plurality of feature mixture modules for feature extraction to obtain mixed features, specifically including: inputting the electroencephalogram window image into a plurality of feature mixture modules, and in each feature mixture module: normalizing the electroencephalogram window image, then transposing it and inputting it into an intra-channel feature extractor; fusing the mixed time-dimensional features within each channel through the intra-channel feature extractor; transposing the mixed time-dimensional features within each channel, then normalizing them and inputting them into an inter-channel feature extractor; fusing the mixed spatial-dimensional features between channels through the inter-channel feature extractor.

[0011] A seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram according to the present invention, wherein the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron or a Kolmogorov-Arnold network.

[0012] A seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram according to the present invention, when the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron, the step of fusing the mixed time-dimensional features within each channel through the intra-channel feature extractor specifically includes: performing a first linear transformation on the transposed electroencephalogram window image within each channel to obtain first temporary data; performing a non-linear transformation on the first temporary data through an activation function to obtain second temporary data; performing a second linear transformation on the second temporary data to obtain the time-dimensional features within each channel; summing the original data before the first linear transformation of the transposed electroencephalogram window image within each channel and the time-dimensional features to obtain the mixed time-dimensional features.

[0013] A seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram according to the present invention, when the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron, the step of fusing the mixed spatial-dimensional features between channels through the inter-channel feature extractor specifically includes: performing a third linear transformation on the transposed and normalized mixed time-dimensional features at each time step through the inter-channel feature extractor to obtain third temporary data; the time step is a fixed-length data segment obtained by dividing the electroencephalogram in chronological order; performing a non-linear transformation on the third temporary data through an activation function to obtain fourth temporary data; performing a fourth linear transformation on the fourth temporary data to obtain the spatial-dimensional features at each time step; summing the data before the third linear transformation of the transposed mixed time-dimensional features at each time step and the spatial-dimensional features to obtain the mixed spatial-dimensional features.

[0014] According to an epilepsy seizure prediction method based on the hybrid of intra-channel and inter-channel features of electroencephalogram provided by the present invention, when the intra-channel feature extractor and the inter-channel feature extractor are constructed by the Kolmogorov-Arnold network, the fusion of the hybrid time dimension features within each channel by the intra-channel feature extractor specifically includes: determining a function matrix according to the input dimension and the output dimension; combining multiple layers of the function matrix and applying it to the transposed electroencephalogram window image to obtain a first output feature within each channel; summing the original data before the function matrix is applied to the transposed electroencephalogram window image within each channel and the first output feature to obtain the hybrid time dimension feature.

[0015] According to an epilepsy seizure prediction method based on the hybrid of intra-channel and inter-channel features of electroencephalogram provided by the present invention, when the intra-channel feature extractor and the inter-channel feature extractor are constructed by the Kolmogorov-Arnold network, the fusion of the hybrid spatial dimension features between channels by the inter-channel feature extractor specifically includes: combining multiple layers of function matrices and applying them to each time step of the transposed and normalized hybrid time dimension features to obtain a second output feature; the time step is a fixed-length data segment obtained by dividing the electroencephalogram in chronological order; summing the data before the function matrix is applied to the transposed hybrid time dimension features at each time step and the second output feature to obtain the hybrid spatial dimension feature.

[0016] The present invention also provides an epilepsy seizure prediction device based on the hybrid of intra-channel and inter-channel features of electroencephalogram, including the following modules:

[0017] An electroencephalogram acquisition module, configured to acquire the original electroencephalogram, filter and segment the original electroencephalogram, and generate multiple electroencephalogram window images;

[0018] A hybrid feature extraction module, configured to input the electroencephalogram window images into multiple feature hybrid modules for feature extraction to obtain hybrid features; each of the feature hybrid modules includes an intra-channel feature extractor and an inter-channel feature extractor; the intra-channel feature extractor is configured to fuse the hybrid time dimension features within each channel; the inter-channel feature extractor is configured to fuse the hybrid spatial dimension features between channels;

[0019] An epilepsy prediction module, configured to input the hybrid features into a prediction head for classification to determine the epilepsy seizure prediction result.

[0020] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, it implements the epilepsy seizure prediction method based on the hybrid of intra-channel and inter-channel features of electroencephalogram as described in any one of the above.

[0021] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the epilepsy seizure prediction method based on the mixture of intra-channel and inter-channel features as described in any one of the above.

[0022] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the epilepsy seizure prediction method based on the mixture of intra-channel and inter-channel features as described in any one of the above.

[0023] The epilepsy seizure prediction method, device and equipment based on the mixture of intra-channel and inter-channel features of electroencephalogram provided by the present invention have the following beneficial effects: By filtering and segmenting the original electroencephalogram to generate window images, it is possible to reduce the computational complexity and improve the processing speed while ensuring the prediction accuracy. By mixing the intra-channel and inter-channel features, it is possible to more comprehensively capture the key information in the electroencephalogram, thereby improving the prediction accuracy of epilepsy seizures. The design of the feature mixing module enables the present invention to consider the features in both the time dimension and the space dimension simultaneously, enhancing the comprehensiveness and depth of feature extraction and helping to discover more potential features related to epilepsy seizures. Since the present invention comprehensively considers various features, the model has better adaptability and generalization ability when facing the electroencephalogram data of different patients. Description of the Drawings

[0024] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0025] Figure 1 It is a schematic diagram of the main states of the epilepsy electroencephalogram provided by the present invention.

[0026] Figure 2 It is an architecture diagram of the epilepsy seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram provided by the present invention.

[0027] Figure 3 It is a flowchart of the epilepsy seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram provided by the present invention.

[0028] Figure 4 It is a schematic diagram of the structure of a multi-layer perceptron provided by the present invention.

[0029] Figure 5 It is a schematic diagram of the structure of a Kolmogorov-Arnold network provided by the present invention.

[0030] Figure 6 It is a result display diagram of the CHB-MIT dataset based on MLP provided by the present invention.

[0031] Figure 7 It is a result display diagram of the CHB-MIT dataset based on KAN provided by the present invention.

[0032] Figure 8 It is a schematic structural diagram of an epilepsy seizure prediction device based on the mixing of intra- and inter-channel features of electroencephalogram.

[0033] Figure 9 It is a schematic structural diagram of an electronic device provided by the present invention. Detailed implementation manners

[0034] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.

[0035] The frequent occurrence of epilepsy affects millions of people globally. Electroencephalogram (EEG) is an important auxiliary method for detecting epilepsy. The information within each channel of the EEG is in the time dimension, while the information between EEG channels is in the space dimension, and the two are different. However, existing EEG-based epilepsy prediction methods rarely notice this. To solve this problem, the present invention proposes a method for mixing intra- and inter-channel features of electroencephalogram (Intra- and Inter-Channel FeatureMixing, I 2 CM) to predict epilepsy seizures. The overall architecture of this method includes three parts: a preprocessor, I 2 CM, and a prediction head. The preprocessor segments and filters the original EEG. I 2 CM uses an intra-channel feature extractor and an inter-channel feature extractor respectively to mix the information in the time and space dimensions. The prediction head then predicts whether an epilepsy seizure is about to occur. In addition, the intra-channel feature extractor, inter-channel feature extractor, and prediction head adopt a Multi-Layer Perceptron (MLP) and a Kolmogorov-Arnold Network (KAN) for feature extraction. The method of the present invention achieves an average accuracy of 96.41%, a specificity of 96.35%, and a sensitivity of 96.47%.

[0036] The following is combined with Figures 1-9Describe embodiments of the present invention.

[0037] Epilepsy is a neurological disorder that causes sudden abnormal electrical discharges in the brain's neurons, leading to abnormalities in consciousness, sensation, mood, and behavior. Epileptic seizures often occur suddenly and unpredictably, causing great pain to patients and their families. Being able to predict epileptic seizures in advance is an important topic in the field of biomedical science in the new era. Timely intervention after prediction can significantly improve the quality of life of patients.

[0038] Electroencephalography (EEG) records brain information and neural activities in the form of electrical signals. By analyzing and processing the EEG data of patients, a prediction model of epileptic seizures can be constructed to help doctors formulate more effective treatment plans. Predicting epileptic seizures before they occur and taking appropriate intervention and protection measures in a timely manner can reduce the damage caused by epilepsy.

[0039] The typical EEG of epilepsy patients can be divided into the following states: interictal, preictal, seizure prediction horizon (SPH), ictal, and postictal. As Figure 1 shown, the interictal period refers to the normal state of the brain; the preictal period refers to the state for some time before an epileptic seizure; the seizure prediction horizon is a short time interval between the preictal period of an epileptic seizure and the epileptic seizure itself, and this interval is expected to issue a prediction alert for doctors to intervene; the ictal period refers to the actual epileptic seizure event; the postictal period refers to the period when the brain returns to the normal state after an epileptic seizure. Epileptic seizure prediction mainly predicts the occurrence of epileptic seizures from the preictal period by distinguishing the interictal period and the preictal period.

[0040] In recent years, with the development of deep learning technology, research on epileptic seizure prediction has advanced rapidly, and many deep learning models have been obtained. These deep learning models can identify early signs of epileptic seizures and predict epileptic seizures. Although there are various neural networks among these models, their architectures can generally be divided into three main parts: a preprocessor, a feature extractor, and a prediction head. The preprocessor performs operations such as filtering and time-frequency transformation, mainly to reduce the interference of eye and muscle movements on the EEG signals. The feature extractor extracts EEG signal features through a backbone network, such as CNN, LSTM, Vision Transformer, etc. The prediction head is usually a fully connected layer (FC), which classifies the extracted features to determine whether the features are interictal or preictal.

[0041] Devices for measuring electroencephalograms usually have multiple electrodes, which are represented as multiple channels in electroencephalogram images. The potential time series collected by each electrode is recorded in the corresponding channel. The information within the channels of the electroencephalogram is the time dimension information, and the information between the channels is the spatial dimension information. Most methods rarely pay attention to the differences within and between the channels. The present invention proposes a method for mixing intra- and inter-channel features (Intra- and Inter-Channel Feature Mixing, I 2 CM) to predict epileptic seizures. The main contributions of the present invention are as follows:

[0042] Proposed an I 2 CM epileptic seizure prediction architecture based on electroencephalogram, which mixes time and spatial dimension information and includes a preprocessor, I 2 CM and a prediction head.

[0043] I 2 In CM, MLP and KAN (instead of CNN) are used to extract features respectively.

[0044] The epileptic seizure prediction method of the present invention was evaluated on the CHB-MIT dataset (a commonly used electroencephalogram dataset dedicated to epilepsy research and prediction tasks), and its accuracy, specificity and sensitivity are all better than those of CNN, verifying the effectiveness of the algorithm of the present invention.

[0045] The method of the present invention uses the original electroencephalogram to predict epileptic seizures and designs the mixing of intra- and inter-channel features to achieve electroencephalogram channel feature fusion. The overall architecture is as Figure 2 shown.

[0046] First, the original electroencephalogram is preprocessed, divided into interictal, preictal, seizure prediction, ictal and postictal periods, and filtered to reduce power frequency interference. Then, the processed electroencephalogram is sent to N I 2 CM modules for feature extraction. In this module, the input samples are transposed and sent into the intra-channel feature extractor, and then transposed again and sent into the inter-channel feature extractor. The intra-channel or inter-channel feature extractor uses MLP and KAN. Finally, the mixed features are input into the prediction head to classify whether it is the interictal or preictal period.

[0047] Figure 3 is one of the schematic flowcharts of the epileptic seizure prediction method based on the mixing of intra- and inter-channel features of electroencephalogram provided by the present invention, as Figure 3 shown, and the method includes the following steps:

[0048] S310. Obtain the original electroencephalogram, filter and segment the original electroencephalogram to generate multiple electroencephalogram window images.

[0049] In one embodiment of the present invention, the original electroencephalogram (EEG) is obtained, and the frequency components within a preset frequency range are filtered from the original EEG; the filtered EEG is segmented into multiple window images of a fixed length.

[0050] Specifically, the present invention selects the CHB-MIT scalp EEG dataset to evaluate the prediction work of the present invention. This dataset contains EEG recordings of 23 pediatric subjects with epilepsy. The sampling rate of these EEG signals is 256 Hz.

[0051] The present invention selects an interval of 5 minutes between the pre-ictal and ictal periods as the intervention time (SPH). The pre-ictal period is defined as 30 minutes before the SPH, and the inter-ictal period is defined as the period outside 4 hours before and 4 hours after the ictal period. According to this setting, chb12 (the subject numbered 12 in the CHB dataset) does not have suitable inter-ictal recordings, and chb24 (the subject numbered 24 in the CHB dataset) lacks the start and end times of the file, and the inter-ictal period cannot be determined. Therefore, the present invention uses the remaining cases (chb1~chb11, chb13~chb23) for research. In these cases, channel 15 and channel 23 are the same scalp electrode, so the present invention uses 22 channels in the research.

[0052] In the preprocessor, the EEG data is filtered by a 6th-order Butterworth filter to remove the frequency components of 57~63 Hz and 117~123 Hz (because there is 60 Hz power frequency interference in the data). In addition, the EEG is segmented into window images of 5 seconds each. Due to the duration setting of the present invention, the number of window images in the inter-ictal and pre-ictal periods is unbalanced. To solve this imbalance, the present invention uses an adjustable step size to generate overlapping windows, thereby increasing the number of fewer windows.

[0053] S320. Input the EEG window images into multiple feature mixing modules for feature extraction to obtain mixed features.

[0054] Each feature mixing module includes an intra-channel feature extractor and an inter-channel feature extractor; the intra-channel feature extractor is used to fuse the mixed time-dimensional features within each channel; the inter-channel feature extractor is used to fuse the mixed space-dimensional features between channels.

[0055] A seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram according to the present invention inputs an electroencephalogram window image into a plurality of feature mixture modules for feature extraction to obtain mixture features, specifically including: inputting the electroencephalogram window image into a plurality of feature mixture modules, and in each feature mixture module: normalizing the electroencephalogram window image, and then transposing and inputting it into an intra-channel feature extractor; fusing the mixed time-dimensional features within each channel through the intra-channel feature extractor; transposing the mixed time-dimensional features within each channel, and then normalizing and inputting them into an inter-channel feature extractor; fusing the mixed space-dimensional features between channels through the inter-channel feature extractor.

[0056] A seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram according to the present invention, the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron or a Kolmogorov-Arnold network.

[0057] Specifically, the segmented EEG window image X is sent to N I 2 CM modules for feature extraction. For each I 2 CM module, the input EEG window is normalized by layer normalization, and then transposed and sent into the intra-channel feature extractor. The intra-channel feature extractor fuses the EEG signal sequence features within each channel, mixing the time-dimensional information. After intra-channel feature extraction, the features are normalized by layer normalization and transposed again and sent into the inter-channel feature extractor. The inter-channel feature extractor fuses the EEG channel features, mixing the space-dimensional information. In feature mixing, skip connections are also used to maintain the gradient.

[0058] S330: Input the mixture features into a prediction head for classification to determine the seizure prediction result.

[0059] Specifically, the mixture features extracted by I 2 CM are finally input into the prediction head. The prediction head is a classifier that classifies the interictal and preictal periods, and the prediction head also adopts a single-layer MLP or KAN.

[0060] A seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram according to the present invention, when the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron, fusing the mixed time-dimensional features within each channel through the intra-channel feature extractor specifically includes: performing a first linear transformation on the transposed electroencephalogram window image within each channel to obtain first temporary data ; performing a non-linear transformation on the first temporary data through an activation function to obtain second temporary data ; Perform a second linear transformation on the second temporary data to obtain the time dimension features within each channel ; The original data before the first linear transformation of the transposed electroencephalogram window image in each channel and the time dimension features are summed to obtain the mixed time dimension features .

[0061] Specifically, a multi-layer perceptron (MLP) consists of an input layer, one or more hidden layers, and an output layer, as Figure 4 shown. Each layer consists of multiple neurons, and the neurons in adjacent layers are fully connected. Activation functions such as RELU, tanh, sigmoid, GELU, etc. are usually applied to the neurons in each hidden layer to increase the expressive power of the network. The in-channel and inter-channel feature extractors of the present invention use the GELU activation function. The output of a fully connected layer is:

[0062] (1)

[0063] where W is the weight matrix and b is the bias.

[0064] The output of the MLP in the in-channel or inter-channel feature extractor can be expressed as:

[0065] (2)

[0066] The in-channel feature mixing acts on the channels (columns) of the (transposed input) , and the MLP is shared among all channels. It mixes the time information of each channel and can be written in the following form:

[0067] (3)

[0068] (4)

[0069] where , is the weight matrix in the MLP, , is the bias in the MLP, is layer normalization, is the channel 's in-channel mixed time dimension feature.

[0070] According to an epilepsy seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram provided by the present invention, when the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron, the mixed spatial dimension features between channels are fused through the inter-channel feature extractor, specifically including: performing a third linear transformation on the transposed and normalized mixed time dimension features at each time step through the inter-channel feature extractor to obtain third temporary data ; the time step is a fixed-length data segment obtained by splitting the electroencephalogram in chronological order; performing a non-linear transformation on the third temporary data through an activation function to obtain fourth temporary data ; performing a fourth linear transformation on the fourth temporary data to obtain the spatial dimension features at each time step ; the data before performing the third linear transformation on the transposed mixed time dimension features at each time step and the spatial dimension features are summed to obtain the mixed spatial dimension features .

[0071] Specifically, the inter-channel feature mixing acts on the time steps (rows) of , and the MLP is shared at all time steps. It mixes the spatial dimension information , and can be written in the following form:

[0072] (5)

[0073] (6)

[0074] where , is the weight matrix in the MLP, , is the bias in the MLP, is layer normalization, is the time step and

[0075] According to an epilepsy seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalogram provided by the present invention, when the intra-channel feature extractor and the inter-channel feature extractor are constructed by a Kolmogorov-Arnold network, the mixed time dimension features within each channel are fused through the intra-channel feature extractor, specifically including: determining a function matrix according to the input dimension i and the output dimension j; combining multiple function matrices and applying them to the transposed electroencephalogram window image to obtain the first output feature within each channel ; the original data before applying the function matrix within each channel to the transposed electroencephalogram window image and the first output feature ​​​​Sum to obtain the mixed time dimension features 。

[0076] Specifically, the Kolmogorov - Arnold Network (KAN), inspired by the Kolmogorov - Arnold representation theorem, is an effective alternative to the MLP.

[0077] The Kolmogorov - Arnold representation theorem states that for any multivariate continuous function on a bounded domain , there exists a univariate continuous function , a finite combination of, such that

[0078] (7)

[0079] This indicates that if the present invention can find suitable univariate functions and , it can approximately represent 。

[0080] The prototype of KAN is a two - layer network, as Figure 5 shown, with the activation function on the edges and the nodes being simple sums that parameterize each one - dimensional function and into a B - spline curve that can be used for training. To better approximate the function , the generalized KAN uses wider and deeper layers. The KAN linear layer (KANLinear) can be defined as a matrix of one - dimensional functions , where and are the input dimension and output dimension respectively. The generalized KAN can be represented by the combination of layers:

[0081] (8)

[0082] where is the function matrix of the th KAN linear layer.

[0083] The output of KAN in the intra - channel or inter - channel feature extractor can be expressed as:

[0084] (9)

[0085] acts on in channel The in-channel feature mixing can be written in the following form:

[0086] (10)

[0087] where is layer normalization, channel in-channel mixed feature (mixed time dimension feature). KAN is shared among all channels.

[0088] According to a seizure prediction method based on in-channel and inter-channel feature mixing of electroencephalogram provided by the present invention, when the in-channel feature extractor and the inter-channel feature extractor are constructed by the Kolmogorov-Arnold network, the inter-channel mixed spatial dimension features are fused through the inter-channel feature extractor, specifically including: combining multiple-layer function matrices and acting on each time step of the transposed and normalized mixed time dimension feature U to obtain the second output feature ; the time step is a fixed-length data segment obtained by dividing the electroencephalogram in chronological order; the data before the function matrix acts on the transposed mixed time dimension feature at each time step and the second output feature are summed to obtain the mixed spatial dimension feature

[0089] Specifically, the inter-channel feature mixing acting on at the time step can be written in the following form:

[0090] (11)

[0091] where is layer normalization, time step inter-channel mixed feature (mixed spatial dimension feature) at. KAN is shared among all time steps.

[0092] For each case in the CHB-MIT dataset, the present invention uses a segmented EEG window of size [1280, 22] as the input of the model. The topologies of the in-channel feature extractor, the inter-channel feature extractor, and the MLP or KAN in the prediction head are 1280-32-1280, 22-32-22, 22-2, respectively. I 2 The number N of ICM modules is set to 4. The cross-entropy loss function is used for model training. The 5-fold cross-validation technique is used to evaluate the model of the present invention. The experiment is implemented using Python 3.9 and Pytorch 1.12.1 on NVIDIA A100.

[0093] Accuracy (ACC), Specificity (SPEC), and Sensitivity (SENS) were used as evaluation metrics. They are defined as follows:

[0094] (12)

[0095] (13)

[0096] (14)

[0097] where is the number of pre-ictal periods correctly classified, is the number of inter-ictal periods correctly classified, is the number of inter-ictal periods misclassified as pre-ictal, is the number of pre-ictal periods misclassified as inter-ictal. The metric values for the CHB-MIT dataset can be obtained by averaging the metric values of 22 cases.

[0098] According to the experimental setup, the present invention tested the model. Based on the model results of each case of MLP and KAN on the CHB-MIT dataset, they are respectively as Figure 6 and Figure 7 shown. It can be seen that in most cases, KAN is better than MLP, while MLP is better than KAN in 5 cases (chb01, chb10, chb17, chb19, and chb23).

[0099] The present invention also studied the influence of the number of I 2 CM modules. The results of different numbers of I 2 CM modules are shown in Table 1. The more I 2 CM modules, the better the results. When there are 4 I 2 CM modules, the method of the present invention can achieve an average accuracy of 96.41%, a specificity of 96.35%, and a sensitivity of 96.47%.

[0100] Table 1 Comparison of results with different numbers of I 2 CM

[0101]

[0102] The present invention also compared the effects of RNN, BiLSTM, CNN with the method of the present invention, as shown in Table 2. The topological structures of RNN and BiLSTM are both 22-28-28, followed by the MLP or KAN topological structure of 28-22; the topological structure of CNN is TC 1, the subsequent MLP or KAN topological structure is 2560-100-32-2. It can be seen that KAN achieved better results than MLP. In addition, the methods based on MLP and KAN are both superior to the CNN with the TC topological structure. That is, the I 2 CM performs better than TC in feature extraction.

[0103] Table 2 Comparison of MLP and KAN Results

[0104]

[0105] 1 TC: Conv16@(1,5) - MaxPool(1,2) - Conv32@(1,5) - MaxPool(1,4) -Conv64@(1,3) - MaxPool(1,5) - Conv64@(3,3) - MaxPool(4,4).

[0106] In addition, when comparing the method of the present invention with other methods, as shown in Table 3, the model of the present invention obtained the highest accuracy and specificity among these models, and the sensitivity is comparable to that of Spiking Conformer.

[0107] Table 3 Comparison of Results with Other Works

[0108]

[0109] The present invention studies the mixing of intra-channel and inter-channel features of EEG and proposes a seizure prediction method that fuses temporal and spatial dimension information. This method consists of a preprocessor, I 2 CM, and a prediction head. The preprocessor segments and filters the original EEG. I 2 CM uses intra-channel and inter-channel feature extractors constructed by MLP or KAN to mix features. The prediction head classifies the interictal or pre-ictal periods. In addition, the present invention evaluated the method of the present invention on the CHB-MIT dataset. The results show that I 2 CM performs better than the CNN with the TC topology, while KAN performs better than MLP, demonstrating the great potential of the method of the present invention in automatic seizure prediction.

[0110] The following describes the epilepsy seizure prediction device provided by the present invention based on the hybrid of intra-channel and inter-channel features of electroencephalogram. The epilepsy seizure prediction device based on the hybrid of intra-channel and inter-channel features of electroencephalogram described below can be correspondingly referred to the epilepsy seizure prediction method based on the hybrid of intra-channel and inter-channel features of electroencephalogram described above.

[0111] As Figure 8 shown, a kind of epilepsy seizure prediction device provided by the present invention based on the hybrid of intra-channel and inter-channel features of electroencephalogram includes:

[0112] An electroencephalogram acquisition module 810, configured to acquire an original electroencephalogram, filter and segment the original electroencephalogram, and generate a plurality of electroencephalogram window images;

[0113] A hybrid feature extraction module 820, configured to input the electroencephalogram window images into a plurality of feature hybrid modules for feature extraction to obtain hybrid features; each feature hybrid module includes an intra-channel feature extractor and an inter-channel feature extractor; the intra-channel feature extractor is used to fuse the hybrid time dimension features within each channel; the inter-channel feature extractor is used to fuse the hybrid space dimension features between channels;

[0114] An epilepsy prediction module 830, configured to input the hybrid features into a prediction head for classification to determine an epilepsy seizure prediction result.

[0115] Figure 9 Illustrated is a schematic diagram of the physical structure of an electronic device. As Figure 9 shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930, and a communication bus 940. Among them, the processor 910, the communication interface 920, and the memory 930 communicate with each other through the communication bus 940. The processor 910 can call the logical instructions in the memory 930 to execute the epilepsy seizure prediction method based on the hybrid of intra-channel and inter-channel features of electroencephalogram. The method includes: acquiring an original electroencephalogram, filtering and segmenting the original electroencephalogram to generate a plurality of electroencephalogram window images; inputting the electroencephalogram window images into a plurality of feature hybrid modules for feature extraction to obtain hybrid features; each feature hybrid module includes an intra-channel feature extractor and an inter-channel feature extractor; the intra-channel feature extractor is used to fuse the hybrid time dimension features within each channel; the inter-channel feature extractor is used to fuse the hybrid space dimension features between channels; inputting the hybrid features into a prediction head for classification to determine an epilepsy seizure prediction result.

[0116] In addition, when the logical instructions in the above-mentioned memory 930 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods according to the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0117] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalograms provided by the above-mentioned various methods. The method includes: acquiring an original electroencephalogram, filtering and segmenting the original electroencephalogram to generate a plurality of electroencephalogram window images; inputting the electroencephalogram window images into a plurality of feature mixture modules for feature extraction to obtain mixture features; each feature mixture module includes an intra-channel feature extractor and an inter-channel feature extractor; the intra-channel feature extractor is used to fuse the mixture time-dimensional features within each channel; the inter-channel feature extractor is used to fuse the mixture space-dimensional features between channels; inputting the mixture features into a prediction head for classification to determine the seizure prediction result.

[0118] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the seizure prediction method based on the mixture of intra-channel and inter-channel features of electroencephalograms provided by the above-mentioned various methods. The method includes: acquiring an original electroencephalogram, filtering and segmenting the original electroencephalogram to generate a plurality of electroencephalogram window images; inputting the electroencephalogram window images into a plurality of feature mixture modules for feature extraction to obtain mixture features; each feature mixture module includes an intra-channel feature extractor and an inter-channel feature extractor; the intra-channel feature extractor is used to fuse the mixture time-dimensional features within each channel; the inter-channel feature extractor is used to fuse the mixture space-dimensional features between channels; inputting the mixture features into a prediction head for classification to determine the seizure prediction result.

[0119] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.

[0120] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiments.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting epileptic seizures based on the mixing of intra-channel and inter-channel features of electroencephalogram, characterized in that: include: Acquire an original electroencephalogram, and filter and segment the original electroencephalogram to generate a plurality of electroencephalogram window images; Input the EEG window image into multiple feature mixing modules for feature extraction to obtain mixed features; each of the feature mixing modules includes an intra-channel feature extractor and an inter-channel feature extractor; the intra-channel feature extractor is used to fuse the mixed time dimension features in each channel; the inter-channel feature extractor is used to fuse the mixed space dimension features between channels; the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron or a Kolmogorov-Arnold network; Inputting the mixed features into a prediction head for classification to determine an epileptic seizure prediction result; The step of inputting the EEG window image into a plurality of feature mixing modules for feature extraction to obtain mixed features specifically includes: inputting the EEG window image into a plurality of feature mixing modules, and in each feature mixing module: normalizing the EEG window image, and then transposing it and inputting it into an intra-channel feature extractor; fusing the mixed time dimension features in each channel through the intra-channel feature extractor; transposing the mixed time dimension features in each channel, and then normalizing them and inputting them into an inter-channel feature extractor; fusing the mixed space dimension features between channels through the inter-channel feature extractor; When the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron, the intra-channel feature extractor is used to fuse the mixed time dimension features in each channel, specifically including: performing a first linear transformation on the transposed EEG window image in each channel to obtain first temporary data; performing a nonlinear transformation on the first temporary data through an activation function to obtain second temporary data; performing a second linear transformation on the second temporary data to obtain the time dimension features in each channel; summing the original data of the transposed EEG window image before the first linear transformation in each channel and the time dimension features to obtain the mixed time dimension features.

2. The epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of electroencephalogram according to claim 1 is characterized in that: When the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron, fusing the mixed spatial dimensional features between channels through the inter-channel feature extractor specifically includes: Performing a third linear transformation on the mixed time dimension features after transposition and normalization processing at each time step through an inter-channel feature extractor to obtain third temporary data; the time step is a fixed-length data segment into which the electroencephalogram is divided in time order; Performing a nonlinear transformation on the third temporary data through an activation function to obtain fourth temporary data; Performing a fourth linear transformation on the fourth temporary data to obtain a spatial dimension feature of each time step; The mixed spatial dimension feature is obtained by summing the data before the third linear transformation of the transposed mixed time dimension feature and the spatial dimension feature at each time step.

3. The epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of electroencephalogram according to claim 1 is characterized in that: When the intra-channel feature extractor and the inter-channel feature extractor are constructed by a Kolmogorov-Arnold network, fusing the mixed time dimension features in each channel by the intra-channel feature extractor specifically includes: Determine the function matrix according to the input dimension and the output dimension; Combining multiple layers of the function matrix and applying it to the transposed EEG window image to obtain the first output feature in each channel; The original data before the function matrix is ​​applied to the transposed EEG window image in each channel and the first output feature are summed to obtain a mixed time dimension feature.

4. The epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of electroencephalogram according to claim 3 is characterized in that: When the intra-channel feature extractor and the inter-channel feature extractor are constructed by a Kolmogorov-Arnold network, fusing the mixed spatial dimension features between channels through the inter-channel feature extractor specifically includes: The multi-layer function matrix is ​​combined and applied to each time step of the mixed time dimension feature after transposition and normalization to obtain a second output feature; the time step is a fixed-length data segment into which the electroencephalogram is divided in time order; The mixed space dimension feature is obtained by summing the transposed mixed time dimension feature before the function matrix is ​​applied to each time step and the second output feature.

5. An epileptic seizure prediction device based on the mixing of intra-channel and inter-channel features of electroencephalogram, characterized in that: include: An EEG acquisition module is used to acquire an original EEG, filter and segment the original EEG, and generate a plurality of EEG window images; A hybrid feature extraction module is used to input the EEG window image into multiple feature mixing modules for feature extraction to obtain hybrid features; each of the feature mixing modules includes an intra-channel feature extractor and an inter-channel feature extractor; the intra-channel feature extractor is used to fuse the hybrid time dimension features in each channel; the inter-channel feature extractor is used to fuse the hybrid space dimension features between channels; the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron or a Kolmogorov-Arnold network; the EEG window image is input into multiple feature mixing modules for feature extraction to obtain hybrid features, specifically comprising: inputting the EEG window image into multiple feature mixing modules, and in each feature mixing module: normalizing the EEG window image, and then transposing it and inputting it into the intra-channel feature extractor; fusing the features in each channel through the intra-channel feature extractor Mixed time dimension features; transposing the mixed time dimension features in each channel, and then normalizing them and inputting them into the inter-channel feature extractor; fusing the mixed space dimension features between channels through the inter-channel feature extractor; when the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron, fusing the mixed time dimension features in each channel through the intra-channel feature extractor specifically includes: performing a first linear transformation on the transposed EEG window image in each channel to obtain first temporary data; performing a nonlinear transformation on the first temporary data through an activation function to obtain second temporary data; performing a second linear transformation on the second temporary data to obtain the time dimension features in each channel; summing the original data of the transposed EEG window image before the first linear transformation in each channel and the time dimension features to obtain the mixed time dimension features; The epilepsy prediction module is used to input the mixed features into the prediction head for classification to determine the epilepsy attack prediction result.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for predicting epileptic seizures based on the mixing of intra-channel and inter-channel features of the electroencephalogram as described in any one of claims 1 to 4 is implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting epileptic seizures based on mixing intra-channel and inter-channel features of electroencephalograms as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Electroencephalogram signal classification method based on spatio-temporal joint MLP network and application

    CN115017960A

  • Epilepsy electroencephalogram signal monitoring method and system based on space-time attention mechanism

    CN115590529A