Method for removing electroencephalogram artifacts based on self-supervised learning and generative adversarial network

Through the combination method of self-supervised learning and generative adversarial network, the limitations and stability of existing EEG artifact removal methods are solved, and efficient artifact removal is achieved in different environments and individuals, which is suitable for real-time processing and analysis of EEG signals.

CN120372503APending Publication Date: 2025-07-25CHANGCHUN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510444577.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing EEG artifact removal methods have limitations on the selection of artifact types, and are difficult to deal with changes in complex artifacts, and their performance is unstable. Especially when the similarity between artifacts and EEG signals is strong, the artifact removal effect is poor, and the reliance on a large amount of manual labeling data limits universality.

Method used

The combination method of self-supervised learning and generative adversarial network is adopted to generate artifact signal tags through self-supervised learning, and the generative adversarial network is used to remove artifacts. Combined with transfer learning and reinforcement learning, the artifact removal strategy is dynamically adjusted to adapt to different individuals and environments.

Benefits of technology

It realizes that without large amounts of labeled data, the accuracy and robustness of artifact removal are improved, and it is highly adaptable. It can handle multiple artifacts in real time. It is suitable for different devices and individuals, and has efficient artifact removal effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure BDA0005352156250000022
    Figure BDA0005352156250000022
  • Figure BDA0005352156250000023
    Figure BDA0005352156250000023
Patent Text Reader

Abstract

The invention relates to the field of electroencephalogram signal preprocessing, in particular to an electroencephalogram artifact removing method based on self-supervised learning and a generative adversarial network, which comprises the following steps of: firstly, acquiring an original electroencephalogram signal and preprocessing the original electroencephalogram signal, automatically generating a label of an artifact signal by using a self-supervised learning model, learning the label to identify and extract an artifact component in the electroencephalogram signal, and further performing artifact removal on the original electroencephalogram signal through a generative adversarial network to obtain an artifact-removed electroencephalogram signal; then, a transfer learning method is used for conducting transfer training on the self-supervised learning model so that the self-supervised learning model can adapt to electroencephalogram signals of different individuals and environments, the wide applicability of the artifact removing effect can be ensured, finally, in the process of collecting the electroencephalogram signals in real time, an artifact removing strategy is dynamically adjusted, the artifact removing effect is optimized in combination with reinforcement learning, and the artifact removing effect is improved. And the real-time performance and the accuracy of the artifact removing effect are ensured. According to the method, the electroencephalogram signals can be processed in real time, a good artifact removing effect can be kept in different environments, and the method is suitable for real-time application of clinical or brain-computer interfaces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention is an electroencephalogram artifact removal method based on self-supervised learning and generative adversarial networks, belonging to the field of electroencephalogram signal preprocessing. Background Art

[0002] Electroencephalogram (EEG) is a bioelectrical signal widely used in fields such as neuroscience, clinical diagnosis, and brain-computer interfaces. By detecting the electrical activity of the cerebral cortex, EEG signals can provide valuable information about brain function. However, during the EEG signal acquisition process, it is often interfered by various artifacts, which mainly originate from non-EEG sources such as eye movements, muscle activities, and device noises. For example, electrooculogram artifacts (such as blinks and eye movements) and electromyogram artifacts (such as facial muscle activities) are common interference signals, which can cause distortion of EEG signals, thus affecting the effective analysis of EEG signals.

[0003] Existing EEG artifact removal methods include traditional methods based on filters and signal separation techniques such as independent component analysis (ICA). The filter method removes artifact signals in certain frequency bands by filtering the EEG signals in the frequency domain. However, this method often has limitations in the selection of artifact types and is difficult to cope with the changes of complex artifacts. The ICA method attempts to separate EEG signals and artifact components from the mixed signals by assuming that the components of EEG signals are independent of each other. However, this method depends on the statistical characteristics of the signals and has unstable performance when facing complex artifacts. Especially when the similarity between artifacts and EEG signals is strong, the artifact removal effect is poor.

[0004] In addition, existing methods generally rely on manually labeled data to train models, which requires a large amount of high-quality labeled data. The acquisition of labeled data not only takes a lot of time and manpower, but also it is often difficult to obtain sufficient labeled data in practical applications, which limits the universality and application scenarios of existing methods.

[0005] Therefore, how to improve the artifact removal effect of EEG signals by using advanced machine learning methods without a large amount of labeled data has become an urgent technical problem to be solved in the current field of EEG signal processing. Self-supervised learning and generative adversarial networks provide new ideas for solving this problem. Self-supervised learning can perform effective learning without labeled data, while generative adversarial networks can generate more realistic signals through the adversarial training of the generator and the discriminator, thereby improving the accuracy and robustness of artifact removal. Summary of the Invention

[0006] Aiming at the problems existing in the prior art, the present invention provides an EEG artifact removal method based on self-supervised learning and generative adversarial network, which solves the limitations in the selection of artifact types in the prior art, the difficulty in coping with the changes of complex artifacts, the unstable performance when facing complex artifacts, and especially the poor artifact removal effect when the similarity between artifacts and EEG signals is strong.

[0007] An EEG artifact removal method based on self-supervised learning and generative adversarial network, the specific steps of the method are as follows:

[0008] S1. Obtain the original EEG signal and preprocess the original EEG signal, and the preprocessing includes denoising, normalization, filtering and feature extraction:

[0009] S2. Use the self-supervised learning model to automatically generate labels of artifact signals and learn the labels to identify and extract artifact components in the EEG signal;

[0010] S3. Remove artifacts from the original EEG signal through a generative adversarial network, and the generative adversarial network includes a generator network and a discriminator network, where the generator network generates the artifact-removed EEG signal and the discriminator network discriminates the authenticity of the generated signal;

[0011] S4. Use the transfer learning method to perform transfer training on the self-supervised learning model to make it adapt to EEG signals of different individuals and environments, and ensure the wide applicability of the artifact removal effect;

[0012] S5. During the real-time acquisition of EEG signals, dynamically adjust the artifact removal strategy, and optimize the artifact removal effect in combination with reinforcement learning to ensure the real-time and accuracy of the artifact removal effect;

[0013] Further, the preprocessing step of step S1 further includes segmenting the EEG signal according to time windows and extracting statistical features within each time window for identifying potential artifact regions. The formulas for segmenting the time windows and extracting features are as follows:

[0014]

[0015] Where X segment represents the segmented EEG signal sequence, represents the signal within the time window t i The signal within.

[0016] The preprocessing step can be expressed by the following formula:

[0017] X pre = f pre (X) (2)

[0018] Further, in step S2, the self-supervised learning model is trained through the reconstruction task of generating artifact signals, which enables the self-supervised learning model to automatically learn and identify artifact signal features. This training task can be achieved by minimizing the reconstruction error between the artifact signals generated by the self-supervised learning model and the real signals:

[0019]

[0020] where X noisy is the original EEG signal containing artifacts; is the EEG signal after artifact removal output by the self-supervised model; is the gradient of the output signal, aiming to maintain the smoothness of the signal; λ is the balance term, used to control the weights of smoothness and signal recovery.

[0021] The goal of the self-supervised learning model is to minimize the reconstruction error, and the formula is:

[0022]

[0023] Further, the generative adversarial network (GAN) in step S3 is optimized through adversarial training, so that the EEG signals generated by the generative network can be as similar as possible to the artifact-free EEG signals, while the discriminative network ensures the authenticity of the generated signals. The loss function of adversarial training includes the alternating optimization of the generator and the discriminator:

[0024]

[0025] Further, the transfer learning method in step S4 fine-tunes the parameters of the self-supervised learning model to adapt to new user or experimental data, thereby improving the generalization ability of the model. The loss function of the target task is used for training during the fine-tuning process:

[0026]

[0027] where θ pretrained are the parameters of the pre-trained model, and θ target are the model parameters of the target task.

[0028] Further, the real-time adjustment step in step S5 includes dynamically adjusting the artifact removal strategy according to the characteristics of the real-time collected EEG signals, and using the reinforcement learning method for real-time optimization. The policy optimization formula in reinforcement learning is:

[0029]

[0030] where Q represents the state-action value function, α is the learning rate, γ is the discount factor, r is the reward, s′ is the next state, and a′ is the next action.

[0031] Beneficial effects

[0032] Compared with the existing EEG artifact removal methods, the present invention has the following beneficial effects:

[0033] 1) Different from the traditional EEG signal artifact removal methods, the present invention adopts self-supervised learning technology and uses unlabeled data for training, avoiding the cumbersome work and cost of manual labeling. This enables the method to have higher flexibility and adaptability in practical applications, especially suitable for the processing of large-scale EEG datasets.

[0034] 2) After combining with the generative adversarial network, the present invention can automatically generate EEG signals after artifact removal. The adversarial training of the generator and discriminator further improves the artifact removal ability of the model, making the artifact removal effect more accurate and having strong real-time performance. The generator can adaptively adjust the artifact removal strategy under different artifact conditions to achieve more efficient signal recovery.

[0035] 3) Due to the adoption of the combination of self-supervised learning and generative adversarial network, the present invention can be flexibly adjusted under different EEG signal conditions, has strong adaptability, and can handle various types of artifacts, such as motion artifacts, device noises, etc. Through transfer learning, this method can also be quickly adapted between different EEG devices and different individuals, further enhancing the generality and practical application value.

[0036] 4) The method of the present invention combines reinforcement learning and real-time acquisition mechanism, and can dynamically adjust the artifact removal strategy during the real-time acquisition of EEG signals. This makes the method have significant advantages in real-time EEG monitoring and analysis systems, can ensure the balance between real-time performance and artifact removal effect, and provides a more efficient solution for EEG applications. Brief description of the drawings

[0037] Figure 1 is the overall structural flowchart of the present invention; Detailed implementation manners

[0038] The following further describes the implementation of the present invention with reference to the drawings:

[0039] Att Figure 1 is a structural block diagram of an EEG artifact removal method based on self-supervised learning and generative adversarial network provided in an embodiment of the present invention. The method includes the following steps:

[0040] S1. Obtain the original EEG signal and preprocess the original EEG signal. Assume the original EEG signal is x(t), where t represents time. Use a filter to remove noise. The noise outside the frequency range can be removed by a band-pass filter. Assume the filter is H(f), then the filtered signal is

[0041]

[0042] where F represents the Fourier transform and F-1 represents the inverse Fourier transform;

[0043] Perform normalization processing on the signal:

[0044]

[0045] where μ x is the mean of the original signal x(t), and σ x is the standard deviation.

[0046] Assume that a band-pass filter H band (f) is used to remove the signals in the unwanted frequency bands, and the filtered signal is:

[0047]

[0048] S2. Use a self-supervised learning model to automatically generate labels for the artifact signals and learn the labels to identify and extract the artifact components in the EEG signals. Assume that the self-supervised model uses an autoencoder, and its goal is to minimize the reconstruction error between the input and the output. Define the input signal as x(t) and the reconstructed signal as Then the reconstruction error is:

[0049]

[0050] where T is the duration of the signal, and the training goal of the autoencoder is to minimize so as to learn the effective representation of the signal.

[0051] Artifact label generation:

[0052] Through the self-supervised learning model, automatically generate labels for the artifact components. Assume that the artifact component is yartifact(t), and there is a classifier C to predict the artifact labels, obtaining the label The generation of the artifact labels is based on model prediction:

[0053]

[0054] S3. Remove the artifacts from the original EEG signals through a generative adversarial network (GAN). The GAN model includes a generator G and a discriminator D. The goal of the generator is to generate the signal after artifact removal The goal of the discriminator is to judge whether the signal is real. Assume that the input of the generator is x(t), the output is G(x(t)), and the output of the discriminator is D(G(x(t))).

[0055] Goal of the generator: Minimize the output of the discriminator so that it is difficult to distinguish between real signals and generated signals:

[0056]

[0057] Goal of the discriminator: Maximize the output of the discriminator to correctly distinguish between real signals and generated signals:

[0058]

[0059] Training process:

[0060] By alternately training the generator and the discriminator, the generator can gradually generate signals after artifact removal

[0061] S4. Use the transfer learning method to perform transfer training on the self-supervised learning model. Assume that there is a pre-trained model f pretrain , and transfer learning adapts to the new dataset through fine-tuning. Assume that the new dataset is x’, and the goal of transfer learning is to minimize the loss function on the new dataset

[0062]

[0063] where is the signal predicted by the model.

[0064] Fine-tune the model: According to the transfer learning strategy, only fine-tune some layers of the network, which are the later convolutional layers or fully connected layers, and this can be achieved by setting a lower learning rate.

[0065] S5. In the real-time acquisition of EEG signals, dynamically adjust the artifact removal strategy, and combine reinforcement learning to optimize the artifact removal effect. In the real-time environment, reinforcement learning optimizes the artifact removal strategy through the reward signal. Assume that the signal at each time step is x(t), and the signal after artifact removal is Calculate the reward r(t) through real-time feedback to optimize the policy π:

[0066] r(t) = E[Quality of denoising]

[0067] Optimize the policy π by maximizing the cumulative reward:

[0068]

[0069] Finally, use the Q-Learning reinforcement learning algorithm to update the policy π, so as to continuously improve the artifact removal effect in the real-time signal processing.

[0070] The specific embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present invention within the scope of knowledge possessed by those of ordinary skill in the art.

Claims

1. A method for removing EEG artifacts based on self-supervised learning and generative adversarial networks, characterized by including: S1. Obtain the original EEG signal and preprocess the original EEG signal. The preprocessing includes denoising, normalization, filtering, and feature extraction. S2. Use a self-supervised learning model to automatically generate labels for the artifact signals and learn the labels to identify and extract the artifact components in the EEG signal. S3. Remove artifacts from the original EEG signal through a generative adversarial network (GAN). The generative adversarial network includes a generator network and a discriminator network. The generator network generates the artifact-removed EEG signal, and the discriminator network discriminates the authenticity of the generated signal. S4. Use transfer learning methods to perform transfer training on the self-supervised learning model to make it adapt to EEG signals of different individuals and environments, ensuring the wide applicability of the artifact removal effect. S5. During the real-time acquisition of EEG signals, dynamically adjust the artifact removal strategy, and optimize the artifact removal effect in combination with reinforcement learning to ensure the real-time performance and accuracy of the artifact removal effect.

2. The EEG artifact removal method based on self-supervised learning and generative adversarial network according to claim 1, wherein: In step S1, the preprocessing step further includes segmenting the EEG signal by time window and extracting the statistical features within each time window for identifying potential artifact regions. The formulas for time window segmentation and feature extraction are as follows: where Xsegment represents the segmented EEG signal sequence, represents the signal within the time window ti.

3. A method for removing EEG artifacts based on self-supervised learning and generative adversarial network according to claim 1, characterized in that: In step S2, the self-supervised learning model is trained through the reconstruction task of generating artifact signals. This task enables the self-supervised learning model to automatically learn and identify artifact signal features. This training task can be achieved by minimizing the reconstruction error between the artifact signals generated by the self-supervised learning model and the real signals: Among them, Xnoisy is the original EEG signal containing artifacts; is the artifact-removed EEG signal output by the self-supervised model; is the gradient of the output signal, aiming to maintain the smoothness of the signal; λ is a balancing term used to control the weights of smoothness and signal recovery.

4. The EEG artifact removal method based on self-supervised learning and generative adversarial network according to claim 1, characterized in that: In step S3, the generative adversarial network (GAN) is optimized through adversarial training, making the EEG signal generated by the generator network as similar as possible to the artifact-free EEG signal, while the discriminator network ensures the authenticity of the generated signal. The loss function of adversarial training includes the alternating optimization of the generator and the discriminator:

5. The method for removing electroencephalogram artifacts based on self-supervised learning and generative adversarial network according to claim 1, characterized in that: In step S4, the transfer learning method adjusts the parameters of the self-supervised learning model through fine-tuning to make it adapt to new user or experimental data, thereby improving the generalization ability of the model. The loss function of the target task is used for training during the fine-tuning process:

6. The EEG artifact removal method based on self-supervised learning and generative adversarial network according to claim 1, characterized in that: In step S5, the real-time adjustment step includes dynamically adjusting the artifact removal strategy according to the features of the real-time acquired EEG signal and using reinforcement learning methods for real-time optimization. The formula for policy optimization in reinforcement learning is: where Q represents the state-action value function, α is the learning rate, γ is the discount factor, r is the reward, s′ is the next state, and a′ is the next action.