An electroencephalogram signal artifact removing method based on a multi-module neural network
By using a multi-module neural network structure and the Inception module, artifacts in EEG signals are effectively removed, improving the removal effect and model learning ability. This solves the problems of time-consuming, labor-intensive, and feature loss in existing methods, achieving more efficient artifact removal and feature preservation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU DIANZI UNIV
- Filing Date
- 2023-03-03
- Publication Date
- 2026-06-12
AI Technical Summary
Existing methods for removing artifacts from EEG signals cannot effectively remove artifacts automatically and are prone to losing the original EEG signal features, especially reference channel-based methods and decomposition-conversion methods, which are time-consuming and labor-intensive.
A multi-module neural network approach is adopted, which uses the Inception module and batch normalization layer to extract EEG signal features, removes artifacts through multiple parallel denoising modules, improves model learning performance by using residual connections, and uses an optimizer to update parameters to minimize the loss function.
It improves the accuracy and efficiency of EEG signal artifact removal, reduces the loss of the original signal, and improves the time-domain and frequency-domain errors and correlation coefficients, outperforming existing methods.
Smart Images

Figure CN116172576B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electroencephalogram (EEG) signal processing, and in particular to a method for removing artifacts from EEG signals based on a multi-module neural network. Background Technology
[0002] Electroencephalography (EEG) is widely used in the treatment of neurological diseases, research on the mechanisms of brain neurobiology, and brain-computer interfaces. However, EEG acquisition is often affected by other bioelectrical signals from the human body, such as electrooculography (OA) and electromyography (MA). Artifacts from these signals often become entangled with EEG signals, severely affecting the extraction of true EEG features and posing significant challenges to the research and application of brain neural activity. Because artifact signals exhibit high randomness and are quite similar to true EEG signals in both the time and frequency domains, developing methods to remove artifacts from EEG signals and retain useful information is of significant theoretical and practical importance.
[0003] Currently, the mainstream methods for removing signal artifacts mainly fall into two categories: one is regression analysis and filtering based on a reference channel, and the other is decomposition and transformation based on the signal. Regression analysis and filtering require setting a reference signal channel during EEG signal acquisition, thus limiting their applicability to specific artifact removal methods. Decomposition and transformation methods mainly include wavelet transform (WT), independent component analysis (ICA), and blind source separation (BSS), but the decomposed EEG components and artifact components require manual identification, making automatic removal impossible. This process is time-consuming and labor-intensive, and the original EEG signal in the segment is lost after removal.
[0004] In recent years, deep neural networks have made significant progress and have been widely applied in areas such as image denoising and audio denoising, achieving excellent results. Meanwhile, deep learning-based methods are also widely used in EEG signal processing. Therefore, removing EEG artifacts using neural networks has promising prospects. Summary of the Invention
[0005] In order to effectively remove physiological artifacts from signals acquired by EEG devices, this invention proposes a method for removing EEG signal artifacts based on a multi-module neural network.
[0006] To achieve this objective, the technical solution of the present invention includes the following steps:
[0007] Step 1: Data Acquisition
[0008] We obtained 4,514 clean EEG segments and 5,598 EMG artifact segments using the publicly available dataset EEGdenoiseNet.
[0009] Step 2: Data Processing
[0010] Step 2-1: Randomly select pure EEG segments from the dataset, and vertically merge the selected segments with all the original pure EEG segments to ensure that the data dimensions of the pure EEG segments and the artifact segments are the same, which facilitates the training of the subsequent model.
[0011] Step 2-2: Based on a fixed signal-to-noise ratio, the longitudinally merged pure EEG segments and artifact segments are semi-simulated to synthesize a contaminated EEG signal;
[0012] Steps 2-3: Enhance the data by linearly mixing the vertically merged clean EEG segments with the original artifact segments ten times, expanding the data volume by 10 times;
[0013] Steps 2-4: Create a training set. Use the semi-fitted and synthesized contaminated EEG signals as the model input data and the clean EEG segments as labels. Use 10x cross-validation to divide the training set and the test set.
[0014] Step 3: EEG signal artifact removal algorithm based on multi-module neural network:
[0015] Step 3-1: Randomly initialize the weight parameters W and bias parameters b of the multi-module neural network model, and set the number of training epochs;
[0016] Step 3-2: Input the training set into the multi-module neural network model. Let (Y, X) represent a pair of contaminated EEG signals and pure EEG signals in the training set. Y is the contaminated EEG signal synthesized by semi-simulation in step 2.
[0017] Input Y into a multi-module neural network In China, the network It consists of a weight parameter W and a bias parameter b, i.e. Multi-module neural network It contains four noise reduction modules. The Y input is fed into the first noise reduction module, F1, which outputs the calculated clean EEG. and forgeries Right now F1 represents the first noise reduction module. The artifacts output by the first noise reduction module F1 The result of subtracting Y from the given value is used as the input to the second denoising module F2, and a new, clean EEG is output. and forgeries Right now The artifacts output by the second noise reduction module F2 The result of the subtraction operation with Y is used as the input to the third denoising module F3, and a new clean EEG is output. and forgeries Right now Following the steps above, the clean EEG and artifacts output by the fourth denoising module are obtained. The final output of the entire multi-module neural network model is then obtained. The pure EEG outputs from the four noise reduction modules are combined, namely: Where i represents the i-th denoising module, i∈[1,4].
[0018] The aforementioned structurally identical denoising modules consist of four structurally identical separation modules. The outputs of the first and fourth separation modules are connected using a residual connection to improve the model's learning performance. Each separation module can separate clean EEG features y. i and artifact features n j , where j represents the j-th separation module, j∈[1,4]. For the first 3 separation modules, the clean EEG features of the adjacent previous separation module are used as the input of the next separation module, and the clean EEG output of the fourth separation module is the final clean EEG signal output by the denoising module. The artifact output of the denoising module is the sum of the artifact features output by the four separation modules, i.e.
[0019] The aforementioned separation module consists of two Inception modules and two 1D convolutional modules. The two 1D convolutional modules are a 1D convolutional clean module and a 1D convolutional noise module, used to learn the features of clean EEG signals and artifact signals in contaminated signals, respectively. The Inception module is further composed of four 1D convolutional layers (Conv1D layers), batch normalization layers (BN layers), and activation function layers (ReLU layers) with kernel sizes of 1x3, 1x5, 1x11, and 1x15, respectively. Figure 4 As shown, four one-dimensional convolutional layers are responsible for extracting input signal features in different dimensions. A batch normalization layer normalizes the data. An activation function layer addresses the vanishing gradient problem, preventing overfitting.
[0020] Step 3-3: Set the loss function. The core objective of step 3 is to minimize the loss function. in N represents the number of samples in the entire training set, X (i) This represents the pure EEG signal of the i-th sample. This indicates the pure EEG signal output by the network.
[0021] Step 3-4: Update the weight parameter W and bias parameter b using the optimizer, jump to step 3-2, and perform the next training iteration until all epochs are completed, at which point the training ends.
[0022] Step 4: Measure the algorithm using evaluation metrics.
[0023] This invention employs three objective evaluation metrics to measure the EEG artifact denoising performance of the invention, including the relative root mean square error (RRMSE) in the time domain. t The relative root mean square error (RRMSE) in the frequency domain f And the average correlation coefficient CC. Where PSD is the power spectral density function, and Cov and Var are the covariance function and variance function, respectively.
[0024] The present invention has the following advantages over the prior art:
[0025] 1. The Inception module is used, which contains convolutional layers with kernel sizes of varying scales, enabling the simultaneous extraction of features from different dimensions of EEG signals. Batch normalization is also employed, helping to avoid special parameter initialization, accelerating training, optimizing results, and providing faster convergence.
[0026] 2. Each separation module can extract pure EEG features and artifact features. This module can extract common and different features between pure EEG signals and artifact signals, increase the number of computational units for artifact signal extraction, and better distinguish between pure EEG signals and artifact signals. At the same time, the separation modules adopt residual connections, which helps to improve the computational performance of the entire model.
[0027] 3. A multi-module parallel structure is adopted, with multiple denoising modules continuously removing artifacts during forward propagation to purify noisy input EEG signals. Furthermore, the parallel structure allows the parameters of each denoising module to be updated simultaneously during backpropagation, thereby improving the learning ability of the neural network. Attached Figure Description
[0028] Figure 1 This is the overall network structure diagram used in this invention.
[0029] Figure 2 This is a structural diagram of the noise reduction module of the present invention.
[0030] Figure 3 This is a structural diagram of the separation module of the present invention.
[0031] Figure 4 This is a structural diagram of the Inception module of the present invention. Detailed Implementation
[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0033] like Figure 1-4 As shown, a method for removing artifacts from electroencephalogram (EEG) signals based on a multi-module neural network is described, with the following specific implementation steps:
[0034] Step 1: Data Acquisition
[0035] The data used is the publicly available EEGdenoiseNet dataset. This dataset contains 4514 clean EEG segments and 5598 EMG artifact segments. The EEG data in the dataset comes from a brain-computer interface dataset for motor imagery. The acquisition electrodes were placed according to the international 10-10 system, with a sampling rate of 512Hz. The EEG signals were bandpass filtered from 1 to 80Hz, and a 50Hz notch filter was used to remove power frequency interference. The acquisition time for each segment was 2 seconds.
[0036] Step 2: Data Processing
[0037] Step 2-1: To ensure that the data dimensions are the same between the clean EEG fragments and the artifact fragments, facilitating subsequent model training, this method randomly reused some data, increasing the number of clean EEG fragments to 5598.
[0038] Step 2-2: The longitudinally merged clean EEG segments and artifact segments are semi-analogously synthesized according to a fixed signal-to-noise ratio (SNR) to form a contaminated EEG signal. The contaminated EEG signal is obtained by mixing the clean EEG and artifact segments at a fixed SNR. The signal mixing formula is defined as follows:
[0039] Y = X + λ(N)
[0040] Where Y represents contaminated EEG, X represents pure EEG, and N represents artifacts. The signal-to-noise ratio (SNR) of the synthesized contaminated signal is controlled by changing the hyperparameter λ. The SNR values range from -7 dB to 2 dB in increments of 1, and λ is calculated using the following formula:
[0041]
[0042] Steps 2-3: Enhance the data by linearly mixing the vertically merged clean EEG segments with the original artifact segments ten times, expanding the data volume by 10 times;
[0043] Steps 2-4: Create a training set. Use the semi-fitted, contaminated EEG signals as the model input data and the clean EEG segments as labels. Use 10x cross-validation to divide the training and test sets.
[0044] Step 3: EEG signal artifact removal algorithm based on multi-module neural network
[0045] The specific steps for designing and training a multi-module neural network are as follows:
[0046] Step 3-1: Randomly initialize the weight parameters W and bias parameters b of the multi-module neural network model, and set the number of training epochs.
[0047] Step 3-2: Input the training set into the multi-module neural network model. Let (Y, X) represent a pair of contaminated and clean EEG signals in the training set. Y is the contaminated signal synthesized through semi-simulation in Step 2. Input Y into the multi-module neural network. In China, the network It consists of a weight parameter W and a bias parameter b, i.e. It contains four noise reduction modules, such as Figure 1 As shown, Y is input into the first denoising module, which then outputs the calculated clean EEG. and forgeries Right now F1 represents the first noise reduction module. The artifacts output by the first noise reduction module The result of subtracting Y from the given value is used as the input to the second denoising module F2, and a new, clean EEG is output. and forgeries Right now The artifacts output by the second noise reduction module F2 The result of the subtraction operation with Y is used as the input to the third denoising module F3, and a new clean EEG is output. and forgeries Right now Following the steps above, the clean EEG and artifacts output by the fourth denoising module are obtained. The final output of the entire multi-module neural network model is then obtained. The pure EEG outputs from the four noise reduction modules are combined, namely: Where i represents the i-th denoising module, i∈[1,4].
[0048] The aforementioned denoising modules with identical structures consist of four separate modules with identical structures, such as... Figure 2 As shown, the outputs of the first and fourth separation modules are residually connected to improve the model's learning performance. Each separation module can separate pure EEG features y. i and artifact features n j , where j represents the j-th separation module, j∈[1,4]. For the first 3 separation modules, the clean EEG features of the adjacent previous separation module are used as the input of the next separation module, and the clean EEG output of the fourth separation module is the final clean EEG signal output by the denoising module. The artifact output of the denoising module is the sum of the artifact features output by the four separation modules. That is...
[0049] The aforementioned separation module consists of two Inception modules and two 1D convolutional modules, such as... Figure 3As shown. The two 1D convolutional modules are the 1D convolutional clean module and the 1D convolutional noise module, used to learn the features of clean EEG signals and artifact signals in contaminated signals, respectively. The Inception module consists of four 1D convolutional layers (Conv1D layers), batch normalization layers (BN layers), and activation function layers (ReLU layers) with kernel sizes of 1x3, 1x5, 1x11, and 1x15, respectively. Figure 4 As shown, four one-dimensional convolutional layers are responsible for extracting input signal features in different dimensions. A batch normalization layer normalizes the data. An activation function layer addresses the vanishing gradient problem, preventing overfitting.
[0050] Step 3-3: Set the loss function. The core objective of step 3 is to minimize the loss function. in N represents the number of samples in the entire training set, X (i) This represents the pure EEG signal of the i-th sample. This indicates the pure EEG signal output by the network.
[0051] Step 3-4: Update the weight parameter W and bias parameter b using the optimizer, jump to step 3-2, and perform the next training iteration until all epochs are completed, at which point the training ends.
[0052] Step 4: Evaluation Indicators
[0053] This invention employs three objective evaluation metrics to measure the EEG artifact denoising performance of the invention, including the relative root mean square error (RRMSE) in the time domain. t The relative root mean square error (RRMSE) in the frequency domain f And the average correlation coefficient CC. Where PSD is the power spectral density function, and Cov and Var are the covariance function and variance function, respectively.
[0054] This invention will compare the performance of existing EEG artifact denoising models Complex CNN, Simple CNN, and Novel CNN.
[0055] Model <![CDATA[RRMSE t ]]> <![CDATA[RRMSE f ]]> CC Simple CNN 0.646 0.649 0.783 Complex CNN 0.596 0.626 0.801 Novel CNN 0.452 0.456 0.856 This invention 0.388 0.416 0.895
[0056] As can be seen from the performance comparison, this invention improves the relative root mean square error by 39% in the time domain and by 35% in the frequency domain compared to simple CNN, while also improving the average correlation coefficient by 14%. Compared to complex CNN, the three metrics are improved by 34%, 33%, and 11%, respectively, and compared to novel CNN, the three metrics are improved by 14%, 8%, and 4%, respectively.
Claims
1. A method for removing artifacts from electroencephalogram signals based on a multi-module neural network, characterized in that Includes the following steps: Step 1: Data Acquisition 4514 clean EEG segments and 5598 EMG artifact segments were obtained using the public dataset EEGdenoiseNet; Step 2: Data processing; Step 3-1: Randomly initialize the weight parameters of the multi-module neural network model and bias parameters Set the number of training epochs; Step 3-2: Input the training set into the multi-module neural network model, using... The training session focused on a pair of contaminated and pure EEG signals. The polluted EEG signal was synthesized through semi-simulation in step 2; Will Input into a multi-module neural network In China, the network From weight parameters and bias parameters Composition, that is Multi-module neural network It includes four noise reduction modules; Input to the first noise reduction module In the middle, the noise reduction module It will output the calculated pure EEG. and forgeries ,Right now ,in This indicates the first noise reduction module. The first noise reduction module Output artifacts and Perform a subtraction operation and use the result as the second noise reduction module. The input and output of new, pure brainwaves and forgeries , Right now ; the second noise reduction module Output artifacts and Perform a subtraction operation and use the result as the third noise reduction module. The input and output of new, pure brainwaves and forgeries , Right now Based on the above steps, the clean EEG and artifacts output by the fourth denoising module are obtained; the final output of the entire multi-module neural network model is then obtained. The pure EEG outputs from the four noise reduction modules are combined, namely: ,in Indicates the first One noise reduction module ; Step 3: EEG signal artifact removal algorithm based on multi-module neural network; Step 4: Measure the algorithm using evaluation metrics.
2. The method for removing artifacts from electroencephalogram (EEG) signals based on a multi-module neural network according to claim 1, characterized in that... Step 2 specifically includes: Step 2-1: Randomly select pure EEG segments from the dataset, and vertically merge the selected segments with all the original pure EEG segments to ensure that the data dimensions of the pure EEG segments and the artifact segments are the same, which facilitates the training of the subsequent model.
3. The method for removing artifacts from electroencephalogram (EEG) signals based on a multi-module neural network according to claim 2, characterized in that... Step 2 also includes the following specific implementation: Step 2-2: Based on a fixed signal-to-noise ratio, the longitudinally merged pure EEG segments and artifact segments are semi-simulated to synthesize a contaminated EEG signal.
4. The method for removing artifacts from electroencephalogram (EEG) signals based on a multi-module neural network according to claim 3, characterized in that... Step 2 also includes the following specific implementation: Steps 2-3: Enhance the data by linearly mixing the vertically merged clean EEG segments with the original artifact segments ten times, expanding the data volume by 10 times.
5. The method for removing artifacts from electroencephalogram (EEG) signals based on a multi-module neural network according to claim 4, characterized in that... Step 2 also includes the following specific implementation: Steps 2-4: Create a training set. Use the semi-fitted and synthesized contaminated EEG signals as the model input data and the clean EEG segments as labels. Use 10x cross-validation to divide the training set and the test set.
6. The method for removing artifacts from electroencephalogram (EEG) signals based on a multi-module neural network according to claim 1, characterized in that... The aforementioned structurally identical denoising module consists of four structurally identical separation modules. The outputs of the first and fourth separation modules are connected using residual connections to improve the model's learning performance. Each separation module can separate clean EEG features. and artifact features ,in Indicates the first A separate module, For the first three separation modules, the clean EEG features of the adjacent previous separation module are used as the input to the next separation module. The clean EEG output of the fourth separation module is the final clean EEG signal output by the denoising module. The artifact output of the denoising module is the sum of the artifact features output by the four separation modules, i.e. .
7. A method for removing artifacts from electroencephalogram (EEG) signals based on a multi-module neural network according to claim 1 or 6, characterized in that... The aforementioned separation module consists of two Inception modules and two 1D convolutional modules. The two 1D convolutional modules are a 1D convolutional clean module and a 1D convolutional noise module, which are used to learn the features of clean EEG signals and artifact signals in contaminated signals, respectively. The Inception module is composed of four 1D convolutional layers with kernel sizes of 1x3, 1x5, 1x11, and 1x15, a batch normalization layer, and an activation function layer. Four one-dimensional convolutional layers are responsible for extracting input signal features in different dimensions; the batch normalization layer performs normalization operations on the data; The activation function layer is responsible for solving the gradient vanishing problem and preventing the model from overfitting.
8. The method for removing artifacts from electroencephalogram (EEG) signals based on a multi-module neural network according to claim 7, characterized in that... Step 3 also includes the following specific implementation: Step 3-3: Set the loss function. The core objective is to minimize the loss function. ,in , This represents the number of samples in the entire training set. Indicates the first Pure EEG signals from a sample, This indicates the pure EEG signal output by the network; Steps 3-4: Update weight parameters using the optimizer and bias parameters Then proceed to step 3-2 to begin the next training iteration, continuing until all epochs are completed, at which point the training ends.