An eeg epileptic spike wave detection system based on group sparse restricted boltzmann machine
Patent Information
- Application Number
- CN202610948648.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-08-18
AI Technical Summary
[0005]为此,本申请提供一种基于组稀疏受限玻尔兹曼机的脑电癫痫棘波检测系统,旨在克服现有方法在检测精度、鲁棒性和临床适用性方面均存在明显不足的问题
1.通过信号采集与预处理模块对多通道脑电信号执行零相位带通滤波与陷波滤波,有效去除基线漂移、高频伪影与工频干扰,在不引入相位失真的前提下保留脑电信号的时域特征,为后续时频分析与异常检测提供高质量输入。
Smart Images

Figure CN122581689A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electroencephalogram (EEG) signal processing and medical auxiliary diagnostic technology, and in particular to an EEG epilepsy spike detection system based on a group sparse restricted Boltzmann machine. Background Technology
[0002] Epilepsy is one of the most common neurological disorders worldwide, with approximately 50 million people affected globally, according to the World Health Organization. Characterized by sudden, recurrent seizures, it severely threatens patients' lives and reduces their quality of life. Electroencephalography (EEG) records the electrical activity signals of neuronal populations in the cerebral cortex, providing a direct and precise view of abnormal discharge rhythms such as spikes, sharp waves, and spike-and-slow-wave complexes that occur during epileptic seizures. Therefore, it has become a core technical tool for clinical epilepsy diagnosis and seizure monitoring.
[0003] In clinical practice, long-term EEG monitoring typically lasts from several hours to several days, generating massive amounts of time-series EEG data. Current mainstream methods for detecting epilepsy EEG abnormalities can be categorized into three types: ① manual segment-by-segment analysis by physicians; ② fixed threshold detection based on traditional statistics; and ③ automatic detection using supervised machine learning models based on labeled datasets. Among these, manual analysis is time-consuming, labor-intensive, and inefficient. Furthermore, the results are highly dependent on physician experience, and prolonged work can easily lead to visual fatigue, increasing the rate of missed or false positives, making it difficult to meet the clinical needs for real-time monitoring and rapid early warning. Traditional statistical methods primarily rely on time-domain and frequency-domain statistical features and set fixed thresholds for abnormality identification. While simple in principle and fast in computation, the EEG characteristics of different patients and different seizure stages fluctuate significantly, making it difficult for fixed thresholds to adapt to complex and variable clinical data, generally resulting in poor adaptability and insufficient accuracy. Supervised learning models, on the other hand, are limited by the scarcity of high-quality labeled abnormal EEG data and individual differences in epileptic discharge morphology and rhythm distribution among patients, making them prone to overfitting and exhibiting poor cross-patient generalization.
[0004] In summary, existing methods have significant shortcomings in terms of detection accuracy, robustness, and clinical applicability. There is an urgent need for an automated detection technology that can adaptively learn normal EEG background patterns, sensitively identify abnormal spike rhythms, and possess multi-channel collaborative judgment capabilities to improve clinical diagnostic efficiency and decision support. Summary of the Invention
[0005] Therefore, this application provides an EEG epilepsy spike detection system based on a group sparse restricted Boltzmann machine, which aims to overcome the significant shortcomings of existing methods in terms of detection accuracy, robustness, and clinical applicability.
[0006] To achieve the above objectives, this application adopts the following technical solution:
[0007] This application provides an EEG epilepsy spike detection system based on a group sparse restricted Boltzmann machine, comprising: The signal acquisition and preprocessing module is used to acquire multi-channel EEG signals from the target patient and perform zero-phase bandpass filtering and notch filtering on the multi-channel EEG signals to obtain preprocessed signals. The time-frequency feature extraction and grouping module is used to extract time-frequency amplitude features from the preprocessed signal through linear time-frequency transformation, and divide the frequency axis of the time-frequency amplitude features into multiple corresponding feature band subsets according to multiple preset electroencephalographic frequency bands. The feature band subsets are then combined according to frequency bands to obtain multi-channel time-frequency feature samples. The model training module is used to perform unsupervised training on the pre-constructed initial restricted Boltzmann machine model using the multi-channel time-frequency feature samples during the epileptic seizure period, and introduces group sparse regularization constraints based on the feature band subset during training to obtain a trained model that represents the normal EEG time-frequency distribution pattern. The single-channel local anomaly detection module is used to input the multi-channel time-frequency feature samples to be detected into the trained model, calculate the dissimilarity score of the hidden layer activation of each channel, and generate a dynamic threshold based on the local median absolute deviation to mark the single-channel local anomaly trigger point. The multi-channel spatial co-occurrence and spike determination module is used to perform multi-channel spatial statistics on the single-channel local abnormal trigger points at each time point, determine the time points that meet the preset spatial threshold conditions as global spike event trigger points, and extract independent spike rhythm sequences; using a fixed-duration sliding determination window, the cumulative frequency of the independent spike rhythm sequences and the cumulative duration of the global spike event trigger points are determined in parallel to determine the epileptic abnormal spike rhythm seizure interval.
[0008] The application employs the above technical solution and has at least the following beneficial effects: 1. The signal acquisition and preprocessing module performs zero-phase bandpass filtering and notch filtering on multi-channel EEG signals, effectively removing baseline drift, high-frequency artifacts and power frequency interference. It preserves the time-domain characteristics of EEG signals without introducing phase distortion, providing high-quality input for subsequent time-frequency analysis and anomaly detection.
[0009] 2. Through the time-frequency feature extraction and grouping module, the time-frequency amplitude features are extracted by linear time-frequency transformation, and the frequency axis is dynamically divided into multiple feature band subsets according to the preset EEG physiological frequency bands such as δ, θ, α, β, and γ. This makes the feature grouping have a clear neurophysiological basis, and the subsequent group sparsity constraint can directly utilize this natural grouping structure without the need for manual design of grouping rules.
[0010] 3. Through the model training module, unsupervised training is performed using normal background EEG time-frequency feature samples during the seizure-free period of epilepsy. The model can be built using only easily accessible normal data, avoiding dependence on scarce and costly epileptic seizure samples. In the training process, group sparsity regularization constraints based on the subset of the feature bands are introduced, which enables the model to automatically retain or suppress weight patterns related to specific EEG rhythm frequency bands during feature learning. This enhances the model's ability to represent normal EEG time-frequency distribution patterns and reduces the risk of overfitting.
[0011] 4. By using a single-channel local anomaly detection module, the dissimilarity score of the hidden layer activation of each channel is calculated based on the trained model, and a dynamic adaptive threshold is generated using the local median absolute deviation. This allows the anomaly judgment threshold to be adjusted in real time according to the local statistical characteristics of the signal. Compared with the fixed threshold method, it has stronger adaptability and robustness to signal fluctuations in different patients, different stages of the disease, and different recording environments.
[0012] 5. Through the multi-channel spatial co-occurrence and spike determination module, the co-occurrence of local abnormal trigger points in a single channel is first filtered based on multi-channel spatial statistics to eliminate isolated artifacts caused by electromyography, electrode loosening, etc., to confirm the global spike event trigger points and extract independent spike rhythm sequences. Then, using a fixed-duration sliding judgment window, the cumulative frequency of independent spike rhythm sequences and the cumulative duration of global spike event trigger points are determined in parallel. The two determination strategies complement each other, which can capture both densely occurring short spike bursts and detect seizure states with longer durations, reducing the risk of missed detection, and finally achieving automatic and accurate determination of the seizure interval of abnormal spike rhythms in epilepsy.
[0013] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a schematic diagram illustrating the components of an EEG epilepsy spike detection system based on a group sparse restricted Boltzmann machine, according to an exemplary embodiment. Figure 2 These are comparison images of the EEG signal before and after filtering processing according to an embodiment of the present invention; Figure 3This is an implementation diagram of single-channel spike anomaly labeling based on Local MAD dynamic threshold and hidden layer dissimilarity index in this invention embodiment; Figure 4 This is a diagram showing the epileptic spike detection process and final implementation result of the multi-channel spatial discrimination and multi-strategy sliding window joint determination in this embodiment of the invention; Figure 5 This is a flowchart illustrating an EEG epilepsy spike detection system based on a group sparse restricted Boltzmann machine, according to an exemplary embodiment. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be described in detail below. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] Example 1 For specific implementation details, please refer to [link / reference]. Figure 1 as well as Figure 5 , Figure 1 This is a schematic diagram illustrating the composition of an EEG epilepsy spike detection system based on a group sparse restricted Boltzmann machine, according to an exemplary embodiment, including: The signal acquisition and preprocessing module is configured to acquire multi-channel EEG signals from the target patient and perform zero-phase bandpass filtering and notch filtering on the acquired multi-channel EEG signals to obtain preprocessed signals. Zero-phase bandpass filtering is used to remove baseline drift and high-frequency artifacts, while notch filtering is used to remove interference from power frequency equipment. The zero-phase characteristic ensures that the filtering process does not introduce phase distortion and preserves the temporal characteristics of the EEG signals.
[0018] The time-frequency feature extraction and grouping module is configured to extract time-frequency amplitude features from the preprocessed signal through linear time-frequency transformation. Based on multiple preset EEG physiological frequency bands, it divides the frequency axis of the time-frequency amplitude features into multiple corresponding feature band subsets. These feature band subsets are then combined according to frequency band order to obtain multi-channel time-frequency feature samples. The linear time-frequency transformation can employ short-time Fourier transform or continuous wavelet transform to convert the one-dimensional time-domain signal into a two-dimensional time-frequency representation. The preset multiple EEG physiological frequency bands include delta wave, theta wave, alpha wave, beta wave, and gamma wave bands, each corresponding to different EEG rhythm activities. The obtained feature band subsets are combined in frequency band order to form structured multi-channel time-frequency feature samples, which serve as input for subsequent model training and detection.
[0019] The model training module is configured to perform unsupervised training on a pre-constructed initial restricted Boltzmann machine model using multi-channel time-frequency feature samples from the seizure-free period. Group sparse regularization constraints based on feature band subsets are introduced during training to obtain a trained model representing the normal EEG time-frequency distribution pattern. The initial restricted Boltzmann machine model contains a Gaussian visible layer and hidden layers. The visible layer uses a Gaussian distribution to accommodate the continuous real-valued properties of the EEG time-frequency features. Training uses only normal background EEG data from the seizure-free period, without requiring anomaly-labeled samples. The group sparse regularization constraints apply selective penalties to the weights based on the grouping structure of the feature band subsets, allowing the model to automatically focus on or suppress feature representations in specific frequency bands during learning.
[0020] The single-channel local anomaly detection module is configured to input multi-channel time-frequency feature samples to be detected into the trained model, calculate the dissimilarity score of the hidden layer activation of each channel, and generate a dynamic threshold based on the local median absolute deviation to mark the trigger points of single-channel local anomalies. The dissimilarity score reflects the degree of deviation between the hidden layer activation mode of the current sample and the normal background activation mode; the dynamic threshold based on the local median absolute deviation can adaptively adjust according to the local statistical characteristics of the signal, and has stronger robustness than a fixed threshold.
[0021] The multi-channel spatial co-occurrence and spike determination module is configured to perform multi-channel spatial statistics on single-channel local abnormal trigger points at various time points, determine the time points that meet the preset spatial threshold conditions as global spike event trigger points, and extract independent spike rhythm sequences. Using a fixed-duration sliding judgment window, the module performs parallel determination on the cumulative frequency of independent spike rhythm sequences and the cumulative duration of global spike event trigger points to determine the epileptic abnormal spike rhythm seizure interval. Specifically, the multi-channel spatial statistics filter out isolated artifacts by counting the number of channels triggering local abnormalities at the same time point and utilizing spatial co-occurrence characteristics; the parallel determination strategy integrates frequency and duration conditions, determining an abnormal seizure interval if either condition is met, thus accommodating both short-duration dense spike bursts and long-duration continuous seizures.
[0022] Example 2 This embodiment, based on Embodiment 1, further defines the specific structure of the model training module. The model training module includes a sample input unit, a weight grouping unit, a penalty gradient generation unit, a gradient fusion unit, and a parameter update unit.
[0023] The sample input unit is configured to input multi-channel time-frequency feature samples from the seizure-free period into the initial restricted Boltzmann machine model. The visible layer of this initial restricted Boltzmann machine model adopts a Gaussian distribution to accommodate the continuous real-valued properties of the EEG time-frequency features; the hidden layer adopts binary units to learn the latent representation of the input features.
[0024] The weight grouping unit is configured to divide the total weight matrix between the visible and hidden layers of the initial restricted Boltzmann machine model into multiple weight sub-matrices based on the EEG physiological frequency bands corresponding to the feature band subsets. Each weight sub-matrice corresponds to a feature band subset. Specifically, let the total weight matrix be W, with rows corresponding to visible layer units and columns corresponding to hidden layer units. According to the feature band subsets to which the visible layer units belong, W is divided into W(1), W(2), ..., W(G) by rows, where G is the number of preset EEG physiological frequency bands, and each W(g) corresponds to the time-frequency feature input of one frequency band.
[0025] The penalized gradient generation unit is configured to compute the L2 norm of the column vectors of each weight submatrix, generating the corresponding group sparse penalized gradient for each group. For the g-th weight submatrix W(g), its group sparse penalized gradient is: ;in, To prevent smooth minimum constants with denominators of zero.
[0026] The gradient fusion unit is configured to compute the base gradient of the total weight matrix using a continuous contrastive divergence algorithm, and then fuse this base gradient with the sparse penalty gradients from each set to obtain the total weight gradient. Specifically, sampling is first performed using a continuous contrastive divergence algorithm to obtain the base weight gradient based on the data distribution. W; then the weighted sum of the base gradient and the sparse penalty gradients of each group is combined to obtain the total weighted gradient: ; in, The total gradient is used as the sparsity penalty coefficient. Based on this total gradient, an adaptive momentum optimization algorithm is employed to update the model parameters and learn the normal temporal-frequency spatial distribution of the background EEG.
[0027] The parameter update unit is configured to update the total weight matrix using the total weight gradient to obtain the trained model. Through the iterative execution of the above grouping, calculation, fusion and update process, the model maximizes the data likelihood while being subject to group sparsity constraints, making the weights related to specific frequency bands exhibit group-level sparsity, thereby learning the time-frequency distribution pattern of EEG signals under normal conditions.
[0028] In practical implementation, the following steps can be referred to: 1. Let the total weight matrix between the visible layer and the hidden layer be... The underlying contrastive divergence weight gradient is calculated through PCD sampling. ; 2. Based on the extracted EEG frequency bands, group the bands... The corresponding visual layer weight submatrix is Calculate the L2 norm of its column vectors and generate a set of sparse penalized gradients. ,in, To prevent the smoothing minimum constant with a denominator of zero; 3. Calculate the total weight gradient of the fusion regularization term: in, The total gradient is used as the sparsity penalty coefficient. Based on this total gradient, an adaptive momentum optimization algorithm is employed to update the model parameters and learn the normal temporal-frequency spatial distribution of the background EEG.
[0029] Example 3 Based on Embodiment 1, this embodiment further defines the specific methods for calculating dissimilarity and determining dynamic threshold in the single-channel local anomaly detection module. The single-channel local anomaly detection module includes a dissimilarity calculation unit and a dynamic threshold determination unit.
[0030] The dissimilarity calculation unit is configured to calculate the degree of deviation of the activation pattern of the sample to be detected in the hidden layer of the model from the activation pattern of the normal background. Specifically, a baseline of normal activation patterns needs to be established first. All multi-channel time-frequency feature samples extracted from the epileptic seizure-free period are input into the trained restricted Boltzmann machine model. After forward propagation of each sample, an activation probability value is generated in each unit of the hidden layer. The activation probabilities of all normal background samples in the same hidden unit are averaged to obtain the activation mean of that hidden unit. The activation mean values of all hidden units are combined to form the hidden layer activation mean vector. This mean vector represents the typical activation pattern of normal EEG signals in the model feature space and serves as a reference baseline for subsequent abnormality judgment.
[0031] During the detection phase, for the time-frequency feature sample of a single channel to be detected at time t, it is also input into the trained model for forward propagation to obtain the real-time activation probability vector of the sample in each unit of the hidden layer. The absolute difference between this real-time activation probability vector and the mean activation vector of the hidden layer at each hidden unit is calculated, and the absolute differences at all hidden units are summed to obtain a scalar value, namely the dissimilarity score of the channel at time t. The larger the dissimilarity score, the more significant the deviation between the activation mode of the current sample in the model's hidden space and the normal background mode, and the higher the probability that the channel has abnormal discharge at the current time.
[0032] The dynamic threshold determination unit is configured to adaptively generate a determination threshold based on the local statistical characteristics of dissimilarity scores and mark abnormal time points accordingly. Specifically, taking the current time t as the end point of the window, a dissimilarity score sequence of a preset length is traced back as a sliding evaluation window. Within this window, the local median of the dissimilarity scores is calculated, which is the value at the middle position after sorting all dissimilarity scores in the window by size. This value reflects the normal level of signal deviation within the window. Simultaneously, the degree to which each dissimilarity score deviates from this local median is calculated, i.e., the absolute value of the difference between each dissimilarity score and the local median. The median of these absolute deviation values is then taken to obtain the local absolute median difference. The absolute median difference is a robust measure of dispersion, unaffected by excessive influence from individual extreme deviations within the window.
[0033] After obtaining the local median and local absolute median difference, the dynamic threshold determination unit combines these two with a preset sensitivity coefficient and scaling constant to calculate the dynamic anomaly determination threshold at the current time t. The sensitivity coefficient controls the threshold's sensitivity to abnormal deviations; a larger coefficient results in a higher threshold and a more stringent determination. The scaling constant ensures that the local absolute median difference is statistically consistent with the standard deviation of a normal distribution, making the thresholds statistically comparable. The calculation formula is: the dynamic anomaly determination threshold equals the local median plus the sensitivity coefficient multiplied by the scaling constant, and then multiplied by the local absolute median difference.
[0034] The dissimilarity score at the current time t is compared with the calculated dynamic anomaly detection threshold. When the dissimilarity score is greater than the dynamic anomaly detection threshold, it indicates that the activation mode of the channel at the current time has deviated from the normal range beyond the upper limit allowed by local statistical fluctuations. The channel at time t is then marked as a single-channel local anomaly trigger point.
[0035] In practical implementation, the following steps can be referred to: 1. Calculate the absolute dissimilarity score between the activation features of the test sample in the hidden layer and the mean vector of the background, expressed as: .in, This is the mean vector of activation probabilities of normal background EEG samples before the onset of an attack in the hidden layer of the model. For the testing phase, single-channel EEG characteristics in The real-time activation probability vector of the hidden layer at time step 1. The length of the hidden vector; 2. Establish a sliding evaluation window and calculate the local median of the dissimilarity scores within the window. and absolute median ; 3. Calculate the dynamic anomaly detection threshold for this single channel at the current moment. in, This is the sensitivity coefficient. This is a scaling constant used to ensure statistical consistency with the standard deviation of the normal distribution. When the dissimilarity score at a certain moment exceeds the anomaly detection threshold, that single channel is marked as a local anomaly trigger point at that moment.
[0036] The core advantage of this dynamic threshold determination method lies in the fact that the threshold is not fixed, but rather generated in real time based on the local median and absolute median difference of data within the adjacent window at the current moment. It can adaptively adjust according to the local statistical characteristics of the signal. When the overall fluctuation of the background signal increases, the local median and absolute median difference increase accordingly, and the threshold automatically rises; when the background signal tends to stabilize, the threshold automatically decreases. Therefore, this method has strong robustness to signal changes in different patients, different leads, and different recording periods, and can effectively reduce false positives and false negatives caused by signal non-stationarity.
[0037] Example 4 Based on Embodiment 1, this embodiment further defines the specific method of joint determination of multi-channel spatial co-occurrence filtering and multi-strategy sliding window.
[0038] The multi-channel spatial co-occurrence and spike determination module includes a spatial co-occurrence filtering unit and a sliding window joint determination unit.
[0039] The spatial co-occurrence filtering unit is configured to perform multi-channel spatial statistics on single-channel local abnormal trigger points at each time point, filtering out isolated artifacts caused by electromyographic interference, electrode loosening, etc., and confirming global spike events that occur synchronously across channels. Specifically, at each time point, the number of channels marked as single-channel local abnormal trigger points is counted in real time across all channels. Since real epileptic spike discharges usually involve synchronous or rapid conduction in multiple brain regions, multiple channels may detect abnormalities simultaneously at the same or adjacent time points; and isolated triggers in a single channel are more likely to originate from noise or artifacts within that channel itself.
[0040] To accommodate the slight time delays caused by the transmission of neural signals between different brain regions, the spatial co-occurrence filtering unit smooths the statistically obtained number of channels by applying a sliding maximum value to a preset time tolerance window. The time tolerance window defines an allowable range of time deviations, and the maximum number of channels within this window is taken as the smoothed number of channels. This process allows multiple-channel anomalous triggers that are not strictly from the same sampling point but fall within the tolerance window to still be identified as spatial co-occurrence events.
[0041] When the number of smoothed channels exceeds a preset spatial threshold, it indicates that a sufficient number of spatially independent channels simultaneously detect an anomaly. This anomaly has a high confidence level for a true spike event, and this time point is determined as the global spike event trigger point. The spatial threshold can be set according to the electrode coverage and clinical detection sensitivity requirements.
[0042] After obtaining the time series of the global spike event trigger point states, the spatial co-occurrence filtering unit further extracts the rising edges of these states to obtain independent spike rhythm sequences. A rising edge refers to the moment when the state transitions from non-triggered to triggered; each rising edge represents the start of a new spike event. Through rising edge extraction, the same spike event across multiple consecutive frames is compressed into a single count, eliminating the problem of duplicate counting and facilitating accurate subsequent statistics on spike event frequencies.
[0043] The sliding window joint determination unit is configured to determine the epileptic abnormal spike rhythm seizure interval based on the independent spike rhythm sequence and the global spike event trigger point state, using a fixed-duration sliding determination window to perform parallel determination of frequency and duration. Specifically, a fixed-duration sliding determination window and its sliding step size are first set, and the sliding determination window moves segment by segment along the time axis, performing independent determination at each window position.
[0044] Within each sliding decision window, two strategies—frequency determination and duration determination—are executed in parallel. The frequency determination strategy continuously counts the number of independent spike rhythm sequences accumulated within the current window, triggering a determination when the accumulated number reaches a preset threshold. This strategy targets short-duration, dense bursts of spike rhythms, enabling the detection of rapidly repetitive abnormal discharge activity before or at the onset of a seizure, thus providing early warning. The duration determination strategy continuously counts the total duration of high-level spike events triggered at the global spike event trigger point within the current window, triggering a determination when the total duration of high-level spike events reaches a preset time threshold. This strategy targets longer seizure states, effectively identifying persistent abnormal discharges and avoiding missed detections due to long durations of spike events even if they are not dense.
[0045] When implementing this, please refer to the following steps: 1. Multi-channel spatial discrimination: Real-time statistics of the total number of channels triggering local anomalies at each time point, and smoothing the number of channels by sliding to the maximum value through a preset time tolerance window. When the smoothed number of channels exceeds a set spatial threshold... When a global spike event is detected, the rising edge of the global spike state is extracted, repeated counting in multiple consecutive frames is eliminated, and independent spike rhythm sequences are marked.
[0046] 2. Multi-strategy sliding window joint decision: Set a sliding decision window with a fixed time length, and use one of the following two strategies or simultaneously in parallel for decision-making: Frequency determination: Real-time statistics of the number of independent global spike rhythms accumulated in the current window, and a determination is triggered when the preset number threshold is reached; Duration determination: Real-time statistics of the total duration of high-level events in the current window that are in a global attack state; when the preset time threshold is reached, a determination is triggered. When any of the above strategies or combined strategies are met, it is determined that an epileptic spike rhythm occurs in the interval corresponding to the sliding time window.
[0047] Frequency determination and duration determination are conducted in parallel, with both strategies operating simultaneously and complementing each other. When either determination condition is met, the time interval covered by the current sliding determination window is determined to be the epileptic spike-wave rhythm seizure interval. Through the parallel complementarity of the two strategies, the system can detect both short-duration, dense spike-wave burst patterns and longer-duration seizure patterns, effectively reducing the risk of missed detection that may be caused by a single strategy and improving the comprehensiveness and robustness of the detection.
[0048] Example 5 This embodiment, based on Embodiment 1, further defines the specific division of the electroencephalographic frequency bands. In the time-frequency feature extraction and grouping module, the preset multiple electroencephalographic frequency bands include: delta wave band (0.5-4 Hz), theta wave band (4-8 Hz), alpha wave band (8-13 Hz), beta wave band (13-30 Hz), and gamma wave band (30-70 Hz). Each electroencephalographic frequency band corresponds one-to-one with a subset of characteristic wavebands, namely, the subsets of delta wave characteristic wavebands, theta wave characteristic wavebands, alpha wave characteristic wavebands, beta wave characteristic wavebands, and gamma wave characteristic wavebands.
[0049] This frequency band division is based on internationally accepted brainwave rhythm classification standards and has clear neurophysiological significance. Delta waves mainly appear in deep sleep and certain pathological states; theta waves are associated with drowsiness and meditative states; alpha waves are significant when awake and eyes are closed; beta waves are associated with active thinking and alertness; and gamma waves are involved in higher cognitive functions. During epileptic seizures, the energy distribution and coupling patterns of each frequency band undergo characteristic changes. Grouping these frequency bands according to their characteristics allows the sparse regularization constraint to specifically learn the expression patterns of each frequency band under normal conditions, improving the specificity of abnormality detection.
[0050] Example 6 Based on Embodiment 1, this embodiment further defines the specific method of linear time-frequency transformation. In the time-frequency feature extraction and grouping module, the linear time-frequency transformation can adopt short-time Fourier transform or continuous wavelet transform.
[0051] When using the short-time Fourier transform, the time-frequency resolution is controlled by setting the window length and overlap rate. For example, the window size can be set to 128 sampling points and the overlap rate to 85%. Performing a fast Fourier transform on the signal segment within each window yields the amplitude spectrum for that time period. Sliding the window along the time axis yields the complete time-frequency amplitude matrix.
[0052] When using continuous wavelet transform, the signal is expanded at different time scales by selecting wavelet basis functions and scaling sequences, resulting in a multi-resolution time-frequency representation. Continuous wavelet transform has high frequency resolution in the low-frequency band and high time resolution in the high-frequency band, and can better adapt to the non-stationary characteristics of EEG signals.
[0053] Both linear time-frequency transformation methods are mature technologies, and those skilled in the art can choose to implement them according to specific application scenarios.
[0054] Example 7 To verify the feasibility of this invention, the scalp electroencephalogram (EEG) signals of patients with focal seizures accompanied by impaired consciousness epilepsy (FIAS) were processed and detected, including the following steps: Step 1: Acquire scalp EEG signals from FIAS epilepsy patients. Electrodes were arranged according to the international 10-20 system to achieve 32-channel sampling. A total of 2282 seconds of data was acquired at a sampling frequency of 512Hz. The patient experienced a seizure 1220 seconds after the start of acquisition, lasting 54 seconds. The EEG signals from each channel were subjected to 0.5-70Hz zero-phase bandpass filtering and 50Hz notch filtering to remove baseline drift, high-frequency artifacts, and interference from power frequency equipment. Figure 2 As shown.
[0055] Step 2: Use STFT to convert the signals of each channel to the time-frequency domain and calculate the amplitude. At the same time, automatically match the amplitude vector with the divided EEG physiological bands. The STFT window size is 128, and the overlap rate is 85%.
[0056] Step 3: Construct and train a group sparse RBM model with a visible layer dimension matching the input vector and a hidden layer dimension of 16. The number of iterations is 30, the batch size is 12, the learning rate is 0.001, and the group sparsity parameter is 0.06. The model is trained using pre-seizure background EEG signal samples, and the parameters are updated using PCD and Adam optimizers.
[0057] Step 4: Perform single-channel anomaly detection with a LocalMAD window length of 10 and a sensitivity coefficient of 3.0; calculate the hidden layer dissimilarity and dynamic threshold for each channel, and mark the single-channel anomaly time points, such as... Figure 3 As shown.
[0058] Step 5: Filter local interference using multi-channel spatial co-occurrence constraints to confirm global spike events; then use a multi-strategy sliding time window to determine spike rhythms to aid in the diagnosis of epileptic seizures. 1. Multi-channel spatial discrimination: Real-time statistics of the total number of channels triggering local anomalies at each time point, with a time tolerance window of 2 and a set global spike spatial threshold. Extract the rising edge of the global spike state, eliminate repeated counting across multiple consecutive frames, and mark independent spike rhythm sequences.
[0059] 2. Multi-strategy sliding window joint judgment: A sliding judgment window with a time length of 5 seconds is set, and one of the following two strategies or simultaneous parallel judgment is adopted: Frequency determination: The determination is triggered when the number of independent global spike rhythms accumulated in the current window reaches 3. Duration determination: The determination is triggered when the total duration of the high-level outbreak state in the current window reaches 1 second; like Figure 4 As shown, the method automatically marks the spikes in the filtered signal through co-occurrence constraints, which can be achieved through... Figure 4 Comparing subplots (a) and (b). In subplot (c), the multi-strategy sliding window joint judgment module marked a significant spike rhythm near 600s, indicating a possible epileptic seizure, and accurately marked the epileptic seizure zone near 1200s and the subsequent interval rhythm.
[0060] It should be understood that the embodiments of the present invention can be implemented by a general-purpose computing device combined with program code, or fabricated as an integrated circuit module, and its implementation is not limited to a specific hardware and software combination. The above descriptions are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A group-sparse restricted Boltzmann machine based electroencephalogram epileptic spike detection system, characterized in that, include: The signal acquisition and preprocessing module is used to acquire multi-channel EEG signals from the target patient and perform zero-phase bandpass filtering and notch filtering on the multi-channel EEG signals to obtain preprocessed signals. The time-frequency feature extraction and grouping module is used to extract time-frequency amplitude features from the preprocessed signal through linear time-frequency transformation, and divide the frequency axis of the time-frequency amplitude features into multiple corresponding feature band subsets according to multiple preset electroencephalographic frequency bands. The feature band subsets are then combined according to frequency bands to obtain multi-channel time-frequency feature samples. The model training module is used to perform unsupervised training on the pre-constructed initial restricted Boltzmann machine model using the multi-channel time-frequency feature samples during the epileptic seizure period, and introduces group sparse regularization constraints based on the feature band subset during training to obtain a trained model that represents the normal EEG time-frequency distribution pattern. The single-channel local anomaly detection module is used to input the multi-channel time-frequency feature samples to be detected into the trained model, calculate the dissimilarity score of the hidden layer activation of each channel, and generate a dynamic threshold based on the local median absolute deviation to mark the single-channel local anomaly trigger point. The multi-channel spatial co-occurrence and spike determination module is used to perform multi-channel spatial statistics on the single-channel local abnormal trigger points at each time point, determine the time points that meet the preset spatial threshold conditions as global spike event trigger points, and extract independent spike rhythm sequences; using a fixed-duration sliding determination window, the cumulative frequency of the independent spike rhythm sequences and the cumulative duration of the global spike event trigger points are determined in parallel to determine the epileptic abnormal spike rhythm seizure interval.
2. The system of claim 1, wherein, The model training module includes: The sample input unit is used to input the multi-channel time-frequency feature samples of the epileptic seizure-free period into the initial restricted Boltzmann machine model; The weight grouping unit is used to divide the total weight matrix between the visible layer and the hidden layer of the initial restricted Boltzmann machine model into multiple weight sub-matrices based on the EEG physiological frequency bands corresponding to the feature band subsets, wherein each weight sub-matrice corresponds to one of the feature band subsets. The penalized gradient generation unit is used to calculate the L2 norm of the column vector of each weight submatrix and generate the corresponding sparse penalized gradient for each group. The gradient fusion unit is used to calculate the basic gradient of the total weight matrix through a continuous comparative divergence algorithm, and fuse the basic gradient with each of the groups of sparse penalty gradients to obtain the total weight gradient. The parameter update unit is used to update the total weight matrix using the total weight gradient to obtain the trained model.
3. The system according to claim 1, characterized in that, The single-channel local anomaly detection module includes a dissimilarity calculation unit, which is configured as follows: The multi-channel time-frequency feature samples extracted from the epileptic seizure-free period are input into the trained model, the activation probability of the hidden layer of each channel is calculated, and the hidden layer activation probability of all samples is averaged element by element to obtain the hidden layer activation mean vector. For the hidden layer activation vector of the single-channel time-frequency feature sample to be detected at time t, calculate the L1 norm between the hidden layer activation vector and the hidden layer activation mean vector, and use it as the dissimilarity score of the channel at time t.
4. The system according to claim 3, characterized in that, The single-channel local anomaly detection module further includes a dynamic threshold determination unit, which is configured to perform the following method steps: S1. Taking time t as the endpoint, take a sliding evaluation window of a preset length and obtain the dissimilarity score sequence within the window; S2. Calculate the local median and local absolute median difference of the dissimilarity fraction sequence; S3. Combine the local median, the local absolute median difference, and the preset sensitivity coefficient and scaling constant to calculate the dynamic anomaly judgment threshold at time t; S4. When the dissimilarity score at time t is greater than the dynamic anomaly determination threshold at time t, the channel is marked as the single-channel local anomaly trigger point at time t.
5. The system according to claim 1, characterized in that, The multi-channel spatial co-occurrence and spike determination module includes a spatial co-occurrence filtering unit, which is configured as follows: The number of channels marked as local anomaly trigger points for each single channel at each time point is counted in real time. The number of channels is smoothed by sliding to the maximum value through a preset time tolerance window; When the number of smoothed channels exceeds a preset spatial threshold, that time point is determined as the trigger point of the global spike event. Extract the rising edge of the global spike event trigger point state to obtain the independent spike rhythm sequence.
6. The system according to claim 1, characterized in that, The multi-channel spatial co-occurrence and spike determination module further includes a sliding window joint determination unit, which is configured as follows: Set a sliding decision window with a fixed time duration; The cumulative number of independent spike rhythm sequences within the current sliding judgment window is counted, and a judgment is triggered when the cumulative number reaches a preset threshold. The total duration of the high-order byte in the current sliding judgment window at the global spike event trigger point is counted. When the total duration of the high-order byte reaches a preset time threshold, a judgment is triggered. When any decision is triggered, the time interval covered by the current sliding decision window is determined to be the epileptic abnormal spike rhythm seizure interval.
7. The system according to claim 1, characterized in that, In the time-frequency feature extraction and grouping module, the preset multiple electroencephalographic frequency bands include: delta wave band, theta wave band, alpha wave band, beta wave band, and gamma wave band.
8. The system according to claim 1, characterized in that, In the time-frequency feature extraction and grouping module, the linear time-frequency transform is either a short-time Fourier transform or a continuous wavelet transform.