Accurate chronic insomnia detection method fusing EMD and multi-channel E-PCNN
By integrating EMD and E-PCNN methods, a multi-channel EEG signal detection model was constructed, which solved the problem of accurate detection of chronic insomnia disorder, realized efficient and personalized EEG signal analysis, and improved detection accuracy and stability.
Patent Information
- Application Number
- CN202510814929.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-11-14
AI Technical Summary
Existing technologies struggle to accurately detect chronic insomnia, especially in EEG signal analysis. They are unable to effectively distinguish the EEG rhythm characteristics of patients with chronic insomnia from those of normal individuals, and are also subject to noise interference and individual differences.
We employ a method that integrates Empirical Mode Decomposition (EMD) and Enhanced Pulse Coupled Neural Network (E-PCNN). By fusing multi-scale features and dynamic channel weighting, we construct a detection model that can adaptively learn EEG signals. By combining a multi-channel convolutional structure and an adaptive time step, we extract rhythmic features in the α and θ frequency bands and perform dynamic feature representation and classification.
It improves the accuracy and robustness of detecting chronic insomnia disorder, and can accurately distinguish insomnia patients from normal individuals in noisy environments, providing a scientific basis for personalized analysis.
Smart Images

Figure CN120938468A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chronic insomnia disorder detection technology, and in particular to a precise detection method for chronic insomnia that integrates EMD and multi-channel E-PCNN. Background Technology
[0002] Chronic insomnia disorder (CID) is a common sleep disorder that affects a large segment of the population due to its situational, recurrent, and long-term nature; approximately 6%–10% of adults meet the criteria for CID. This disorder is often accompanied by fatigue or low energy, cognitive difficulties (such as attention, concentration, and memory), and mood disturbances (such as irritability and restlessness), which can further lead to functional impairment (Morin & Benca, 2012). Furthermore, CID has a high comorbidity rate with mental illnesses, particularly anxiety and depression (Johnson et al., 2006), and is a potential trigger for other diseases, including cardiovascular disease and dementia (Zhao et al., 2021). This not only places a heavy burden on patients and the healthcare system but also threatens patients' quality of life and their psychological, occupational, and socioeconomic development.
[0003] Advances in brain imaging technology have provided new perspectives for the precise diagnosis of chronic insomnia. Resting-state electroencephalography (EEG), a non-invasive and efficient technique for monitoring neural activity, is widely used in the study of neural rhythms in patients with chronic insomnia, accurately revealing neurophysiological changes in the brain under natural conditions. Studies have found significant abnormalities in the alpha wave (8–13 Hz) and theta wave (4–8 Hz) rhythmic activities of patients with chronic insomnia under resting conditions. Alpha waves (associated with relaxation) often show reduced power, indicating a state of high alertness in the brain, making it difficult to enter a relaxation or resting mode (Cortoos et al., 2006). Theta waves (associated with deep relaxation and sleep) are abnormally enhanced in some patients, possibly reflecting increased sleep pressure or compensatory regulatory mechanisms (Riedner et al., 2016). Further research has shown that rhythmic abnormalities in patients with chronic insomnia are mainly concentrated in the dorsolateral prefrontal cortex (DLPFC) (Zhao et al., 2024), posterior parietal cortex (PPC), and anterior cingulate cortex (ACC) (Winkelman et al., 2013). Therefore, EEG rhythmic feature analysis targeting the DLPFC, PPC, and ACC regions can help to more accurately reveal the abnormal patterns of brain neural activity in chronic insomnia and provide a scientific basis for objective diagnosis and personalized intervention.
[0004] In recent years, machine learning, especially deep learning, has become an important tool in the field of EEG signal analysis, achieving significant application results. This invention proposes an Enhanced Pulse Coupled Neural Network (E-PCNN) to improve the automatic feature extraction capability of EEG signals and enhance the accuracy of temporal modeling. E-PCNN combines Multi-Scale Feature Fusion (MSFF) and Dynamic Channel Weighting (DIC) mechanisms, enabling real-time capture and analysis of rhythmic differences in resting-state EEG signals between individuals with chronic insomnia and those with normal sleep patterns, under conditions of high accuracy and efficiency. Furthermore, E-PCNN introduces an adaptive time-stepping mechanism, giving it greater dynamic flexibility in modeling EEG temporal information. Furthermore, E-PCNN employs a multi-channel CNN structure, enabling simultaneous processing of EEG signals from different key brain regions. Combined with dynamic spiking neuron mechanisms, it enhances the model's adaptability to neural oscillation variations, more effectively distinguishing the EEG frequency domain feature patterns of patients with chronic insomnia and normal individuals, reducing noise interference in EEG signals, and improving the stability of the classification model. This invention's method, integrating Empirical Mode Decomposition (EMD) and Enhanced Pulsed Coupled Neural Network (E-PCNN), not only advances research into the neural mechanisms of chronic insomnia but also provides a precise and efficient early diagnostic tool for detecting the rhythmic activity characteristics of patients with chronic insomnia. Summary of the Invention
[0005] The purpose of this invention is to solve the above-mentioned problems by providing a precise detection method for chronic insomnia that integrates EMD and multi-channel E-PCNN.
[0006] To achieve the above objectives, the technical solution adopted by this invention is as follows: Based on EEG signal processing, empirical mode decomposition, multi-scale feature fusion, and enhanced pulse-coupled neural network modeling, a detection model with rhythm sensitivity and individual adaptability is constructed, characterized by the following:
[0007] S1: Screening patients with chronic insomnia disorder based on PSQI, SAS, and SDS scales, and collecting EEG data in the resting state with eyes closed;
[0008] S2: The acquired EEG signal is preprocessed using EEGLAB, and each EEG channel is decomposed using the EMD method to obtain several intrinsic mode functions (IMFs) in order to preserve the nonlinear and non-stationary characteristics of the signal at different time scales.
[0009] S3: The MSFF module calculates the temporal features of IMFs in a short time window of 500ms and a long time window of 4000ms respectively, and selects the effective IMFs in the α band 8–13Hz and the θ band 4–8Hz. These selected multi-time scale IMF features are input into the E-PCNN structure as the dynamic feature representation layer of the model.
[0010] S4: Based on the selected α and θ band IMF components, construct the rhythmic feature sequence for each channel, calculate the power difference between the α and θ band components at each time step, and combine the statistical distribution of the difference across the entire time series and all channels to extract the rhythmic features of the α / θ band. The rhythmic features serve as the rhythm enhancement representation before input to the E-PCNN model.
[0011] S5: Calculate the spatial channel weighting coefficient This is used to measure the contribution of different channels in rhythm differentiation, and normalizes the importance of each channel.
[0012] S6: Input the selected multi-scale IMFs features into the enhanced pulse-coupled neural network E-PCNN to construct a dynamic feature representation layer;
[0013] S7: Introducing the Dynamic Channel Weighting (DIC) mechanism, which dynamically calculates the attention weights for each frequency band within E-PCNN based on the attention mechanism. To adjust the response intensity of the α / θ band characteristics under different channels;
[0014] S8: Finally, binary classification is performed using Softmax to calculate the probabilities of the insomnia group and the normal group, and the classification results are output.
[0015] Furthermore, participants were divided into a normal group and an insomnia group. The normal group needed to meet the following criteria: PSQI score ≤ 5, SAS score ≤ 50, and SDS score ≤ 52, to ensure no significant anxiety or depressive symptoms. The insomnia group was assessed based on PSQI score ≥ 7, SAS score ≤ 50, and SDS score ≤ 52, and required to have no other mental health issues besides sleep problems.
[0016] The experimental data collection process involved the patient being in a closed-eye, resting state. A 10-20 lead system was used to place 64-channel electrodes, with a sampling frequency of 1000Hz and a recording duration of 8 minutes. During this period, a soft prompt was given every 2 minutes to keep the patient awake.
[0017] Furthermore, the power of the α-wave and θ-wave corresponding to the IMFs is calculated using the following formula:
[0018]
[0019]
[0020] The α / θ power ratio is calculated in the statistical distribution and expressed as a scalar. The calculation formula is as follows:
[0021]
[0022] in, and These represent the total power of the IMF components corresponding to the α-wave and θ-wave frequency bands, respectively, which is the cumulative sum of the power of each IMF component within a specific time period.
[0023] Furthermore, the spatial channel weighting coefficient Spatial channel weighting coefficients are used to adjust the contribution of different brain region channels in the neuronal activation process. The calculation formula is as follows:
[0024]
[0025] in, Used to measure the The power difference characteristics of each EEG channel in the α / θ band contribute to the overall performance. The total time step represents the length of the time series during the EEG signal sampling process. The current time step, ranging from 1 to... This represents the index at different time points during the entire EEG sampling process, the EEG channel number, and indicates different electrode channels. Indicates the first Channel in alpha band (8–13 Hz) IMF components at time step The value, Indicates the first Channel IMF components in the θ band (4–8 Hz) at time step The value of the numerator Indicates the first The total timing power difference between the channel in the α and θ bands, denominator The total α / θ power difference across all EEG channels is normalized, and this ratio measures the power of the first channel. The relative contribution of channels in distinguishing the two types of rhythmic patterns serves as an important basis for spatial channel weighting.
[0026] (2) Frequency band attention weight To dynamically adjust the influence of different frequency bands on the final feature representation, the dynamic channel weighting module calculates the importance of frequency bands such as α and θ through an attention mechanism. The formula for calculating the frequency band attention weight is as follows:
[0027]
[0028] in, A time step represents a specific sampling point in the EEG recording process. The EEG channel is numbered to indicate different electrode locations. The time steps are calculated by the attention mechanism. The dynamic weight at each point in time measures the importance of that point in the EEG signal.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] This invention proposes an E-PCNN that combines multi-scale feature fusion (MSFF) to extract rhythmic information at different time scales and utilizes an adaptive time-stepping mechanism to optimize the temporal modeling capability of EEG signals. This method can effectively improve the recognition ability of EEG features in insomnia patients and significantly optimize the accuracy of insomnia detection in classification tasks.
[0031] Another innovation of this invention lies in the fact that E-PCNN employs a dynamic spiking neural network structure, enhancing its ability to model the temporal dependence of EEG signals. E-PCNN utilizes an adaptive time-stepping mechanism to perform short-term dynamic modeling of EEG signals, effectively capturing the temporal features of the α and θ frequency bands. Simultaneously, the dynamic channel weighting (DIC) mechanism allows for adaptive information interaction between EEG signals from brain regions such as DLPFC, PPC, and ACC, thereby enabling a more comprehensive learning of brain rhythm characteristics.
[0032] From a macro perspective, this invention provides a significant technological breakthrough in EEG signal analysis for chronic insomnia disorder through multi-channel structure, temporal learning, dynamic feature fusion, cross-channel coupling, and adaptive temporal modeling, offering new methods and application value for the accurate detection and personalized analysis of chronic insomnia disorder. Attached Figure Description
[0033] Figure 1 A flowchart of a method for accurate detection of chronic insomnia disorder provided in this application embodiment;
[0034] Figure 2 This is a data collection diagram provided for an embodiment of this application;
[0035] Figure 3 This is a diagram of 64 sampling electrodes set up according to the 10-20 international standard lead system in this embodiment of the application;
[0036] Figure 4 This is a schematic diagram of the E-PCNN model structure provided in the embodiments of this application;
[0037] Figure 5This is a schematic diagram of IMF decomposition and frequency band screening provided in an embodiment of this application. Detailed Implementation
[0038] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.
[0039] This invention proposes a precise detection method for chronic insomnia that integrates EMD and multi-channel E-PCNN. This application provides the following solution:
[0040] according to Figures 1 to 5 As shown, this invention first proposes a method for detecting chronic insomnia disorder that integrates Empirical Mode Decomposition (EMD) and Enhanced Pulse Coupled Neural Network (E-PCNN). This method achieves efficient and intelligent detection of chronic insomnia disorder. Specifically, it includes the following steps:
[0041] The Pittsburgh Sleep Quality Index (PSQI), Self-Rating Anxiety Scale (SAS), and Self-Rating Depression Scale (SDS) were used to measure sleep quality and the severity of depression and anxiety symptoms.
[0042] Participants were divided into a normal group and an insomnia group. The normal group required a PSQI score ≤5, an SAS score ≤50, and an SDS score ≤52 to ensure no significant anxiety or depressive symptoms; in addition, they had no history of insomnia or other mental illnesses (including anxiety disorders, depression, etc.), and had not sought medical attention or taken sleep aids for sleep problems in the past 3 months. The insomnia group required a PSQI score ≥7, an SAS score ≤50, and an SDS score ≤52, and required no other mental health issues besides sleep problems.
[0043] As shown in Figure 2, patients with chronic insomnia will participate in the experiment in a quiet and comfortable environment. Participants will sit approximately 0.6 meters away from a 27-inch screen. Patients will be instructed to close their eyes, minimize physical activity, and slow their breathing rate for resting-state EEG signal acquisition. During the experiment, to ensure subjects remain awake during EEG recording, the experimenter will gently prompt them to stay focused every 2 minutes to avoid drowsiness due to prolonged resting time. The experiment duration will be limited to 8 minutes to minimize the possibility of subjects entering a light sleep state (N1 stage).
[0044] As shown in Figure 3, a 10-20 international standard lead system was further adopted, with 64-channel electrodes to acquire resting-state EEG data. The sampling frequency was 1000Hz, and the resting-state closed-eye EEG data was recorded using the Neuroscan EEG system.
[0045] The EEG data was preprocessed using EEGLAB, with the following steps: discarding useless electrodes, performing bandpass filtering with a 0.5-30Hz Butterworth filter (4th order) to retain frequency bands related to rhythmic characteristics, and downsampling to 250Hz; segmenting the data into 2-second time windows and performing baseline correction (-200ms to 0ms); discarding bad segments, performing ICA denoising, and removing EOG, ECG, and channel noise artifacts.
[0046] The preprocessed EEG data is input into the feature extraction process. First, Empirical Mode Decomposition (EMD) is used to decompose the EEG signal, obtaining a series of Intrinsic Mode Functions (IMFs). These IMFs represent the local time-frequency characteristics of the signal at different frequency components, possessing good adaptability to nonlinear and non-stationary signals, and can reveal EEG activity patterns at different time scales. Subsequently, using the Multi-Scale Feature Fusion (MSFF) method, the temporal features of each IMF are calculated in both short-term (500ms) and long-term (4000ms) windows. An IMF is a single modal component obtained from EMD decomposition. Based on frequency domain criteria, effective IMF components that meet the α (8–13Hz) and θ (4–8Hz) frequency bands are selected, i.e., IMFs that meet the requirements of specific frequency ranges are selected as the feature basis for subsequent modeling. Next, these filtered multi-timescale IMF features are input into the Enhanced Pulse-Coupled Neural Network (E-PCNN) structure as the dynamic feature representation layer of the model.
[0047] In the process of IMF extraction, in order to ensure the stability of different individual data, the present invention adopts the following selection criteria: only the IMF components corresponding to alpha waves (8-13Hz) and theta waves (4-8Hz) are retained.
[0048] Step 1: Calculate the envelope curve, identify local maxima and local minima in the EEG signal, and use cubic spline interpolation to fit the upper and lower envelope curves.
[0049] Step 2: Calculate the instantaneous mean, calculate the mean of the upper and lower envelope curves, and obtain the instantaneous mean curve.
[0050] Step 3: Iteratively extract several IMFs, each representing a time series of different frequency components in the signal. Calculate the difference between the original EEG signal and the instantaneous mean to obtain the first-level IMF (IMF1), which is the highest frequency component extracted from the original signal. Continue repeating the same process on the residual signal until the residual signal becomes a monotonic sequence.
[0051] Step 4: Select relevant IMFs and calculate the instantaneous frequency of each IMF. Use the Hilbert Transform to obtain its instantaneous spectrum. Then, based on the instantaneous frequency of the IMFs, filter out IMFs belonging to the alpha wave (8–13 Hz) and theta wave (4–8 Hz) bands as input for feature extraction. Calculate the power of the IMFs corresponding to the alpha and theta waves using the following formula:
[0052]
[0053]
[0054] The α / θ power ratio is calculated as a scalar quantity and serves as an important indicator for measuring the brain rhythm characteristics of insomnia patients. The calculation formula is as follows:
[0055]
[0056] in, and These represent the total power of the IMF components corresponding to the alpha and theta wave frequency bands, respectively, i.e., the cumulative sum of the power of each IMF component within a specific time period. Since the EEG signal is a time series, therefore... and It reflects the integral value of power within a certain time window, rather than the instantaneous power at a single point. In statistical analysis, its mean is usually calculated, that is, the average power over a specific time period, to measure the overall energy level of that frequency band.
[0057] After identifying IMFs that conform to the α (8–13Hz) and θ (4–8Hz) frequency bands, the MSFF method is used to calculate the features of the IMFs within short-time (500ms) and long-time (4000ms) windows. The specific formulas are as follows:
[0058]
[0059] in, The weight for short-term features is usually set to 0.6 to enhance the impact of short-term EEG dynamic changes. The weight for long-term features is usually set to 0.4, which is used to capture EEG change trends over a longer time window. This is the time index within the short time window, ranging from t−250 to t, which is 500ms. This is the time index within the long time window, ranging from t−2000t to t, which is 4000ms. , At time step or The intrinsic mode functions obtained from EMD represent the energy values of the decomposed components of EEG at different time scales. The weight selection of short-time windows (500ms) and long-time windows (4000ms) is based on EEG time series signal analysis research.
[0060] After calculating the short-term (500ms) and long-term (4000ms) signal energies using MSFF, these extracted multi-scale α / θ rhythmic features are uniformly encoded into two-dimensional feature tensors and input into the E-PCNN backbone network for classification. In the E-PCNN structure, the model further introduces two types of weighting mechanisms to optimize the dynamic modeling capability of EEG features: (1) Spatial channel weighting coefficients, denoted as (2) Frequency band attention weight, denoted as The importance of frequency bands such as α and θ is dynamically allocated by the Dynamic Channel Weighting (DIC) module through an attention mechanism, thereby improving the response capability to different frequency components. Unlike traditional static weighting methods, the DIC module... It adapts to the input data during training, reflecting the differences in EEG spectral characteristics between individuals. This mechanism enhances the accuracy of feature representation in the frequency dimension, while... This optimizes the model's structural perception capability from a spatial perspective. The two work synergistically to improve the accuracy and robustness of chronic insomnia disorder detection.
[0061] Spatial channel weighting coefficient The calculation formula is as follows:
[0062]
[0063] in, Used to measure the The power difference characteristics of each EEG channel in the α / θ band contribute to the overall performance. The total time step represents the length of the time series during the EEG signal sampling process. The current time step, ranging from 1 to... , which represents the index at different time points during the entire EEG sampling process. The EEG channel number represents a different electrode channel. Indicates the first Channel in alpha band (8–13 Hz) IMF components at time step The value of . Indicates the first Channel IMF components in the θ band (4–8 Hz) at time step The value of the molecule. Indicates the first Total timing power difference between the channel in the α and θ frequency bands. (Denominator) The total α / θ power difference across all EEG channels is normalized. This ratio measures the power difference of the first EEG channel. The relative contribution of channels in distinguishing between the two types of rhythmic patterns serves as an important basis for spatial channel weighting.
[0064] For the IMFs obtained after MSFF processing and screening, the system further extracts their rhythmic features and performs statistical analysis to evaluate their feature distribution across different frequency bands. This statistical analysis primarily targets the α and θ frequency band rhythmic indices output by the MSFF module, combining dimensions such as spectral energy and rhythmic stability to provide interpretable EEG feature support for subsequent model training. Specifically, it includes the following steps:
[0065] Step 1: Intergroup difference analysis, using independent samples t-test, compares the differences between the insomnia group and the normal group in α / θ ratio, α power, and θ power to determine whether these characteristics can effectively distinguish insomnia patients. The calculation formula is as follows:
[0066]
[0067] in, , The mean α / θ ratio, α power, and θ power are respectively for the insomnia group and the normal group. , The variances of the two groups are respectively. , This represents the sample size.
[0068] A p-value < 0.05 was considered statistically significant between the insomnia and normal groups for EEG features. Furthermore, based on the dynamic channel weighting mechanism of E-PCNN, the feature weight distribution of each brain region (DLPFC, PPC, ACC) was calculated, and an independent samples t-test was used to compare the feature weights between the insomnia and normal groups. Additionally, AUC, F1-score, and feature importance were calculated to further validate the feature stability and discriminative power of EEG signals across different time scales.
[0069] Step 2: Classification performance evaluation. Operating characteristic (ROC) curves were plotted for the normal group and the insomnia group. The area under the curve (AUC) was calculated to evaluate the discriminative power of the α / θ ratio, α power, and θ power as biomarkers of chronic insomnia disorder. An AUC close to 1 indicates superior classification performance. The calculation formula is as follows:
[0070]
[0071] in: The sensitivity of the insomnia group is the proportion of samples that are correctly identified as positive out of all samples that are actually positive. The negative case rate (1-specificity) represents the normal group.
[0072] If the AUC of the α / θ ratio, α power, and θ power is greater than 0.80, it indicates that the feature can serve as a potential biomarker for insomnia and can be used as a feature input for the E-PCNN model.
[0073] The DIC module employs a band attention mechanism to calculate the band attention weights for each frequency component. This mechanism dynamically adjusts the influence of different frequency bands on the final feature representation. This differs from the aforementioned spatial channel weighting coefficient. The latter acts on the spatial dimension of brain region channels. Both complement each other, jointly enhancing the model's ability to perceive and regulate time-frequency multidimensional EEG features. The formula for calculating frequency band attention weights is as follows:
[0074]
[0075] in, The time step represents a sampling point in the EEG recording process. The EEG channel number indicates the location of different electrodes. The time steps are calculated by the attention mechanism. The dynamic weight at each point in time measures the importance of that point in the EEG signal.
[0076] The EEG signal feature input adopts a dual feature fusion strategy to calculate the α / θ power ratio. α power and θ power are important indicators for measuring the brain rhythm characteristics of insomnia patients. In order to further preserve the temporal information of the EEG signal, IMFs that conform to the α wave (8–13Hz) and θ wave (4–8Hz) frequency bands are selected as input features of E-PCNN.
[0077] Z-score normalization was used to process the data to improve data consistency, reduce the influence of feature scale, and eliminate differences in EEG signal amplitude across different brain regions. The calculation formula is as follows:
[0078]
[0079] in, The original EEG rhythm characteristics (such as α power, θ power, α / θ ratio). The mean of this feature is calculated independently for each channel. This represents the standard deviation of the feature.
[0080] To verify the effectiveness of the proposed model, the dataset was split using the 5-fold K-Fold Cross Validation method, with 80% allocated to the training set for model training and 20% to the test set for model evaluation. Subsequent steps, including a comprehensive evaluation of metrics such as accuracy, sensitivity, and specificity, constitute a systematic testing phase of the model's performance, aiming to verify its generalization ability and robustness in the accurate detection of chronic insomnia disorder. Specifically, the following steps are included:
[0081] Step 1: Divide the dataset into 5 equal parts (Fold1, Fold2, Fold3, Fold4, Fold5).
[0082] Step 2: Select 1 set as the test set each time, and use the remaining 4 sets as the training set.
[0083] Step 3: Repeat 5 times, with each subset used as a test set, and finally take the average value as the model performance evaluation metric.
[0084] Multiple EEG channels are input into a multi-channel convolutional CNN, corresponding to the prefrontal cortex (DLPFC), parietal cortex (PPC), and cingulate gyrus (ACC), respectively, and adaptive channel expansion is supported. Specific electrode points are as follows: DLPFC: F3, F4, F5, F6; PPC: P3, P4, P5, P6; ACC: FCz, Cz, Fz, AFz. Furthermore, to enhance the model's generalization ability, this invention allows dynamic adjustment of the number of EEG signal input channels to adapt to different experimental environments. A 3×3 convolutional kernel (KernelSize=3×3) with a stride of 1 is used to extract local temporal features of the EEG signal, improving feature representation capabilities.
[0085] The ReLU activation function is used to enhance the model's ability to learn nonlinear features and improve the interaction between EEG signals from different brain regions.
[0086] In EEG time-series modeling, E-PCNN employs an adaptive time-stepping mechanism combined with multi-scale feature fusion. It simultaneously learns short-term dynamics within a local time window and long-term trends within a longer time window. Through multi-scale fusion, the model's ability to model the temporal dependencies of EEG signals is improved, enabling it to accurately capture abnormal brain rhythms in insomnia patients.
[0087] In addition, E-PCNN employs a dynamic inter-channel coupling mechanism, which assigns different weights to different EEG channels through learnable parameters. This allows the EEG signals of the three key brain regions, DLPFC, PPC, and ACC, to be adaptively optimized according to individual characteristics, thereby improving signal discrimination and enhancing the ability to learn rhythm features.
[0088] The E-PCNN neuron update formula is as follows:
[0089]
[0090] in, This indicates the adaptive time step, calculated based on the short-term dynamic characteristics of the EEG signal, ensuring that the model can adapt to the EEG rhythm changes of different individuals. Indicates the channel number. Feedforward input represents the raw input signal received by the neuron, which is influenced by the input signal from the previous time step. and external weights Influence. Coupled linking simulates the connections between neurons, determining the influence of neighboring neurons on the current neuron. Its changes are influenced by the previous time step. and connection matrix A joint decision. The cross-channel connection weight matrix is obtained by training a CNN and has learnable parameters that determine the interaction between different EEG channels. Dynamic activity represents the adaptive state of a neuron, determining whether the neuron is inhibited or activated. Its changes are influenced by dynamic modulation parameters. Influence. This refers to the dynamic inhibition parameters of neurons, which are used to adjust the influence of the inhibition term to ensure that E-PCNN can adapt to the EEG changes of different individuals. Modulation product, combined with feedforward input and coupled input Calculate the final input value of the neuron. This is the final output.
[0091] E-PCNN uses sigmoid normalization, allowing neuron activation values to smoothly vary between 0 and 1, effectively reducing binarization errors in EEG signals and improving the model's adaptability to complex EEG signals. Simultaneously, E-PCNN's dynamic channel weighting mechanism can adaptively reduce the weights of unstable channels when EEG signals are noisy, thereby enhancing the model's robustness.
[0092]
[0093] in, The output value of the Sigmoid function is in the range (0,1). The input values for neurons are usually feature values calculated by the neural network. The base of the natural logarithm is approximately 2.718.
[0094] In the E-PCNN structure, x is activated by the Sigmoid function. Normalization allows the output of neurons to change smoothly between 0 and 1, avoiding the binarization problem in the original PCNN structure and improving the learning stability of the model.
[0095] RFTD-BN normalizes the input EEG signal, reducing individual data variability and improving the model's generalization ability. Normalization is performed on the feedforward input and linking input at different time steps, calculated using the following formulas:
[0096]
[0097]
[0098] in, and These represent the feedforward input and the coupled input at the t-th time step, respectively. , , , Parameters are learned independently; , , , The mean and variance are given at different time steps.
[0099] The fully connected layer is used to extract deep features from the EEG signal and classify insomnia disorder. The convolutional output is then fed into the fully connected layer after global average pooling, and finally, a softmax function is used to perform binary classification, calculating the probabilities of the insomnia group and the normal group. The calculation formula is as follows:
[0100]
[0101] in, These are the activation values of neurons in the fully connected layer. This represents the number of classification categories. These are the activation values of neurons in the fully connected layer. Where is the number of categories, and e is the natural constant (approximately 2.718). Softmax outputs a normalized probability distribution, i.e.: The probability that the input data belongs to the "insomnia group". The probability that the input data belongs to the "normal group".
[0102] To optimize the classification performance of the E-PCNN model, the training parameters are set as follows: Optimizer: Adam (adaptive learning rate optimizer); Learning rate: 0.001; Number of training epochs: 100; Batch size: 32; Loss function: Cross-Entropy Loss, calculated as follows:
[0103]
[0104] in, For the real category, Predict probabilities for the model.
[0105] This embodiment employs K-Fold Cross Validation (K=10) to partition the EEG dataset, reducing the risk of overfitting and improving the model's generalization ability. Key performance indicators are calculated, including classification accuracy, sensitivity, specificity, and AUC (area under the receiver operating characteristic curve). The specific steps are as follows:
[0106] Step 1: Randomly divide the EEG dataset into 10 subsets.
[0107] Step 2: Select one subset as the test set each time, and use the remaining nine subsets for training.
[0108] Step 3: Repeat 10 times, using each subset as a test set, and finally calculate the average performance of all folds.
[0109] Step 4: Record the training accuracy, test accuracy, training loss, and test loss for each fold.
[0110] The calculation formula is as follows:
[0111]
[0112]
[0113]
[0114] Among them, TP (True Positive) represents patients with correctly detected chronic insomnia disorder, TN (True Negative) represents normal individuals who are correctly classified, FP (False Positive) represents normal individuals who are misdiagnosed as having chronic insomnia disorder, and FN (False Negative) represents patients with chronic insomnia disorder who are misdiagnosed as normal.
[0115] During training, the loss curve and accuracy curve are recorded, and the convergence trend of E-PCNN during training at different epochs is observed to ensure that the model can stably learn the rhythmic features of EEG signals.
[0116] When performing AUC assessment, a receiver operating characteristic (ROC) curve is plotted, and the area under the curve (AUC) is calculated. The formula for calculating the AUC value is as follows:
[0117]
[0118] in, The sensitivity of the insomnia group. The negative case rate (1 - specificity) represents the normal group. The AUC value ranges from 0 to 1, where AUC > 0.90 indicates that the model has strong discriminative ability.
[0119] After E-PCNN is trained, its classification performance is analyzed in detail, including accuracy, sensitivity, specificity, AUC, etc. on the test set.
[0120] To further verify the superiority of E-PCNN, this invention selects the vector machine (SVM) benchmark method and compares and analyzes the classification performance of the two.
[0121] To verify the E-PCNN model's ability to resist EEG data noise, this invention designed a noise robustness test to simulate EEG signal fluctuations in a real environment and evaluate the model's stability.
[0122] To simulate data fluctuations in real-world conditions, different levels of Gaussian white noise are added to the EEG signal, as shown in the following formula:
[0123]
[0124] in, This is the EEG signal after noise has been added; The original EEG signal; The mean is variance is Gaussian noise;
[0125] set up =0, test respectively Three noise levels, 0.05, 0.1, and 0.2, were used to simulate different levels of data contamination.
[0126] To evaluate the impact of noise on E-PCNN, this experiment trained and tested the model under different noise levels and compared their classification performance. The experimental steps are as follows:
[0127] Step 1: Benchmarking. Train E-PCNN on a noise-free dataset and obtain standard classification accuracy, sensitivity, specificity, and AUC as a control group.
[0128] Step 2: Add noise. Add Gaussian noise of varying intensities to the EEG data. =0.05, 0.1, 0.2).
[0129] Step 3: Retrain and test. Train E-PCNN using noisy data and calculate classification accuracy, sensitivity, specificity, and AUC.
[0130] Step 4: Results Analysis. Record the classification performance indicators under different noise levels and compare them with noise-free benchmark tests;
[0131] Observe the loss curve and accuracy curve of the model under noise interference, and analyze its stability.
[0132] In this embodiment, this application provides a precise detection method for chronic insomnia based on resting-state EEG signals, and proposes an EEG signal analysis model that combines empirical mode decomposition (EMD) and multi-channel deep pulse-coupled neural network (E-PCNN).
[0133] This invention can effectively extract the brain rhythm characteristics of insomnia patients and achieve high-precision automated insomnia detection in classification tasks.
[0134] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0135] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A precise detection method for chronic insomnia integrating EMD and multi-channel E-PCNN, based on EEG signal processing, empirical mode decomposition, multi-scale feature fusion, and enhanced pulse-coupled neural network modeling, constructs a detection model with rhythm sensitivity and individual adaptability, characterized by: as follows: S1: Screening patients with chronic insomnia disorder based on PSQI, SAS, and SDS scales, and collecting EEG data in the resting state with eyes closed; S2: The acquired EEG signal is preprocessed using EEGLAB, and each EEG channel is decomposed using the EMD method to obtain several intrinsic mode functions (IMFs) in order to preserve the nonlinear and non-stationary characteristics of the signal at different time scales. S3: The MSFF module calculates the temporal features of IMFs in a short time window of 500ms and a long time window of 4000ms respectively, and selects the effective IMFs in the α band 8–13Hz and the θ band 4–8Hz. These selected multi-time scale IMF features are input into the E-PCNN structure as the dynamic feature representation layer of the model. S4: Based on the selected α and θ band IMF components, construct the rhythmic feature sequence for each channel, calculate the power difference between the α and θ band components at each time step, and combine the statistical distribution of the difference across the entire time series and all channels to extract the rhythmic features of the α / θ band. The rhythmic features serve as the rhythm enhancement representation before input to the E-PCNN model. S5: Calculate the spatial channel weighting coefficient This is used to measure the contribution of different channels in rhythm differentiation, and normalizes the importance of each channel. S6: Input the selected multi-scale IMFs features into the enhanced pulse-coupled neural network E-PCNN to construct a dynamic feature representation layer; S7: Introducing the Dynamic Channel Weighting (DIC) mechanism, which dynamically calculates the attention weights for each frequency band within E-PCNN based on the attention mechanism. To adjust the response intensity of the α / θ band characteristics under different channels; S8: Finally, binary classification is performed using Softmax to calculate the probabilities of the insomnia group and the normal group, and the classification results are output.
2. The method for accurate detection of chronic insomnia by fusing EMD and multi-channel E-PCNN as described in claim 1, characterized in that: Participants were divided into a normal group and an insomnia group. The normal group needed to meet the following criteria: PSQI score ≤5, SAS score ≤50, and SDS score ≤52 to ensure that there were no significant anxiety or depression symptoms. The insomnia group was required to meet the following criteria: PSQI score ≥7, SAS score ≤50, and SDS score ≤52, and to have no other mental health problems other than sleep problems. The experimental data collection process involved the patient being in a closed-eye, resting state. A 10-20 lead system was used to place 64-channel electrodes, with a sampling frequency of 1000Hz and a recording duration of 8 minutes. During this period, a soft prompt was given every 2 minutes to keep the patient awake.
3. The method for accurate detection of chronic insomnia by fusing EMD and multi-channel E-PCNN as described in claim 1, characterized in that: The power of the α-wave and θ-wave corresponding to the IMFs is calculated using the following formula: The α / θ power ratio is calculated in the statistical distribution and expressed as a scalar. The calculation formula is as follows: in, and These represent the total power of the IMF components corresponding to the α-wave and θ-wave frequency bands, respectively, which is the cumulative sum of the power of each IMF component within a specific time period.
4. The method for accurate detection of chronic insomnia by fusing EMD and multi-channel E-PCNN as described in claim 1, characterized in that: Spatial channel weighting coefficient Spatial channel weighting coefficients are used to adjust the contribution of different brain region channels in the neuronal activation process. The calculation formula is as follows: in, Used to measure the The power difference characteristics of each EEG channel in the α / θ band contribute to the overall performance. The total time step represents the length of the time series during the EEG signal sampling process. The current time step, ranging from 1 to... This represents the index at different time points during the entire EEG sampling process, the EEG channel number, and indicates different electrode channels. Indicates the first Channel in alpha band (8–13 Hz) IMF components at time step The value, Indicates the first Channel IMF components in the θ band (4–8 Hz) at time step The value of the numerator Indicates the first The total timing power difference between the channel in the α and θ bands, denominator The total difference in α / θ power across all EEG channels is normalized. (2) Frequency band attention weight To dynamically adjust the influence of different frequency bands on the final feature representation, the dynamic channel weighting module calculates the importance of frequency bands such as α and θ through an attention mechanism. The formula for calculating the frequency band attention weight is as follows: in, A time step represents a specific sampling point in the EEG recording process. The EEG channel is numbered to indicate different electrode locations. The time steps are calculated by the attention mechanism. The dynamic weight at each point in time measures the importance of that point in the EEG signal.
5. The method for accurate detection of chronic insomnia by fusing EMD and multi-channel E-PCNN as described in claim 1, characterized in that: The classification process in S8 is as follows: The convolutional output is then fed into a fully connected layer after global average pooling, and finally, binary classification is performed using Softmax to calculate the probabilities of the insomnia group and the normal group. The calculation formula is as follows: Softmax outputs a normalized probability distribution. These are the activation values of neurons in the fully connected layer. Let be the number of categories, where These are the activation values of neurons in the fully connected layer. Let be the number of categories, and e be the natural constant.