A method for automatic quantification of slow-wave activity in sleep epilepsy
By constructing an automatic quantification model of spike-waves based on multi-dimensional time features, a convolutional neural network was used to achieve rapid and accurate diagnosis of epileptic electrical status during sleep. This solves the problems of time-consuming, labor-intensive, and inaccurate manual diagnosis in existing technologies, and improves the diagnostic efficiency and consistency of ESES.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-18
- Publication Date
- 2026-03-20
AI Technical Summary
In the existing technology, the diagnosis of epileptic electrical status epilepticus (ESES) during sleep relies on long-term manual analysis, which results in inaccurate results and inter-doctor variability, leading to low diagnostic efficiency and inability to provide timely and effective treatment.
A deep learning-based approach is adopted, combined with multi-dimensional temporal features, to construct an automatic quantization model for spike-and-slow-wavelength waves, including spatial filtering, temporal feature processing, localization, and classification modules. Automatic quantization of spike-and-slow-wavelength waves is achieved through a convolutional neural network.
It achieves rapid and accurate automatic quantification of spike-and-wave exponents, reducing manual identification time, improving diagnostic efficiency and robustness of results, and reducing the complexity of hyperparameter tuning.
Smart Images

Figure CN116269439B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of auxiliary diagnosis of epileptic encephalopathy, and particularly relates to a method for automatically quantifying a spike-slow wave index of an epileptic electrical status during sleep. BACKGROUND
[0002] Epilepsy is a common nervous system disease, which is characterized by abnormal discharge of neurons in the brain, resulting in limb convulsions, loss of consciousness, etc. Repeated attacks can cause patients to be disabled or even die. Electrical Status Epilepticus during Sleep (ESES) is a symptom of epilepsy in which continuous spike-slow waves appear during slow-wave sleep. It occurs more frequently in children during the onset of epilepsy. However, children with ESES-related epilepsy syndromes usually do not show uniform and obvious clinical manifestations, and are idiopathic, cryptogenic and symptomatic. In addition, abnormal discharges often occur during sleep, which is difficult to detect clinically, thus delaying treatment and processing. ESES can cause high-level cortical function to be affected, causing severe neuropsychological and cognitive function damage, and has the characteristics of poor prognosis. Therefore, early diagnosis and early treatment of ESES-related epilepsy syndromes are of great significance to improve the quality of life of children.
[0003] Currently, the slow-wave sleep spike-slow wave index (SWI) based on long-term electroencephalogram analysis is an important standard for diagnosing and treating ESES-related epilepsy syndromes, and is also an important indicator for evaluating the prognosis of children. Clinically, ESES-related epileptic activity is quantified and SWI index is estimated by recording electroencephalogram and combining artificial recognition of epileptic waves, which is also the main basis for clinical diagnosis. There are two main shortcomings in current clinical diagnosis:
[0004] 1. The recording time of ESES-related electroencephalogram is often several hours to several tens of hours, and manual analysis is time-consuming and laborious. It takes a long time from completing the electroencephalogram examination to obtaining the results.
[0005] 2. SWI is a rough estimate, and manual estimation is not accurate enough. There are differences in the analysis results between different doctors.
[0006] Both of the above points are not conducive to the timely diagnosis and effective treatment of children. Based on the problems of artificial diagnosis, the demand for developing SWI automatic quantification for assisting clinical diagnosis is large. Past SWI automatic quantification mainly includes feature threshold, template matching and deep learning methods. The feature threshold method is based on the morphological features of spike waves and spike slow waves, and sets a judgment threshold to detect it. The disadvantage of this method is that it is more dependent on the preset threshold, and it cannot distinguish similar waveforms with similar morphological features, and has poor robustness. The template matching method screens potential spike waves and spike slow waves by matching the pre-set classic waveform template with the real waveform. Its disadvantage is that it relies more on prior knowledge of the waveform, and the selected template will affect the matching performance. Both of these two methods cannot locate the spike wave and spike slow wave abnormalities, and need to manually set many super parameters for different patients, and the threshold standard is complex.
[0007] From the aspect of clinical auxiliary diagnosis, in view of the difficulties such as high professional requirement, great difficulty and long time for interpretation of epileptiform waves (such as spike slow wave), and great difference in manual interpretation of doctors, the research and development of automatic quantification and evaluation system can quickly and accurately calculate SWI, and greatly improve the diagnosis efficiency of ESES. SUMMARY
[0008] In view of the problems of high labor cost, inaccurate estimation of traditional manual method, and poor robustness and strong dependence on prior knowledge of existing automatic detection method, the present application aims to provide an efficient, accurate positioning, suitable for clinical, and robust result automatic quantification method of spike slow wave index of sleep epilepsy electrical status.
[0009] The present application utilizes whole-night polysomnogram data, combines deep learning method, introduces multi-dimensional time features, and realizes automatic quantification of spike slow wave index suitable for clinical.
[0010] The automatic quantification method of spike slow wave index of sleep epilepsy electrical status based on multi-dimensional time features provided by the present application comprises constructing a spike slow wave automatic quantification model for positioning and identifying spike waves and spike slow waves in electroencephalogram (EEG); the specific steps are as follows:
[0011] Step one, obtaining ESES electroencephalogram (EEG) data set;
[0012] Divide the original EEG data into multiple short window samples and resample them;
[0013] Step two, constructing a spike slow wave automatic quantification model, which comprises a spatial filtering module, a time feature processing module, a positioning module and a classification module;
[0014] Further divide each short window sample with multiple default windows;
[0015] The segmented EEG sample is input into a spatial filtering module to increase the signal-to-noise ratio of the input signal and remove artifacts, then input into a time feature processing module to obtain the time features of the input signal, and finally input into a positioning module and a classification module to match all default windows and real waveforms, realize positioning and classification of potential spikes and spike-and-wave in the sample, and output the adjusted default window and the probability of the potential waveform belonging to each type of waveform.
[0016] Step three, match the potential spikes and spike-and-wave output by the model with real waveforms, test the detection performance under different overlap thresholds, and select the best overlap threshold.
[0017] Eliminate the overlapping parts between different waveforms identified.
[0018] Further,
[0019] In step one, the data set used is the electroencephalogram (EEG) signal. The short time window needs to have sufficient length to cover multiple complete spike and spike-and-wave waveforms.
[0020] In step two, the default window in the sample is a parameterized representation constructed for a specific waveform, mainly composed of two parameters: the center time of the waveform and the duration of the waveform, and the parameterized representation is as follows:
[0021]
[0022] wherein, represents the center time of the waveform, represents the duration of the waveform.
[0023] The length of the default window is preset based on the duration length of the spike and spike-and-wave, and there can be an overlapping part between different default windows, and the length of the overlapping part is adjustable.
[0024] In step two, the spatial filtering module, the time feature processing module, the positioning module and the classification module are all composed of convolutional neural networks. Among them:
[0025] The spatial filtering module is composed of one two-dimensional convolution layer and transposes the time and spatial channels of the signal. This operation uses convolution to perform linear spatial filtering on the input signal, increasing the signal-to-noise ratio of the input signal.
[0026] The time feature processing module is composed of K blocks containing two-dimensional convolution layers; wherein, in a block, a two-dimensional convolution layer, a batch normalization (Batch Normalization) layer, and a ReLU as an activation function are contained, and finally a maximum pooling is performed.
[0027] In the time feature processing module, for different sizes of convolution layers, the spatial filtered signal is obtained by downsampling to obtain low-level features, and the low-level features are upsampled and fused with different sizes of time features, and are sent to the positioning and classification module.
[0028] The positioning module and the classification module are both composed of a two-dimensional convolution layer.
[0029] The positioning module adjusts the position of the default window according to the matching degree between the default window and the real waveform.
[0030]
[0031] Wherein, subscript i is the index of the default window, and subscript j is the index of the real waveform. The positioning module uses a linear activation function.
[0032] The classification module uses a softmax activation function to output the probability of each default window belonging to each category of waveform.
[0033] In step three of the application, the model output potential spike and spike-slow wave are matched with the real waveform, the detection performance under different overlap thresholds is tested, and the best performance overlap threshold is selected; specifically, the Jaccard index, namely Intersection over Union (IoU) is used to quantify the matching degree between the potential waveform and the real waveform, and by setting different IoU thresholds, it is judged whether the corresponding position waveform is correctly detected. The precision (precision) and recall (recall) of the detection method are tested under different IoU thresholds, and the harmonic mean of the precision and the recall, namely the F1 score, is calculated, and the IoU threshold corresponding to the maximum F1 score is selected as the best performance overlap threshold; the F1 score calculation formula is as follows:
[0034]
[0035] In step three, the non-maximum suppression method is used to remove the overlapping parts between the multiple potential waveforms identified, so as to realize the automatic detection of the spike wave and the spike slow wave in the EEG.
[0036] Compared with the prior art, the beneficial effects of the present application are as follows:
[0037] 1. The present application uses an adjustable default window to segment the EEG sample, and the method trained by extracting the time characteristics has the positioning ability of the spike wave and the spike slow wave.
[0038] 2. The present application fuses multiple time characteristics, combines the information of the low-level feature map with the information of the high-level feature map, enhances the positioning ability of the spike wave and the spike slow wave, and uses multiple size time characteristics for training, so that the method can be used to predict the spike wave and the spike slow wave with different durations, and has stronger robustness.
[0039] 3. The present application uses a two-dimensional convolution layer capable of performing multi-classification, has the ability to directly distinguish the spike wave and the spike slow wave, thereby reducing the number of parameters to be set in the detection process, and simplifies the judgment standard by outputting the classification probability. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 is a flowchart of the automatic quantification method of the spike slow wave index of the epileptiform electrical status in sleep of the present application.
[0041] Figure 2 is a schematic diagram of different dimension convolution blocks in the time characteristic processing module.
[0042] Figure 3 is a schematic diagram of the multi-dimensional time feature splicing structure. DETAILED DESCRIPTION
[0043] The present application will be further described below by combining the embodiments with the drawings.
[0044] The present application provides a multiple time characteristic automatic quantification method of the spike slow wave index of the epileptiform electrical status in sleep based on a convolutional neural network. In training and testing the convolutional neural network model, electroencephalogram (EEG) data is used, and the length of the EEG sample is set by referring to the duration of the spike wave and the spike slow wave. The default window is set, and after convolution spatial filtering, the multiple size fused time characteristics are extracted by the feature extraction module. Finally, the F1 score is used to verify the accuracy of the positioning and classification of the spike wave and the spike slow wave.
[0045] The overall flow of the system is shown in Figure 1 . It includes the following steps:
[0046] Step 1, obtain at least 20 cases of electroencephalogram signals, each with a length of about 2 hours (at least containing a sleep cycle), and label each subject's electroencephalogram signal by an expert to obtain labeled training data; in this embodiment, the original electroencephalogram signal collected by the medical electroencephalogram acquisition device does not contain feature wave position labels, in order to enable the proposed model to learn the features, the corresponding feature wave start and end positions in the signal need to be labeled by an expert, and the labeled data will be used to train the proposed convolutional neural network model.
[0047] Step 2, pre-process the obtained labeled data, mainly including data cutting, resampling, and presetting default windows.
[0048] 1) Data cutting: cut the original electroencephalogram signal to generate multiple sample signal windows with a length of about 1 minute;
[0049] 2) Resampling: resample the electroencephalogram data to 100 Hz;
[0050] 3) Presetting default window: initially set the default window length to 10 seconds, and set 30 default windows for each electroencephalogram sample.
[0051] Step 3, set the channel number to 1, and use a two-dimensional convolution layer with a 1x1 convolution kernel to perform spatial filtering processing, since the channel number is 1, no transpose operation is performed.
[0052] Step 4, use a two-dimensional convolution layer with a 1x3 convolution kernel and a pooling layer with a 1x2 pooling kernel to perform time feature extraction operation, the two-dimensional convolution block involved in this operation is as shown in Figure 2 , the process is: convolution-batch normalization- ReLU activation-max pooling, to obtain the time features in the current dimension. On this basis, time feature fusion is introduced, the fusion splicing structure is as shown in Figure 3 , the low-dimensional time features are upsampled by 2 times by the nearest neighbor method to obtain high-dimensional time features, at the same time, the time features of the previous dimension extracted need to be added to the upsampled time features after passing through a two-dimensional convolution layer with a 1x1 convolution kernel, and then pass through a two-dimensional convolution layer with a 3x3 convolution kernel to eliminate the aliasing effect caused by addition, to obtain the time features in the current dimension.
[0053] Step 5, send the time features of different dimensions into the positioning module and the classification module respectively, and train the two-dimensional convolution network to obtain the potential target waveform.
[0054] Step 6, test the detection performance under the overlap threshold δ∈{0.1, 0.2,..., 0.9}, and the evaluation indicators under each overlap threshold are: accuracy, recall rate, and F1 score.
[0055] Step 7, according to the duration of all detected spindles and slow waves and the length of NREM period in the EEG, calculate the SWI.
[0056] Compared with the existing automatic quantification method of SWI, the method of the present application effectively realizes the detection of spindles and slow waves, introduces multi-dimensional time features, improves the accurate positioning ability of spindles and slow waves, reduces the number of hyperparameters that need to be adjusted in the detection process, simplifies the selection standard of threshold, and maintains the robustness of the model used between different populations. The convolutional neural network model used in the present application can greatly reduce the time and workload of manual identification.
Claims
1. An automatic quantification method for the spike-and-wave index of epileptic electrical persistence during sleep, characterized in that, This includes constructing an automatic quantification model for spike-and-wave waves (SSW) for the localization and identification of spikes and SSW in electroencephalograms (EEGs); the specific steps are as follows: Step 1: Obtain the ESES electroencephalogram (EEG) dataset; The original EEG data was segmented into multiple short-window samples and then resampled. Step 2: Construct an automatic quantization model for spike-wavelength waves, which includes a spatial filtering module, a temporal feature processing module, a localization module, and a classification module. For each short-window sample, further segmentation is performed using multiple default windows; The segmented EEG samples are input into the spatial filtering module to increase the signal-to-noise ratio of the input signal and remove artifacts; then they are sent to the temporal feature processing module to obtain the temporal features of the input signal; finally, they are input into the localization and classification modules to match all the default windows with the real waveforms, thereby locating and classifying the potential spikes and spike-slow-wave waves in the samples, and outputting the adjusted default windows and the probability of the potential waveforms belonging to each category of waveforms. Step 3: Match the potential spikes and spike-slow-wave outputs of the model with the real waveforms, test the detection performance under different overlap thresholds, and select the overlap threshold with the best performance. Eliminate overlapping portions between identified different waveforms; The default window within the sample mentioned in step two is a parameterized representation constructed from a specific waveform, consisting of two parameters: the center time of the waveform and the duration of the waveform, as shown in the following parameterized representation: (1) in, Represents the center time of the waveform. Represents the duration of the waveform; The length of the default window is preset based on the duration of spikes and spike-slow-waves. There is overlap between different default windows, and the length of the overlap is adjustable. The spatial filtering module, temporal feature processing module, localization module, and classification module mentioned in step two are all composed of convolutional neural networks; wherein: The spatial filtering module consists of a single two-dimensional convolutional layer and transposes the temporal and spatial channels of the signal. This operation uses convolution to perform linear spatial filtering on the input signal to increase the signal-to-noise ratio of the input signal. The temporal feature processing module consists of K blocks containing two-dimensional convolutional layers. Each block contains one two-dimensional convolutional layer, one batch normalization layer, ReLU as the activation function, and finally a max pooling layer. Zero padding is used when performing convolution within a block. In this module, the feature map obtained after downsampling through multiple blocks is upsampled using the nearest neighbor interpolation method after the last block. It is then added to the temporal features of the same size and passed through a convolutional layer to obtain the temporal features for training at that size. In the temporal feature processing module, for convolutional layers of different sizes, the spatially filtered signal is downsampled to obtain low-level features, and then the low-level features are upsampled and fused with temporal features of different sizes, and then sent to the localization and classification module. Both the localization module and the classification module consist of a single two-dimensional convolutional layer; wherein: The positioning module adjusts the position of the default window based on the degree of matching between the default window and the actual waveform: (2) Among them, subscript i For the default window index, subscript j Indexed to the actual waveform; the localization module uses a linear activation function; The classification module uses the softmax activation function to output the probability that each default window belongs to each category of waveform; Step three involves matching the latent spikes and spike-slow-wave outputs from the model with the actual waveforms, testing the detection performance under different overlap thresholds, and selecting the overlap threshold with the best performance. Specifically, the Jaccard index is used. IoU Quantify the degree of matching between the potential waveform and the real waveform by setting different... IoU Thresholds are used to determine whether the waveform at the corresponding position has been correctly detected; in different... IoU The precision and recall of the detection method are tested below the threshold, and the harmonic mean of precision and recall, i.e., the F1 score, is calculated. The method with the highest F1 score is selected. IoU The threshold is the overlap threshold with the best performance; the F1 score is calculated as follows: (3)。 2. The method for automatic quantification of the spike-and-wave index of epileptic electrical persistence during sleep according to claim 1, characterized in that, The short window mentioned in step one needs to be long enough to cover multiple complete spike and spike-slow-wave waveforms.
3. The method for automatically quantifying the spike-and-wave index of epileptic electrical persistence during sleep according to claim 1, characterized in that, The step three involves identifying the overlapping portions between different waveforms by using a non-maximum suppression method to remove the overlapping portions between multiple identified potential waveforms, thereby eliminating the overlapping portions and achieving automatic detection of spikes and spike-slow-wave waves in EEG.
Citation Information
Patent Citations
Intelligent epileptic spike wave detection method based on fusion of self-adaptive template matching and machine learning algorithm
CN110811609A
Ratchet wave detection method based on deep neural network and CCA feature fusion
CN114081508A