Method for removing electrooculogram artifact from electroencephalogram signal based on conditional diffusion model
Patent Information
- Application Number
- CN202410222137.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-28
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2044-02-28
AI Technical Summary
基于GAN的方法尝试通过生成对抗的方式缓解过度平滑问题,然而,复杂的训练过程和纳什均衡导致的难以收敛问题阻碍了其在脑电降噪领域的应用
[0046]1、本发明中的模型采用参数化马尔可夫链逐步从高斯噪声中还原出干净脑电图信号。与传统的自回归模型不同,本发明是非自回归的,采用具有固定步数的参数化马尔可夫链将白噪声信号转换为降噪后的脑电信号,从而有效的缓解了传统自回归方法存在的过度平滑问题。
Smart Images

Figure CN118069993B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of EEG signal denoising, specifically a method for removing electrooculogram artifacts from EEG signals based on a conditional diffusion model. Background Technology
[0002] Electroencephalogram (EEG) signals can reflect brain activity and objectively and reliably monitor human brain states. EEG has advantages such as high temporal resolution, safety, non-invasiveness, and low cost, and has wide applications in cognitive science, brain-computer interfaces, sleep monitoring, affective computing, and disease diagnosis. However, EEG signals are very weak and highly susceptible to interference from various noise sources, including electrooculogram (EOG), electromyogram (EMG), electrocardiogram (ECG), power line interference, and motion artifacts. This noise interference severely affects subsequent EEG analysis and limits the practical application of EEG. Therefore, EEG noise reduction is a crucial issue that has received significant attention in both research and application.
[0003] Traditional EEG noise reduction methods primarily rely on blind source separation (BSS) algorithms such as independent component analysis and canonical correlation analysis. However, BSS algorithms require manual inspection and removal of isolated artifacts, or setting appropriate thresholds for specific artifacts. These operations are not only time-consuming and labor-intensive but also impractical for real-world applications. In contrast, deep learning-based noise reduction methods can automatically learn EEG features from the original signal without relying on prior knowledge, thus gaining favor among researchers. In recent years, deep neural networks such as convolutional neural networks and long short-term memory networks have been widely applied in EEG noise reduction, demonstrating better performance than traditional methods.
[0004] However, existing deep learning methods suffer from oversmoothing, which often leads to the loss of high-frequency information in the predicted signal. This makes achieving high-precision eye-tracking artifact removal challenging. GAN-based methods attempt to alleviate the oversmoothing problem through generative adversarial mechanisms; however, the complex training process and the convergence difficulty caused by Nash equilibrium hinder their application in EEG noise reduction. Summary of the Invention
[0005] The present invention addresses the shortcomings of the existing technology by proposing a method for removing electrooculogram (EOG) artifacts from EEG signals based on a conditional diffusion model. This method aims to better preserve high-frequency information in EEG signals, significantly improve the performance of removing EOG artifacts from EEG signals, achieve high-quality EEG signal noise reduction, and thus enhance the application value of EEG signals in fields such as medicine.
[0006] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0007] The method for removing electrooculogram artifacts from electroencephalogram signals based on a conditional diffusion model, as described in this invention, is characterized by the following steps:
[0008] Step 1: Obtain clean EEG and EEG datasets separately and perform preprocessing;
[0009] Step 1.1: After denoising and normalizing each original EEG signal sample in the EEG signal dataset, the sliding window method is used to divide it into N EEG signal segments of duration t, thus obtaining the segmented EEG signal sample set Z = {Z1, Z2, ..., Z...} n ,…,Z N}, Z n This represents the nth EEG signal sample;
[0010] Step 1.2: After denoising and normalizing each single-channel electrooculogram (EOG) signal sample in the EOG signal dataset, the sliding window method is used to divide it into N segments of EOG signal duration t, thus obtaining the segmented EOG signal sample set O = {O1, O2, ..., O...} n ,…,O N}, O n This represents the nth electrooculogram (EOG) signal sample;
[0011] Step 1.3: After mixing Z and O, a training sample set of EEG data containing electrooculography (EOG) noise is obtained.
[0012] X = {X1, X2, ..., X} n ,…,X N}, X n This represents the nth EEG signal sample containing ocular noise;
[0013] Step 2: Construct an EEG signal denoising network based on a conditional diffusion model, which includes a diffusion network and a deep denoising network;
[0014] Step 2.1, the diffusion network for Z n Add T variances {β1,β2,…,β} respectively t ,…,β T Gaussian noise was added to obtain the nth EEG signal sample set. This results in a set of N EEG signal samples Z′={Z1′,Z2′,…,Z1′,…} after adding Gaussian noise. n ′,…,Z′ N}, and select from Z′ to add the T-th variance β T The sample values after Gaussian noise constitute the T-th EEG signal training set after Gaussian noise. in, Indicates Z nAdd the t-th variance β t The sample values after Gaussian noise, Indicates Z n Add the Tth variance β T The sample values after Gaussian noise, where T represents the number of variances;
[0015] Step 2.2: The deep noise reduction network uses X as a control condition, from Z′ T The added Gaussian noise is removed to obtain the noise-reduced EEG signal sequence F = {F1, F2, ..., F...} n ,...,F N}, where F n This represents the nth noise-reduced EEG signal sample.
[0016] Step 3, Model Training:
[0017] A loss function is constructed and the ADAM optimizer is used to minimize the loss function, thereby optimizing all parameters of the deep learning network until the loss function converges, and the optimal denoising model is obtained to eliminate electrooculography noise in X.
[0018] Step 4, Model Inference:
[0019] X n The reference signal used as the control condition is derived from the standard normal distribution. The Gaussian white noise W is obtained by sampling, where I represents the identity matrix, and X is... n The Gaussian noise in the Gaussian white noise W is removed by inputting W into the optimal noise reduction model, thus obtaining the reference signal X. n Corresponding clean EEG signals
[0020] The method for removing electrooculogram artifacts based on the conditional diffusion model described in this invention is also characterized in that the diffusion network in step 2.1 is obtained by applying equation (1) to Z. n Add the t-th variance β t Gaussian noise was added to obtain the sample values.
[0021]
[0022] In equation (1), Let represent the parameter that controls the addition of noise amplitude for the t-th control, and α s Let represent the s-th pre-computed hyperparameter, and α s =1-β s ,β s Let s represent the variance of the s-th variable. Indicates the actual addition to Z n The t-th Gaussian white noise in the array follows a standard normal distribution. I indicates that I is related to Z n Unit covariance matrices with the same dimensions.
[0023] The deep noise reduction network in step 2.2 is based on X n To control the condition, and eliminate it according to the following process The added T variances {β1,β2,…,β t ,…,β T Gaussian noise, thus obtaining F n :
[0024] Step 2.2.1: Initialize t = 1;
[0025] Step 2.2.2, using formula (2) After removing the Gaussian noise added for the t-th time, the sample value after the t-th removal is obtained.
[0026]
[0027] In equation (2), α represents the parameter indicating the magnitude of Gaussian noise added to the T-th control. T This represents the T-th pre-calculated hyperparameter. This indicates that deep noise reduction networks are effective against... The predicted t-th Gaussian white noise;
[0028] Step 2.2.3: After assigning T-(t+1) to T, return to step 2.2.2 until T = 0, thus obtaining the sample values after eliminating T-order Gaussian noise. And as F n .
[0029] The deep noise reduction network in step 2.2.2 includes: two local feature extraction units, two Transformer networks, a Film network, and an information integration module, and will... X n and parameters After inputting the deep noise reduction network, it is processed according to the following steps to obtain...
[0030] Step a: Each local feature extraction unit consists of M one-dimensional convolutional layers;
[0031] Will The input is the first local feature extraction unit, which processes the data through M one-dimensional convolutional layers to output a feature map D containing local information. Z,n ;
[0032] X n The second local feature extraction unit is input and processed through M one-dimensional convolutional layers to output a feature map D containing local information. X,n ;
[0033] Step b: Each Transformer network consists of N identical Transformer encoding modules stacked together: each Transformer encoding module contains a self-attention mechanism layer, a feedforward neural network layer, two residual connection layers, and two normalization layers;
[0034] Feature map D Z,n The input is fed into the first Transformer network and processed by N Transformer encoding modules to obtain the corresponding global feature sequence G. Z ={G Z,1 G Z,2 ,...,G Z,j ,...,G Z,N}, where G Z,j D represents Z,n Global features after processing by the j-th Transformer encoding module;
[0035] Step c: The Film network consists of N identical Film modules: each Film module contains a coding layer, two one-dimensional convolutions, and a channel splitting layer;
[0036] Global feature G Z,j and The input is processed by N Film modules in the Film network to obtain the corresponding fused output. Global feature sequence G after information Z,α ={G Z,α,1 G Z,α,2 ,...,G Z,α,j ,...,G Z,α,N}, where G Z,α,j G represents Z,j and Global features after processing by the j-th Film module;
[0037] Step d: When j=1, the feature map D is... X,n The input is fed into the second Transformer network and processed by the j-th Transformer encoding module to obtain the j-th global feature G. X,j ;
[0038] When s = 2, 3, ..., N, G X,j-1+G Z,α,j-1 After processing by the j-th Transformer encoding module in the second Transformer network, the j-th global feature G is obtained. X,j Thus, the final Nth global feature G is obtained. X,N ;
[0039] Step e: The information integration module consists of M one-dimensional convolutional layers; G X,N +G Z,N The information is input into the information integration module for processing and obtains...
[0040] Step 3 involves using equation (3) to construct the loss function L. condition :
[0041]
[0042] In equation (3), P is the number of sampling points for Gaussian noise. for The predicted value at the i-th sampling point, for The true value at the i-th sampling point.
[0043] The present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the electroencephalogram (EEG) signal removal method for removing electrooculogram artifacts, and the processor is configured to execute the program stored in the memory.
[0044] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the method for removing electroencephalogram (EEG) artifacts.
[0045] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0046] 1. The model in this invention uses a parameterized Markov chain to gradually recover a clean EEG signal from Gaussian noise. Unlike traditional autoregressive models, this invention is non-autoregressive, using a parameterized Markov chain with a fixed number of steps to convert white noise signals into denoised EEG signals, thereby effectively alleviating the oversmoothing problem of traditional autoregressive methods.
[0047] 2. This invention utilizes feature fusion technology to transform the original diffusion model into a conditional diffusion model, thereby enabling the estimation of clean EEG signals based on given contaminated EEG signals. The diffusion model, as a generative model, generates unconstrained signals. By applying feature fusion technology, the noisy EEG signals to be denoised are used as constraints, thus enabling the diffusion model to generate clean EEG signals corresponding to the noisy EEG signals.
[0048] 3. This invention can preserve the high-frequency information of the predicted signal while achieving a more stable and controlled training process. Therefore, this invention can generate more refined denoised EEG signals, thus achieving high-quality EEG signal denoising. Traditional generative networks contain multiple adversarial loss functions and face the challenge of Nash equilibrium. The diffusion model only needs to optimize a minimum mean square error, and its optimization process is smoother and its convergence process is more stable. Generating refined denoised EEG signals with a relatively smooth training process further improves the quality of the reconstructed EEG signal.
[0049] 4. Experiments conducted on two public datasets demonstrated the effectiveness and robustness of the invention, showing a significant improvement in EEG noise reduction performance compared to existing deep learning methods for removing eye artifacts from EEG signals. Attached Figure Description
[0050] Figure 1 This is a schematic diagram of the framework structure of the present invention;
[0051] Figure 2 This is a schematic diagram of the overall depth noise reduction model used in the noise reduction process of this invention;
[0052] Figure 3 This is a detailed schematic diagram of the depth noise reduction model used in the noise reduction process of this invention. Detailed Implementation
[0053] In this embodiment, a method for removing electrooculogram (EOG) artifacts from EEG signals based on a conditional diffusion model is presented. This method leverages the advantages of diffusion models in generating fine signals, thereby achieving high-quality EEG signal denoising. The basic principle of the diffusion model is to learn the information attenuation pattern caused by noise and then use the learned pattern to generate data. A schematic diagram of the model structure of this invention is shown below. Figure 1 As shown, the method is performed according to the following steps:
[0054] Step 1: Environmental noise and EEG signals have different frequency characteristics and can be easily eliminated using digital filters. A well-designed experiment can also effectively eliminate experimental errors. In contrast, physiological artifacts, such as those related to the eyes, muscles, and heart, are more difficult to filter out. Physiological artifacts are particularly difficult to filter, primarily including eye artifacts, muscle artifacts, and cardiac artifacts. To quantitatively validate the framework's performance, this invention conducts experiments targeting electrooculogram (EOG) artifacts in EEG. The method of this invention is tested on the EEGdenoiseNet dataset. The EEGdenoiseNet dataset consists of Electroencephalogram (EEG) and Electrooculogram (EOG) signals. Clean EEG and EOG datasets are acquired and preprocessed.
[0055] Step 1.1: After denoising and normalizing each original EEG signal sample in the EEG signal dataset, the sliding window method is used to divide it into N EEG signal segments of duration t, thus obtaining the segmented EEG signal sample set Z = {Z1, Z2, ..., Z...} n ,…,Z N}, Z n This represents the nth EEG signal sample;
[0056] Step 1.2: After denoising and normalizing each single-channel electrooculogram (EOG) signal sample in the EOG signal dataset, the sliding window method is used to divide it into N segments of EOG signal duration t, thus obtaining the segmented EOG signal sample set O = {O1, O2, ..., O...} n ,…,O N}, O n This represents the nth electrooculogram (EOG) signal sample;
[0057] Step 1.3: After mixing Z and O, a training sample set of EEG data containing electrooculography (EOG) noise is obtained.
[0058] X = {X1, X2, ..., X} n ,…,X N}, X n This represents the nth EEG signal sample containing ocular noise;
[0059] Using equation (1), simulated data contaminated by electrooculography artifacts is generated:
[0060] X n =Z n +λ·O n (1).
[0061] Step 2: Construct an EEG signal denoising network based on a conditional diffusion model, comprising a diffusion network and a deep denoising network. A schematic diagram of the deep denoising model structure used in this invention is shown below. Figure 2 and Figure 3 As shown; the deep denoising model is used to fit noise features and obtain the predicted noise signal. The proposed model is based on a two-branch Transformer architecture, which is designed to transform the raw EEG signal X to be denoised into a digital image. n This is introduced as a control condition during the training process. To achieve this, the present invention employs a Feature Linear Modulation (FiLM) module to control the noise level. Mapping to the feature scale and performing feature fusion of the two branches during training.
[0062] Step 2.1, Diffusion network on Z n Add T variances {β1,β2,…,β} respectively t ,…,β T Gaussian noise, through equation (2) on Z n Add the t-th variance β t Gaussian noise was added to obtain the sample values.
[0063]
[0064] In equation (2), Let represent the parameter that controls the addition of noise amplitude for the t-th control, and α s Let represent the s-th pre-computed hyperparameter, and α s =1-β s ,β s Let s represent the variance of the s-th variable. Indicates the actual addition to Z n The t-th Gaussian white noise in the array follows a standard normal distribution. I indicates that I is related to Z n They have unit covariance matrices of the same dimension. This ultimately yields the nth EEG signal sample set after adding Gaussian noise. This results in a set of N EEG signal samples Z′={Z′1,Z′2,…,Z′} after adding Gaussian noise. n ,…,Z′ N}, and select from Z′ to add the T-th variance β T The sample values after Gaussian noise constitute the T-th EEG signal training set after Gaussian noise. in, Indicates Z n Add the t-th variance β t The sample values after Gaussian noise, Indicates Z n Add the Tth variance β T The sample values after Gaussian noise, where T represents the number of variances; the process follows a posterior distribution as shown in equation (3);
[0065]
[0066] in, This is the posterior probability. Each step in the diffusion follows a Gaussian distribution as shown in equation (4):
[0067]
[0068] To simplify the process, this invention employs a reparameterization technique, thus eliminating the need for stepwise transitions from a Gaussian distribution. Mid-sampling, We can directly use equation (5) to obtain Z n The sampling yielded:
[0069]
[0070]
[0071] Through this diffusion process, the complex original data distribution p complex It is transformed into a simple prior distribution p with known parameters. prior When the number of diffusion iterations T is large enough, p prior It approximates a standard Gaussian distribution.
[0072] Step 2.2: The deep denoising network uses X as the control condition, from Z′ T The added Gaussian noise is removed to obtain the noise-reduced EEG signal sequence F = {F1, F2, ..., F...} n ,...,F N}, where F n This represents the nth noise-reduced EEG signal sample.
[0073] In this embodiment, the deep noise reduction network is based on X. n To control the condition, and eliminate it according to the following process The added T variances {β1,β2,…,β t ,…,β T Gaussian noise, thus obtaining F n :
[0074] Step 2.2.1: Initialize t = 1;
[0075] Step 2.2.2, using formula (6) After removing the Gaussian noise added for the t-th time, the sample value after the t-th removal is obtained.
[0076]
[0077] In equation (6), α represents the parameter indicating the magnitude of Gaussian noise added to the T-th control. T This represents the T-th pre-calculated hyperparameter. This indicates that deep noise reduction networks are effective against... The predicted t-th Gaussian white noise.
[0078] In this embodiment, the deep denoising network includes two local feature extraction units, two Transformer networks, a Film network, and an information integration module. In each branch, the input signal is first processed by the local feature extraction units to extract local features. Then, the extracted features are modeled with global information through three Transformer encoding modules. To make it suitable for single-channel EEG samples with limited data, the original multi-head self-attention mechanism layer in the Transformer encoder module is replaced with a self-attention mechanism layer. This method combines convolutional neural networks and Transformers, enabling simultaneous extraction of local features and global information from EEG signals, which is beneficial for achieving higher-performance signal reconstruction tasks. In the output part of the model, the information integration module maps the features to the same dimension as the labeled signal. The specific structure and parameters of each module are as follows: Figure 2 and Figure 3 As shown. X n and parameters After inputting the deep noise reduction network, process it according to the following steps to obtain...
[0079] Step a: Each local feature extraction unit consists of M one-dimensional convolutional layers;
[0080] Will The input is the first local feature extraction unit, which processes the data through M one-dimensional convolutional layers to output a feature map D containing local information. Z,n ;
[0081] X n The second local feature extraction unit is input and processed through M one-dimensional convolutional layers to output a feature map D containing local information. X,n .
[0082] Step b: Each Transformer network consists of N identical Transformer encoding modules stacked together: each Transformer encoding module contains a self-attention mechanism layer, a feedforward neural network layer, two residual connection layers, and two normalization layers;
[0083] Feature map D Z,n The input is fed into the first Transformer network and processed by N Transformer encoding modules to obtain the corresponding global feature sequence G. Z ={G Z,1 G Z,2 ,...,G Z,j ,...,G Z,N}, where G Z,j D represents Z,n The global features after being processed by the j-th Transformer encoding module.
[0084] Step c: The Film network consists of N identical Film modules: each Film module contains one coding layer, two one-dimensional convolutions, and one channel splitting layer;
[0085] Global feature G Z,j and The input is fed into the Film network and processed by N Film modules to obtain the fused output. Global feature sequence G after information Z,α ={G Z,α,1 G Z,α,2 ,...,G Z,α,j ,...,G Z,α,N}, where G Z,α,j G represents Z,j and The global features after processing by the j-th Film module.
[0086] Step d: When j=1, the feature map D is... X,n The input is fed into the second Transformer network and processed by the j-th Transformer encoding module to obtain the j-th global feature G. X,j ;
[0087] When s = 2, 3, ..., N, G X,j-1 +G Z,α,j-1 After processing by the j-th Transformer encoding module in the second Transformer network, the j-th global feature G is obtained. X,j Thus, the final Nth global feature G is obtained. X,N .
[0088] Step e: The information integration module consists of M one-dimensional convolutional layers; G X,N +G Z,N The input information is processed in the integration module and obtained.
[0089] Step 2.2.3: After assigning T-(t+1) to T, return to step 2.2.2 until T = 0, thus obtaining the sample values after eliminating T-order Gaussian noise. And as F n .
[0090] In the noise reduction process, the diffusion model can transform a simple prior distribution p prior Transform into a complex original data distribution p complex Because the distribution is directly... Convert to Distribution is relatively difficult, so use Approximating the distribution The distribution is shown in equation (7):
[0091]
[0092] Where, μ θ and Σ θ These are the parameters learned by the deep learning model. They are ultimately obtained through multiple consecutive iterations. This can be approximated by the original data distribution. The process can be represented by equation (8):
[0093]
[0094] in, p is the joint probability distribution of Z, which can be obtained from the conditional probability equation (9):
[0095]
[0096] The diffusion model estimates the model parameters through maximum likelihood estimation, i.e., minimizing... and The direct cross-entropy is shown in equation (10):
[0097]
[0098] By optimizing the variational lower bound L VLB Simplify and optimize loss As shown in equation (11):
[0099]
[0100] From the Bayesian formula, we can obtain formula (12):
[0101]
[0102] in, It follows a Gaussian distribution, and we assume that:
[0103]
[0104] in,
[0105] Further simplification of L VLB It can be represented as an entropy L0 and multiple KL divergences L. t-1 The sum is shown in equation (14):
[0106] L VLB =L T +L T-1 +…+L0 (14)
[0107]
[0108]
[0109]
[0110] Among them, L T In and They are all fixed, so L T It is a constant and can be ignored during the optimization process. t-1 This refers to two Gaussian distributions. and The distance between them.
[0111] Then L t It can be obtained through equation (15):
[0112]
[0113] Where C is a constant. Further simplification yields equation (16):
[0114]
[0115] The diffusion model estimates the conditional distribution using a noise reduction model. Thus, conditional distribution If modeling is performed, the denoising process of the conditional diffusion model can be expressed as equation (17):
[0116]
[0117] in,
[0118] The optimization process of the conditional diffusion model can be represented by equation (18):
[0119]
[0120] Step 3, Model Training:
[0121] Construct the loss function, using equation (19) to construct the loss function L. condition :
[0122]
[0123] In equation (19), P is the number of sampling points for Gaussian noise. for The predicted value at the i-th sampling point, for The true value at the i-th sampling point. The ADAM optimizer is used to minimize the loss function, thereby optimizing all parameters of the deep learning network until the loss function converges, obtaining the optimal denoising model for eliminating electrooculography noise in X. This invention sets the diffusion step size to 1000, with β ranging from [0.0001, 0.02]. For the Transformer model, the dimensions of Q, K, and V are set to 64. During training, the batch size is set to 512, and the model is trained 4000 times. The loss function is L1 loss. Furthermore, the learning rate is initialized to 0.001 and reduced by a factor of 10 every 1500 iterations. All coding is performed using Python 3.9 and PyTorch 1.12.0. Experiments are conducted using an Nvidia GeForce RTX3080 GPU.
[0124] Step 4, Model Inference:
[0125] X n The reference signal used as the control condition is derived from the standard normal distribution. The Gaussian white noise W is obtained by sampling, where I represents the identity matrix, and X is... n The Gaussian noise in the Gaussian white noise W is removed by inputting W into the optimal noise reduction model, thus obtaining the reference signal X. n Corresponding clean EEG signals
[0126] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.
[0127] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.
[0128] Select the relative root mean square error in the time domain (RRMSE) temporal ), spectral domain relative root mean square error (RRMSE) spectral The performance of the model was measured using five evaluation metrics: signal-to-noise ratio (SNR), correlation coefficient (CC), and p-value. Experimental results on the EEGDenoiseNet dataset at different input SNR levels are shown in Table 1. Table 1 presents the performance of different methods, including the proposed method and five baseline methods. As can be seen from these tables, the proposed method outperforms the baseline methods in every evaluation metric and achieves a significant improvement compared to the baselines, demonstrating the superiority of the proposed model. Experimental results show that the proposed method is an efficient denoising model. It significantly reduces noise while largely preserving the active components of the original signal. These findings highlight the practical application potential of the proposed method in signal denoising, where accurately preserving important signal features is crucial for downstream analysis and interpretation.
[0129] Table 1. Experimental results at different input signal-to-noise ratio levels on the EEGDenoiseNet dataset.
[0130]
[0131] • The p-values for all CC values in the table are less than 0.05.
[0132] In summary, this invention proposes a method for removing electrooculogram (EOG) artifacts from EEG signals based on a conditional diffusion model. Compared with existing traditional autoregressive methods, this method better preserves the high-frequency information of the predicted signal. Experimental results show that the proposed method can achieve fine-grained EOG artifact removal and outperforms state-of-the-art methods on public datasets. Specifically, on the EEGdenoiseNet dataset, the RRMSE obtained by this invention is [missing information]. temporal The signal-to-noise ratio (SNR) was 0.182, the RRMSE spectral was 0.188, and the CC was 0.983. On the sed dataset, the SNR obtained by this invention was 25.3, and the RRMSE was... temporal The RRMSE is 0.130. spectralThe coefficient of performance (COP) was 0.137, and the critical value (CC) was 0.991. These results validate the effectiveness and superiority of the proposed method for removing EEG artifacts. The diffusion model proves to be an effective tool for removing EEG artifacts. The proposed method provides an efficient solution for removing EEG artifacts, which is beneficial for subsequent EEG analysis and interpretation. Future work may explore the application of this method in other types of artifact removal tasks in various signal processing applications.
Claims
1. A method for removing electrooculogram artifacts from electroencephalogram (EEG) signals based on a conditional diffusion model, characterized in that, The procedure is as follows: Step 1: Obtain clean EEG and EEG datasets separately and perform preprocessing; Step 1.1: After denoising and normalizing each raw EEG signal sample in the EEG signal dataset, the sliding window method is used to divide it into... The duration is The brainwave signal segments are used to obtain a segmented brainwave signal sample set. , Indicates the first One EEG signal sample; Step 1.2: After denoising and normalizing each single-channel electrooculogram (EOG) signal sample in the EOG signal dataset, the sliding window method is then used to divide it into... The duration is The electrooculogram (EOG) signal segments are used to obtain a segmented EOG signal sample set. , Indicates the first One electrooculogram signal sample; Step 1.3, and After mixing, a training sample set of EEG data containing electrooculography (EOG) noise is obtained. , Indicates the first A sample of EEG signals containing oculomotor noise; Step 2: Construct an EEG signal denoising network based on a conditional diffusion model, which includes a diffusion network and a deep denoising network; Step 2.1, the diffusion network pair Add T variances respectively Gaussian noise is added to obtain the first Gaussian noise. A set of EEG signal samples This yields a set of N EEG signal samples after Gaussian noise has been added. and from Selecting to add the Tth variance The sample values after Gaussian noise constitute the T-th EEG signal training set after Gaussian noise. ,in, Indicates to Add the The variance is The sample values after Gaussian noise, Indicates to Add the Tth variance The sample values after Gaussian noise, where T represents the number of variances; Step 2.2, the deep noise reduction network will As a control condition, from The added Gaussian noise is removed to obtain the noise-reduced EEG signal sequence. ,in, Indicates the first A noise-reduced EEG signal sample; The deep noise reduction network in step 2.2 is based on To control the condition, and eliminate it according to the following process Add T variances Gaussian noise, thus obtaining : Step 2.2.1: Initialize t=1; Step 2.2.2, using formula (2) After removing the Gaussian noise added for the t-th time, the sample value after the t-th removal is obtained. ; (2) In equation (2), Indicates the first A parameter that controls the addition of Gaussian noise amplitude. Indicates the first A pre-calculated hyperparameter, This indicates that deep noise reduction networks are effective against... The predicted first Gaussian white noise; The deep noise reduction network in step 2.2.2 includes: two local feature extraction units, two Transformer networks, a Film network, and an information integration module, and will... and parameters After inputting the deep noise reduction network, it is processed according to the following steps to obtain... ; Step a: Each local feature extraction unit consists of... It consists of one-dimensional convolutional layers; Will Input the first local feature extraction unit, and then sequentially pass through... After processing by one-dimensional convolutional layers, the output is a feature map containing local information. ; Will Input to the second local feature extraction unit, and then sequentially pass through... After processing by one-dimensional convolutional layers, the output is a feature map containing local information. ; Step b, each Transformer network consists of It consists of stacked identical Transformer coding modules: each Transformer coding module contains a self-attention mechanism layer, a feedforward neural network layer, two residual connection layers and two normalization layers; feature map The input is fed into the first Transformer network and then passes through... After processing by each Transformer encoding module, the corresponding global feature sequence is obtained. ,in, express After the first Global features after processing by a Transformer encoding module; Step c, the Film network is composed of It consists of three identical Film modules: each Film module contains a coding layer, two one-dimensional convolutions, and a channel splitting layer; global features and Input into the Film network, and respectively through After processing by each Film module, the corresponding fusion is obtained. Global feature sequence after information ,in, express and After the first Global features after processing by each Film module; Step d, when At that time, the feature map Input into the second Transformer network, and pass through the first... After processing by the Transformer encoding module, the th... Global features ; when At that time, Input the second Transformer network After processing by the Transformer encoding module, the th... Global features Thus, the final result is obtained. Global features ; Step e, the information integration module is composed of Composed of one-dimensional convolutional layers; The information is input into the information integration module for processing and obtains... ; Step 2.2.3: After assigning T-(t+1) to T, return to step 2.2.2, and repeat until T=0, thus obtaining the sample values after eliminating T-order Gaussian noise. , and as ; Step 3, Model Training: A loss function is constructed, and the ADAM optimizer is used to minimize the loss function, thereby optimizing all parameters of the deep learning network until the loss function converges, resulting in the optimal denoising model for noise reduction. Electrooculo noise in the eye; Step 4, Model Inference: Will The reference signal used as the control condition is derived from the standard normal distribution. Gaussian white noise was obtained by mid-sampling. ,in, Representing the identity matrix, and Input into the optimal noise reduction model to remove Gaussian white noise. Gaussian noise in the signal is used to obtain the reference signal. Corresponding clean EEG signals .
2. The method for removing electrooculogram artifacts from EEG signals based on a conditional diffusion model according to claim 1, characterized in that, The diffusion network in step 2.1 is obtained by equation (1). Add the variance Gaussian noise was added to obtain the sample values. ; (1) In equation (1), Indicates the first A parameter that controls the added noise amplitude, and , Indicates the first A pre-calculated hyperparameter, and , Indicates the first One variance, Indicates the actual amount added The first in Gaussian white noise, and follows a standard normal distribution. , Indicates and Unit covariance matrices with the same dimensions.
3. The method for removing electrooculogram artifacts from EEG signals based on the conditional diffusion model according to claim 2, characterized in that, Step 3 involves constructing the loss function using equation (3). : (3) In equation (3), The number of sampling points for Gaussian noise. for In the Predicted values for each sampling point for In the The true value at each sampling point.
4. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the electroencephalogram (EEG) signal removal method for removing electrooculogram artifacts according to any one of claims 1-3, and the processor is configured to execute the program stored in the memory.
5. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is run by the processor, it performs the steps of the electroencephalogram (EEG) signal removal method for removing electrooculogram artifacts as described in any of claims 1-3.