Electroencephalogram data enhancement and classification method and related equipment

By using an end-to-end training framework based on a conditional autoencoder diffusion model, the isolated optimization problem of EEG signal enhancement and classification tasks is solved, achieving efficient EEG signal classification and enhancement, and improving the robustness and generalization ability of the model.

CN120850079APending Publication Date: 2025-10-28SHAANXI UNIV OF SCI & TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510887928.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing methods for enhancing and classifying EEG signals suffer from problems such as insufficient data generation and distribution modeling, isolated optimization of generation and classification tasks, and insufficient classification robustness and feature discriminativeness, leading to latent space mismatch and error accumulation.

Method used

We employ a conditional autoencoder diffusion model, using a joint training framework of conditional autoencoder, denoising diffusion probability model, and classifier. By utilizing skip connection mechanism and joint loss function for synchronous optimization, we construct an end-to-end EEG data augmentation and classification method to dynamically compensate for information loss during the diffusion process.

Benefits of technology

It significantly improves the robustness and generalization ability of EEG signal classification, increases classification accuracy and cross-scenario applicability, and enhances the fidelity and feature discriminativeness of signal enhancement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120850079A_ABST
    Figure CN120850079A_ABST
Patent Text Reader

Abstract

The invention discloses an electroencephalogram data enhancement and classification method and related equipment, relates to the cross technical field of artificial intelligence and neural signal processing, and aims to overcome the defects that high-frequency information is lost when electroencephalogram signals are generated by a traditional diffusion model, and potential space mismatch is caused by isolation and optimization of a generation-classification task. Proposing an end-to-end joint training framework of a conditional auto-encoding diffusion model, modeling a degeneration and reconstruction process of an electroencephalogram signal through a de-noising diffusion model, and dynamically compensating information loss in a diffusion process by using a jump connection mechanism of a conditional auto-encoder; according to the method, the robustness and generalization ability of electroencephalogram signal classification are remarkably improved through end-to-end joint optimization of generation and classification tasks, and the robustness and generalization ability of electroencephalogram signal classification are improved; and an efficient solution is provided for the fields of target classification, signal enhancement, physiological signal analysis and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of artificial intelligence and neural signal processing, specifically relating to a method and related equipment for enhancing and classifying electroencephalogram (EEG) data. Background Technology

[0002] Existing methods for enhancing and classifying EEG signals are mainly based on the analysis of neural oscillation characteristics of EEG signals, but they still face significant technical bottlenecks due to limitations in data quality and model design. Insufficient data generation and distribution modeling. Traditional diffusion models generate data by progressively injecting noise through Markov chains, but their forward diffusion process easily leads to the loss of high-frequency features. Studies have shown that when generating high-dimensional EEG signals, traditional diffusion models can have power spectrum errors exceeding 15% in specific frequency bands, and the significant difference between the generated data and the true distribution greatly limits their usability in classification tasks. Furthermore, while existing generative models can generate diverse samples, they lack explicit modeling of the signal degradation process, making it difficult to adapt to the noise characteristics of EEG signals.

[0003] The generation and classification tasks are optimized in isolation. Existing generation-classification cascade frameworks train data augmentation and classification tasks in separate stages, leading to latent space mismatch and error accumulation. For example, the DPTA-LC method relies on two-stage training, resulting in a mismatch between the generated data and the classifier's latent space, achieving a classification accuracy of only 83.96% and a recall as low as 76.14%. Such methods cannot achieve dynamic alignment between generation and classification tasks, limiting the model's generalization ability across subject data.

[0004] Insufficient classification robustness and feature discriminative power. Existing methods mostly rely on handcrafted features such as wavelet transform, power spectral density, or single deep learning models, which are sensitive to noise and struggle to model cross-frequency band coupling features. Graph convolution-based methods rely on predefined lead topologies and cannot dynamically capture the spatiotemporal evolution characteristics of EEG signals; while multi-scale spatiotemporal models, although introducing time-warped data enhancement, only achieve a classification accuracy of 86.70%. Furthermore, traditional methods have limited ability to model the asymmetry of key frequency band features, leading to blurred classification boundaries. Summary of the Invention

[0005] The purpose of this invention is to provide a method and related equipment for EEG data augmentation and classification, in order to solve the technical problem that the existing technology uses a "generation-classification" cascade framework to train data augmentation and classification tasks in stages, resulting in latent space mismatch and error accumulation.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: A method for augmenting and classifying electroencephalogram (EEG) data includes the following steps: The target frequency band features of the EEG signal are obtained, and the target frequency band features of the EEG signal are input into the trained conditional autoencoder diffusion model to output the predicted probability of the EEG signal category. The conditional autoencoder diffusion model is constructed based on a conditional autoencoder, a denoised diffusion probability model, and a classifier. The training process of the conditional autoencoder diffusion model is as follows: The target frequency band features of the EEG signal are input into the encoder of the conditional autoencoder, and the output is a latent vector. The target frequency band features of the EEG signal are input into the denoising diffusion probability model. Noise is injected during the forward diffusion process of the denoising diffusion probability model to generate noisy intermediate features. During the reverse denoising process of the diffusion model, the intermediate features of each layer are extracted step by step, and the denoising reconstruction loss function of the diffusion model is calculated. The extracted intermediate features are input into the decoder of the conditional autoencoder through skip connections. The decoder of the conditional autoencoder obtains the conditional autoencoder reconstruction loss function based on the latent vector output by the encoder and the intermediate features of the diffusion model. The latent vector is input into the classifier, which outputs the predicted probability of the EEG signal category. During model training, a joint loss function is constructed based on the denoising and reconstruction loss function of the diffusion model, the reconstruction loss function of the conditional autoencoder, and the classifier loss function. The joint loss function is then used to simultaneously optimize the conditional autoencoder, the denoising and diffusion probability model, and the classifier.

[0007] Furthermore, the process of acquiring the target frequency band features of the EEG signal includes: Bandpass filtering, power frequency interference elimination, independent component analysis artifact removal, and channel-level normalization are performed on EEG signals to extract target frequency band features.

[0008] Furthermore, the denoising diffusion probability model adopts a time-conditional one-dimensional UNet structure.

[0009] Furthermore, the step of inputting noisy intermediate features into the decoder of the conditional autoencoder via the skip connections is as follows: In the reverse denoising process of the denoising diffusion probability model, the intermediate feature maps of each layer of UNet are extracted; By connecting intermediate feature maps across layers to the corresponding layers of the decoder of the input conditional autoencoder, information loss during the forward diffusion process is dynamically compensated.

[0010] Furthermore, the joint loss function is:

[0011] In the formula, Denotes the joint loss function. The alignment loss function between the encoder latent vector of the conditional autoencoder and the intermediate features of the denoising diffusion probability model is denoised as follows: Let be the classifier loss function. These are dynamic weighting coefficients.

[0012] Furthermore, the alignment loss function formula for the encoder latent vector of the conditional autoencoder and the intermediate features of the denoising diffusion probability model is as follows:

[0013] In the formula, The denoising and reconstruction loss function for the diffusion model is... Let be the reconstruction loss function of the conditional autoencoder; The loss function of the classifier is:

[0014] In the formula, Indicates the true label, This represents the predicted probability, and N represents the sample size.

[0015] Furthermore, the adjustment formula for the dynamic weighting coefficient is as follows:

[0016] In the formula, , , t is the current training round number.

[0017] Secondly, this invention provides an EEG data augmentation and classification system, comprising a model training module and a model output module, wherein: Model training module: used to input the target frequency band features of EEG signals into the encoder of the conditional autoencoder and output the latent vector; The target frequency band features of the EEG signal are input into the denoising diffusion probability model. Gaussian noise is injected into the forward diffusion process of the denoising diffusion probability model to generate a noisy intermediate feature representation. In the reverse denoising process of the diffusion model, the intermediate features of each layer are extracted step by step, and the denoising reconstruction loss function of the diffusion model is calculated. The extracted intermediate features are input into the decoder of the conditional autoencoder through a skip connection mechanism. The decoder of the conditional autoencoder reconstructs the target EEG signal based on the latent vector output by the encoder and the intermediate features of the diffusion model, and is used to calculate the reconstruction loss function of the conditional autoencoder. The latent vector is input into the classifier, which outputs the predicted probability of the EEG signal category. During model training, a joint loss function is constructed based on the denoising reconstruction loss function of the diffusion model, the conditional autoencoder reconstruction loss function, and the classifier loss function. The joint loss function is then used to simultaneously optimize the conditional autoencoder, the denoising diffusion probability model, and the classifier. Model output module: Used to obtain the target frequency band features of EEG signals, input the target frequency band features of EEG signals into the trained conditional autoencoder diffusion model, and output the predicted probability of EEG signal category.

[0018] Thirdly, a terminal device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.

[0019] Fourthly, a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.

[0020] Compared with the prior art, the present invention has the following beneficial technical effects: This invention provides a method for EEG data augmentation and classification. Addressing the shortcomings of traditional diffusion models in generating EEG signals, such as high-frequency information loss and latent space mismatch caused by isolated optimization of the "generation-classification" task, this invention proposes an end-to-end joint training framework for a conditional autoencoder diffusion model. It models the degradation and reconstruction process of EEG signals using a denoising diffusion model and dynamically compensates for information loss during the diffusion process using the skip connection mechanism of the conditional autoencoder. Simultaneously, a joint loss function is used to synchronously optimize the conditional autoencoder, the denoising diffusion probability model, and the classifier. Through end-to-end joint optimization of the generation and classification tasks, this invention significantly improves the robustness and generalization ability of EEG signal classification, providing an efficient solution for target classification, signal augmentation, and physiological signal analysis. Attached Figure Description

[0021] Figure 1 A flowchart of a brainwave data augmentation and classification method; Figure 2 This is a flowchart illustrating a method for enhancing and classifying electroencephalogram (EEG) data in an embodiment of the present invention. Figure 3 This is a system architecture diagram of the conditional autoencoder diffusion model CAEDiff in an embodiment of the present invention; Figure 4 This is a schematic diagram of an improved temporally conditional UNet structure in an embodiment of the present invention, highlighting the temporal embedding and skip connection design. Figure 5 This is a structural diagram of a conditional autoencoder in an embodiment of the present invention; Figure 6This is the dynamic weight adjustment curve in an embodiment of the present invention, used for verification. A diagram illustrating the exponential growth trend of the value with the number of training rounds; Figure 7 This is a performance comparison chart between the method proposed in this invention and different algorithms in the prior art; Figure 8 This is a comparative diagram of ablation experiments using the method proposed in this invention. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0023] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] The present invention will now be described in further detail with reference to the accompanying drawings: like Figure 1 As shown, a method for EEG data augmentation and classification includes the following steps: The target frequency band features of the EEG signal are obtained, and the target frequency band features of the EEG signal are input into the trained conditional autoencoder diffusion model to output the predicted probability of the EEG signal category. The target frequency band features of EEG signals are obtained through preprocessing of the raw EEG signals. The preprocessing steps specifically include: A zero-phase Butterworth bandpass filter is used for filtering in the 0.5Hz-45Hz frequency band, preserving... Wave (4-8Hz) and Frequency characteristics of the wave (8-13Hz); Environmental interference was eliminated using a 50Hz power frequency notch filter, and the noise suppression effect was verified by sliding window spectrum analysis. The FastICA algorithm was used to decompose the EEG signal into 30 independent components. The signal was then reconstructed after manually verifying and removing eye movement and electromyography artifacts. Z-score normalization is performed on the 2-second non-overlapping segment of each channel, using the following formula: in, and These represent the mean and standard deviation of the channel signal, respectively.

[0026] The conditional autoencoder diffusion model is constructed based on a conditional autoencoder, a denoised diffusion probability model, and a classifier. The training process of the conditional autoencoder diffusion model is as follows: Step 1: Input the target frequency band features of the EEG signal into the encoder of the conditional autoencoder, and output the latent vector; Conditional autoencoders (CAEs) include: The encoder consists of five stacked one-dimensional convolutional layers, outputting a 256-dimensional latent vector, which is then concatenated with the external conditional vector to generate a conditionally enhanced latent representation. Decoder: Receives the encoder output and intermediate features from the DDPM, and reconstructs the EEG signal through deconvolution. The formula is:

[0027] in, For DDPM in time step The intermediate features.

[0028] Step 2: Input the target frequency band features of the EEG signal into the denoising diffusion probability model, inject noise during the forward diffusion process of the denoising diffusion probability model, generate noisy intermediate features, and obtain the denoising reconstruction loss function of the diffusion model. The denoising diffusion probability model adopts a time-conditional one-dimensional UNet structure.

[0029] Integrating channel-spatial attention (CBAM) into the denoising diffusion probability model (DDPM) enhances the ability to jointly model key frequency band features and lead topology relationships.

[0030] Channel attention: Channel weights are generated through global average pooling and max pooling to enhance the feature response of specific frequency bands in the prefrontal cortex; Spatial attention: Generate spatial masks based on the topological relationship of electrode positions to enhance the modeling of functional connectivity between leads.

[0031] Step 3: The noisy intermediate features are input into the decoder of the conditional autoencoder through skip connections. The decoder of the conditional autoencoder obtains the conditional autoencoder reconstruction loss function based on the latent vector output by the encoder and the noisy intermediate features. The steps of inputting noisy intermediate features into the decoder of the conditional autoencoder via skip connections are as follows: In the reverse denoising process of the denoising diffusion probability model, the intermediate feature maps of each layer of UNet are extracted; By connecting intermediate feature maps across layers to the corresponding layers of the decoder of the input conditional autoencoder, information loss during the forward diffusion process is dynamically compensated.

[0032] Step 4: Input the latent vector into the classifier and output the predicted probability of the EEG signal category; During model training, a joint loss function is constructed based on the denoising and reconstruction loss function of the diffusion model, the reconstruction loss function of the conditional autoencoder, and the classifier loss function. The joint loss function is then used to simultaneously optimize the conditional autoencoder, the denoising and diffusion probability model, and the classifier.

[0033] In terms of loss function design, the joint training framework adopts a triple loss optimization strategy, including DDPM denoising loss, CAE feature alignment loss, and classification loss.

[0034] DDPM's denoising loss ensures that the generated signal maintains high fidelity at the signal level, while CAE's feature alignment loss forces the encoder to... Extracted latent features The model aligns with the feature space generated by the diffusion model, while the classification loss constrains the CAE encoder to extract more discriminative latent features. Finally, through a joint optimization strategy, the model achieves collaborative learning between the generation and classification tasks during training, improving the applicability of EEG data augmentation to classification tasks.

[0035] In one embodiment of the present invention, a method for enhancing and classifying electroencephalogram (EEG) data is provided, the specific steps of which are as follows: Figure 2 As shown, the system architecture of the conditional autoencoder diffusion model CAEDiff is as follows: Figure 3 As shown: Step 1: EEG data preprocessing, including filtering, artifact removal, windowing and segmentation, and normalization, to obtain standardized EEG data segments; A multichannel electroencephalogram (EEG) dataset was used, employing a standard 128-channel EEG cap with electrodes placed according to the international 10-20 system, and a sampling frequency of 250 Hz. To ensure data quality, environmental noise was controlled and labeled events were recorded during the acquisition process.

[0036] The raw EEG signals undergo the following preprocessing steps: Use a 0.5-45Hz bandpass filter to filter out high-frequency electromyography and low-frequency drift; Use a 50Hz notch filter to remove power frequency interference; The FastICA method was used to decompose the EEG signal into multiple independent components, and eye movement, blinking and electromyography artifacts were removed through manual review. The preprocessed signal was divided into 2-second non-overlapping segments; Baseline correction is performed on each segment based on the previous 500ms. Z-score normalization is performed on each channel signal to eliminate amplitude shift caused by impedance differences across individual channels.

[0037] Step 2: Input the EEG segments into a conditional autoencoder (CAE) encoder to extract deep temporal features; The structure of the conditional autoencoder module is as follows: Figure 5 As shown, the process of constructing a conditional autoencoder (CAE) module is as follows: The preprocessed EEG segments are input into the encoder part of the conditional autoencoder to extract latent representations. The encoder adopts a five-layer one-dimensional convolutional network structure, with each layer followed by GroupNorm and PReLU activation functions, and the temporal dimension is compressed by adaptive average pooling to output a 256-dimensional latent vector.

[0038] To enhance the task relevance of the latent representation, the target label is embedded to construct a 256-dimensional conditional vector, which is then concatenated with the encoder output to form the final conditional representation. This conditional latent vector is used for subsequent decoding, reconstruction, and classification tasks.

[0039] Step 3: Use the Denoising Diffusion Probability Model (DDPM) to perform noise addition and denoising processes on the target frequency band features of the EEG signal, extract intermediate features, and send them to the CAE decoder through skip connections; The process of constructing the Denoising Diffusion Model Module (DDPM) is as follows: This module uses the Denoising Diffusion Probabilistic Model (DDPM) to model EEG signals, generating enhanced samples and compensating for missing encoder features.

[0040] Its main processes include: Forward diffusion process: Gaussian noise is gradually injected into the original signal at multiple time steps to simulate data degradation; Inverse denoising process: Training a neural network to gradually recover the signal distribution from noise; like Figure 4As shown, the network structure of the denoising diffusion probability model adopts a time-conditional one-dimensional UNet architecture, and introduces time step embedding to enhance the model's ability to model the diffusion stage. In the reverse process, intermediate feature representations are extracted from multiple time steps and used for subsequent jump connections to the CAE decoder.

[0041] The latent vectors extracted by the CAE encoder are fused with the intermediate features from the DDPM backward process. The fusion method is skip connections: the features from each layer of DDPM are connected to the CAE decoder at corresponding positions to compensate for the information loss caused by the forward process of the diffusion model.

[0042] The CAE decoder structure is symmetrical to the encoder, consisting of stacked deconvolutional layers, group normalization, and activation functions. The input includes the encoder output and intermediate features from the DDPM (Digital Deposition Processing Unit), and the output is the reconstructed EEG signal. Step 4: Employ a dynamic weighting strategy to jointly optimize the feature alignment loss and classification loss, and use the classifier to output the classification result; The latent vector output by the CAE encoder is also simultaneously input into the classifier, which consists of a three-layer fully connected neural network and ultimately outputs the probability distribution of the target category.

[0043] The classifier is trained using the cross-entropy loss function, with the goal of improving the ability of latent features to distinguish task-related features.

[0044] Specifically, the process of constructing the joint training optimization module is as follows: To achieve collaborative optimization of generation and classification tasks, this invention designs the following joint loss function:

[0045]

[0046] Where: L align This is used as the alignment loss between the latent features of the CAE encoder and the intermediate features of the DDPM, thereby improving the consistency of the feature space. L cls For classification loss, the constrained encoder extracts discriminative representations; L DDPM This serves as the denoising and reconstruction loss for the diffusion model, ensuring the authenticity of the generated samples. The weights are dynamic and adjust adaptively with training iterations using an exponential growth method, enhancing generation accuracy in the early stages and improving classification performance in later stages. Figure 6 Convergence curves for different losses are presented to verify the stability of the model training.

[0047] The entire model is trained end-to-end, with the optimization objective being to minimize the joint loss. The RMSProp optimizer and cosine learning rate scheduling strategy are used for training.

[0048] It should be noted that this invention was experimentally validated on publicly available EEG datasets. Five-fold cross-validation was used to evaluate model performance, such as... Figure 7 As shown, experimental results demonstrate that the method of this invention significantly outperforms traditional feature engineering methods, graph neural network methods, and generative model methods in multiple metrics, including classification accuracy, F1 score, recall, and AUC. Specifically, the classification accuracy reaches 92.86%, the F1 score reaches 90.91%, and the AUC reaches 86.87%. Furthermore, as... Figure 8 As shown, ablation experiments verified the key role of the combined DDPM and CAE structure in performance improvement.

[0049] In another embodiment of the present invention, an EEG data augmentation and classification system is provided, including a model training module and a model output module, wherein: Model training module: used to input the target frequency band features of EEG signals into the encoder of the conditional autoencoder and output the latent vector; The target frequency band features of the EEG signal are input into the denoising diffusion probability model. Gaussian noise is injected into the forward diffusion process of the denoising diffusion probability model to generate a noisy intermediate feature representation. In the reverse denoising process of the diffusion model, the intermediate features of each layer are extracted step by step, and the denoising reconstruction loss function of the diffusion model is calculated. The extracted intermediate features are input into the decoder of the conditional autoencoder through a skip connection mechanism. The decoder of the conditional autoencoder reconstructs the target EEG signal based on the latent vector output by the encoder and the intermediate features of the diffusion model, and is used to calculate the reconstruction loss function of the conditional autoencoder. The latent vector is input into the classifier, which outputs the predicted probability of the EEG signal category. During model training, a joint loss function is constructed based on the denoising reconstruction loss function of the diffusion model, the conditional autoencoder reconstruction loss function, and the classifier loss function. The joint loss function is then used to simultaneously optimize the conditional autoencoder, the denoising diffusion probability model, and the classifier. Model output module: Used to obtain the target frequency band features of EEG signals, input the target frequency band features of EEG signals into the trained conditional autoencoder diffusion model, and output the predicted probability of EEG signal category.

[0050] Compared with the prior art, the present invention has the following advantages: High-fidelity EEG data generation capability: Leveraging the advantages of diffusion models in modeling high-dimensional temporal data, EEG signals that closely resemble real neural features are generated, which helps improve reconstruction accuracy and compensate for the loss of high-frequency features during the forward diffusion process, thereby enhancing the encoder's latent representation learning ability.

[0051] Information loss compensation mechanism: By using the mechanism of skip connection between CAE and DDPM intermediate layer, the problem of loss of detailed information in the forward process of diffusion model is effectively solved, and the integrity of reconstructed signal is improved.

[0052] Strong task collaboration and optimization capabilities: This invention integrates the two major tasks of generation and classification, and constructs explicit connections in the latent space through feature alignment loss, breaking the problem of task separation in traditional methods and significantly improving classification performance.

[0053] The dynamic weight adjustment strategy is stable and efficient: by introducing a time-dependent dynamic weighting mechanism, the optimization focus is reasonably allocated in different training stages, thereby improving the model training efficiency and final performance.

[0054] Enhanced classification performance and robustness: Test results on publicly available EEG datasets show that the proposed method outperforms existing mainstream methods in multiple metrics, including accuracy, F1-score, and AUC. Its cross-scene generalization ability and noise resistance are significantly improved. Ablation experiments verify the effectiveness of the joint training strategy in preserving high-frequency features, and the performance degradation in noisy environments is reduced compared to traditional methods.

[0055] High scalability: The core architecture of this invention, with its dynamic weight optimization, cross-model feature compensation, and multi-dimensional attention mechanism, has general temporal signal processing capabilities and can be extended to diverse scenarios such as physiological state monitoring, brain-computer interface control, and abnormal signal detection, providing efficient technical support for complex EEG pattern recognition.

[0056] In another embodiment of the present invention, a computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used to operate a brainwave data enhancement and classification method based on two-layer routing attention and Informer networks.

[0057] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the EEG data augmentation and classification method based on two-layer routing attention and Informer networks in the above embodiments.

[0058] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0059] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0060] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0061] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for augmenting and classifying electroencephalogram (EEG) data, characterized in that, Includes the following steps: The target frequency band features of the EEG signal are obtained, and the target frequency band features of the EEG signal are input into the trained conditional autoencoder diffusion model to output the predicted probability of the EEG signal category. The conditional autoencoder diffusion model is constructed based on a conditional autoencoder, a denoised diffusion probability model, and a classifier. The training process of the conditional autoencoder diffusion model is as follows: The target frequency band features of the EEG signal are input into the encoder of the conditional autoencoder to extract the latent vector. The target frequency band features of the EEG signal are input into the denoising diffusion probability model. Gaussian noise is injected into the forward diffusion process of the denoising diffusion probability model. Then, the intermediate features containing noise are generated through the reverse denoising process. In the reverse denoising process of the diffusion model, the intermediate features of each layer are extracted step by step and the denoising reconstruction loss function of the diffusion model is calculated. The extracted intermediate features are input into the decoder of the conditional autoencoder through a skip connection mechanism. The decoder of the conditional autoencoder reconstructs the target EEG signal based on the latent vector output by the encoder and the intermediate features of the diffusion model, and is used to calculate the reconstruction loss function of the conditional autoencoder. The latent vector is input into the classifier, which outputs the predicted probability of the EEG signal category. During model training, a joint loss function is constructed based on the denoising and reconstruction loss function of the diffusion model, the reconstruction loss function of the conditional autoencoder, and the classifier loss function. The joint loss function is then used to simultaneously optimize the conditional autoencoder, the denoising and diffusion probability model, and the classifier.

2. The EEG data augmentation and classification method according to claim 1, characterized in that, The process of acquiring the target frequency band features of the EEG signal includes: Bandpass filtering, power frequency interference elimination, independent component analysis artifact removal, and channel-level normalization are performed on EEG signals to extract target frequency band features.

3. The EEG data augmentation and classification method according to claim 1, characterized in that, The denoising diffusion probability model adopts a time-conditional one-dimensional UNet structure.

4. The EEG data augmentation and classification method according to claim 1, characterized in that, The step of inputting noisy intermediate features into the decoder of the conditional autoencoder via the skip connections is as follows: In the reverse denoising process of the denoising diffusion probability model, the intermediate feature maps of each layer of UNet are extracted; By connecting intermediate feature maps across layers to the corresponding layers of the decoder of the input conditional autoencoder, information loss during the forward diffusion process is dynamically compensated.

5. The EEG data augmentation and classification method according to claim 1, characterized in that, The joint loss function is: Where, Denotes the joint loss function. The feature alignment loss function represents the relationship between the encoder latent representation of the conditional autoencoder and the intermediate features of the denoising diffusion probability model. Let the classifier loss function be... These are dynamic weighting coefficients.

6. The EEG data augmentation and classification method according to claim 5, characterized in that, The alignment loss function formula for the encoder latent vector and the intermediate features of the denoising diffusion probability model of the conditional autoencoder is as follows: Where, The denoising and reconstruction loss function for the diffusion model is... Let be the reconstruction loss function of the conditional autoencoder; The denoising loss function is: Where, For DDPM parameters, The raw EEG signal, The denoised EEG signal of DDPM; The loss function of the classifier is: In the formula, Indicates the true label, This represents the predicted probability, and N represents the sample size.

7. The EEG data augmentation and classification method according to claim 5, characterized in that, The adjustment formula for the dynamic weighting coefficient is as follows: Where, , , t is the current training round number.

8. A brainwave data augmentation and classification system, characterized in that, The EEG data augmentation and classification method according to any one of claims 1-7 includes a model training module and a model output module, wherein: Model training module: used to input the target frequency band features of EEG signals into the encoder of the conditional autoencoder and output the latent vector; The target frequency band features of the EEG signal are input into the denoising diffusion probability model. Noise is injected during the forward diffusion process of the denoising diffusion probability model to generate noisy intermediate features. During the reverse denoising process of the diffusion model, the intermediate features of each layer are extracted step by step, and the denoising reconstruction loss function of the diffusion model is calculated. The extracted intermediate features are input into the decoder of the conditional autoencoder through skip connections. The decoder of the conditional autoencoder obtains the conditional autoencoder reconstruction loss function based on the latent vector output by the encoder and the intermediate features of the diffusion model. The latent vector is input into the classifier, which outputs the predicted probability of the EEG signal category. During model training, a joint loss function is constructed based on the denoising reconstruction loss function of the diffusion model, the conditional autoencoder reconstruction loss function, and the classifier loss function. The joint loss function is then used to simultaneously optimize the conditional autoencoder, the denoising diffusion probability model, and the classifier. Model output module: Used to obtain the target frequency band features of EEG signals, input the target frequency band features of EEG signals into the trained conditional autoencoder diffusion model, and output the predicted probability of EEG signal category.

9. A terminal 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 computer program, it implements the steps of the method as described in any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.

Citation Information

Cited By

  • Brain-computer interface instruction issuing method, device and equipment based on regulation enhancement simulation

    CN121116079A