Seizure prediction method and system based on channel selection of physiological diffusion modeling of epilepsy
Patent Information
- Application Number
- CN202611327733.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2046-08-31
AI Technical Summary
Existing epilepsy seizure prediction models struggle to accurately locate weak epileptogenic foci signals amidst complex background noise, and the "black box" nature of deep learning models limits their reliability in clinical practice.
A channel selection method based on epilepsy physiological diffusion modeling is adopted. Temporal feature maps are extracted through a three-layer 1D-CNN, spatial information is aggregated by GCN, H-CGA algorithm is used to dynamically focus key epileptogenic regions, suppress background noise, and temporal prediction is performed through LSTM network.
It achieves highly reliable and interference-resistant epileptic seizure early warning, with high model transparency, providing visual lesion localization assistance, and improving the safety and practicality of prediction.
Smart Images

Figure CN122827630B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of liquid biomedical engineering and artificial intelligence technology, specifically to a method and system for predicting seizures based on channel selection using epilepsy physiological diffusion modeling. Background Technology
[0002] Epilepsy is a chronic brain disorder caused by abnormal synchronous discharges of nerve cells, characterized by recurrent and unpredictable seizures. Electroencephalography (EEG), by capturing voltage fluctuations in brain electrical activity, has become one of the most commonly used and reliable tools for clinical diagnosis of epilepsy. However, in actual clinical practice, doctors need to analyze massive amounts of EEG data to assess a patient's seizure risk. Limited by manpower and time, it is impossible to achieve 24 / 7 real-time monitoring of every patient. Therefore, research on real-time analysis of epileptic seizures using artificial intelligence is crucial. It can not only compensate for the shortcomings of manual monitoring but also significantly reduce the workload of medical staff, providing patients with more timely medical care and allowing sufficient time to avoid danger and take protective measures. Ultimately, this will comprehensively improve the quality of life for patients and their families.
[0003] In epilepsy diagnosis and treatment research, the application of machine learning technology can be mainly divided into three directions: seizure prediction, seizure detection, and seizure type classification. Seizure prediction is the core direction of this invention. The core objective of the invention is to identify pre-ictal features in the patient's EEG signals, distinguishing between the pre-ictal and interictal EEG states, thereby achieving early warning of epileptic seizures and gaining valuable time for clinical intervention. Throughout the entire process of an epileptic seizure, EEG signals exhibit four distinct phases: interictal, pre-ictal, ictal, and post-ictal. Accurate identification of abnormal pre-ictal EEG signals is the key to effective epilepsy prediction.
[0004] Because of individual differences in seizure type and lesion location among epilepsy patients, the characteristics of their EEG signals also vary. Therefore, individualized prediction methods for specific patients have become a research focus in academia. However, existing data-driven methods still face many challenges. First, traditional deep learning models often treat multi-channel EEG as independent two-dimensional matrices or one-dimensional sequences, ignoring the inherent non-Euclidean spatial topological relationships between electrodes in the brain as a spherical structure, making it difficult to capture the spatial characteristics of seizures as a network propagation event. Second, EEG signals are filled with background activity and environmental artifacts unrelated to the patient's physiological state, and epileptic seizures usually originate in one area of the brain and may spread to another, rather than being a synchronous outbreak across the entire brain. Existing global feature extraction methods often assign the same weight to all channels, making it difficult to accurately locate weak epileptogenic focus signals in complex background noise, leading to false alarms when the model encounters blinking or electromyographic interference.
[0005] Therefore, introducing an attention mechanism that can dynamically focus on key epileptogenic regions and suppress irrelevant background noise is a key challenge for improving predictive performance. Furthermore, the "black box" nature of deep models makes it difficult for physicians to understand the physiological basis of their predictions, limiting their clinical reliability. Summary of the Invention
[0006] This invention addresses the problem that existing global feature extraction methods often assign the same weight to all channels, making it difficult to accurately locate weak epileptogenic foci signals in complex background noise, leading to false alarms when the model encounters blinking or electromyographic interference. To this end, this invention proposes a seizure prediction method and system based on channel selection using epilepsy physiological diffusion modeling. The invention achieves these technical problems through the following technical solutions: Option 1: This invention proposes a seizure prediction method based on channel selection in epilepsy physiological diffusion modeling, the method comprising the following steps: Step 1: Obtain EEG signals from the CHB-MIT scalp EEG database and divide the EEG signals into preic samples and interictal samples. Step 2: Employ end-to-end representation learning, extract temporal feature maps for each channel using a three-layer 1D-CNN, and feed the temporal feature maps of each channel into a GCN containing two layers of GCNConv to aggregate spatial information and obtain high-order spatiotemporal features. Step 3: Using the H-CGA algorithm, the global context encoder aggregates whole-brain features to obtain the context vector. The hub selector projects the context vector to 7 candidate hubs and obtains the gating coefficients by Sigmoid normalization. The knowledge-driven expansion layer projects the hub activation probability to 21 channels through a predefined binary expansion matrix. The spatial gating vector is obtained by the Clamp function and then fused to output the enhanced features. Step 4: Input the enhanced features into a two-layer LSTM network with a hidden layer dimension of 256, extract the hidden state of the last time step, output the logical value through the classifier, and complete the binary classification of the pre-ictal and interictal periods and the prediction of epileptic seizures.
[0007] Furthermore, a preferred embodiment is provided in which random undersampling is performed on the interictal samples described in step 1, and the data is standardized using Z-score.
[0008] Furthermore, a preferred embodiment is provided, wherein the method for extracting the temporal features of each channel using a three-layer 1D-CNN in step 2 is as follows: The first layer of 1D-CNN is used to extract basic temporal morphological features; The second and third layers of 1D-CNN are used to progressively extract complex rhythmic patterns and high-level potential biomarkers.
[0009] Furthermore, a preferred embodiment is provided, wherein the method for sending the temporal feature maps of each channel into the GCN containing two GCNConv layers to aggregate spatial information and obtain high-order spatiotemporal features in step 2 is as follows: the 1D-CNN and the graph convolutional network module form an ST-CGN module, which is used to generate high-order spatiotemporal features that fuse physical connection priors and send them into the H-CGA algorithm.
[0010] Furthermore, a preferred implementation is provided, in step 2, the first layer of GCNConv maps CNN features to the hidden layer space, and the second layer of GCNConv expands the receptive field and doubles the feature dimension to analyze the topological correlation of EEG channel space.
[0011] Furthermore, a preferred embodiment is provided, wherein step 3 employs the H-CGA algorithm, and the method for obtaining the context vector by aggregating whole-brain features through a global context encoder is as follows: Context vectors reflecting the physiological state of the whole brain are extracted through a global perception unit; a scoring system combining an attention layer and a semantic hub selector is used to assign scores to predefined anatomical hubs, identifying and highlighting key brain network nodes representing the epileptic seizure onset zone. ; in, For mean pooling operation, Let N be the input sequence, N be the total number of elements in the input sequence, and n be the number of elements. Let be the feature vector of the nth element in the sequence.
[0012] Furthermore, a preferred implementation is provided, in step 3, the knowledge-driven expansion layer projects the hub activation probability onto 21 channels using a predefined binary expansion matrix, processes it through the Clamp function to obtain a spatial gating vector, and outputs the enhanced features after fusion as follows:
[0013]
[0014] in, For the center attention vector This represents the original feature tensor output by the graph convolutional layer. Extended mapping matrix, , For the enhanced features input to the LSTM layer, The spatiotemporal characteristic matrix, Let be the transpose of the gated vector.
[0015] Option 2: A seizure prediction system based on channel selection using epilepsy physiological diffusion modeling, the system comprising: The data acquisition module is used to acquire EEG signals from the CHB-MIT scalp EEG database and divide the EEG signals into pre-ictal samples and interictal samples. The spatiotemporal feature extraction module is used to extract the temporal feature maps of each channel through a three-layer 1D-CNN using end-to-end representation learning. The temporal feature maps of each channel are then fed into a GCN containing two layers of GCNConv to aggregate spatial information and obtain high-order spatiotemporal features. The channel selection module uses the H-CGA algorithm to aggregate whole-brain features through a global context encoder to obtain a context vector. The hub selector projects the context vector to 7 candidate hubs and obtains the gating coefficients by Sigmoid normalization. The knowledge-driven expansion layer projects the hub activation probability to 21 channels through a predefined binary expansion matrix, processes it through the Clamp function to obtain a spatial gating vector, and outputs the enhanced features after fusion. The temporal prediction module is used to input enhanced features into a two-layer LSTM network with a hidden layer dimension of 256, extract the hidden state of the last time step, output the logical value through the classifier, and complete the binary classification of the pre-ictal and interictal periods and the prediction of epileptic seizures.
[0016] Option 3: A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in Option 1.
[0017] Option 4: A computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the method described in Option 1.
[0018] The advantages of this invention are: The seizure prediction method and system based on channel selection modeling of epilepsy physiological diffusion, as described in this invention, represents a comprehensive leap forward in early warning reliability, anti-interference capability, and clinical interpretability. Firstly, in terms of clinical prediction performance, the model effectively overcomes the challenge of extreme class imbalance in long-term EEG monitoring by simulating the H-CGA gating mechanism of physiological diffusion. This mechanism can accurately amplify weak pre-seizure aura features and strongly suppress redundant background noise in non-epileptic areas, thus achieving a balance between missed and false alarms and significantly improving the safety and practicality of the early warning system. Secondly, in terms of model transparency, this architecture breaks through the "black box" barrier of traditional deep learning, enabling dynamic output of patient-specific epileptogenic network topology maps that highly conform to neuropathological patterns. This not only provides clinicians with intuitive and visual lesion localization assistance but also lays a solid technological foundation for the future development of lightweight wearable epilepsy monitoring devices with low power consumption and customized channels.
[0019] This invention is also applicable to a method for predicting epileptic seizures based on channel selection simulating the physiological diffusion process of epilepsy in predicting epileptic seizure scenarios. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the model architecture in the seizure prediction method based on channel selection modeling of epilepsy physiological diffusion as described in Implementation Method 1.
[0021] Figure 2 This is a visualized brain topography map with different folding operations as described in Implementation Method 1.
[0022] Figure 3 This is the final average visualized brain topography map as described in Implementation Method 1. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0024] Implementation Method 1, see [link] Figures 1 to 3 This embodiment describes a seizure prediction method based on channel selection modeling of epilepsy physiological diffusion. This method aims to simulate the physiological process of EEG diffusion and dynamically select important channels according to the characteristics of different patients, thereby solving the problem of large individual differences in seizure characteristics. To comprehensively capture the spatiotemporal characteristics of EEG signals, this embodiment proposes a hybrid cascaded deep learning model. This model consists of a one-dimensional convolutional neural network (1D-CNN) for extracting microscopic waveform features, a graph convolutional network (GCN) for modeling mesoscopic brain network topology, and a long short-term memory network (LSTM) for tracking macroscopic temporal evolution.
[0025] Unlike existing methods that primarily focus on reducing computational complexity through static channel selection, this implementation introduces a dynamic gating mechanism based on anatomical hubs. This mechanism uses the physical connectivity of the international 10-20 system as a graph structure prior, enabling real-time calculation of attentional weights in key brain regions (hubs) and focusing on analyzing epileptogenic focus activity during the preic seizure phase.
[0026] The method described in this invention was evaluated on the CHB-MIT scalp EEG dataset using a leave-one-out cross-validation strategy. This invention describes four stages: feature extraction, diffuse channel selection, temporal capture, and classification output. Ultimately, it classifies the interictal and preictal phases to achieve predictive performance. Stage one uses ST-CGN for spatiotemporal feature extraction; stage two simulates the physiological characteristics of epileptic seizures, diffusely selecting important channels and generating a gating matrix; stage three inputs the data into an LSTM network for long-range feature capture to prevent missing important information; and the final stage uses an MLP for classification. The main steps include: Step 1: Data Acquisition and Preprocessing. The CHB-MIT scalp EEG database was freely available through the PhysioNet platform. This dataset included 23 pediatric epilepsy patients. Because one patient underwent a second EEG recording 1.5 years later, this sample is often separated in related experiments; therefore, the entire dataset was considered as 24 independent study cases. The subjects included both males and females, with ages ranging from 1.5 to 22 years. EEG signal acquisition strictly followed the international 10-20 electrode placement standard, with the original sampling frequency set at 256 Hz. The entire dataset contains over 900 hours of continuous EEG monitoring data, recording nearly 200 epileptic seizures of different clinical types.
[0027] To effectively predict epileptic seizures, this invention divides continuously acquired EEG signals into two categories: pre-ictal and interictal samples. Clinical studies have confirmed that abnormal brain discharges occur before an epileptic seizure, and the related energy accumulation shows significant changes in the tens of minutes before the seizure. Based on this characteristic, this invention defines the pre-ictal period as the time from 35 minutes to 5 minutes before the seizure, corresponding to a 30-minute seizure prediction window. The last 5 minutes before the seizure are designated as the seizure prediction warning period. This setting ensures that after the system detects pre-seizure auras, it allows patients and medical staff at least 5 minutes of intervention time to take appropriate medical protective measures in a timely manner. On the other hand, the interictal signal is normal background EEG activity extracted from a period of time far removed from any seizure event. To prevent data contamination, a 30-minute post-ictal exclusion period is specifically set to ensure that the interictal data does not contain residual EEG abnormalities after the seizure. In the data preprocessing stage, unlike traditional methods that use Short-Time Fourier Transform (STFT) to generate two-dimensional spectrograms, our model runs directly on the original one-dimensional time series to avoid the loss of subtle temporal features caused by frequency domain transformation. First, each patient's EEG data is preprocessed individually, extracting 21 reference channels (e.g., FP1-F7, F7-T7, etc.) based on a 10-20 system through normalization mapping. Subsequently, the signals are sequentially passed through bandpass filters from 1.0 to 70 Hz to eliminate baseline drift and high-frequency EMG artifacts, and a 60 Hz notch filter is applied to thoroughly remove power line noise interference. The cleaned continuous EEG signals are then segmented into discrete sample segments using a sliding window technique. The physical duration of each window is set to 30 seconds, with a sliding step size of 5 seconds. To eliminate class bias during model training, we randomly undersample a large number of interictal samples and normalize the data using Z-scores. Finally, the input shape fed into our proposed CNN-GCN-LSTM multidimensional spatiotemporal network is (B, 21, 7680), where B is the batch size, 21 is the number of normalized channels, and 7680 is the time step of a 30-second data window at a sampling rate of 256 Hz.
[0028] Step Two: Spatiotemporal Feature Extraction. This invention chooses not to rely on Short-Time Fourier Transform (STFT) or spectrograms for signal preprocessing, but instead employs an end-to-end representation learning method that directly acts on the original signal. The study introduces a one-dimensional convolutional neural network (1D-CNN) as a set of self-learning filters to directly extract discriminative temporal features from the original EEG waveforms. This mechanism requires the model to automatically discover and learn potential nonlinear biomarkers in the data and to efficiently combine with graph convolutional network modules to form an ST-CGN module. Hierarchical Feature Extraction Based on One-Dimensional Convolutional Neural Networks: The original EEG time series is processed through three one-dimensional convolutional layers, which act as a learnable filter bank. The first layer (large convolutional kernel) extracts basic temporal morphological features, such as spikes and sharp waves. The second and third layers (medium and small convolutional kernels) progressively extract complex rhythmic patterns and high-level potential biomarkers, replacing traditional manual STFT features with data-driven spatiotemporal representation.
[0029] The raw multi-channel EEG signals are first processed by 1D-CNN to independently extract the local high-frequency temporal features of each channel. Then, the feature maps are reshaped and fed into a graph convolutional network (GCN), where spatial neighborhood information is aggregated based on a predefined electrode physical topology. After processing by ST-CGN, the spatiotemporal features of the EEG signals can be successfully extracted. In traditional spatial analysis, conventional 3D convolution often assumes that electrodes are distributed on a regular Euclidean grid, which obviously violates the complex curved physical topology of the human cerebral cortex. To overcome this limitation, this implementation introduces a GCN to deeply analyze the complex spatial topological correlations between different EEG channels. Specifically, this implementation constructs a graph convolutional network containing two GCNConv layers. The edge indices and adjacency matrices of the graph are not randomly initialized, but are strictly based on the predefined physical distances and functional connectivity of 10-20 EEG system electrodes according to international standards. Since abnormal EEG activity in the pre-seizure phase typically propagates gradually between adjacent brain regions along specific anatomical pathways, the information transfer mechanism of the GCN allows each node (electrode) to dynamically aggregate the spatial information of its physical neighbors. The first layer of the GCN maps the features extracted by the CNN to the hidden space, while the second layer further expands the receptive field and doubles the feature dimension. Through this joint architecture, the ST-CGN module generates a highly fused high-order spatiotemporal feature representation rich in physical connection priors before feeding the data into the subsequent H-CGA core selection model.
[0030] Step 3: Simulating the physiological characteristics of epilepsy to learn and diffusely select important channels. The higher-order output of the GCN enters the attention mechanism (hub selector). To achieve precise selection of EEG channels, this implementation design employs the Hub to Channel Gating Attention (H-CGA) algorithm. Its core principle is to simulate the clinical diagnostic logic of neurologists who "first locate the brain region, then focus on the electrodes." This algorithm abandons the indiscriminate attention calculation method for physical channels. Through a hierarchical cascaded processing flow, it transforms the global contextual information of the entire brain into gating signals for specific physical channels, dynamically generating a spatial attention gating mechanism.
[0031] The H-CGA architecture primarily consists of three modules: a global context encoder, a hub selector, and a knowledge-driven extension layer. This module is based on the spatial aggregation features output by a graph convolutional network (GCN)—that is, a node feature map that integrates physical neighborhood context. It dynamically assigns gating weights to each physical channel based on its potential contribution to capturing epileptogenic symptoms. The core objective is to identify and enhance key brain network hubs representing the origin of epileptic seizures, transforming spatiotemporal features into dynamically weighted maps with anatomical significance. H-CGA follows a hierarchical mapping mechanism from global to local: first, a global perception unit extracts context vectors reflecting the physiological state of the entire brain; then, based on this global background, an attention layer combined with a semantic hub selector assigns scores to predefined anatomical hubs, thereby identifying and highlighting key brain network nodes representing the epileptic seizure onset area.
[0032] In the H-CGA architecture, the HubSelector operates immediately following the global context encoder. Its primary task is to map highly compressed global EEG representations onto anatomically significant physical nodes. Unlike traditional self-attention mechanisms that compute correlations across all channels, the HubSelector employs a sparse selection strategy based on prior knowledge. This design stems from the neurophysiological fact that epileptic seizures typically originate from specific "epileptic foci" and propagate via key hubs, rather than from synchronized abnormalities across the entire brain. By focusing on key regions, the model avoids being distracted by background noise in non-seizure areas.
[0033] The specific operation flow of this module is shown in the figure, and mainly includes the following stages: 1. The module receives an aggregated vector from the global context encoder, which uses global average pooling (GAP) to pool tensors with spatiotemporal characteristics. Aggregation is performed on the channel dimension N. The aggregation process can be described mathematically as Formula 1. In this way, the macroscopic physiological state representation of the brain under the current window is extracted, providing overall contextual information for subsequent pivotal decisions.
[0034]
[0035] 2. Project it into a predefined space of 7 "Candidate Hubs" through a learnable linear layer. The mathematical representation of the linear layer can be seen in the formula. This is a weight matrix, where K is the number of hubs and D is the feature dimension. These hubs are selected based on the international EEG10-20 system (e.g., the left frontal lobe represents the pathway, the temporal lobe represents the pathway, etc.), covering the seven major functional areas of the brain. The model calculates the response intensity of each anatomical hub based on the input global context. This step essentially asks: "Given the current overall state of the brain, which functional area is most likely the source of abnormal activity?"
[0036]
[0037] in, This is the weight matrix. For context vectors, For bias vectors, This is the output score vector.
[0038] 3. Apply the Sigmoid activation function to normalize the response intensity to a gating coefficient in the (0,1) interval.
[0039]
[0040] In the H-CGA architecture described in this embodiment, although the HubSelector effectively identifies key anatomical core nodes (Hubs), to achieve brain-wide feature enhancement, this sparse high-level topological signal must be transformed into dense modulation of all N EEG channels. In our work, considering the electrophysiological propagation characteristics of epileptic seizures, a knowledge-driven expansion layer is introduced. In deep learning, utilizing prior knowledge can be seen as a regularization method that restricts the model's search space to conform to physical reality. The core of this layer lies in constructing a static mapping relationship using the physical connection topology of the EEG10-20 system, allowing the activation of core nodes to propagate to their spatial neighborhoods via "synapses." The proposed expansion layer aims to extend the HubSelector's decision logic from the local core to the global network, thereby suppressing seizure-irrelevant background noise. Therefore, generating a spatial gating vector that covers all channels is crucial. Considering the spatial layout of the trained HubSelector and EEG, they show which neighboring regions should share the activation state of core nodes. This expansion mechanism effectively acts as an anatomically based spatial filter.
[0041] In this implementation, the source vector Ahub of length K is defined as the activation probabilities of the K candidate hubs output by HubSelector at time t (K=7 in this implementation). To project these probabilities onto the complete N channel space (N=21 or as set according to the specific patient), this implementation introduces a predefined binary expansion matrix. If channel j is a physical neighbor of hub i (or is the hub itself), then the matrix elements... =1, otherwise 0. The spatial gating vector Gt is calculated as follows:
[0042] The Clamp function acts as a non-linear activation mechanism, forcibly restricting the gate value to the interval [ ]. [1.0] (This experiment is set within) =0.15). This design is crucial because it prevents features of inactive regions from being completely zeroed out (i.e., the "dead zone" problem), ensuring that the model can retain the basic information flow of background EEG activity while focusing on key regions.
[0043] Finally, the expansion layer uses element-wise multiplication (HadamardProduct) to gate the vector. Integrating into the features, as shown in the formula:
[0044] This represents the original feature tensor output by the graph convolutional layer. These are the enhanced features input to the LSTM layer. After the expansion layer is applied, the gated vectors... right Each channel feature in the model is weighted. Therefore, in subsequent temporal modeling, LSTM is able to learn pre-onset evolution patterns based on the enhanced topology, while focusing more on channels that are anatomically connected to the active hub, rather than other irrelevant regions.
[0045] Step 4: Extracting Long-Range Features Using LSTM. To verify the effectiveness of our graph topology gating method and accurately capture the dynamic evolution of pre-seizure aura signals over time, we designed and integrated a deep Long Short-Term Memory (LSTM) module after the Knowledge-Driven Expansion Layer of H-CGA. In the architecture described in this embodiment, the dense feature stream, dynamically weighted by HubSelector and redistributed across the entire brain by the expansion matrix, is directly used as the input to this temporal module. Existing studies have shown that epileptic seizures are not isolated, instantaneous events, but rather a complex temporal process involving the continuous evolution of brainwave microstates. Therefore, this embodiment utilizes a deep learning structure containing recurrent connections to test spatially filtered selected channel data. In the proposed final classification architecture, this module mainly consists of a two-layer LSTM network and a subsequent Multilayer Perceptron (MLP) classification head.
[0046] Long Short-Term Memory (LSTM) networks are a special type of recurrent neural network (RNN) that learns long-term dependencies in a given data sequence by remembering information over a long period, thus avoiding the vanishing gradient problem of RNNs. LSTM networks were originally proposed by Hochreiter and Schmidhuber. These networks are widely used in various classification problems involving time-series data, speech, audio, text data, and biomedical signals. They are particularly well-suited for handling long-duration pre-seizure EEG windows. The LSTM architecture is shown in the figure. Specifically, the enhanced 3D feature matrix is fed into a two-layer LSTM network with 256 hidden layers to learn the potential dynamic evolution patterns of pre-seizure auras. Considering that patient-specific EEG data often involves extremely high individual variability and unpredictable background noise, we achieved a dropout rate as high as 0.7 between LSTM layers and in subsequent fully connected layers. This powerful regularization strategy significantly improves the model's generalization ability and prevents overfitting.
[0047] After processing the entire time series, the hidden state vector of the last time step output by the LSTM is extracted and fed into a classifier consisting of a linear layer, ReLU activation, and quadratic Dropout. Since our ultimate goal is to accurately binary classify the input segment into preictal or interictal, the fully connected network ultimately outputs the classification logits to make a prediction decision.
[0048] Figure 2This is a visualization of the channel importance for each fold in patient 7's calculations. The visualized EEG topographic map of the three folds in the Leave One Seizure-Only (LOSO) cross-validation for patient 7 profoundly reveals the dynamic allocation mechanism and clinical significance of spatial attention weights in the model when dealing with different independent seizure events of the same patient. First, the three-fold images consistently show high-weight clustering in the central frontal region and stably suppress the occipital background region, indicating that the model discards random noise and anchors to the core epileptogenic network specific to this patient. Second, the subtle differences in the local weight distribution of each fold (such as bilateral frontal symmetry in Fold1, midline concentration in Fold2, and left hemisphere lateralization in Fold3) restore the complex neurological reality: that is, different seizures of the same patient often exhibit inherent spatial heterogeneity in the precise starting point and early propagation path of abnormal discharges. This topological mapping of "overall consistency and local variability" proves that the H-CGA module does not use a rigid static template but possesses dynamic adaptive capabilities; it can flexibly adjust the spatial "focus" according to the real-time physiological state before each seizure, accurately tracking minute shifts in the discharge trajectory.
[0049] Figure 3 This is an average visualized brain topography map of all patients who participated in the experiment after screening. It primarily shows that the important brain regions differ among different patients. This result was obtained after diffusion selection. The darker the red, the more important the region is to the patient; conversely, blue indicates that the region is less associated with seizures. The map reveals a highly diverse distribution of spatial attention weights—some patients show highly concentrated focal activation, while others show widespread diffuse network diffusion. This breaks the assumption that "all humans share a single universal epileptogenic network," highlighting the limitations of traditional "one-size-fits-all" models and the absolute necessity of personalized prediction. Simultaneously, the high activation weights shown in the frontal and temporal lobes of a large number of patients perfectly match the objective pattern of the highest incidence of frontal and temporal lobe epilepsy in clinical epidemiology, proving that the model learned neurophysiologically significant aura features, rather than fitting random data artifacts.
[0050] This implementation further proposes ablation experiments to verify the key modules. Ablation experiments were conducted on the CHB-MIT dataset to verify the actual contribution of the H-CGA module to the evaluation performance. In the experiments, the total number of training epochs was set to 30, and the learning rate was 1×10⁻⁶. -4The batch size was 16, and all other training parameters were the same as the baseline model. The training / test / validation splitting method was also consistent with the baseline model to ensure fairness. The results are shown in Table 1. The complete framework integrating the H-CGA module demonstrated excellent overall performance. The model's mean area under the curve (AUC) was 85.02%, and the mean accuracy (ACC) was 75.81%. Notably, the model achieved excellent performance in two key clinical diagnostic indicators: sensitivity (SEN) and F1 score, at 86.45% and 77.39%, respectively. Especially in cases ch03, ch10, ch20, and ch23, the model's AUC exceeded 0.93. In contrast, the baseline model results showed a significant performance decrease after removing the H-CGA mechanism: the mean AUC dropped significantly to 78.47% (a decrease of 6.55%), and the mean ACC dropped to 67.76% (a decrease of 8.05%). Of significant academic and clinical importance is that the sensitivity (SEN) of the baseline model plummeted from 86.45% to 62.85% (an absolute decrease of 23.60%), and the F1 score also dropped sharply by 18.05%, to only 59.34%. This indicates that without H-CGA, traditional models struggle to adaptively model the complex spatial topological dependencies in multi-channel EEG signals. Therefore, in real-world scenarios with extreme class imbalances, these factors are easily overwhelmed by redundant interictal background noise, leading to the omission of weak preictal aura signals (manifested as a surge in false negatives and a significant decrease in sensitivity). In contrast, the H-CGA module can dynamically focus on key topological centers, achieving precise localization and enhancement of high-frequency epilepsy-related features.
[0051] Table 1. Comparison of quantitative evaluation results between the complete model of this invention and the baseline model
[0052] This embodiment compares the method of the present invention with recent studies on epilepsy seizure prediction involving EEG channel selection, among which the work of Affes et al. is the closest to this paper, as they also incorporate attention mechanisms into neural networks. With a 23-channel setup, the model accuracy is 69.40%, and the F1 score is 70.04%; notably, when using only 2 channels, the F1 score further improves to 76.13%. This significant result demonstrates the great potential of attention mechanisms in identifying signals from key brain regions. Experimental results are shown in Table 2, and the H-STNet proposed in this embodiment outperforms several existing methods in overall performance.
[0053] Table 2. Comparison of the epilepsy seizure prediction performance between the method of the present invention and existing EEG channel selection methods.
[0054] In summary, this invention executes the above steps sequentially to predict epileptic seizures. Its working principle simulates the clinical diagnostic logic of a neurologist, achieving accurate epilepsy prediction through an end-to-end architecture of "feature extraction - topological fusion - physiological gating - temporal tracking." First, the model uses 1D-CNN to independently extract microscopic high-frequency waveform features from each channel of the raw EEG signal. Then, a graph convolutional network (GCN) aggregates physical neighbor information based on real anatomical structures to capture local abnormal synergies. Its core innovation, the H-CGA module, maps the global EEG state to seven epidemiological high-frequency epileptogenic hubs and uses a predefined extended matrix to simulate the physiological diffusion path of epileptic discharges, dynamically generating spatial attention weights. This "gating" mechanism effectively amplifies the features of key regions of the epileptogenic network and strongly filters background noise from irrelevant brain regions. Finally, the spatially filtered high-value feature stream is fed into an LSTM network to deeply explore the long-term dynamic evolution of pre-seizure auras, thereby outputting highly robust prediction results.
[0055] This implementation proposes an innovative patient-specific spatiotemporal graph neural network (H-STNet), which achieves high-precision and highly interpretable prediction of epileptic seizures by deeply integrating cutting-edge deep learning techniques with clinical neurodynamic mechanisms. In terms of technical architecture, this model abandons traditional manual feature extraction, employing a 1D-CNN end-to-end capture of the microscopic waveform features of multi-channel EEG signals. It combines this with a graph convolutional network (GCN) based on the topology of actual physical electrodes for spatial information fusion, and utilizes an LSTM network to deeply mine the long-term temporal evolution of pre-seizure aura signals. The core methodological innovation of this study lies in the pioneering knowledge-driven "central to channel-gated attention (H-CGA)" mechanism. This module breaks through the "black box" limitations of conventional data-driven attention, strictly dividing the whole brain into seven high-frequency epileptogenic hubs according to clinical epidemiology. By introducing a predefined extension matrix, it accurately simulates the real physiological process of abnormal discharges spreading (diffusion) from "pathological hubs" to the surrounding cortical networks within the graph network. This neurophysiology-inspired "diffusion gating" not only dynamically and adaptively scales the feature weights of individualized key epileptogenic regions and powerfully filters out background noise from irrelevant brain regions, but also provides a solid anatomical theoretical foundation for the model's decision-making process. The resulting patient-specific epileptogenic network topology perfectly balances algorithm robustness and clinical interpretability, providing a highly promising technological paradigm for next-generation intelligent wearable epilepsy monitoring devices.
[0056] Those skilled in the art will understand that the above description is merely a preferred embodiment of the present invention, and the features described in the various embodiments and / or technical solutions of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. This is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0057] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended technical solutions are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the present invention. Clearly, those skilled in the art can make various modifications and variations to the present invention without departing from its spirit and scope. Thus, if these modifications and variations of the present invention fall within the scope of the present invention and its equivalents, the present invention also intends to include these modifications and variations.
Claims
1. A seizure prediction method based on channel selection using epilepsy physiological diffusion modeling, characterized in that, The method includes the following steps: Step 1: Obtain EEG signals from the CHB-MIT scalp EEG database and divide the EEG signals into preic samples and interictal samples. Step 2: Employ end-to-end representation learning, extract temporal feature maps for each channel using a three-layer 1D-CNN, and feed the temporal feature maps of each channel into a GCN containing two layers of GCNConv to aggregate spatial information and obtain high-order spatiotemporal features. Step 3: Using the H-CGA algorithm, the global context encoder aggregates whole-brain features to obtain the context vector. The hub selector projects the context vector to 7 candidate hubs and obtains the gating coefficients by Sigmoid normalization. The knowledge-driven expansion layer projects the hub activation probability to 21 channels through a predefined binary expansion matrix. The spatial gating vector is obtained by the Clamp function and then fused to output the enhanced features. Step 4: Input the enhanced features into a two-layer LSTM network with a hidden layer dimension of 256, extract the hidden state of the last time step, output the logical value through the classifier, and complete the binary classification of the pre-ictal and interictal periods and the prediction of epileptic seizures. Step 3 uses the H-CGA algorithm, and the method for obtaining the context vector by aggregating whole-brain features through a global context encoder is as follows: Context vectors reflecting the physiological state of the whole brain are extracted through global perception units. in, For mean pooling operation, Let N be the input sequence, N be the total number of elements in the input sequence, and n be the number of elements. The feature vector of the nth element in the sequence; the attention layer combined with the semantic hub selector assigns scores to predefined anatomical hubs, identifies and highlights key brain network nodes representing the epileptic seizure onset zone; The context vector is projected into a predefined space of 7 candidate hubs, which cover 7 major functional areas of the brain, through a learnable linear layer. The model calculates the response intensity of each anatomical hub based on the input global context. in, This is the weight matrix. For context vectors, For bias vectors, This is the output score vector; The Sigmoid activation function is applied to normalize the response intensity to a gating coefficient in the (0,1) interval. Let the source vector Ahub of length K be defined as the activation probabilities of the K candidate hubs output by the hub selector at time t. If channel j is a physical neighbor of hub i, then the matrix elements... =1, otherwise 0; In step 3, the knowledge-driven expansion layer projects the hub activation probabilities onto 21 channels using a predefined binary expansion matrix. The spatial gating vectors are then processed by the Clamp function, and the fused output enhanced features are obtained as follows: The expansion layer gates the vectors through element-wise multiplication. The calculation method for integrating features is as follows: After the extension layer is applied, the gate vector right Each channel feature in the data is weighted, where, For the center attention vector This represents the original feature tensor output by the graph convolutional layer. To expand the mapping matrix, , For the enhanced features input to the LSTM layer, The spatiotemporal characteristic matrix, Let be the transpose of the gated vector.
2. The seizure prediction method based on channel selection using epilepsy physiological diffusion modeling according to claim 1, characterized in that, Random undersampling was performed on the interictal samples described in step 1, and the data were standardized using Z-score.
3. The seizure prediction method based on channel selection using epilepsy physiological diffusion modeling according to claim 1, characterized in that, The method for extracting temporal features of each channel using a three-layer 1D-CNN in step 2 is as follows: The first layer of 1D-CNN is used to extract basic temporal morphological features; The second and third layers of 1D-CNN are used to progressively extract complex rhythmic patterns and high-level potential biomarkers.
4. The seizure prediction method based on channel selection using epilepsy physiological diffusion modeling according to claim 1, characterized in that, In step 2, the method for feeding the temporal feature maps of each channel into the GCN containing two GCN Conv layers to aggregate spatial information and obtain high-order spatiotemporal features is as follows: the 1D-CNN and the graph convolutional network module form the ST-CGN module, which is used to generate high-order spatiotemporal features that fuse physical connection priors and feed them into the H-CGA algorithm.
5. The seizure prediction method based on channel selection using epilepsy physiological diffusion modeling according to claim 1, characterized in that, In step 2, the first layer of GCNConv maps CNN features to the hidden layer space, and the second layer of GCNConv expands the receptive field and doubles the feature dimension to analyze the topological correlation of EEG channel space.
6. A seizure prediction system based on channel selection using epilepsy physiological diffusion modeling, characterized in that, The system includes: The data acquisition module is used to acquire EEG signals from the CHB-MIT scalp EEG database and divide the EEG signals into pre-ictal samples and interictal samples. The spatiotemporal feature extraction module is used to extract the temporal feature maps of each channel through a three-layer 1D-CNN using end-to-end representation learning. The temporal feature maps of each channel are then fed into a GCN containing two layers of GCNConv to aggregate spatial information and obtain high-order spatiotemporal features. The channel selection module uses the H-CGA algorithm to aggregate whole-brain features through a global context encoder to obtain a context vector. The hub selector projects the context vector to 7 candidate hubs and obtains the gating coefficients by Sigmoid normalization. The knowledge-driven expansion layer projects the hub activation probability to 21 channels through a predefined binary expansion matrix, processes it through the Clamp function to obtain a spatial gating vector, and outputs the enhanced features after fusion. The temporal prediction module is used to input the enhanced features into a two-layer LSTM network with a hidden layer dimension of 256, extract the hidden state of the last time step, output the logical value through the classifier, and complete the binary classification of the pre-ictal and interictal periods and the prediction of epileptic seizures. The channel selection module uses the H-CGA algorithm, and the method for obtaining the context vector by aggregating whole-brain features through a global context encoder is as follows: Context vectors reflecting the physiological state of the whole brain are extracted through global perception units. in, For mean pooling operation, Let N be the input sequence, N be the total number of elements in the input sequence, and n be the number of elements. The feature vector of the nth element in the sequence; the attention layer combined with the semantic hub selector assigns scores to predefined anatomical hubs, identifies and highlights key brain network nodes representing the epileptic seizure onset zone; The context vector is projected into a predefined space of 7 candidate hubs, which cover 7 major functional areas of the brain, through a learnable linear layer. The model calculates the response intensity of each anatomical hub based on the input global context. in, This is the weight matrix. For context vectors, For bias vectors, This is the output score vector; The Sigmoid activation function is applied to normalize the response intensity to a gating coefficient in the (0,1) interval. Let the source vector Ahub of length K be defined as the activation probabilities of the K candidate hubs output by the hub selector at time t. If channel j is a physical neighbor of hub i, then the matrix elements... =1, otherwise 0; In the channel selection module, the knowledge-driven expansion layer projects the hub activation probabilities onto 21 channels using a predefined binary expansion matrix. The resulting spatial gating vectors are then processed by the Clamp function. The method for outputting enhanced features after fusion is as follows: The expansion layer gates the vectors through element-wise multiplication. The calculation method for integrating features is as follows: After the extension layer is applied, the gate vector right Each channel feature in the data is weighted, where, For the center attention vector This represents the original feature tensor output by the graph convolutional layer. To expand the mapping matrix, , For the enhanced features input to the LSTM layer, The spatiotemporal characteristic matrix, Let be the transpose of the gated vector.
7. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1-5.
8. A computer device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the method of any one of claims 1-5.
Citation Information
Patent Citations
Epilepsy whole brain dynamics modeling method based on key propagation area
CN118380154A
Method and system for epileptic seizure detection and automatic labeling based on electroencephalogram data
CN118557150A
