Epileptic seizure prediction method based on electroencephalogram intra-channel and inter-channel feature mixing

By fusing intra-channel and inter-channel characteristics in epilepsy prediction, the problem of insufficient information fusion is solved, the prediction accuracy and model robustness are improved, and efficient epilepsy prediction is achieved.

CN119302671AActive Publication Date: 2025-01-14PEKING UNIV

Patent Information

Application Number
CN202411192788.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-01-14
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 limits the accuracy and robustness of the prediction 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 spatial dimension to form mixed features, and input the prediction head for classification prediction.

Benefits of technology

The prediction accuracy of epilepsy and the generalization ability of the model were improved, and the average accuracy of 96.41%, specificity of 96.35%, and sensitivity of 96.47%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119302671A_ABST
    Figure CN119302671A_ABST
Patent Text Reader

Abstract

The invention relates to the field of intelligent medical treatment, and provides an epileptic seizure prediction method based on intra-channel and inter-channel feature mixing of an electroencephalogram, and the method comprises the steps: obtaining an original electroencephalogram, and carrying out the filtering and segmentation of the original electroencephalogram, and generating a plurality of electroencephalogram window images; inputting the electroencephalogram window image into a plurality of feature mixing modules for feature extraction to obtain mixed features; each feature mixing module comprises an in-channel feature extractor and an inter-channel feature extractor; the in-channel feature extractor is used for fusing mixed time dimension features in each channel; the inter-channel feature extractor is used for fusing inter-channel mixed spatial dimension features; and inputting the mixed features into a prediction head for classification, and determining an epileptic seizure prediction result. The epileptic seizure prediction method solves the defect of low accuracy of epileptic seizure prediction in the prior art, realizes efficient and accurate epileptic seizure prediction, 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 in particular to an epileptic seizure prediction method, device and equipment based on a mixture of intra-channel and inter-channel features of an electroencephalogram. Background Art

[0002] Epilepsy is a serious neurological disease characterized by sudden abnormal discharges of brain neurons, which causes patients to experience abnormal consciousness, sensation, emotion and behavior. Frequent attacks of epilepsy not only seriously affect the quality of life of patients, but also bring heavy burdens to their families and society. Electroencephalogram (EEG), as an important auxiliary means of detecting epilepsy, provides key information for the diagnosis and treatment of epilepsy by recording changes in electrical signals in the brain.

[0003] In recent years, with the development of deep learning technology, EEG-based epileptic seizure prediction has made significant progress. Most existing prediction models use neural network structures, such as convolutional neural networks (CNN), long short-term memory networks (LSTM), visual transformers, etc., to filter and transform EEG signals through preprocessors, then extract signal features through feature extractors, and finally perform classification predictions through prediction heads.

[0004] Although existing EEG-based epileptic seizure prediction methods have achieved certain results, they generally suffer from 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 a mixture of intra-channel and inter-channel features of electroencephalograms, so as to solve the defect of low accuracy in epileptic seizure prediction in the prior art, achieve efficient and accurate prediction of epileptic seizures, and improve the performance and generalization ability of the prediction model.

[0006] The present invention provides an epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of electroencephalogram, comprising the following steps: 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 mixed features are input into the prediction head for classification to determine the epileptic seizure prediction result.

[0007] According to a method for predicting epileptic seizures based on mixing intra-channel and inter-channel features of an electroencephalogram (EEG), the EEG window image is input into a plurality of feature mixing modules for feature extraction to obtain mixed features, specifically comprising: 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 before inputting it into an intra-channel feature extractor; fusing the mixed time dimension features within each channel through the intra-channel feature extractor; transposing the mixed time dimension features within each channel and then normalizing them before inputting them into an inter-channel feature extractor; and fusing the mixed space dimension features between channels through the inter-channel feature extractor.

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

[0009] According to a method for predicting epileptic seizures based on a mixture of intra-channel and inter-channel features of an 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 time dimension features in each channel are fused by the intra-channel feature extractor, specifically including: performing a first linear transformation on the transposed electroencephalogram 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 time dimension features in each channel; summing the original data of the transposed electroencephalogram window image before the first linear transformation in each channel and the time dimension features to obtain mixed time dimension features.

[0010] According to a method for predicting epileptic seizures based on a mixture of intra-channel and inter-channel features of an 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 inter-channel mixed spatial dimensional features are fused by the inter-channel feature extractor, specifically including: performing a third linear transformation on the transposed and normalized mixed time dimensional features at each time step by the inter-channel feature extractor to obtain third temporary data; the time steps are data segments of fixed length into which the electroencephalogram is divided in chronological order; the third temporary data is nonlinearly transformed by an activation function to obtain fourth temporary data; the fourth temporary data is subjected to a fourth linear transformation to obtain spatial dimensional features of each time step; the transposed mixed time dimensional features are summed with the data before the third linear transformation and the spatial dimensional features at each time step to obtain mixed spatial dimensional features.

[0011] According to a method for predicting epileptic seizures based on a mixture of intra-channel and inter-channel features of an 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 in each channel are fused by the intra-channel feature extractor, specifically including: determining a function matrix according to an input dimension and an output dimension; combining multiple layers of the function matrix and applying the resultant function matrix to a transposed electroencephalogram window image to obtain a first output feature in each channel; and summing the original data of the transposed electroencephalogram window image before the function matrix is ​​applied to each channel and the first output feature to obtain a mixed time dimension feature.

[0012] According to a method for predicting epileptic seizures based on a mixture of intra-channel and inter-channel features of an 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 inter-channel mixed spatial dimensional features are fused through the inter-channel feature extractor, specifically including: combining multiple layers of function matrices and applying them to each time step of the transposed and normalized mixed time dimensional features to obtain a second output feature; the time step is a fixed-length data segment into which the electroencephalogram is divided in chronological order; and summing the data before the function matrix is ​​applied to the transposed mixed time dimensional features at each time step and the second output feature to obtain the mixed spatial dimensional features.

[0013] The present invention also provides an epileptic seizure prediction device based on the mixing of intra-channel and inter-channel features of electroencephalogram, comprising the following modules: 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 mixed feature extraction module is used to 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 epilepsy prediction module is used to input the mixed features into the prediction head for classification to determine the epilepsy attack prediction result.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, an epileptic seizure prediction method based on a mixture of intra-channel and inter-channel features of an electroencephalogram as described above is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for predicting epileptic seizures based on a mixture of intra-channel and inter-channel features of electroencephalograms.

[0016] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-described methods for predicting epileptic seizures based on mixing intra-channel and inter-channel features of electroencephalograms.

[0017] The present invention provides an epileptic seizure prediction method, device and equipment based on the mixing of intra-channel and inter-channel features of electroencephalograms, including the following beneficial effects: by filtering and segmenting the original electroencephalogram to generate a window image, 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, the key information in the electroencephalogram can be captured more comprehensively, thereby improving the prediction accuracy of epileptic seizures. The design of the feature mixing module enables the present invention to consider the features of the time dimension and the spatial dimension at the same time, enhances the comprehensiveness and depth of feature extraction, and helps to discover more potential features related to epileptic seizures. Because the present invention comprehensively considers multiple features, the model has better adaptability and generalization ability when facing the electroencephalogram data of different patients. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

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

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

[0021] Figure 3 It is a flow chart of the epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of electroencephalogram provided by the present invention.

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

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

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

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

[0026] Figure 8 It is a structural schematic diagram of an epileptic seizure prediction device based on the mixing of intra-channel and inter-channel features of electroencephalogram provided by the present invention.

[0027] Fig. 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] Frequent epilepsy attacks affect millions of people around the world, and electroencephalogram (EEG) is an important auxiliary method for detecting epilepsy. Each channel of the EEG contains information in the time dimension, while the channels between the EEG contain information in the spatial dimension. The two are different, but existing EEG-based epilepsy prediction methods rarely pay attention to this. In order to solve this problem, the present invention proposes a method for mixing intra- and inter-channel features of EEG (Intra- and Inter-Channel FeatureMixing, I 2 CM) to predict epileptic seizures. The overall architecture of this method consists of three parts: preprocessor, I 2 CM and prediction head. The preprocessor performs segmentation and filtering on the raw EEG. 2 CM uses intra-channel feature extractors and inter-channel feature extractors to mix information in time and space dimensions. The prediction head predicts whether epilepsy is about to occur. In addition, the intra-channel feature extractor, inter-channel feature extractor and prediction head use multi-layer perceptron (MLP) and 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%.

[0030] Combine the following Figure 1-Figure 9Embodiments of the present invention are described.

[0031] Epilepsy is a neurological disease that causes sudden abnormal discharges of brain neurons, leading to abnormal consciousness, sensation, emotion, and behavior. Epilepsy often occurs 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 biomedical field in the new era. Timely intervention after prediction can significantly improve the patient's quality of life.

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

[0033] The typical EEG of epileptic patients can be divided into the following states: interictal, preictal, seizure prediction horizon (SPH), ictal, and postictal. Figure 1 As shown, the interictal period refers to the normal state of the brain; the preictal period refers to the state before the epileptic seizure; the seizure prediction period is a short time interval between the preictal period and the epileptic seizure, which is expected to issue a prediction alarm so that doctors can intervene; the ictal period refers to the actual epileptic seizure event; the postictal period refers to the period after the epileptic seizure when the brain returns to a normal state. Epilepsy seizure prediction mainly distinguishes between the interictal period and the preictal period to predict the onset of epilepsy from the preictal period.

[0034] In recent years, with the development of deep learning technology, epilepsy prediction research has progressed 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 in these models, their architectures can generally be divided into three main parts: preprocessor, feature extractor, and prediction head. The preprocessor performs operations such as filtering and time-frequency transformation, mainly to reduce the interference of eye and muscle movements on EEG signals. The feature extractor extracts EEG signal features through the backbone network, such as CNN, LSTM, visual Transformer, etc. The prediction head is usually a fully connected layer (Fully Connected, FC), which classifies the extracted features to determine whether the features are interictal or preictal.

[0035] The device for measuring EEG usually has multiple electrodes, which are reflected as multiple channels in the EEG image. The potential time series collected by each electrode is recorded in the corresponding channel. The intra-channel of EEG contains time dimension information, and the inter-channel contains spatial dimension information. However, most methods rarely pay attention to the difference between intra-channel and inter-channel. The present invention proposes an EEG intra- and inter-channel feature mixing (Intra- and Inter-Channel Feature Mixing, I 2 The main contributions of the present invention are: A method based on electroencephalogram (EEG) is proposed. 2 CM epilepsy prediction architecture, mixing temporal and spatial dimensions, which includes preprocessor, I 2 CM and prediction head.

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

[0037] The epilepsy seizure prediction method of the present invention was evaluated on the CHB-MIT dataset (a commonly used EEG dataset specifically used for epilepsy research and prediction tasks). Its accuracy, specificity and sensitivity were better than those of CNN, verifying the effectiveness of the algorithm of the present invention.

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

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

[0040] Figure 3 This is one of the flow charts of the epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of the electroencephalogram provided by the present invention, such as Figure 3 As shown, the method comprises the following steps: S310, obtaining an original electroencephalogram, filtering and segmenting the original electroencephalogram, and generating a plurality of electroencephalogram window images.

[0041] In one embodiment of the present invention, an original electroencephalogram is obtained, and frequency components within a preset frequency range are filtered out of the original electroencephalogram; and the filtered electroencephalogram is segmented into a plurality of window images of fixed lengths.

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

[0043] The present invention selects a 5-minute interval between the preictal period and the ictal period as the intervention time (SPH). The preictal period is defined as 30 minutes before the SPH, and the interictal period is defined as the period other than 4 hours before the ictal period and 4 hours after the ictal period. According to this setting, chb12 (subject numbered 12 in the CHB dataset) has no suitable interictal record, and chb24 (subject numbered 24 in the CHB dataset) lacks the start and end time of the file, and the interictal 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 study.

[0044] 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 the data has 60 Hz power frequency interference). In addition, the EEG is divided into window images of 5 seconds. Due to the duration setting of the present invention, the number of window images in the interictal period and the preictal period is unbalanced. In order to solve this imbalance, the present invention uses an adjustable step size to generate overlapping windows, thereby increasing the number of fewer windows.

[0045] S320, inputting the EEG window image into multiple feature mixing modules for feature extraction to obtain mixed features.

[0046] 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 dimension features within each channel; the inter-channel feature extractor is used to fuse the mixed space dimension features between channels.

[0047] According to an epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of an electroencephalogram provided by the present invention, an electroencephalogram window image is input into multiple feature mixing modules for feature extraction to obtain mixed features, specifically comprising: inputting the electroencephalogram window image into multiple feature mixing modules, and in each feature mixing module: normalizing the electroencephalogram 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; and fusing the mixed space dimension features between channels through the inter-channel feature extractor.

[0048] According to an epileptic seizure prediction method based on a mixture of intra-channel and inter-channel features of an electroencephalogram provided by the present invention, an intra-channel feature extractor and an inter-channel feature extractor are constructed by a multilayer perceptron or a Kolmogorov-Arnold network.

[0049] Specifically, the segmented EEG window image X is sent to N I 2 The CM module performs feature extraction. 2 In the CM module, the input EEG window is normalized by layer normalization and then transposed to the intra-channel feature extractor. The intra-channel feature extractor fuses the EEG signal sequence features in each channel and mixes the time dimension information. After the intra-channel feature extraction, the features are normalized by layer normalization and transposed again to the inter-channel feature extractor. The inter-channel feature extractor fuses the EEG channel features and mixes the spatial dimension information. In the feature mixing, jump connections are also used to maintain the gradient.

[0050] S330: Input the mixed features into the prediction head for classification to determine the epileptic seizure prediction result.

[0051] Specifically, I 2 The mixed features extracted by CM are finally input into the prediction head, which is a classifier that classifies the interictal period and preictal period. The prediction head also uses a single-layer MLP or KAN.

[0052] According to the present invention, an epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of electroencephalogram is provided. When the intra-channel feature extractor and the inter-channel feature extractor are constructed by a multi-layer perceptron, the mixed time dimension features in each channel are fused by the intra-channel feature extractor. Specifically, the method includes: performing a first linear transformation on the transposed electroencephalogram window image in each channel to obtain a first temporary data ; The first temporary data is transformed nonlinearly through the activation function to obtain the second temporary data ; Perform a second linear transformation on the second temporary data to obtain the time dimension features in each channel ; The original data of the transposed EEG window image before the first linear transformation in each channel and time dimension features Sum to get mixed time dimension features .

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

[0054] Among them, W is the weight matrix and b is the bias.

[0055] The output of the MLP in the intra-channel or inter-channel feature extractor can be expressed as: (2)

[0056] The intra-channel feature mixing acts on Channels (columns) of (transposed input) , MLP is shared among all channels. It mixes the temporal information of each channel , can be written as follows: (3)

[0057] (4)

[0058] in , is the weight matrix in MLP, , is the bias in the MLP, is the layer normalization, It is a channel The intra-channel mixed time dimension characteristics.

[0059] According to the present invention, an epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of electroencephalogram is provided. 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 by the inter-channel feature extractor, specifically comprising: performing a third linear transformation on the mixed time dimension features after transposition and normalization at each time step by the inter-channel feature extractor to obtain a third temporary data ; The time step is a fixed-length data segment into which the EEG is divided in chronological order; the third temporary data is nonlinearly transformed through an activation function to obtain the fourth temporary data ; Perform the fourth linear transformation on the fourth temporary data to obtain the spatial dimension features of each time step ; The data before the third linear transformation of the transposed mixed time dimension features at each time step and spatial dimension features Sum to get the mixed space dimension features .

[0060] Specifically, the inter-channel feature mixing acts on Time step (rows) , MLP is shared across all time steps. It mixes spatial dimension information , can be written as follows: (5)

[0061] (6)

[0062] in , is the weight matrix in the MLP, , is the bias in the MLP, is the layer normalization, is the time step The inter-channel mixing characteristics.

[0063] According to an epileptic seizure prediction method based on the mixing 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 in each channel are fused by the intra-channel feature extractor, specifically including: determining a function matrix according to the input dimension i and the output dimension j; combining the multi-layer function matrix and applying it to the transposed electroencephalogram window image to obtain the first output feature in each channel ; The original data before the transposed EEG window image is subjected to the function matrix in each channel and the first output feature Sum to get mixed time dimension features .

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

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

[0066] (7)

[0067] This shows that if the present invention can find a suitable univariate function and , it can be approximately expressed as .

[0068] The prototype of KAN is a two-layer network. Figure 5 As shown, the activation function is located on the edge, and the node is a simple summation, which combines each one-dimensional function and Parameterized into a b-spline curve that can be used for training. In order to better approximate the function , generalized KAN uses wider and deeper layers. The KAN linear layer (KANLinear) can be defined as a one-dimensional function The matrix ,in and are the input dimension and the output dimension respectively. The generalized KAN can be obtained by The combination of layers is represented by: (8)

[0069] in, It is The function matrix of the linear layer of KAN.

[0070] The KAN output in the intra-channel or inter-channel feature extractor can be expressed as: (9)

[0071] Acts on Middle Channel The intra-channel feature mixture of can be written as follows: (10)

[0072] in is the layer normalization, aisle The KAN is shared among all channels.

[0073] According to an epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of an 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 spatial dimension features between channels are fused by the inter-channel feature extractor, specifically comprising: combining the multi-layer function matrix and acting on each time step of the mixed time dimension feature U after transposition and normalization, to obtain a second output feature ; The time step is the fixed-length data segment into which the EEG is divided in chronological order; the data before the transposed mixed time dimension feature is applied to the function matrix at each time step and the second output feature Sum to get the mixed space dimension features .

[0074] Specifically, it acts on Medium time step The inter-channel feature mixture can be written as follows: (11)

[0075] in is the layer normalization, Time step The KAN is shared across all time steps.

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

[0077] Accuracy (ACC), specificity (SPEC), and sensitivity (SENS) are used as evaluation metrics. They are defined as follows: (12)

[0078] (13)

[0079] (14)

[0080] in is the number of correctly classified preictal episodes, is the number of correctly classified interictal periods, is the number of interictal periods misclassified as preictal periods, is the number of preictal episodes misclassified as interictal episodes. The indicator value for the CHB-MIT dataset can be obtained by averaging the indicator values ​​of the 22 cases.

[0081] According to the experimental settings, the present invention tested the model. The model results of each case based on MLP and KAN on the CHB-MIT dataset are as follows: Figure 6 and Figure 7 As shown in Figure 2, we can see that KAN outperforms MLP in most cases, while MLP outperforms KAN in 5 cases (chb01, chb10, chb17, chb19, and chb23).

[0082] The present invention also studies I 2 The impact of the number of CM modules. 2 The results of the number of CM modules are shown in Table 1. 2 The more CM modules there are, the better the result. 2 When the CM module is used, 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%.

[0083] Table 1 Different I 2 Comparison of CM quantity results

[0084] The present invention also compares the effects of RNN, BiLSTM, CNN and the present invention, as shown in Table 2. The topological structures of RNN and BiLSTM are both 22-28-28, followed by MLP or KAN with a topological structure of 28-22; the topological structure of CNN is TC 1 , followed by MLP or KAN topology is 2560-100-32-2. It can be seen that KAN achieves better results than MLP. In addition, both MLP and KAN-based methods outperform CNN with TC topology. In other words, I based on MLP and KAN 2CM performs better than TC in feature extraction.

[0085] Table 2 Comparison of MLP and KAN results

[0086] 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).

[0087] In addition, the method of the present invention was compared with other methods. As shown in Table 3, the model of the present invention achieved the highest accuracy and specificity among these models, and the sensitivity was comparable to that of the Spiking Conformer.

[0088] Table 3 Comparison with other work results

[0089] The present invention studies the mixing of intra-channel and inter-channel features of EEG and proposes a method for predicting epileptic seizures that integrates temporal and spatial dimension information. The method consists of a preprocessor, an I 2 The preprocessor performs segmentation and filtering on the raw EEG. 2 CM uses intra-channel features and inter-channel feature extractors constructed by MLP or KAN to mix features. The prediction head classifies the interictal period or preictal period. In addition, the method of the present invention is evaluated on the CHB-MIT dataset. The results show that I 2 CM outperformed CNN with TC topology, while KAN outperformed MLP, demonstrating that the proposed method has great potential for automatic epileptic seizure prediction.

[0090] The following is a description of the epilepsy seizure prediction device based on the mixing of EEG intra-channel and inter-channel features provided by the present invention. The epilepsy seizure prediction device based on the mixing of EEG intra-channel and inter-channel features described below and the epilepsy seizure prediction method based on the mixing of EEG intra-channel and inter-channel features described above can be referenced to each other.

[0091] like Figure 8 The present invention shows an epileptic seizure prediction device based on the mixing of intra-channel and inter-channel features of electroencephalogram, comprising: The EEG acquisition module 810 is used to acquire the original EEG, filter and segment the original EEG, and generate multiple EEG window images; The mixed feature extraction module 820 is used to input the EEG window image into multiple feature mixing modules for feature extraction to obtain mixed features; 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 dimension features in each channel; the inter-channel feature extractor is used to fuse the mixed space dimension features between channels; The epilepsy prediction module 830 is used to input the mixed features into the prediction head for classification to determine the epilepsy attack prediction result.

[0092] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9 As shown, the electronic device may include: a processor 910, a communication interface 920, a memory 930 and a communication bus 940, wherein the processor 910, the communication interface 920 and the memory 930 communicate with each other through the communication bus 940. The processor 910 may call the logic instructions in the memory 930 to execute an epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of the electroencephalogram, the method comprising: obtaining the original electroencephalogram, filtering and segmenting the original electroencephalogram, generating a plurality of electroencephalogram window images; inputting the electroencephalogram window images into a plurality of feature mixing modules for feature extraction to obtain mixed features; 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 dimension features in each channel; the inter-channel feature extractor is used to fuse the mixed space dimension features between channels; the mixed features are input into the prediction head for classification to determine the epileptic seizure prediction result.

[0093] In addition, the logic instructions in the above-mentioned memory 930 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0094] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program 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 epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of the electroencephalogram provided by the above-mentioned methods, the method including: obtaining the original electroencephalogram, filtering and segmenting the original electroencephalogram, and generating multiple electroencephalogram window images; inputting the electroencephalogram window image into multiple feature mixing modules for feature extraction to obtain mixed features; 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 dimension features within each channel; the inter-channel feature extractor is used to fuse the mixed spatial dimension features between channels; the mixed features are input into the prediction head for classification to determine the epileptic seizure prediction result.

[0095] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of the electroencephalogram provided by the above-mentioned methods, the method comprising: obtaining an original electroencephalogram, filtering and segmenting the original electroencephalogram, and generating multiple electroencephalogram window images; inputting the electroencephalogram window image into multiple feature mixing modules for feature extraction to obtain mixed features; each feature mixing module comprises 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; the mixed features are input into the prediction head for classification to determine the epileptic seizure prediction result.

[0096] The device embodiments described above are merely illustrative, wherein 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, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0097] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for 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 embodiment.

[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions 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 mixed features are input into the prediction head for classification to determine the epileptic seizure prediction result.

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: The step of inputting the EEG window image into a plurality of feature mixing modules for feature extraction to obtain mixed features specifically includes: The EEG window image is input 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 the intra-channel feature extractor; fusing the mixed time dimension features in each channel through the intra-channel feature extractor; Transpose the mixed time dimension features in each channel, perform normalization processing, and then input them into the inter-channel feature extractor; The mixed spatial dimensional features between channels are fused through the inter-channel feature extractor.

3. The epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of electroencephalogram according to claim 2 is characterized in that: The intra-channel feature extractor and the inter-channel feature extractor are constructed by multi-layer perceptron or Kolmogorov-Arnold network.

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 multi-layer perceptron, fusing the mixed time dimension features in each channel by 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 a time dimension feature in each channel; The mixed time dimension feature is obtained by summing the original data of the transposed EEG window image before the first linear transformation in each channel and the time dimension feature.

5. The epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of electroencephalogram according to claim 4 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.

6. The epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of electroencephalogram according to claim 3, 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.

7. The epileptic seizure prediction method based on the mixing of intra-channel and inter-channel features of electroencephalogram according to claim 6, 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.

8. 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 mixed feature extraction module is used to 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 epilepsy prediction module is used to input the mixed features into the prediction head for classification to determine the epilepsy attack prediction result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: 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 7 is implemented.

10. 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 7 is implemented.

Citation Information

Patent Citations

  • Brain electrical emotion recognition method based on space-time diagram model

    CN114169364A

  • 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

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

    CN115944307A

  • Motor imagery electroencephalogram signal classification method and system based on space-time frequency feature extraction

    CN116595455A

Cited By

  • Aero-engine degradation perception representation learning method and device based on double-dependence interaction, equipment and medium

    CN121935858A