Epilepsy detection method and system based on cross-link nested subnets and hybrid dependency algorithm

CN117982102BActive Publication Date: 2026-09-25SHENYANG AEROSPACE UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410128689.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-31
Publication Date
2026-09-25
Estimated Expiration
2044-01-31

AI Technical Summary

Technical Problem

[0005]鉴于此,本发明公开提供了基于跨链接嵌套子网及混合依存算法的癫痫检测方法及系统,以解决脑电信号特征表达不完整、网络传输过程中特征消失、时频域特征学习不充分及信号关系抽取不精确等问题

Benefits of technology

[0048]本发明提供了基于跨链接嵌套子网及混合依存算法的癫痫检测方法及系统,该方法能够有效的提取基于时频域信号的多维信息,本发明方法在单通道数据集和多通道数据集上都获得了最佳性能。在单通道数据集上的两种任务比次优结果在准确率分别提高了0.19%和2.813%。F1分数比次优结果分别提高了0.5%和4.122%。在多通道数据集上,准确率和F1分数比次优结果分别提高了1.63%和1.81%。本发明提出的混合网络架构即可以有效的分析脑电图的时频特征,其性能超过了目前最优的识别模型。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117982102B_ABST
    Figure CN117982102B_ABST
Patent Text Reader

Abstract

The application discloses a kind of epilepsy detection method and system based on cross-linking nested subnet and hybrid dependence algorithm, wherein the detection method includes S1: using multi-task decomposition mode and spectral transform algorithm to convert original electroencephalogram signal data into electroencephalogram;S2: construct the time sequence of cross-linking nested subnet and parallel multi-dimensional granularity feature learning module, the spectral graph matrix is sent into cross-linking nested subnet architecture to learn space-time feature;S3: the output of cross-linking nested subnet branch is summed up after full connection layer and position embedding, and the sum and the result of S1 electroencephalogram are respectively input into hybrid electroencephalogram dependence algorithm to carry out multi-dimensional electroencephalogram dependence calculation;S4: the output of hybrid electroencephalogram dependence algorithm is sent into classifier to obtain the result of epilepsy detection.The method can effectively extract multi-dimensional information based on time-frequency domain signal, and the best performance is obtained on single-channel dataset and multi-channel dataset.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of biological signal processing technology, specifically to an epilepsy detection method and system based on cross-linked nested subnets and hybrid dependency algorithms. Background Technology

[0002] Epilepsy is a neurological disorder affecting more than 50 million people worldwide. It is considered a major chronic disease, with the number of cases increasing by 5 million annually. Frequent seizures can adversely affect brain function, causing declines in memory, cognitive abilities, and overall physiological function, thus posing a ongoing risk to the health of individuals affected by such seizures. The symptoms of epileptic seizures fall into two main categories: the first is loss of consciousness accompanied by uncontrollable tremors in various parts of the body; the second is varying degrees of focal seizures or transient loss of consciousness in specific body parts. Typically, a seizure lasts about 2 minutes, with time required for recovery. Although antiepileptic drugs effectively reduce the frequency of seizures, further understanding of the harmful effects of epilepsy is crucial.

[0003] Electroencephalography (EEG) is a biophysical diagnostic technique that medical researchers can use to acquire visual data related to epilepsy patients. Due to its ease of generation, cost-effectiveness, and ability to provide high-resolution data, it has gradually become a popular detection technique in the medical field. However, manually identifying epilepsy is a demanding and complex task, requiring clinicians to spend a significant amount of time decoding EEG patterns. From a medical perspective, automated detection and prediction of epilepsy has enormous potential to assist doctors in diagnosis and help patients take preventative measures.

[0004] Currently, traditional shallow machine learning (ML) and deep learning (DL) represent two main approaches for identifying epileptic seizures. Typically, traditional identification methods combine manually designed features with shallow machine learning techniques. However, traditional shallow machine learning methods require researchers to possess extensive expertise and the arduous task of manually designing features. Furthermore, manually designed features face challenges related to the time-consuming extraction process and often exhibit lower accuracy on classification tasks. In contrast, deep learning algorithms can autonomously extract meaningful features from electroencephalograms (EEGs) and perform end-to-end seizure detection tasks. Summary of the Invention

[0005] In view of this, the present invention discloses an epilepsy detection method and system based on cross-linked nested subnets and hybrid dependency algorithms to solve problems such as incomplete expression of EEG signal features, feature loss during network transmission, insufficient learning of time-frequency domain features, and inaccurate extraction of signal relationships.

[0006] The technical solution of this invention includes: an epilepsy detection method based on cross-linked nested subnets and a hybrid dependency algorithm, comprising...

[0007] S1: Collect raw EEG signal data and convert the raw EEG signal data into an EEG using multi-task decomposition mode and spectrum transformation algorithm;

[0008] The multi-task decomposition mode is used to decompose the original signal of all channels in each signal slice into multiple mode functions, and the number of modes functions is uniformly selected according to the frequency from high to low. Then, the multiple mode functions obtained for each channel are subjected to spectral transformation. Finally, the resulting spectrum matrix is ​​concatenated into a spectrum matrix P in sequence, as shown in the following formula:

[0009]

[0010] S2: Construct a temporally parallel multidimensional granular feature learning module for cross-linked nested subnets, and input the spectrogram matrix into the cross-linked nested subnet architecture for spatiotemporal feature learning;

[0011] S3: The output of the cross-linked nested subnet branches is summed through a fully connected layer and position embedding. The summation and the EEG result of S1 are then input into the hybrid EEG dependency algorithm to perform multidimensional EEG dependency calculation and obtain global knowledge in the EEG data.

[0012] S4: The output of the hybrid EEG dependency algorithm is fed into the classifier to obtain the epilepsy detection result.

[0013] Specifically, the mind map generation in S1 comprises two stages. The first stage utilizes the multi-task decomposition modality to decompose the raw signal of all channels in each signal slice into multiple modal functions, selecting them in descending order of frequency to unify their quantity, including:

[0014] S11: Signal Decomposition: Given a signal s(t), decompose it into a series of mode functions through the following iterations:

[0015] s(t) = a1(t) + a2(t) + ... + a n (t)+b n (t)

[0016] Where a(t), a2(t), ..., a n (t) are the modal functions extracted sequentially, b n(t) represents the remaining trend term;

[0017] S12: Extracting local extrema: In each iteration, the local maxima and minima of the signal s(t) are taken as the "inflection points" of the signal. Using the local extrema, the upper boundary line TBL and the lower boundary line BBL of the signal are obtained.

[0018] S13: Extract boundary lines: Extract boundary lines through interpolation;

[0019] S14: Averaging process: Add the upper and lower boundary lines and divide by 2 to obtain the boundary average line.

[0020]

[0021] S15: Calculate the difference between the signal and the boundary moving average to obtain the one-dimensional signal z(t):

[0022]

[0023] S16: Check whether the one-dimensional signal z(t) satisfies the condition of a modal function, that the number of maxima and minima in the entire signal interval is equal and they alternate in the entire interval; if the condition is met, then the signal is treated as a modal function; otherwise, z(t) is treated as a new input signal and the above steps are iterated.

[0024] S17: Iterate until the stopping condition is met: Repeat the above process until the stopping condition is met, wherein the stopping condition is: reaching a certain predetermined number of iterations, or determining that the obtained signal is close enough to a mode function.

[0025] The second stage of mind map generation involves spectral transformation of the multiple modal functions obtained from each channel in S1, including:

[0026] S111: Collect the obtained modal functions, represented as: a m (t), where m represents the m-th mode function;

[0027] S112: Select a window function α(t) to analyze each modal function, where the length of the window function is denoted as L;

[0028] S113: Divide each modal function into several segments, the length of each segment being the length L of the window function. These segments are called windows, denoted as c. m,n (t), where m represents the m-th modal function, n represents the n-th window, and Δh represents the time interval between windows:

[0029] c m,n =a m (t)·α(tn·Δh)

[0030] S114: Perform spectral transformation on each window signal of each modal function to obtain spectral information; the formula for the spectral transformation is as follows:

[0031]

[0032] Where u is the index of the current window, with the first window having an index of 0; v represents the time index; w(v) refers to the window function; uH represents the left coordinate of the current window; and N represents the number of windows. Indicates frequency;

[0033] S115: Combine the spectral information of each modal function along the time axis to obtain a visualized spectrum, represented as P. i (f,t);

[0034] S116: Visualizing the spectrum P i (f,t) is used to analyze the changes of each modal function in time and frequency, in P i In (f,t), the horizontal axis represents time, the vertical axis represents frequency, and color or brightness represents the signal strength.

[0035] Specifically, the temporal parallel multidimensional granular feature learning module with cross-linked nested subnetworks described in S2 consists of two parallel subnetworks, each of which includes the following two parts:

[0036] The first part is a convolutional network with cross-links, consisting of two convolutional layers and one cross-link. The convolutional layers are used to extract subspace features, and the cross-links are used to prevent degradation during feature evolution.

[0037] The second part consists of two cross-linked convolutional networks, each connected to a nested subnet. The nested subnet is used for subspace temporal feature extraction and is composed of two temporal memory networks. At the same time, normalization and activation functions are added after each temporal memory network to optimize the model and reduce the risk of model degradation.

[0038] Specifically, before the output of the cross-linked nested subnet branches is input into the hybrid EEG dependency algorithm after passing through a fully connected layer, sinusoidal position embedding is used to supplement the distance-position relationship information in the time information.

[0039] Specifically, in S3, the output of the cross-linked nested subnet branches is summed after passing through a fully connected layer and positional embedding, and then inputted into the hybrid EEG dependency algorithm along with the result of the mind map in S1:

[0040] The hybrid EEG dependency algorithm consists of cross-channel EEG signal dependency computation and parallel multidimensional EEG signal dependency computation;

[0041] Channel dependency information and global dependency information are calculated using a cross-channel EEG dependency algorithm;

[0042] Subspace relationships are captured through parallel multidimensional EEG signal dependency computation.

[0043] This invention also provides an epilepsy detection system based on cross-linked nested subnets and a hybrid dependency algorithm, comprising:

[0044] The data processing module uses multi-task decomposition mode and spectrum transformation algorithms to convert raw EEG signal data into EEG.

[0045] The spatiotemporal feature learning module learns multi-scale temporal sub-features of EEG signals based on cross-linked nested subnetworks;

[0046] The dependency computation module uses a hybrid EEG dependency computation model to obtain multi-perspective relationships in EEG signals, including channel perspective, subspace perspective and global perspective.

[0047] The classifier module is designed for epilepsy detection tasks and yields the final epilepsy detection results.

[0048] This invention provides an epilepsy detection method and system based on cross-linked nested subnets and a hybrid dependency algorithm. This method effectively extracts multidimensional information based on time-frequency domain signals. The method achieves state-of-the-art performance on both single-channel and multi-channel datasets. On single-channel datasets, the accuracy is improved by 0.19% and 2.813% compared to the suboptimal results for both tasks, respectively. The F1 score is improved by 0.5% and 4.122% compared to the suboptimal results, respectively. On multi-channel datasets, the accuracy and F1 score are improved by 1.63% and 1.81% compared to the suboptimal results, respectively. The hybrid network architecture proposed in this invention can effectively analyze the time-frequency features of electroencephalograms (EEGs), and its performance surpasses that of the current best recognition models.

[0049] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit the disclosure of the present invention. Attached Figure Description

[0050] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 Five types of signals in a single-channel dataset provided in the embodiments of the present invention;

[0053] Figure 2 The two types of signals in the multi-channel dataset provided in the embodiments of the present invention;

[0054] Figure 3 The overall process for epilepsy detection based on cross-link nested subnets and hybrid dependency algorithms is provided in the embodiments of the present invention.

[0055] Figure 4 This is a flowchart of mind map generation provided in an embodiment of the present invention;

[0056] Figure 5 This is a cross-link nested subnet architecture provided in the embodiments disclosed in this invention;

[0057] Figure 6 This invention discloses a multidimensional EEG-dependent computing architecture.

[0058] Figure 7 The parallel multidimensional EEG-dependent computing architecture provided in the embodiments disclosed in this invention;

[0059] Figure 8 This is the cross-channel EEG dependency algorithm architecture provided in the embodiments of the present invention;

[0060] Figure 9 The hybrid EEG dependency algorithm architecture provided in the embodiments of the present invention;

[0061] Figure 10 The signal spectrum diagram using only spectral transformation is provided for the embodiments disclosed in this invention;

[0062] Figure 11 The signal spectrum diagram using the multi-task decomposition mode spectrum transformation algorithm provided in the embodiments of the present invention;

[0063] Figure 12 Comparison of the beneficial modules invented in this invention before and after ablation on the CHB-MIT dataset provided in the embodiments of this invention;

[0064] Figure 13 This invention provides a comparison of the beneficial modules invented before and after ablation on the TUSZ dataset provided in the embodiments of the present invention.

[0065] Figure 14 This is a general framework diagram of an epilepsy detection system based on cross-linked nested subnets and hybrid dependency algorithms, provided in an embodiment of the present invention. Detailed Implementation

[0066] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of systems consistent with some aspects of the invention as detailed in the appended claims.

[0067] The system analyzes electroencephalogram (EEG) signals to automatically identify whether a subject experienced seizures over a period of time. The types of signals associated with seizures are determined based on the dataset being analyzed. For example:

[0068] Single-channel datasets: These datasets categorize patients based on the specific type of brain electrical activity. Bonn and UCI are single-channel datasets containing five types of labels (A-eye-open, B-eye-closed, C-interval-hippocampus, D-interval-epileptic zone, E-seizure), as follows: Figure 1 As shown.

[0069] Multichannel datasets: These datasets assess abnormal brain electrical activity on multiple electrodes. The CHB-MIT and TUSZ datasets are examples of multichannel datasets. A single EEG recording of a subject includes several seizure periods and interictal periods, as follows: Figure 2 As shown.

[0070] Furthermore, the English meanings used in this implementation plan are as follows:

[0071] Epoch: The number of iterations in a neural network.

[0072] Bonn: Epilepsy dataset collected by the University of Bonn, Germany.

[0073] UCI: A machine learning library built by the University of California, Irvine.

[0074] CHB-MIT: A dataset of electroencephalograms (EEGs) of pediatric subjects with refractory seizures, jointly created by the Massachusetts Institute of Technology (MIT) and Children's Hospital Boston (CHB).

[0075] TUSZ: A large-scale EEG database for epilepsy built by Temple University in the United States.

[0076] EEG: A medical technique used to measure electrical activity in the brain. It assesses activity by placing several electrodes (usually attached to the scalp) and recording the electrical signals generated in the brain.

[0077] Python 3.7: A high-level programming language for writing computer programs. It was developed by an open-source project led by Guido van Rossum and has extensive community support.

[0078] NVIDIA GeForce RTX 4090 GPU: A high-end graphics processing unit (GPU) designed for demanding gaming and computer graphics applications.

[0079] Tensorflow: An open-source software library for dataflow and differentiable programming, covering a wide range of tasks. Primarily used for machine learning and deep learning, it allows researchers and developers to easily build and deploy models.

[0080] Automatic feature extraction and analysis of EEG signals directly impacts the accuracy of epilepsy detection. However, three main challenges remain in data processing and feature extraction. First, the amplitude and frequency of EEG signals exhibit temporal variations, making them inherently non-stationary. Therefore, time-frequency domain feature analysis holds significant potential in EEG signal processing, primarily due to its non-stationary nature. However, traditional time-frequency analysis techniques have inherent limitations and drawbacks, hindering further performance improvements. Furthermore, feature embedding in the time-frequency domain is hampered by cross-interference, unavoidable in multi-component signals. Consequently, existing data preprocessing techniques cannot provide better EEG signal feature representations for network-based learning. Second, many techniques prioritize enhancing network performance by increasing network depth, but they often neglect the beneficial effects of utilizing local sparse features. Moreover, features gradually vanish during transmission as network depth increases. Therefore, the network must effectively reconstruct high-quality features by identifying optimal local features and subsequently repeating them spatially.

[0081] Current practices typically involve connecting only local features at different scales, leading to insufficient utilization of these features. Furthermore, current simple deep learning algorithms (such as CNNs and RNNs) can only capture limited information from the data, while attention mechanisms often outperform these algorithms. In fact, current attention mechanisms usually only focus on limited sequence relationships, ignoring signal relationships in multidimensional spaces, including the perceptual channel space and the network representation subspace.

[0082] To address the problems of incomplete representation of EEG signal features, feature loss during network transmission, insufficient learning of time-frequency domain features, and inaccurate extraction of signal relationships, this invention proposes an epilepsy detection method based on cross-linked nested subnets and a hybrid EEG dependency algorithm.

[0083] An epilepsy detection method based on cross-linked nested subnets and a hybrid dependency algorithm includes:

[0084] S1: Acquire raw EEG signal data and convert it into an electroencephalogram (EEG) using multi-task modal decomposition and spectral transformation algorithms; for example... Figure 4 As shown;

[0085] Specifically, the multi-task decomposition process is as follows: Figure 4 The process involves parts A through B. Preprocessing the original signal, rather than directly using it for model training, can improve the performance of the seizure detection model. Time-frequency domain features are widely used as key features in seizure detection-related activities. Multi-task decomposition is a common method in original signal processing, which can be used to extract modal functions from non-stationary EEG data. Since the number of modal functions obtained after decomposition varies depending on the original signal, this implementation scheme selects modal functions in descending order of frequency to unify the number for further analysis.

[0086] To better extract frequency, spatial, and channel features of EEG, this invention employs a multi-task modal decomposition and spectral transformation algorithm to construct a brain map.

[0087] The detailed process and related formulas of the multi-task decomposition algorithm are as follows:

[0088] Step 1: Signal Decomposition: Given a signal s(t), the first step in multi-task decomposition is to decompose it into a series of mode functions. This process is completed through the following iterative steps:

[0089] s(t) = a1(t) + a2(t) + ... + a n (t)+b n (t)

[0090] Where a(t), a2(t), ..., a n (t) is the modal function extracted sequentially, while b n (t) represents the remaining trend term.

[0091] Step 2: Local extremum extraction: In each iteration, the local maxima and minima of the signal s(t) are first found. These points are called the "inflection points" of the signal.

[0092] Step 3: Boundary line extraction: Using local extrema, the upper boundary line (TBL) and lower boundary line (BBL) of the signal can be obtained. Boundary line extraction can be accomplished through interpolation and other methods.

[0093] Step 4: Averaging process: Add the upper and lower boundary lines and divide by 2 to obtain the boundary average line.

[0094]

[0095] Step 5: Calculate the difference between the signal and the boundary moving average to obtain the one-dimensional signal z(t):

[0096]

[0097] Step 6: Determine if it is a modal function: Check if the one-dimensional signal z(t) satisfies the conditions of a modal function, that is, the number of maxima and minima is equal throughout the entire signal interval, and they alternate throughout the interval. If the conditions are met, then the signal is considered a modal function; otherwise, z(t) is treated as a new input signal, and the above steps are iterated again.

[0098] Step 7: Iterate until the stopping condition is met. Repeat the above process until the stopping condition is met. The stopping condition can be reaching a predetermined number of iterations, or determining that the obtained signal is sufficiently close to a mode function.

[0099] The spectrum transformation process is as follows Figure 4 Parts B to C. This implementation scheme proposes a time-frequency feature extraction algorithm for modal functions extracted from multi-task decomposition to construct a signal spectrum matrix.

[0100] Signal collection: For the mode function obtained above, i.e., a m (t), where m represents the m-th mode function.

[0101] Window function selection: A window function α(t) is selected for analysis of each modal function. The length of the window function is denoted as L.

[0102] Signal segmentation: Each mode function is divided into several segments, each segment having a length L equal to the length of the window function. Such segments are called windows, denoted as c. m,n (t), where m represents the m-th modal function, n represents the n-th window, and Δh represents the time interval between windows.

[0103] c m,n =a m (t)·α(tn·Δh)

[0104] Spectrum transformation formula: Perform a spectrum transformation on each window signal for each mode function to obtain the spectrum information. The formula for spectrum transformation is as follows:

[0105]

[0106] Where u is the index of the current window, with the first window having an index of 0. v represents the time index, w(v) refers to the window function, uH represents the left coordinate of the current window, and N represents the number of windows. Indicates frequency.

[0107] Constructing the spectrogram: Combine the spectrograms of each modal function along the time axis to obtain the combined spectrogram, denoted as P. i (f,t).

[0108] Visualization Analysis: Visualizing the spectrum P i We use (f,t) to analyze the changes in time and frequency of each modal function. In P... i In (f,t), the horizontal axis represents time, the vertical axis represents frequency, and color or brightness represents the signal strength.

[0109] Piecing together multi-task subgraphs: The process is as follows Figure 4 Sections C to D. The spectrum matrices obtained from the second and third stage processing of the signals from each original channel are sequentially concatenated into a single spectrum matrix P. The formula is as follows:

[0110]

[0111] A novel approach combining multi-task decomposition and spectral transformation (i.e., multi-task decomposition modal spectral transformation algorithm) was adopted in the data processing. Figure 10 and Figure 11 It is clearly demonstrated that, compared to signals using only spectral transform, power fluctuations generated by different categories are more easily perceived in the spectral images obtained from the multi-task decomposition modal spectral transform algorithm. This allows the hybrid network to learn more spatiotemporal information, thereby acquiring valuable features. This innovative signal processing method utilizing the multi-task decomposition modal spectral transform algorithm effectively leverages the unique advantages of these techniques, thereby improving the accuracy and reliability of EEG processing. The performance comparison results of this method are as follows... Figure 12 and Figure 13 As shown.

[0112] The comparative results show that the multi-task decomposition modal spectrum transform algorithm has a significant impact on model performance. On the CHB-MIT dataset, retaining only one modal function resulted in a sharp drop in overall model performance of 0.53%. On the TUSZ dataset, the impact on the model is even more pronounced, with a performance decrease of 0.6%.

[0113] S2: Construct a temporally parallel multidimensional granular feature learning module for cross-linked nested subnets, and input the spectrogram matrix into the cross-linked nested subnet architecture for spatiotemporal feature learning;

[0114] The temporal parallel multidimensional granular feature learning module for cross-linked nested subnets, such as... Figure 5 As shown. This module consists of two parallel sub-networks, each of which comprises the following two parts:

[0115] Part One Figure 5 As shown in (a), a convolutional network with cross-links was constructed, consisting of two convolutional layers and one cross-link. The convolutional layers are used to extract subspace features, and the cross-link is used to prevent degradation during feature evolution.

[0116] Part Two Figure 5 As shown in (b), two cross-linked convolutional networks are each connected to a nested subnetwork. This nested subnetwork is used for subspace temporal feature extraction and consists of two temporal memory networks. At the same time, normalization and activation functions are added after each memory network to optimize the model and reduce the risk of model degradation.

[0117] in addition, Figure 5 In (a), the yellow and green dashed boxes represent cross-linked convolutional units, where the green one is a 1×3 convolution and the yellow one is a 1×5 convolution. These two units are used to extract fine-grained features at multiple spatial scales, and cross-linking can prevent degradation during feature evolution. The output of each cross-linked convolutional unit is then fed into a nested subnet used to extract temporal features.

[0118] The cross-link nested subnets designed in this implementation scheme can not only learn fine-grained features at different scales from the spatial dimension, but also learn the temporal relationships between fine-grained features across the time dimension, thereby achieving comprehensive and multi-faceted feature learning.

[0119] This step effectively utilizes the inherent features of EEG data. First, features between different layers in this method can be shared, solving the problem of feature vanishing. Second, by utilizing a multi-kernel convolutional network, EEG feature detection at different scales can be achieved. Furthermore, nested subnetworks can expand the receptive field and systematically integrate spatiotemporal features. The performance comparison results of this method are as follows. Figure 12 and Figure 13 As shown.

[0120] The comparative results show that the cross-linked nested subnets have a certain impact on model performance. On the CHB-MIT dataset, the model performance decreased by 0.03% after replacing the cross-linked nested subnets with the multi-scale network EEGWaveNet. On the TUSZ dataset, the impact of the network replacement on performance is more significant, with a performance decrease of 0.34%. This is because the cross-linked nested subnets can take into account multi-scale features that traditional nested models fail to consider, thus effectively identifying EEG signals at different scales.

[0121] S3: The output of the cross-linked nested subnet branches is summed by a fully connected layer and position embedding, and then fed into the hybrid EEG dependency algorithm along with the result of the mind map in S1 to perform multidimensional EEG dependency calculation and obtain global knowledge in the EEG data.

[0122] Step 3 presents a novel hybrid EEG signal dependency algorithm designed to enhance the extraction of discriminative features from acquired temporal multichannel EEG.

[0123] The hybrid EEG signal dependency algorithm consists of two EEG dependency algorithms: one is parallel multidimensional EEG signal dependency computation, and the other is cross-channel EEG signal dependency computation, which aims to improve the ability to extract deep features from multi-channel EEG data.

[0124] Specifically, the parallel multidimensional EEG-dependent algorithm:

[0125] The calculation is performed in two steps: first, multidimensional EEG-dependent calculation is performed, and then parallel calculation is performed.

[0126] Step 1: Multidimensional EEG Dependency Calculation calculates the dependency relationships between each EEG segment, such as... Figure 6 As shown.

[0127] Step 2: Parallel multidimensional EEG dependency computation assigns weights to the dependency relationships of each segment, such as... Figure 7 As shown.

[0128] Cross-channel EEG-dependent computing, such as Figure 8 As shown. First, part A obtains the EEG signal matrix, with each row representing data from one channel. Then, through matrix transposition, each column represents data from one channel. Therefore, in the transposed matrix, each row consists of data from multiple channels. The data from each row is then fed into a parallel multidimensional dependency EEG calculation module, allowing for the calculation of dependencies between cross-channel EEG signals.

[0129] To detect potential multidimensional dependencies in signals, hybrid EEG dependency algorithms such as Figure 9 As shown. Figure 9 The hybrid EEG dependency algorithm comprises two branches: a cross-channel EEG dependency algorithm (branch A) and parallel multidimensional EEG dependency computation (branch B). In branch A, the computation will be performed using data from... Figure 3 The output of part A (the result after mind map processing) is used as input. Next, the fully connected layer and transposed layer are used to satisfy the input data volume requirements of the cross-channel dependency algorithm. Subsequently, channel dependency information and global dependency information are calculated using the cross-channel EEG dependency algorithm. Finally, the output of the cross-channel dependency algorithm is transposed to connect with the output of branch B. In branch B, the first step is to... Figure 3The output of part B is used as input; secondly, subspace relationships are captured through parallel multidimensional EEG dependency computation; subsequently, two fully connected layers are used to enhance the model's expressive power; finally, cross-link computation is added between the input and output of this branch to enhance gradient propagation. Specifically, one cross-link is from the input of branch B to the output of the parallel multidimensional EEG dependency computation. The other cross-link is from the output of the parallel multidimensional EEG dependency computation to the output of the fully connected layer. Therefore, the hybrid EEG dependency algorithm can acquire global knowledge existing in EEG data.

[0130] A hybrid EEG dependency algorithm for acquiring multidimensional dependencies is proposed, capable of extracting information related to the overall interconnections present in EEG data. Performance comparison results of this method are as follows: Figure 12 and Figure 13 As shown.

[0131] Comparative results show that when the hybrid EEG dependency algorithm is replaced by a self-attention model, the model's accuracy on the two multichannel datasets decreased by approximately 0.13% and 0.8%, respectively. The comparative analysis indicates that the cross-channel EEG dependency algorithm effectively captures multi-relational information, thereby facilitating feature extraction. The enhanced performance of the hybrid EEG dependency algorithm compared to self-attention demonstrates that the cross-channel EEG dependency algorithm effectively utilizes the multichannel feature encoder, its fundamental principle being the preservation of channel spatial information.

[0132] S4: The output of the hybrid EEG dependency algorithm is fed into the classifier to obtain the epilepsy detection result.

[0133] This implementation scheme also provides an epilepsy detection system based on cross-linked nested subnets and hybrid dependency algorithms, such as... Figure 3 As shown, it includes:

[0134] The data processing module uses multi-task decomposition mode and spectrum transformation algorithms to convert raw EEG signal data into EEG.

[0135] The spatiotemporal feature learning module learns multi-scale temporal sub-features of EEG signals based on cross-linked nested subnetworks;

[0136] The dependency computation module uses a hybrid EEG dependency computation model to obtain multi-perspective dependency relationships in EEG signals, including channel perspective, subspace perspective and global perspective.

[0137] Furthermore, to enhance the correlation between distance and location in the temporal data, sinusoidal position embedding is used as a means to compensate for location information. Finally, a classification module is developed for the epilepsy detection task, resulting in the final epilepsy detection result.

[0138] The proposed invention employs a hybrid network architecture based on cross-linked nested subnets and a hybrid dependency algorithm. This hybrid architecture can effectively analyze the temporal, spatial, and channel features of EEG, and also significantly improve the accuracy of epilepsy recognition. Its performance surpasses that of the current best recognition model. Specific comparison results are shown in Tables 1-3 below.

[0139] The comparative results show that the method of this invention achieves state-of-the-art performance on both single-channel and multi-channel datasets. On the single-channel dataset, the accuracy is improved by 0.19% and 2.813% respectively compared to the suboptimal results for both tasks. The F1 score is improved by 0.5% and 4.122% respectively compared to the suboptimal results. On the multi-channel dataset, the accuracy and F1 score are improved by 1.63% and 1.81% respectively compared to the suboptimal results. In other words, the experimental results on both single-channel and multi-channel datasets demonstrate the superiority of our method.

[0140] Table 1: Performance Comparison of Different Models on the Single Channel Dataset (UCI) Binary Classification Task

[0141] Machine learning methods 96 / / / Convolutional Neural Networks 99.13 / / / Recurrent Neural Networks 88.5 87.9 88.5 87.9 Long Short-Term Memory Network 98.87 / / / Depth-gauge sparse autoencoder 98.67 99.25 / 98.89 1D Convolutional Long Short-Term Memory Network 99.57 98.79 98.79 98.79 Recurrent Neural Networks - Long Short-Term Memory Networks 98.4 / / / 1D Convolutional Neural Network - Long Short-Term Memory Network 99.39 98.39 98.79 98.59 Method of the present invention 99.76 99.56 99.22 99.39

[0142] Table 2: Performance comparison of different models on the five-class classification task of the single-channel dataset (UCI)

[0143] Machine learning methods 92.0 / / 92.7 1D Convolutional Neural Network 94.01 / / / Residual Networks - Long Short-Term Memory Networks - Attention Mechanisms 90.17 90.00 90.16 90.05 Convolutional Neural Networks 93.60 / / / Method of the present invention 96.823 96.891 96.823 96.822

[0144] Table 3: Performance comparison of different models on the binary classification task of the multichannel dataset (TUSZ)

[0145] Channel attention 96.78 96.86 96.50 96.60 Machine learning methods 83.72 / / 83.20 Random Forest 90.30 / / 90.76 Convolutional Neural Networks 94.98 / / 94.9 Alex Networks 95.34 / / 95.31 Method of the present invention 98.41 97.81 99.03 98.41

[0146] And by Figure 12 and Figure 13 The results showed that after ablation of the multi-task decomposition modal spectrum transform algorithm, the accuracy of the CHB-MIT dataset decreased by 0.53%, and the accuracy of the TUSZ dataset decreased by 0.6%. When the hybrid EEG dependency algorithm was ablated, the accuracy of CHB-MIT and TUSZ decreased by 0.13% and 0.8%, respectively. Other beneficial modules of this method all showed a significant decrease in recognition accuracy after ablation.

[0147] The present invention will be further explained below with reference to specific implementation schemes, but this is not intended to limit the scope of protection of the present invention.

[0148] Example 1;

[0149] like Figure 14 This demonstrates the specific structure and processing steps of an epilepsy detection network architecture based on cross-linked nested subnets and a hybrid EEG-dependent algorithm:

[0150] Step 1: Collect raw EEG signals (this example uses the CHB-MIT dataset).

[0151] Step 2: Slice the original data using a 4s non-overlapping sliding window.

[0152] Step 3: Use multi-task decomposition to decompose the original signal of all channels in each slice into multiple mode functions, and retain the first 6 mode functions in order of frequency from high to low.

[0153] Step 4: Perform spectral transformation on the multiple modal functions obtained from each channel. The spectral transformation uses a cosine window function with a window size of 1024 data points and a step size of 512. After processing, the spectrograms of 6 modal functions are obtained, each containing 513 data points.

[0154] Step 5: Repeat the steps in Step 4 to obtain 138 spectrograms from all channels in a data slice.

[0155] Step 6: Connect all the obtained spectrograms from beginning to end along the time axis to obtain the final spectrogram matrix input into the network.

[0156] Step 7: The constructed spectrogram matrix is ​​fed into a cross-linked nested subnet architecture for spatiotemporal feature learning, and simultaneously fed into a hybrid EEG dependency algorithm for multidimensional EEG dependency computation.

[0157] Step 8: Before inputting the output of the cross-linked nested subnet branches into the hybrid EEG dependency algorithm after passing through a fully connected layer, sinusoidal position embedding is used to supplement the distance-location relationship information in the temporal information. Then, the results after the summation of the fully connected layer and position embedding, and the S1 mind map results are respectively input into the hybrid EEG dependency algorithm.

[0158] Step 9: Input the output of the hybrid EEG dependency algorithm into the classifier to obtain the epilepsy detection result.

[0159] Step 10: Use the mean of the results of the 10-fold cross-validation of the model as the final evaluation result.

[0160] Experiments and evaluations:

[0161] The experiment used the public dataset CHB-MIT, collected by Boston Children's Hospital, which contains EEG recordings of pediatric subjects with refractory seizures. Subjects were monitored for several days after discontinuation of antiepileptic medication to characterize their seizures and assess their suitability for surgical intervention. The recordings were divided into 24 cases (5 male cases, aged 3–22 years; 17 female cases, aged 1.5–19 years; 1 unknown case). Each case (Subject 01, Subject 02, etc.) contained 9–42 consecutive .edf files. Due to hardware limitations, there were gaps between consecutively numbered .edf files, during which no signal was recorded. In most cases, the gaps were 10 seconds or less, with occasional longer gaps. Most .edf files contained one hour of digitized EEG signal (Subject 10's file was two hours long, and Subjects 04, 06, 07, 09, and 23's files were four hours long).

[0162] Therefore, the final data format for each subject is shown in Table 4 below. Our experiment performed a binary classification test on the epileptic seizure phase and interictal phase. Additionally, if the dataset is single-channel, different classification tasks need to be designed based on the labels.

[0163] Table 4: Data Summary for Each Subject

[0164] data 23x921600 Channel x frames Label 2 Tags (Ictal, Interictal)

[0165] The experimental environment consisted of Python 3.7 and an NVIDIA GeForce RTX 4090 GPU processor. The entire network was implemented using the Tensorflow architecture. The experiment employed 10-fold cross-validation, with 300 epochs of training, a batch size of 128 samples, and a learning rate of 0.00002.

[0166] To verify the performance of the present invention, this embodiment applied two evaluation methods, namely subject-specific and cross-subject, to the dataset and compared them with existing comparison methods. The comparison results are shown in Tables 5 and 6 below.

[0167] Table 5: Performance comparison of specific subject assessment methods on CHB-MIT

[0168] Convolutional Neural Network - Transformer 98.76 / / 97.90 Decision Tree 99.56 99.81 / 99.65 Convolutional Neural Networks 97.57 / / / Graph Neural Network - Bidirectional Long Short-Term Memory Network 98.52 / / 95.9 Support Vector Machine 97.09 / / / Large-scale graph convolutional networks 99.30 / / 98.73 Method of the present invention 99.97 99.95 99.98 99.96

[0169] Table 6: Performance Comparison of Cross-Subject Assessment Methods on CHB-MIT

[0170] Convolutional Neural Networks 98.22 / / 91.80 3D Convolutional Neural Network 99.4 / / / Convolutional Neural Networks - Long Short-Term Memory Networks 98.9 97.1 98.7 97.9 Visual transformer 96.31 95.81 96.82 96.3 Convolutional Neural Network - Transformer 97.15 / / / transformer 94.46 / / / Attention mechanism 96.22 / / 89.53 Machine learning methods 92.8 / / / Method of the present invention 99.57 99.34 99.76 99.55

[0171] The results show that our method achieved 99.97% and 99.96% accuracy and F1 score, respectively, in the subject-specific assessment method on the CHB-MIT dataset. In the cross-subject assessment method, it achieved 99.57% and 99.55% accuracy and F1 score, respectively, demonstrating strong performance on individual subjects and the ability to handle the impact of subject variability.

[0172] Example 2:

[0173] This embodiment uses the proposed epilepsy detection network architecture based on cross-linked nested subnets and a hybrid EEG-dependent algorithm on the multi-channel dataset TUSZ:

[0174] Step 1: Acquire raw EEG signals and preprocess them. The preprocessing involves data standardization.

[0175] Step 2: The first 26 channels were selected for analysis.

[0176] Step 3: Slice the original data using a 5-second non-overlapping sliding window.

[0177] Step 4: Perform spectral transformation on the multiple modal functions obtained from each channel. The window function for the spectral transformation is a cosine window with a window size of 1024 data points and a step size of 512, resulting in spectral graphs of 6 modal functions, each containing 513 data points.

[0178] Step 5: Repeat the steps in Step 4 to obtain 312 spectrograms from all channels in a data slice.

[0179] Steps 6-10 are the same as in Example 1.

[0180] The experimental environment consisted of Python 3.7 and an NVIDIA GeForce RTX 4090 GPU processor. The entire network was implemented using the Tensorflow architecture. The experiment employed 10-fold cross-validation, with 200 epochs of training, a batch size of 128 samples, and a learning rate of 0.00001.

[0181] To verify the performance of this invention on the multi-channel dataset TUSZ, we performed a binary classification task on the dataset for cross-subject evaluation and compared it with existing comparative methods. The comparison results are shown in Table 7 below.

[0182] Table 7: Performance comparison of cross-subject assessment methods on TUSZ

[0183] Channel attention 96.78 96.86 96.50 96.60 Machine learning methods 83.72 / / 83.20 Random Forest 90.30 / / 90.76 Convolutional Neural Networks 94.98 / / 94.9 Alex Networks 95.34 / / 95.31 Method of the present invention 98.41 97.81 99.03 98.41

[0184] Experimental results show that the epilepsy detection and analysis method based on cross-linked nested subnets and hybrid EEG dependency algorithm has an accuracy of 98.41%, which is significantly better than other comparative methods, effectively verifying the effectiveness of the method.

[0185] Example 3:

[0186] This embodiment uses the proposed epilepsy detection network architecture based on cross-linked nested subnets and hybrid EEG-dependent algorithms on the single-channel dataset UCI:

[0187] Step 1: Collect raw EEG signals.

[0188] Step 2: Assign each single-channel EEG data point to its corresponding label.

[0189] Step 3: Slice the single-channel data using an 11.5s sliding window with 87.5% overlap.

[0190] Step 4: Perform spectral transformation on the multiple modal functions obtained from each channel. The window function for the spectral transformation is a cosine window with a window size of 1024 data points and a step size of 512, resulting in spectral graphs of 6 modal functions, each containing 513 data points.

[0191] Step 5: Repeat the steps in Step 4 to obtain 18 spectrograms from all channels in a data slice.

[0192] Steps 6-10 are the same as in Example 1.

[0193] The experimental environment consisted of Python 3.7 and an NVIDIA GeForce RTX 4090 GPU processor. The entire network was implemented using the Tensorflow architecture. The experiment employed 10-fold cross-validation, trained for 400 epochs, with a batch size of 32 samples and a learning rate of 0.0001.

[0194] To verify the performance of this invention on the single-channel dataset UCI, we performed binary and quinary classification tasks on this dataset and compared it with existing comparison methods. The comparison results are shown in Tables 8 and 9 below.

[0195] Table 8: Performance Comparison of Different Models on the Single Channel Dataset (UCI) Binary Classification Task

[0196] Machine learning methods 96 / / / Convolutional Neural Networks 99.13 / / / Recurrent Neural Networks 88.5 87.9 88.5 87.9 Long Short-Term Memory Network 98.87 / / / Deep-gauge sparse autoencoder 98.67 99.25 / 98.89 1D Convolutional Long Short-Term Memory Network 99.57 98.79 98.79 98.79 Recurrent Neural Networks - Long Short-Term Memory Networks 98.4 / / / 1D Convolutional Neural Network - Long Short-Term Memory Network 99.39 98.39 98.79 98.59 Method of the present invention 99.76 99.56 99.22 99.39

[0197] Table 9: Performance Comparison of Different Models on the Five-Class Classification Task of the Single-Channel Dataset (UCI)

[0198] Machine learning methods 92.0 / / 92.7 1D Convolutional Neural Network 94.01 / / / Residual Networks - Long Short-Term Memory Networks - Attention Mechanisms 90.17 90.00 90.16 90.05 Convolutional Neural Networks 93.60 / / / Method of the present invention 96.823 96.891 96.823 96.822

[0199] Experimental results show that the epilepsy detection and analysis method based on cross-linked nested subnets and hybrid EEG dependency algorithms achieves an accuracy of 99.76% for binary classification and 96.823% for pentathlon on UCI data. This outperforms other comparative methods, demonstrating the effectiveness of the proposed method.

[0200] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.

Claims

1. An epilepsy detection system based on cross-linked nested subnets and a hybrid dependency algorithm, characterized in that, include: The data processing module uses multi-task decomposition mode and spectrum transformation algorithms to convert raw EEG signal data into EEG. The multi-task decomposition mode is used to decompose the original signal of all channels in each signal slice into multiple mode functions, and the number of these functions is uniformly selected in order of frequency from high to low. Next, perform spectral transformation on the multiple mode functions obtained from each channel; then, concatenate the resulting spectrum matrices sequentially into a single spectrum matrix P, as shown in the following formula: The spatiotemporal feature learning module learns temporal sub-features of EEG signals in a multi-dimensional and multi-granular manner based on cross-linked nested subnetworks. The temporal parallel multidimensional granular feature learning module of the cross-linked nested subnetwork consists of two parallel subnetworks, each of which includes the following two parts: The first part is a convolutional network with cross-links, consisting of two convolutional layers and one cross-link. The convolutional layers are used to extract subspace features, and the cross-links are used to prevent degradation during feature evolution. The second part consists of two cross-linked convolutional networks, each connected to a nested subnet. The nested subnet is used for subspace temporal feature extraction and is composed of two temporal memory networks. At the same time, normalization and activation functions are added after each temporal memory network to optimize the model and reduce the risk of model degradation. The dependency computation module uses a hybrid EEG dependency computation model to obtain multi-perspective relationships in EEG signals, including channel perspective, subspace perspective and global perspective. The output of the cross-linked nested subnet branches is passed through a fully connected layer and summed by position embedding. The summation and the EEG result are then input into a hybrid EEG dependency algorithm to perform multidimensional EEG dependency computation and obtain global knowledge in the EEG data. The classifier module, designed for epilepsy detection tasks, feeds the output of the hybrid EEG-dependent algorithm into the classifier to obtain the epilepsy detection results.

2. The epilepsy detection system based on cross-linked nested subnets and hybrid dependency algorithms according to claim 1, characterized in that, The first stage of mind map generation involves using the multi-task decomposition modality to decompose the raw signal of all channels in each signal slice into multiple modal functions, and then selecting them in descending order of frequency to unify their quantity. The steps are as follows: S11: Decompose the signal: Given a signal It is decomposed into a series of modal functions through the following iterations: in, These are the modal functions extracted sequentially, and These are the remaining trend terms; S12: Extracting local extrema: In each iteration, the signal... The local maxima and minima are used as the "inflection points" of the signal. The upper boundary line TBL and the lower boundary line BBL of the signal are obtained by using the local extreme points. S13: Extract boundary lines: Extract boundary lines through interpolation; S14: Averaging process: Add the upper and lower boundary lines and divide by 2 to obtain the boundary average line. : S15: Calculate the difference between the signal and the boundary moving average to obtain the one-dimensional signal. : S16: Check one-dimensional signal If the signal meets the conditions for a modal function, meaning the number of maxima and minima is equal across the entire signal interval and they alternate throughout the interval, then the signal is considered a modal function. Otherwise, it is... Treat this as a new input signal and continue iterating the above steps; S17: Iterate until the stopping condition is met: Repeat the above process until the stopping condition is met, wherein the stopping condition is: reaching a certain predetermined number of iterations, or determining that the obtained signal is close enough to a mode function; In the second stage of mind map generation, the multiple modal functions obtained from each channel undergo spectral transformation, as follows: S111: Collect the obtained modal functions, expressed as: ,in Indicates the first One modal function; S112: Select window function , used to analyze each modal function, where the length of the window function is denoted as L; S113: Divide each modal function into several segments, each segment having a length L equal to the length of the window function. These segments are called windows, and are denoted as follows: , in Indicates the first One modal function, Indicates the first One window, Indicates the time interval between windows: S114: Perform spectral transformation on each window signal of each modal function to obtain spectral information; the formula for spectral transformation is as follows: Where u is the index of the current window, with the first window having an index of 0; v represents the time index; w(v) refers to the window function; uH represents the left coordinate of the current window; and N represents the number of windows. Indicates frequency; S115: The spectral information of each modal function is combined along the time axis to obtain a visualized spectrum, represented as follows: ; S116: Visualizing the spectrum To analyze the changes in time and frequency of each modal function, in In the diagram, the horizontal axis represents time, the vertical axis represents frequency, and color or brightness represents signal strength.

3. The epilepsy detection system based on cross-linked nested subnets and hybrid dependency algorithms according to claim 1, characterized in that, The output of the cross-linked nested subnet branches is fed into a fully connected layer and then used with sinusoidal position embedding to supplement the distance-position relationship information in the temporal information before being input into the hybrid EEG dependency algorithm.

4. The epilepsy detection system based on cross-linked nested subnets and hybrid dependency algorithm according to claim 1, characterized in that, The outputs of cross-linked nested subnet branches are passed through fully connected layers and summed using positional embeddings. The summation and the result of the mind map are then input into a hybrid EEG dependency algorithm. The hybrid EEG dependency algorithm consists of cross-channel EEG signal dependency computation and parallel multidimensional EEG signal dependency computation; Channel dependency information and global dependency information are calculated using a cross-channel EEG dependency algorithm; Subspace relationships are captured through parallel multidimensional EEG signal dependency computation.

Citation Information

Patent Citations

  • Cross-media hierarchical deep video question-answer reasoning framework

    CN112527993A

  • Positive emotion multi-label classification method and device based on multi-channel electroencephalogram data

    CN113598774A