Electroencephalogram (EEG) denoising method, device, and medium based on neural network architecture search

Through the neural network architecture search method, the neural network architecture suitable for EEG denoising is automatically found, which solves the problem of difficulty in obtaining the optimal model architecture in existing technologies and achieves more efficient EEG denoising effect.

CN119564229BActive Publication Date: 2025-09-26UNIV OF SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing neural network-based EEG denoising technologies, it is difficult to automatically find the optimal model architecture, which limits the efficiency of EEG denoising.

Method used

A method based on neural network architecture search is adopted. By defining the neural network architecture search space, including convolution operations, average pooling operations and skip connection operations, the training set and validation set are used to search for the best operation combination, the model parameters of the EEG denoising model are optimized, and a neural network architecture suitable for EEG denoising is constructed.

Benefits of technology

It significantly improves the EEG noise reduction level, reduces the burden of manually designed architecture, and can automatically find a suitable neural network model architecture suitable for EEG noise removal tasks, with flexibility and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119564229B_ABST
    Figure CN119564229B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of electroencephalogram (EEG) signal noise reduction, and discloses an EEG noise reduction method, device, and medium based on a neural network architecture search. The method first obtains a data set containing pure EEG signals and noisy EEG signals with different signal-to-noise ratios; then defines a neural network architecture search space, wherein the convolution operation includes a small-kernel convolution operation and multiple large-kernel convolution operations; when searching for the neural network architecture, ordinary units are used to extract features, and reduction units are used to reduce the dimension of the feature map; then, using a training set and a validation set, the neural network architecture search space is searched for the optimal combination of operations within ordinary units and reduction units to determine the optimal neural network architecture, and the model parameters of the EEG noise reduction model are optimized using the optimal neural network architecture to obtain a trained and verified EEG noise reduction model; finally, the EEG data to be processed is input into the EEG noise reduction model for noise reduction. The present invention can effectively remove EEG noise.
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 noise reduction, and in particular to an EEG noise reduction 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 electrical signals generated by cortical neuron activity. 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 typically less than 1mV. Their weak magnitude makes them extremely susceptible to various types of noise contamination, which can obscure or overwhelm the target EEG signal. During EEG acquisition, noise is introduced by both the measuring instrument and the human body. Although interference from measuring instruments, such as electrode failure, power frequency, and electrode impedance, can be mitigated to some extent by improving the accuracy of the acquisition system and strictly controlling the acquisition process, physiological signal noise introduced by the human body often overlaps significantly with the EEG signal in the time or frequency domain, making it difficult to eliminate. Common physiological signal noise sources include movement, electrocardiograms, eye movements, and muscle activity. This noise can be detected using electrocardiograms (ECGs), electrooculograms (EOGs), and electromyograms (EMGs). Noise removal is crucial in EEG signal processing and is often a prerequisite for efficient subsequent signal analysis. For example, studying EEG recorded during exercise can help better understand dynamic brain information. Certain disease diagnosis scenarios, such as epilepsy prediction in daily life, require identifying subtle fluctuations related to epilepsy prediction within the presence of activity noise in the EEG signal. 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 segments contaminated by noise by observing EEG waveforms, spectrograms, or topographic maps. However, directly discarding EEG signal segments 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 through reference electrodes, spectrum analysis, or signal source separation, the noise components can be effectively extracted and pure EEG signals can be reconstructed. However, there are often many obstacles in actual use, such as the difficulty in finding suitable reference electrodes, some complex noise (such as EMG) and pure EEG signals have sufficient overlapping frequencies, and there are too many noise sources that 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 revolutionary success in various fields. By automatically learning nonlinear feature representations from data, deep learning, with its large number of parameters and flexible neural network architectures, can extract highly accurate and robust features, enabling it to handle complex data and tasks. Given that EEG signals are complex signals with nonlinear characteristics, preserving these features is crucial for EEG artifact removal. Recent studies have also demonstrated that deep learning-based EEG artifact removal methods can achieve superior performance compared to traditional methods. However, identifying the optimal neural network architecture requires considerable expert effort. Previous studies have shown that convolutional neural network architectures with more layers may yield better EMG noise removal performance. With the emergence of new architectures (such as Inception and residual architectures), it is virtually impossible for humans to explore every potential combination of neural network architectures to find the optimal noise removal model architecture. Therefore, search methods are urgently needed to automatically find suitable neural network architectures for EEG denoising. Summary of the Invention

[0006] In order to solve the technical problem that the optimal model architecture of 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 (EEG) denoising method based on neural network architecture search, comprising steps S1 to S4.

[0009] S1. Obtain a dataset containing clean 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. The convolution operations include 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 used in 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.

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

[0012] S4. Inputting 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 to the above scheme, in step S2, 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 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] Where 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 an optional operation set.

[0017] As a further improvement to the above solution, in step S3, the method for determining the optimal 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] Where, 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.

[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] Where θ is the architecture parameter of the neural network, ω is the weight of the neural network; θ o Represents the network architecture weight parameters 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.

[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 optimal neural network architecture.

[0027] As a further improvement of the above solution, in step S33, the training loss and validation loss The loss function is constructed by calculating the difference between the EEG signal after model noise reduction and the real pure EEG signal. The MSE is defined as follows:

[0028]

[0029] Where, 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 point 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] Where, represents the difference in MSE calculated based on the reconstructed EEG signal and the pure EEG signal; and They 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; Indicates the loss of frequency components; α1 to α4 indicate the weights of the 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. 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 EEG signal and collect multiple noise signals, and divide the pure EEG signal and each noise signal into several single-channel signal windows of specific duration.

[0039] S12. By 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, a set of noisy electroencephalogram signals with a signal-to-noise ratio within a set range is constructed.

[0040] S13. Use the clean EEG signal as a label and the noisy EEG signal as an input, so as to form a data set consisting 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 electrodes are used to collect signals around the heart as electrocardiographic noise, signals around the eyes as electrooculographic noise, and signals around the masseter muscles of the head as electromyographic noise, 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 runnable 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 this paper, introduces the concept of neural network architecture search for the first time in the field of EEG denoising. This significantly reduces the need for experts to manually search for model architectures and produces neural network architectures more suitable for EEG noise removal tasks. This method can automatically find the appropriate neural network model architecture based on the characteristics of the EEG signal, significantly improving EEG denoising while reducing the burden of manually designing the architecture.

[0046] 2. This invention also implements a large convolution kernel approach for EEG noise removal for the first time, constructing a neural network architecture search space. This allows for the effective capture of long-term temporal dependencies in EEG signals through a large receptive field, further improving EEG noise reduction. Furthermore, the EEG noise reduction method based on large convolution kernel neural network architecture search can flexibly search for an architecture suitable for the task at hand based on the input EEG data, using the EEG noise reduction neural network architecture search method. This method itself possesses 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 flowchart 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 noise reduction method in Example 1 of the present invention. DETAILED DESCRIPTION

[0051] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts 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, comprising steps S1 to S4.

[0054] S1. Obtain a dataset containing clean 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 EEG signal and collect multiple noise signals, and divide the pure EEG signal and each noise signal into several 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 to be 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. Signals from specific parts are collected by electrodes as noise signals, such as collecting signals around the heart as electrocardiographic 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 dataset EEGdenoiseNet can also be used to obtain the data required for the experiment. This dataset provides two types of noisy EEG signals: EEG contaminated by EOG and EEG contaminated by EMG. The dataset initially downloads EEG, EOG, and EMG signals from a public dataset. These signals are then segmented into 2-second segments. After processing through the above steps, the dataset contains 4514 clean EEG segments, 3400 noisy EOG segments, and 5598 noisy EMG segments. The classification probability threshold τ can be 0.8, and in the experiment, t = 2 seconds.

[0059] Furthermore, to more comprehensively validate the EEG denoising method, we combined it with two other common noises found in real-world environments: ECG noise and motion noise. The ECG noise was obtained from the MIT-BIH arrhythmia dataset, while the motion noise was obtained from a public dataset proposed by Sweeney et al. in 2012. Through the above steps, the ECG noise consisted of 3600 segments, and the motion noise consisted of 2760 segments. Each segment had a duration of 2 seconds.

[0060] S12. By 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, a set of noisy electroencephalogram signals with a signal-to-noise ratio within a set range is constructed.

[0061] The linear mixing formula is as follows:

[0062] x C =x+λ·n

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

[0064]

[0065] Where N represents the length of the signal window, 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, adjusting λ can generate noisy EEG segments with an SNR range from -5dB to 5dB. In real-world scenarios, EEG signals are often contaminated by noise within this SNR range. Ultimately, four sets of noisy EEG signals can be synthesized.

[0067] S13. Use the clean EEG signal as a label and the noisy EEG signal as an input, so as to form a data set consisting 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 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%).

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

[0070] To capture the long-term temporal dependencies inherent in EEG signals, this method uses large convolution kernels as potential operations. 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 at different scales. Given that EEG signals are one-dimensional data, one-dimensional convolution and one-dimensional pooling operations are utilized here.

[0071] In this embodiment, Figure 2As shown, the search space O includes convolution operations, average pooling operations, and skip connection operations. In the figure, L×1 and P×1 represent the kernel sizes. To process one-dimensional EEG signals, one-dimensional convolution and one-dimensional pooling operations are used. During the convolution operation, the input signal first passes through the Reluctant Unit (ReLU) activation function. Both convolution and pooling operations undergo batch normalization before output. Skip connections do not perform any processing and directly output the input value.

[0072] First, we define the basic units used in the search neural network architecture: normal cells and reduction cells. Normal cells are used to extract features, while reduction cells are used to reduce the dimension of the feature graph. 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 on a processing node. The output of a basic unit is obtained by serializing all nodes within the unit. The output of a basic unit is composed of the outputs of the first two basic units in series. Intermediate nodes are calculated by the predecessor nodes and the corresponding operations. The calculation formula is:

[0073]

[0074] Where 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 an optional operation set.

[0075] In this embodiment, 6 basic units are set when searching the neural network architecture, including 4 ordinary units and 2 reduction units. 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.

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

[0077] The optimization method searches for the optimal neural network architecture by comprehensively searching for operations in the space. This embodiment can use a gradient-based method to search for the optimal combination of operations in the normal unit and the reduced unit. In step S3, the method for determining the optimal combination of operations specifically includes the following steps:

[0078] S31. 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] Where, 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] Where θ is the architecture parameter of the neural network, ω is the weight of the neural network; θ o Represents the network architecture weight parameters 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 θ influences the neural network architecture and ω determines the network's predictive performance. Here, we use the validation set performance 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 the 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 , the Adam optimizer with β1=0.5 and β2=0.99 is used to optimize the architecture parameters θ.

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

[0088]

[0089] Where, 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 point 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, multi-order differences (such as first-order and second-order differences) are performed on the original EEG, 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] Where, represents the difference in MSE calculated based on the reconstructed EEG signal and the pure EEG signal; and They 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 to α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 optimal 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. Inputting 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-mentioned scheme of the present invention, the proposed method (EEG denoising method of the present invention) is compared with a fully connected neural network (FCNN), a simple convolutional neural network (SCNN), a 1D-ResCNN, a recurrent neural network (RNN), a novel convolutional neural network (Novel CNN), and a differentiable architecture search method (DARTS) without adding a large convolution kernel. The correlation coefficient (CC), relative root mean square error (RRMSE), and signal-to-noise ratio (SNR) are used as indicators to measure the level of EEG denoising. The larger the CC and SNR values ​​and 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] As can be seen from Table 1, the present invention has better EEG denoising performance than existing denoising methods and neural network architecture search methods that are 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, and significantly improve the EEG denoising level while reducing the burden of manually designing the architecture. 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 predefining 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 help to mine the global and local information in the noisy EEG signal; (3) neural network architecture search, that is, assigning a probability to each potential operation in the model architecture, and finding 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. This invention avoids the process of experts investing a lot of time and energy in designing an effective neural network model architecture. The noise reduction model trained based on the searched architecture can efficiently remove various noises, and is expected to promote the advancement of EEG noise reduction 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 smartphone, tablet computer, laptop computer, etc. that can execute a program. In some embodiments, the processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. 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, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), 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, a magnetic disk, an optical disk, etc. In some embodiments, the storage medium may be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the storage medium may also be an external storage device of the computer device, such as a plug-in hard disk equipped on the computer device, a smart media card (SMC), a secure digital (SD) card, a flash memory card, etc. Of course, the storage medium may also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory is generally used to store the operating system and various application software installed on the computer device. In addition, the memory may also be used to temporarily store various types of data that have been output or are about to be output.

[0109] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.

Claims

1. An EEG denoising method based on neural network architecture search, characterized in that: Including steps: S1. Obtain a dataset containing clean 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; S2. Define a neural network architecture search space, which includes convolution operations, average pooling operations, and skip connection operations. Convolution operations include a small convolution operation with a kernel size of 3×3 and multiple convolution operations with kernel sizes larger than 3×3 and increasing in size. The basic units used in the neural network architecture search are divided into normal units and reduced units. Normal units are used to extract features, while reduced units are used to reduce the dimensionality of feature maps. S3. Using the training set and the validation set, searching for an optimal combination of operations within the common units and the reduced units in the neural network architecture search space to determine an optimal neural network architecture, and optimizing the model parameters of the EEG denoising model using the optimal neural network architecture, thereby obtaining a trained and verified EEG denoising model. In step S3, the method for determining the optimal combination of operations specifically comprises the following steps: S31. Use the softmax function that includes all possible operations to relax the selection of specific operations between nodes. The calculation process is expressed as: Where, Represents the comprehensive output of all current operations; o and o' both represent operations; vector and are the mixed weights of operations associated with operations o and o'; e is the natural base; 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 an optional operation set; 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: Where θ is the architecture parameter of the neural network, ω is the weight of the neural network; θ o Represents the network architecture weight parameters 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; in step S33, the training loss and validation loss The loss function is constructed by calculating the difference between the EEG signal after model noise reduction and the real pure EEG signal. The MSE is defined as follows: Where, 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 point 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: Where, represents the difference in MSE calculated based on the reconstructed EEG signal and the pure EEG signal; and They 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; Indicates the loss of frequency components; α1 to α4 indicate the weights of the 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 performing Z-score normalization on the power spectrum density obtained by fast Fourier transform. 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 Down-optimize the denoising model weights to search for the best neural network architecture; S4. Inputting the EEG data to be processed into the EEG denoising model for denoising processing.

2. The EEG 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 both batch normalized before output.

3. The EEG denoising method based on neural network architecture search according to claim 1, characterized in that: In step S2, 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 serially operating all 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 nodes are calculated by the predecessor nodes and the corresponding operations, and the calculation formula is:

4. The EEG 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 normal units and 2 reduction units. 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. 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.

5. The EEG 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. Prepare a clean EEG signal and collect multiple noise signals, and segment the clean EEG signal and each noise signal into several single-channel signal windows of specific duration; S12. 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, thereby constructing a set of noisy EEG signals having a signal-to-noise ratio within a set range; S13. Use the clean EEG signal as a label and the noisy EEG signal as an input, so as to form a data set consisting of the clean EEG signal and the noisy EEG data corresponding to the various noise signals.

6. The EEG denoising method based on neural network architecture search according to claim 5, 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 electrodes are used to collect signals around the heart as electrocardiographic noise, signals around the eyes as electrooculographic noise, and signals around the masseter muscles of the head as electromyographic noise, and each noise signal is divided into multiple single-channel signal windows with a duration of t=2s.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: 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 6 are implemented.

8. 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 6 are implemented.

Citation Information

Patent Citations

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

    CN113361484A

  • Electromagnetic signal feature intelligent classification method and model based on lightweight progressive microarchitecture search

    CN118509287A