Electroencephalogram noise reduction method and device based on neural network architecture search and medium

Through the method based on neural network architecture search, the best neural network architecture is automatically searched and model parameters are optimized, which solves the problem of difficult to obtain the optimal model architecture in the existing technology, and significantly improves the EEG noise reduction efficiency.

CN119564229AActive Publication Date: 2025-03-07陈勋

Patent Information

Application Number
CN202411739918.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-07
Estimated Expiration
2044-11-29

Smart Images

  • Figure CN119564229A_ABST
    Figure CN119564229A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electroencephalogram signal noise reduction, and discloses an electroencephalogram noise reduction method and device based on neural network architecture search and a medium. The method comprises the following steps: firstly, acquiring a data set containing pure electroencephalogram signals and noisy electroencephalogram signals with different signal-to-noise ratios; then defining a neural network architecture search space, wherein the convolution operation comprises a small kernel convolution operation and a plurality of large kernel convolution operations; the common unit is used for extracting features when the neural network architecture is searched, and the reduction unit is used for reducing the dimensionality of a feature map; searching an optimal operation combination in the common unit and the reduction unit in a neural network architecture search space by utilizing the training set and the verification set to determine an optimal neural network architecture, and optimizing model parameters of the electroencephalogram noise reduction model through the optimal neural network architecture to obtain a trained electroencephalogram noise reduction model which is verified to be qualified; and finally inputting electroencephalogram data to be processed into the electroencephalogram noise reduction model for noise reduction. The electroencephalogram noise can be efficiently removed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electroencephalogram (EEG) signal denoising, and in particular to an EEG denoising method based on neural network architecture search, as well as a computer device and a computer-readable storage medium applying the method. Background Art

[0002] Electroencephalogram (EEG) can record the electrical signals generated by the activity of cortical neurons. Due to its advantages such as high temporal resolution, non-invasiveness and low cost, EEG has become a widely used tool for studying brain function and diagnosing pathological information of brain diseases.

[0003] However, EEG signals are usually within 1mV, and their weak magnitude makes the signal extremely susceptible to various types of noise pollution, resulting in the target EEG signal being obscured or submerged. During the EEG acquisition process, both the measuring instrument and the human body will introduce noise. Although the interference introduced by measuring instruments such as electrode failure, power frequency and electrode impedance can be reduced to a certain extent by improving the accuracy of the acquisition system and strictly limiting the acquisition process, the physiological signal noise introduced by the human body often highly overlaps with the EEG signal in the time domain or frequency domain, so it is difficult to eliminate. Common physiological signal noise can come from movement, electrocardiogram, eye movement and muscle activity, which can be detected by electrocardiogram (ECG), electrooculogram (EOG) and electromyogram (EMG). Noise removal is crucial in EEG signal processing and is usually a prerequisite for efficient subsequent signal analysis. For example, studying EEG recorded during exercise can help better understand the dynamic information of the brain; certain disease diagnosis scenarios, such as epilepsy prediction in daily life, require identifying small fluctuations related to epilepsy prediction in EEG signals accompanied by activity noise. Therefore, by removing artifacts unrelated to brain activity through noise reduction, signal processing methods can focus on changes in EEG signal patterns, thereby enabling a more accurate understanding of brain function.

[0004] Existing work has identified and discarded EEG signal fragments contaminated by noise by observing EEG waveforms, spectrograms or topographic maps. However, directly discarding EEG signal fragments contaminated by noise will inevitably lose some information related to brain activity. Therefore, researchers have tried to eliminate noise through techniques such as regression, adaptive filtering and blind source separation. These methods assume that the noise component can be effectively extracted and the pure EEG signal can be reconstructed through reference electrodes, spectrum analysis or signal source separation. However, there are often many obstacles in actual use, such as the difficulty in finding suitable reference electrodes, some complex noises (such as EMG) have sufficient overlapping frequencies with pure EEG signals, and too many noise sources are difficult to separate. These factors make the above traditional methods unable to restore pure EEG with high quality. In addition, due to the diversity of noise sources and their significantly different characteristics, most researchers tend to focus only on the elimination of a single type of noise.

[0005] In recent years, deep learning has achieved highly disruptive success in various fields. Deep learning can extract high-precision and strong generalization features by automatically learning nonlinear feature representations from data with the help of a large number of parameters and flexible neural network architecture, enabling it to handle complex data and tasks. Given that EEG signals are complex signals with nonlinear characteristics, retaining these features is crucial for EEG artifact removal. Recent studies have also shown that EEG artifact removal methods based on deep learning can achieve superior performance compared to traditional methods. However, determining the optimal neural network architecture requires a lot of effort from experts. Previous studies have shown that convolutional neural network architectures with more layers may produce better EMG noise removal performance. With the emergence of new architectures (such as inception and residual architectures), it is almost impossible for humans to explore every potential combination of neural network architectures to find the best noise removal model architecture. Therefore, there is an urgent need for search methods to automatically find a neural network architecture suitable for EEG denoising. Summary of the invention

[0006] In order to solve the technical problem that the optimal model architecture of the existing neural network-based EEG denoising technology is difficult to obtain, thereby limiting the efficiency of EEG denoising, the present invention provides an EEG denoising method, device and medium based on neural network architecture search.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] The present invention discloses an electroencephalogram denoising method based on neural network architecture search, comprising steps S1 to S4.

[0009] S1. Obtain a dataset containing pure EEG signals and noisy EEG signals with different signal-to-noise ratios, and divide the dataset into a training set, a validation set, and a test set.

[0010] S2. Define a neural network architecture search space, which includes convolution operations, average pooling operations, and skip connection operations; wherein the convolution operation includes a small-core convolution operation with a convolution kernel size of 3×3 and multiple large-core convolution operations with convolution kernel sizes greater than 3×3 and increasing in size; the basic units when searching for a neural network architecture are divided into ordinary units and reduced units, ordinary units are used to extract features, and reduced units are used to reduce the dimension of feature maps.

[0011] S3. Using the training set and the validation set, search for the best combination of operations within the common units and the reduced units in the neural network architecture search space to determine the best neural network architecture, and optimize the model parameters of the EEG denoising model through the best neural network architecture, thereby obtaining a trained and verified EEG denoising model.

[0012] S4. Input the EEG data to be processed into the EEG denoising model for denoising processing.

[0013] As a further improvement of the above scheme, in step S2, the neural network architecture search space adopts one-dimensional convolution and one-dimensional pooling operations; the input signal first passes through the ReLU activation function during the convolution operation; the convolution operation and the average pooling operation are both batch normalized before output.

[0014] As a further improvement of the above scheme, in step S2, each basic unit is composed of a directed acyclic graph with S nodes and a series of directed edges; each node represents a feature graph, and each directed edge corresponds to an operation of a processing node; the output of the basic unit is obtained by performing a series operation on all nodes in the unit, and the output of the basic unit is composed of the series connection of the outputs of the first two basic units; the intermediate node is calculated by the predecessor node and the corresponding operation, and the calculation formula is:

[0015]

[0016] In the formula, x (n) is the middle node, x (m) is the predecessor node, o (m,n) Indicates that x (m) Convert to x (n) operation, operation o∈O, O is a set of optional operations.

[0017] As a further improvement of the above solution, in step S3, the method for determining the best operation combination specifically includes the following steps:

[0018] S31. Use the softmax function that includes all possible operations to relax the selection of specific operations between nodes. The expression formula of this calculation process is:

[0019]

[0020] In the formula, Represents the comprehensive output of all current operations; o and o' both represent operations; vector and are the operation mixing weights associated with operations o and o' respectively; e is the natural base.

[0021] S32. By Replace with operations with high weights to derive the final discrete architecture; define the operation intensity as o s :

[0022]

[0023] S33. Define a two-layer optimization problem function, and optimize the function to find a neural network architecture suitable for the current denoising task; the expression formula of the two-layer optimization problem function is as follows:

[0024]

[0025] In the formula, θ is the architecture parameter of the neural network, ω is the weight of the neural network; θ o Represents the network architecture weight parameter searched through the validation set; ω * (θ) represents the optimal model parameters obtained by optimizing the training set under given θ; and denote the training loss and validation loss respectively.

[0026] S34. Based on θ o The operation with the highest operation intensity is selected to determine the final neural network architecture, using a fixed architecture θ and gradient The weights of the denoising model are optimized by descent, thereby searching for the best neural network architecture.

[0027] As a further improvement of the above solution, in step S33, the training loss and validation loss The difference between the EEG signal after the model denoising and the real pure EEG signal is calculated, and the mean square error (MSE) is used to construct the loss function. The MSE is defined as follows:

[0028]

[0029] In the formula, Represents a real pure EEG signal. represents the reconstructed EEG signal after noise reduction; x c,i and x d,i are the i-th sample points of the pure EEG signal and the reconstructed EEG signal respectively; is a set of real numbers; T is the total number of sample points;

[0030] Among them, the training loss It is obtained by integrating the loss functions of morphological and frequency domain information, and the expression formula is:

[0031]

[0032] In the formula, represents the difference in MSE calculated based on the reconstructed EEG signal and the pure EEG signal; and They represent the MSE differences obtained based on the first-order / second-order differences of the reconstructed EEG signal and the first-order / second-order differences of the pure EEG signal; Represents the loss of frequency components; α1~α4 represent the weights of four types of losses; The expression formula is:

[0033]

[0034] in, and They represent the spectrum estimation values ​​of the pure EEG signal and the reconstructed EEG signal in the frequency range of 1 to 50 Hz, respectively. There are r frequency points in total. The spectrum estimation values ​​are obtained by Z-score normalization of the power spectral density obtained by fast Fourier transform.

[0035] As a further improvement of the above scheme, in step S2, 8 basic units are set when searching the neural network architecture, including 6 ordinary units and 2 reduction units, and the 2 reduction units are located at 1 / 3 and 2 / 3 of the depth of the entire neural network model respectively; each basic unit includes 7 nodes, including 2 input nodes and 1 output node.

[0036] In step S3, when optimizing the EEG denoising model through the optimal neural network architecture, the number of basic units is set to 8, the training cycle is set to 50, the batch size is set to 32, and the weight decay is set to 1×10 -3 ; Use the SGD optimizer with an initial learning rate of 0.025 and a momentum of 0.9.

[0037] As a further improvement of the above solution, in step S1, the method for constructing the data set includes the following steps:

[0038] S11. Prepare a pure electroencephalogram signal and collect a variety of noise signals, and divide the pure electroencephalogram signal and each noise signal into a number of single-channel signal windows of specific duration.

[0039] S12. A set of noisy EEG signals with a signal-to-noise ratio in a set range is constructed by linearly mixing a single-channel signal window of a pure EEG signal with a single-channel signal window of a noise signal and controlling the noise amplitude.

[0040] S13. The clean EEG signal is used as a label and the noisy EEG signal is used as an input, so that a data set is composed of the clean EEG signal and the noisy EEG data corresponding to the various noise signals.

[0041] As a further improvement of the above scheme, in step S11, a multi-channel EEG acquisition device is used to collect EEG signals of multiple users, and then ICLabel is used to retain the components in the EEG signal that are predicted to be EEG components and whose classification probability exceeds a threshold value τ=0.8 to prepare the pure EEG signal, and then the pure EEG signal is divided into multiple single-channel signal windows with a duration of t=2s; the signals around the heart are collected as electrocardiographic noise, the signals around the eyes are collected as electrooculographic noise, and the signals around the masseter muscles of the head are collected as electromyographic noise through electrodes, and each noise signal is divided into multiple single-channel signal windows with a duration of t=2s.

[0042] The present invention also discloses a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the above-mentioned EEG denoising method based on neural network architecture search are implemented.

[0043] The present invention also discloses a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the above-mentioned EEG denoising method based on neural network architecture search are implemented.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] 1. The EEG denoising method based on neural network architecture search disclosed in the present invention introduces the concept of neural network architecture search for the first time in the field of EEG denoising, significantly reducing the need for experts to manually search for model architectures, and generating a neural network architecture that is more suitable for EEG noise removal tasks. The method can automatically find a suitable neural network model architecture based on the characteristics of the EEG signal, while reducing the burden of manually designing the architecture and significantly improving the EEG denoising level.

[0046] 2. The present invention also implements the large convolution kernel method in the EEG noise removal task for the first time, constructs a neural network architecture search space, and can effectively capture the long-term time dependency in the EEG signal through a large receptive field, further improving the EEG noise reduction level. In addition, the EEG noise reduction method based on the large convolution kernel neural network architecture search can flexibly search for an architecture suitable for the current task based on the input EEG data through the EEG noise reduction neural network architecture search method, and the method itself has flexibility and scalability.

[0047] 3. The computer device and computer-readable storage medium disclosed in the present invention can achieve the same beneficial effects as the above method by applying the above method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a flow chart of the EEG denoising method based on neural network architecture search in Example 1 of the present invention.

[0049] Figure 2 Schematic diagram of the operations included in the neural network architecture search space in Example 1 of the present invention.

[0050] Figure 3 Schematic diagram of the data processing process of the EEG denoising method in Example 1 of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] Example 1

[0053] See also Figure 1 , this embodiment provides an EEG denoising method based on neural network architecture search, including steps S1 to S4.

[0054] S1. Obtain a dataset containing pure EEG signals and noisy EEG signals with different signal-to-noise ratios, and divide the dataset into a training set, a validation set, and a test set.

[0055] In step S1, the method for constructing the data set includes the following steps:

[0056] S11. Prepare a pure electroencephalogram signal and collect a variety of noise signals, and divide the pure electroencephalogram signal and each noise signal into a number of single-channel signal windows of specific duration.

[0057] Among them, a multi-channel EEG acquisition device can be used to collect EEG signals of multiple users, and then ICLabel is used to remove noise signals, leaving only pure EEG signals. In this embodiment, in order to make the EEG signal as noise-free as possible, only components predicted as EEG components and with a classification probability exceeding a threshold value τ=0.8 are retained here to prepare the pure EEG signal. The multi-channel pure EEG signal is then divided into multiple single-channel signal windows with a duration of t=2s, and a single single-channel pure EEG signal window is denoted as x. The signal of a specific part is collected by electrodes as a noise signal, such as collecting signals around the heart as ECG noise, signals around the eyes as electrooculographic noise, and signals around the masseter muscles of the head as myoelectric noise. These noise signals are also divided into multiple single-channel signal windows with a duration of t=2s, and a single single-channel noise signal window is denoted as n.

[0058] In some embodiments, the public data set EEGdenoiseNet can also be used to obtain the data required for the experiment. The data set provides two noisy EEG signals: EEG contaminated by electrooculogram and EEG contaminated by electromyography. The data set initially downloaded EEG, EOG and EMG signals from the public data set. Subsequently, these signals were divided into 2-second segments. After processing through the above steps, the data set contains 4514 pure EEG segments, 3400 EOG noise segments and 5598 EMG noise segments. The classification probability threshold τ can be 0.8, and t=2s in the experiment.

[0059] In addition, in order to more comprehensively verify the EEG denoising method, two other common noises in real environments can be combined: ECG noise and motion noise. ECG noise is obtained from the arrhythmia dataset MIT-BIH, while motion noise comes from the public dataset proposed by Sweeney et al. in 2012. Through the above steps, the ECG noise consists of 3600 segments and the motion noise consists of 2760 segments. In each segment, t = 2s.

[0060] S12. A set of noisy EEG signals with a signal-to-noise ratio in a set range is constructed by linearly mixing a single-channel signal window of a pure EEG signal with a single-channel signal window of a noise signal and controlling the noise amplitude.

[0061] The linear mixture is expressed as follows:

[0062] x C =x+λ·n

[0063] In the formula, x C represents a one-dimensional noisy EEG signal, and the parameter λ controls the generated noisy signal x CThe signal-to-noise ratio (SNR) of the signal is calculated as follows:

[0064]

[0065] Where N represents the signal window length, i.e., the number of data points in the signal window; x i represents the i-th single-channel pure EEG signal window; n i Represents the i-th single-channel noise signal window. By adjusting the parameter λ, noisy EEG signals with different signal-to-noise ratios can be generated.

[0066] In some embodiments, by adjusting λ, noisy EEG segments with an SNR range from -5dB to 5dB can be generated. In actual scenarios, EEG signals are often contaminated by noise within this SNR range. Finally, four groups of noisy EEG signals can be synthesized.

[0067] S13. The clean EEG signal is used as a label and the noisy EEG signal is used as an input, so that a data set is composed of the clean EEG signal and the noisy EEG data corresponding to the various noise signals.

[0068] In this embodiment, the EEG denoising model uses the pure EEG signal x as the label and the one-dimensional noisy EEG signal x C As input, for each type of noise, 80% of the data segments are assigned as training sets, and the remaining 20% ​​of the data are assigned as validation sets (10%) and test sets (10%), respectively.

[0069] S2. Define a neural network architecture search space, which includes convolution operations, average pooling operations, and skip connection operations; wherein the convolution operation includes a small-core convolution operation with a convolution kernel size of 3×3 and multiple large-core convolution operations with convolution kernel sizes greater than 3×3 and increasing in size.

[0070] In order to capture the long-term time-dependent information inherent in the EEG signal, the present invention uses a large convolution kernel convolution operation as a potential operation. Specifically, the constructed search space includes both large kernel convolution operations and traditional small kernel convolution operations. This design enables the search method to combine kernel operations of various sizes to extract information of different scales. Considering that the EEG signal is one-dimensional data, one-dimensional convolution and one-dimensional pooling operations are used here.

[0071] In this embodiment, Figure 2As shown in the figure, the search space O contains convolution operations, average pooling operations, and skip connection operations. In the figure, L×1 and P×1 represent the kernel size. In order to process one-dimensional EEG signals, one-dimensional convolution and one-dimensional pooling operations are used here. The input signal first passes through the ReLU activation function during the convolution operation. Both convolution and pooling operations are batch normalized before output. The skip connection operation does not do any processing and directly outputs the input value.

[0072] First, define the basic units when searching for neural network architectures, namely normal cells and reduction cells. Normal cells are used to extract features, while reduction cells are used to reduce the dimension of feature graphs. Each basic unit consists of a directed acyclic graph with S nodes and a series of directed edges; each node represents a feature graph, and each directed edge corresponds to an operation of a processing node; the output of the basic unit is obtained by connecting all nodes in the unit in series, and the output of the basic unit is composed of the outputs of the first two basic units in series; the intermediate nodes are calculated by the predecessor nodes and the corresponding operations, and the calculation formula is:

[0073]

[0074] In the formula, x (n) is the middle node, x (m) is the predecessor node, o (m,n) Indicates that x (m) Convert to x (n) operation, operation o∈O, O is a set of optional operations.

[0075] In this embodiment, 6 basic units are set when searching the neural network architecture, including 4 ordinary units and 2 reduction units, and the 2 reduction units are respectively located at 1 / 3 and 2 / 3 of the depth of the entire neural network model; each basic unit includes 7 nodes, including 2 input nodes and 1 output node.

[0076] S3. Using the training set and the validation set, search for the best combination of operations within the common units and the reduced units in the neural network architecture search space to determine the best neural network architecture, and optimize the model parameters of the EEG denoising model through the best neural network architecture, thereby obtaining a trained and verified EEG denoising model.

[0077] The optimization method finds the best neural network architecture by comprehensively searching the operations in the space. In this embodiment, a gradient-based method can be used to search for the best operation combination in the common unit and the reduced unit. In step S3, the method for determining the best operation combination specifically includes the following steps:

[0078] S31. In order to ensure the continuity of the search space, a softmax function that includes all possible operations is used to relax the selection of specific operations between nodes. The expression formula of this calculation process is:

[0079]

[0080] In the formula, Represents the comprehensive output of all current operations; o and o' both represent operations; vector and are the operation mixing weights associated with operations o and o' respectively; e is a natural base.

[0081] S32. By Replace with operations with high weights to derive the final discrete architecture; define the operation intensity as o s :

[0082]

[0083] S33. Define a two-layer optimization problem function, and optimize the function to find a neural network architecture suitable for the current denoising task; the expression formula of the two-layer optimization problem function is as follows:

[0084]

[0085] In the formula, θ is the architecture parameter of the neural network, ω is the weight of the neural network; θ o Represents the network architecture weight parameter searched through the validation set; ω * (θ) represents the optimal model parameters obtained by optimizing the training set under given θ; and Denote the training loss and validation loss respectively. The subsequent goal is to jointly optimize the architecture parameters θ and ω, where θ affects the neural network architecture and ω determines the prediction performance of the network. Here, the validation set performance is used for optimization. and are determined by θ and ω. The goal is to find the optimal architecture θ by minimizing the validation loss * , The weight ω * Optimize by minimizing the training loss.

[0086] When searching for neural network architectures, a network with 6 units was trained. The search process consisted of 50 epochs with a batch size of 64. The network weights ω were optimized using an SGD optimizer with an initial learning rate of 0.025 and a momentum of 0.9. In addition, an initial learning rate of 3×10 -4 , β1=0.5 and β2=0.99 to optimize the architecture parameter θ.

[0087] In step S33, the training loss and validation loss The difference between the EEG signal after the model denoising and the real pure EEG signal is calculated, and the mean square error (MSE) is used as the main loss function, which is defined as follows:

[0088]

[0089] In the formula, Represents a real pure EEG signal. represents the reconstructed EEG signal after noise reduction; x c,i and x d,i are the i-th sample points of the pure EEG signal and the reconstructed EEG signal respectively; is a set of real numbers; T is the total number of sample points. In order to more comprehensively capture the morphological differences of EEG signals before and after denoising, the original EEG is subjected to multi-order differences (such as first-order and second-order differences), and the MSE values ​​before and after are calculated to construct the loss function. In addition, considering that deep learning models usually perform poorly in capturing high-frequency components in signals, these high-frequency components can be revealed by including the difference of the signal in the loss function, thereby overcoming this limitation. Loss of frequency components Defined as:

[0090]

[0091] in, and They represent the spectrum estimation values ​​of the pure EEG signal and the reconstructed EEG signal in the frequency range of 1 to 50 Hz, respectively. There are r frequency points in total. The spectrum estimation values ​​are obtained by Z-score normalization of the power spectral density obtained by fast Fourier transform.

[0092] Therefore, the training loss is obtained by integrating the loss functions of morphological and frequency domain information, and the expression formula is:

[0093]

[0094] In the formula, represents the difference in MSE calculated based on the reconstructed EEG signal and the pure EEG signal; and They respectively represent the MSE differences between the first-order / second-order differences of the reconstructed EEG signal and the first-order / second-order differences of the pure EEG signal; α1~α4 represent the weights of the four losses. By adjusting the weights, the model can pay more attention to the recovery accuracy of different signal components.

[0095] S34. Based on θ oThe operation with the highest operation intensity is selected to determine the final neural network architecture, using a fixed architecture θ and gradient The weights of the denoising model are optimized by descent, thereby searching for the best neural network architecture.

[0096] like Figure 3 As shown in Figure 2, when optimizing the EEG denoising model through the optimal neural network architecture, the number of basic units is set to 8, the training cycle is set to 50, the batch size is set to 32, and the weight decay is set to 1×10. -3 ; Use the SGD optimizer with an initial learning rate of 0.025 and a momentum of 0.9.

[0097] S4. Input the EEG data to be processed into the EEG denoising model for denoising processing.

[0098] In this embodiment, in order to illustrate the performance of the above scheme of the present invention, the proposed method (EEG denoising method of the present invention) is compared with a fully connected neural network (fully connected neural network, FCNN), a simple convolutional neural network (simple convolutional neural network, SCNN), 1D-ResCNN, a recurrent neural network (recurrent neural network, RNN), a novel convolutional neural network (Novel CNN), and a differentiable architecture search method (differentiable architecture search, DARTS) without adding a large convolution kernel. The correlation coefficient (correlation coefficient, CC), relative root mean square error (relative root mean square error, RRMSE), and signal-to-noise ratio (SNR) are used as indicators to measure the level of EEG denoising, wherein the larger the CC and SNR values, the smaller the RRMSE, the stronger the performance of the denoising model. The comparison results are shown in Table 1 below.

[0099] Table 1. Comparison of EEG denoising performance of different methods

[0100]

[0101] It can be seen from Table 1 that the present invention has better EEG denoising performance than the existing denoising methods and the neural network architecture search method not based on large convolution kernels.

[0102] In summary, the EEG denoising method disclosed in the present invention can automatically find a suitable neural network model architecture according to the characteristics of the EEG signal, while reducing the burden of manually designing the architecture, significantly improving the EEG denoising level. The following operations are performed in sequence: (1) constructing a pair of pure EEG and noisy EEG data, and constructing noisy EEG data with different signal-to-noise ratios by controlling the noise amplitude; (2) defining a neural network architecture search space, and pre-defining convolution operations and pooling operations with large convolution kernels and conventional convolution kernels as options according to the properties of the EEG signal. These potential operations are helpful in mining the global and local information in the noisy EEG signal; (3) neural network architecture search, that is, assigning probabilities to each potential operation in the model architecture, and obtaining the most suitable architecture according to the characteristics of the input data and the optimization function; (4) constructing an efficient EEG denoising model, and training the EEG denoising model with the neural network architecture obtained by the search, which can perform efficient EEG noise removal. The present invention avoids the process of experts investing a lot of time and energy in designing an effective neural network model architecture. The denoising model trained based on the searched architecture can efficiently remove various noises, and is expected to promote the advancement of EEG denoising technology.

[0103] Example 2

[0104] This embodiment provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0105] The computer device may be a smart phone, tablet computer, laptop computer, etc. capable of executing a program. The processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor is generally used to control the overall operation of the computer device. In this embodiment, the processor is used to run the program code stored in the memory or process data. When the processor executes the program, the steps of the EEG denoising method based on neural network architecture search in Example 1 are implemented.

[0106] Example 3

[0107] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the electroencephalogram denoising method based on neural network architecture search in Embodiment 1 are implemented.

[0108] The computer-readable storage medium may include flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the storage medium may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the storage medium may also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the storage medium may also include both an internal storage unit of a computer device and an external storage device thereof. In this embodiment, the memory is generally used to store an operating system and various application software installed on the computer device, etc. In addition, the memory may also be used to temporarily store various types of data that have been output or are to be output.

[0109] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. An electroencephalogram denoising method based on neural network architecture search, characterized in that: Includes steps: S1. Obtain a data set containing pure EEG signals and noisy EEG signals with different signal-to-noise ratios, and divide the data set into a training set, a validation set, and a test set; S2. Define a neural network architecture search space, which includes convolution operations, average pooling operations, and skip connection operations; wherein the convolution operation includes a small convolution operation with a convolution kernel size of 3×3 and multiple large convolution operations with convolution kernel sizes greater than 3×3 and increasing in size; the basic units when searching for neural network architectures are divided into ordinary units and reduced units, ordinary units are used to extract features, and reduced units are used to reduce the dimension of feature maps; S3. Using the training set and the validation set, searching for the best operation combination in the common unit and the reduced unit in the neural network architecture search space to determine the best neural network architecture, and optimizing the model parameters of the EEG denoising model through the best neural network architecture, thereby obtaining a trained and verified qualified EEG denoising model; S4. Input the EEG data to be processed into the EEG denoising model for denoising processing.

2. The electroencephalogram denoising method based on neural network architecture search according to claim 1, characterized in that: In step S2, the neural network architecture search space adopts one-dimensional convolution and one-dimensional pooling operations; the input signal first passes through the ReLU activation function during the convolution operation; the convolution operation and the average pooling operation are batch normalized before output.

3. The electroencephalogram denoising method based on neural network architecture search according to claim 1, characterized in that: In step S2, each basic unit is composed of a directed acyclic graph with S nodes and a series of directed edges; each node represents a feature graph, and each directed edge corresponds to an operation of a processing node; the output of the basic unit is obtained by serially operating all the nodes in the unit, and the output of the basic unit is composed of the serial outputs of the first two basic units; the intermediate node is calculated by the predecessor node and the corresponding operation, and the calculation formula is: In the formula, x (n) is the middle node, x (m) is the predecessor node, o (m,n) Indicates that x (m) Convert to x (n) operation, operation o∈O, O is a set of optional operations.

4. The electroencephalogram denoising method based on neural network architecture search according to claim 3, characterized in that: In step S3, the method for determining the best operation combination specifically includes the following steps: S31. Use the softmax function that includes all possible operations to relax the selection of specific operations between nodes. The expression formula of this calculation process is: In the formula, Represents the comprehensive output of all current operations; o and o' both represent operations; vector and are the operation mixing weights associated with operations o and o' respectively; e is a natural base; S32. By Replace with operations with high weights to derive the final discrete architecture; define the operation intensity as o s : S33. Define a two-layer optimization problem function, and optimize the function to find a neural network architecture suitable for the current denoising task; the expression formula of the two-layer optimization problem function is as follows: In the formula, θ is the architecture parameter of the neural network, ω is the weight of the neural network; θ o Represents the network architecture weight parameter searched through the validation set; ω * (θ) represents the optimal model parameters obtained by optimizing the training set under given θ; and Represent the training loss and validation loss respectively; S34. Based on θ o The operation with the highest operation intensity is selected to determine the final neural network architecture, using a fixed architecture θ and gradient The weights of the denoising model are optimized by descent, thereby searching for the best neural network architecture.

5. The electroencephalogram denoising method based on neural network architecture search according to claim 4, characterized in that: In step S33, the training loss and verification loss The difference between the EEG signal after the model denoising and the real pure EEG signal is calculated, and the mean square error (MSE) is used to construct the loss function. The MSE is defined as follows: In the formula, Represents a real pure EEG signal. represents the reconstructed EEG signal after noise reduction; x c,i and x d,i are the i-th sample points of the pure EEG signal and the reconstructed EEG signal respectively; is a set of real numbers; T is the total number of sample points; Among them, the training loss It is obtained by integrating the loss functions of morphological and frequency domain information, and the expression formula is: In the formula, represents the difference in MSE calculated based on the reconstructed EEG signal and the pure EEG signal; and They represent the MSE differences obtained based on the first-order / second-order differences of the reconstructed EEG signal and the first-order / second-order differences of the pure EEG signal; Represents the loss of frequency components; α1~α4 represent the weights of four types of losses; The expression formula is: in, and They represent the spectrum estimation values ​​of the pure EEG signal and the reconstructed EEG signal in the frequency range of 1 to 50 Hz, respectively. There are r frequency points in total. The spectrum estimation values ​​are obtained by Z-score normalization of the power spectral density obtained by fast Fourier transform.

6. The electroencephalogram denoising method based on neural network architecture search according to claim 3, characterized in that: In step S2, 8 basic units are set when searching for the neural network architecture, including 6 ordinary units and 2 reduction units, and the 2 reduction units are respectively located at 1 / 3 and 2 / 3 of the depth of the entire neural network model; each basic unit includes 7 nodes, including 2 input nodes and 1 output node; In step S3, when optimizing the EEG denoising model through the optimal neural network architecture, the number of basic units is set to 8, the training cycle is set to 50, the batch size is set to 32, and the weight decay is set to 1×10 -3 ; Use the SGD optimizer with an initial learning rate of 0.025 and a momentum of 0.

9.

7. The electroencephalogram denoising method based on neural network architecture search according to claim 1, characterized in that: In step S1, the method for constructing the data set includes the following steps: S11. preparing a pure electroencephalogram signal and collecting a plurality of noise signals, and dividing the pure electroencephalogram signal and each noise signal into a plurality of single-channel signal windows of a specific duration; S12. Linearly mixing a single-channel signal window of a pure electroencephalogram signal with a single-channel signal window of a noise signal and controlling the noise amplitude, thereby constructing a set of noisy electroencephalogram signals with a signal-to-noise ratio in a set range; S13. The clean EEG signal is used as a label and the noisy EEG signal is used as an input, so that a data set is composed of the clean EEG signal and the noisy EEG data corresponding to the various noise signals.

8. The method for EEG denoising based on neural network architecture search according to claim 7, characterized in that: In step S11, a multi-channel EEG acquisition device is used to collect EEG signals of multiple users, and then ICLabel is used to retain the components in the EEG signal that are predicted to be EEG components and whose classification probability exceeds a threshold value τ=0.8 to prepare the pure EEG signal, and then the pure EEG signal is divided into multiple single-channel signal windows with a duration of t=2s; the signals around the heart are collected as electrocardiographic noise, the signals around the eyes are collected as electrooculographic noise, and the signals around the masseter muscles of the head are collected as electromyographic noise through electrodes, and each noise signal is divided into multiple single-channel signal windows with a duration of t=2s.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the electroencephalogram denoising method based on neural network architecture search as described in any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the electroencephalogram denoising method based on neural network architecture search as described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Deep learning network architecture search method for EEG signal classification task

    CN113361484A

  • Human motion intention recognition method based on network architecture search

    CN113962268A

  • Electroencephalogram signal feature enhancement method based on reinforcement learning combined denoising and time-space relation modeling

    CN114841192A

  • Lightweight neural network architecture search method based on flatness

    CN117786162A

  • Method and system for optimizing wavelet threshold denoising parameters based on improved particle swarm optimization under comprehensive evaluation index system

    CN118312721A

Cited By

  • Underwater acoustic signal modulation identification method based on GAN network denoising and neural network architecture searching

    CN120185982A